@markusylisiurunen/tau 0.3.96 → 0.3.98
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/dist/code_mode/runtime.js +1 -1
- package/dist/code_mode/runtime.js.map +1 -1
- package/dist/core/code_mode/agents.js +9 -1
- package/dist/core/code_mode/agents.js.map +1 -1
- package/dist/core/code_mode/models.js +69 -21
- package/dist/core/code_mode/models.js.map +1 -1
- package/dist/core/config/content_loader.js +27 -1
- package/dist/core/config/content_loader.js.map +1 -1
- package/dist/core/config/schema.js +9 -3
- package/dist/core/config/schema.js.map +1 -1
- package/dist/core/models/model_id.js +12 -0
- package/dist/core/models/model_id.js.map +1 -0
- package/dist/core/models/openrouter.js +63 -52
- package/dist/core/models/openrouter.js.map +1 -1
- package/dist/core/models/openrouter_budget.js +54 -0
- package/dist/core/models/openrouter_budget.js.map +1 -0
- package/dist/core/models/openrouter_media.js +20 -17
- package/dist/core/models/openrouter_media.js.map +1 -1
- package/dist/core/runtime/chat_runtime.js +25 -3
- package/dist/core/runtime/chat_runtime.js.map +1 -1
- package/dist/core/session/auto_compaction_threshold.js.map +1 -1
- package/dist/core/static/code_mode/sandbox_runner.mjs +1 -1
- package/dist/core/static/index.js +4 -6
- package/dist/core/static/index.js.map +1 -1
- package/dist/core/static/tau_docs/code-mode.md +2 -2
- package/dist/core/static/tau_docs/history.md +1 -1
- package/dist/core/static/tau_docs/node-sdk.md +1 -1
- package/dist/core/static/tau_docs/openrouter.md +11 -10
- package/dist/core/static/tau_docs/personas.md +15 -0
- package/dist/core/static/tau_docs/session-protocol-methods.md +3 -3
- package/dist/core/static/tau_docs/session-protocol.md +2 -2
- package/dist/core/static/tau_docs/sessions.md +10 -3
- package/dist/core/static/tau_docs/subagents.md +11 -1
- package/dist/core/static/tau_docs/telegram.md +35 -5
- package/dist/core/static/tau_docs/tui.md +2 -2
- package/dist/core/subagents/claude_code_runner.mjs +55 -50
- package/dist/core/subagents/launch_model.js +4 -7
- package/dist/core/subagents/launch_model.js.map +1 -1
- package/dist/core/subagents/native_subagent_runtime.js +1 -1
- package/dist/core/subagents/native_subagent_runtime.js.map +1 -1
- package/dist/core/subagents/registry.js.map +1 -1
- package/dist/core/telegram/adapter.js +46 -29
- package/dist/core/telegram/adapter.js.map +1 -1
- package/dist/core/telegram/config.js +9 -1
- package/dist/core/telegram/config.js.map +1 -1
- package/dist/core/telegram/local_session_client.js +4 -1
- package/dist/core/telegram/local_session_client.js.map +1 -1
- package/dist/core/telegram/runtime.js +8 -0
- package/dist/core/telegram/runtime.js.map +1 -1
- package/dist/core/telegram/session_manager.js.map +1 -1
- package/dist/core/tool/openrouter.js +1 -1
- package/dist/core/tool/openrouter.js.map +1 -1
- package/dist/core/tools/catalog.js +1 -0
- package/dist/core/tools/catalog.js.map +1 -1
- package/dist/core/tools/code_mode_worker.js +2 -2
- package/dist/core/tools/code_mode_worker.js.map +1 -1
- package/dist/core/utils/model_notices.js +0 -19
- package/dist/core/utils/model_notices.js.map +1 -1
- package/dist/core/version.js +1 -1
- package/dist/diff_tool/app/dist/assets/{apl-oXhhIufm.js → apl-B2CApK1w.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{astro-BSfvy1I6.js → astro-BngVf-Vk.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{blade-BPJIqBv7.js → blade-CJoxmvIk.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{core-NkxL1yZC.js → core-D8lOlLN2.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{crystal-BGOEqbwF.js → crystal-HDtM80sC.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{edge-CQJH3_5t.js → edge-D4Nvwgsf.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{erb-DZNowPeY.js → erb-CyjZ4knI.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-js-jxYiQSCJ.js → glimmer-js-D6M3MOmY.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-ts-DoFbDDKI.js → glimmer-ts-DfokzFjG.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{graphql-CA_BX0d6.js → graphql-DTnqPoeZ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{handlebars-Bumg1nhL.js → handlebars-DZi9CvTQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/highlights-B80gocb2.js +3 -0
- package/dist/diff_tool/app/dist/assets/{http-Dt-6KBlS.js → http-ynmm9XFY.js} +1 -1
- package/dist/diff_tool/app/dist/assets/hurl-jiJ4Cyz5.js +1 -0
- package/dist/diff_tool/app/dist/assets/index-DSKn9aHV.js +205 -0
- package/dist/diff_tool/app/dist/assets/julia-BqNVScfB.js +1 -0
- package/dist/diff_tool/app/dist/assets/{just-CePkuXj4.js → just-D4SaWSq3.js} +1 -1
- package/dist/diff_tool/app/dist/assets/langs-Cb6u03GG.js +1 -0
- package/dist/diff_tool/app/dist/assets/{liquid-DBxKJhTy.js → liquid-DZ2yKB_9.js} +1 -1
- package/dist/diff_tool/app/dist/assets/marko-r9UJPNdX.js +1 -0
- package/dist/diff_tool/app/dist/assets/{mdc-AoEkrSRV.js → mdc-Bc7j-rRZ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{nim-CdOSsVN7.js → nim-Bzsd8mjy.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{org-wLn5ov6u.js → org-D0z5J7r3.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{perl-D1d-UYsx.js → perl-DSZpjAyA.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{php-BXtg-e-b.js → php-BJRzLxXW.js} +1 -1
- package/dist/diff_tool/app/dist/assets/rst-CFIvEOFm.js +1 -0
- package/dist/diff_tool/app/dist/assets/{ruby-DAY5ZYSg.js → ruby-SpTrDNEO.js} +1 -1
- package/dist/diff_tool/app/dist/assets/shiki-DaptjTao.js +2 -0
- package/dist/diff_tool/app/dist/assets/{stream-tokenizer-h1lwRQEk.js → stream-tokenizer-BkuDYA48.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{svelte-CouSRXXN.js → svelte-BjJxriRn.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{templ-nHebsoOx.js → templ-B8KaQl_2.js} +1 -1
- package/dist/diff_tool/app/dist/assets/themes-BaMgiyFz.js +2 -0
- package/dist/diff_tool/app/dist/assets/{ts-tags-ByyA0QCx.js → ts-tags-BJYJ_DXd.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{twig-DUDRwdST.js → twig-Bf7V1wC8.js} +1 -1
- package/dist/diff_tool/app/dist/assets/typst-DxctUuHF.js +1 -0
- package/dist/diff_tool/app/dist/assets/{vue-BMcQkxhM.js → vue-BeSZAYMy.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-vine-CEJFhGMr.js → vue-vine-D-Me5wQp.js} +1 -1
- package/dist/diff_tool/app/dist/index.html +1 -1
- package/dist/host/hosted_ephemeral_agent_session.js +1 -1
- package/dist/host/hosted_ephemeral_agent_session.js.map +1 -1
- package/dist/host/local_session_host.js +3 -2
- package/dist/host/local_session_host.js.map +1 -1
- package/dist/sdk/local_client.d.ts +2 -0
- package/dist/sdk/local_client.js +1 -0
- package/dist/sdk/local_client.js.map +1 -1
- package/dist/tui/session_chat_controller.js +4 -1
- package/dist/tui/session_chat_controller.js.map +1 -1
- package/package.json +6 -6
- package/dist/diff_tool/app/dist/assets/highlights-Coi8xHW0.js +0 -3
- package/dist/diff_tool/app/dist/assets/hurl-DUghBkZb.js +0 -1
- package/dist/diff_tool/app/dist/assets/index-Jt-l2Q96.js +0 -205
- package/dist/diff_tool/app/dist/assets/julia-CRQfdd-b.js +0 -1
- package/dist/diff_tool/app/dist/assets/langs-qJAo26KT.js +0 -1
- package/dist/diff_tool/app/dist/assets/marko-CjRgUMoV.js +0 -1
- package/dist/diff_tool/app/dist/assets/rst-D9EQsBp-.js +0 -1
- package/dist/diff_tool/app/dist/assets/shiki-B8l9Ufae.js +0 -2
- package/dist/diff_tool/app/dist/assets/themes-D3P9yN9_.js +0 -2
- package/dist/diff_tool/app/dist/assets/typst-DE5bnHEE.js +0 -1
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./loader-DYYMIDWx.js","./preload-helper-CRzLMJPS.js","./themes-D3P9yN9_.js","./highlights-Coi8xHW0.js","./stream-tokenizer-h1lwRQEk.js","./shiki-B8l9Ufae.js","./angular-html-DbefOYVd.js","./rolldown-runtime-XKyaHtl9.js","./html-xg5kwvwR.js","./javascript-DF6j-435.js","./css-28T6ABEL.js","./angular-ts-CvKvjrwq.js","./scss-CNJYx4G4.js","./apl-oXhhIufm.js","./xml-CJx_hAt3.js","./java-DmZF03nx.js","./json-42mipy3Q.js","./astro-BSfvy1I6.js","./typescript-Dvuj33DD.js","./postcss-BXeXVLqQ.js","./tsx-r6-X8vM1.js","./blade-BPJIqBv7.js","./html-derivative-zG1x8fML.js","./sql-BJYzzGx2.js","./bsl-_VjlB9mv.js","./sdbl-bTVj8UrX.js","./c-NZxYjD9R.js","./cairo-DLTphjLi.js","./python-gzcpVVnB.js","./chapel-C_yIxKK6.js","./cobol-DJ9emjzS.js","./coffee-DCXaW2x4.js","./cpp-Y8tBED_W.js","./regexp-CCN76yWg.js","./glsl-DBf8kQxW.js","./crystal-BGOEqbwF.js","./shellscript-DG0er0mb.js","./edge-CQJH3_5t.js","./elixir-BQwyj_cP.js","./elm-x2IF6yQx.js","./erb-DZNowPeY.js","./ruby-DAY5ZYSg.js","./haml-MvCfcv0X.js","./graphql-CA_BX0d6.js","./jsx-vimVRUsC.js","./lua-CxMwO_Mz.js","./yaml-BY1dOrT3.js","./erlang-Cphh6RMH.js","./markdown-BYOwaDjH.js","./fortran-fixed-form-DEKoE2YW.js","./fortran-free-form-CYNrtFtB.js","./fsharp-D13ZGOAj.js","./gdresource-xMC7jr7x.js","./gdshader-CBce3t8t.js","./gdscript-DYvRD3hg.js","./git-commit-BSykSTBG.js","./diff-woXpYk--.js","./git-rebase-WKrMcflD.js","./glimmer-js-jxYiQSCJ.js","./glimmer-ts-DoFbDDKI.js","./hack-gtYgwEcA.js","./handlebars-Bumg1nhL.js","./http-Dt-6KBlS.js","./hurl-DUghBkZb.js","./csv-Dx-8-gkx.js","./hxml-Dcm88srW.js","./haxe-C8oCnwJJ.js","./jinja-B2nuVHF1.js","./jison-CZsiyrSO.js","./julia-CRQfdd-b.js","./r-C0eHyz6n.js","./just-CePkuXj4.js","./perl-D1d-UYsx.js","./latex-CdMZza0I.js","./tex-Bmmg45Le.js","./liquid-DBxKJhTy.js","./marko-CjRgUMoV.js","./less-DVTAwKKz.js","./mdc-AoEkrSRV.js","./nextflow-CSgcYZcx.js","./nextflow-groovy-D7IRt6Pp.js","./nginx-BiHSRcGz.js","./nim-CdOSsVN7.js","./org-wLn5ov6u.js","./clojure-DqKBuwfJ.js","./csharp-dmMxLVLW.js","./dart-CHZY9Xhz.js","./docker-IyjqRm3v.js","./go-rLFTqkRN.js","./groovy-CacY0gHj.js","./ini-B5eOa1yu.js","./make-Dixweg8N.js","./objective-c-D1A_Heim.js","./ocaml-O90oeIOV.js","./php-BXtg-e-b.js","./vb-DOwzaHZ0.js","./raku-B3gFvitq.js","./rust-DpiIf5JO.js","./scala-BiFt_7mu.js","./zig-CMLA9XwU.js","./xsl-Bd7alYZi.js","./pug-CueMe1Oe.js","./qml-BQ_VstfA.js","./razor-DKbaSFqp.js","./rst-D9EQsBp-.js","./cmake-Bj61d0ZC.js","./sas-DC4F9y1U.js","./shaderlab-TOUzSsQk.js","./hlsl-Cvrh5tZx.js","./shellsession-DZdJuHd_.js","./soy-DBgMV_3R.js","./sparql-D_iOobhT.js","./turtle-ByJddavk.js","./stata-CANxZdMU.js","./surrealql-h0PQCFLw.js","./svelte-CouSRXXN.js","./templ-nHebsoOx.js","./ts-tags-ByyA0QCx.js","./twig-DUDRwdST.js","./typst-DE5bnHEE.js","./bat-qdxAdBWQ.js","./bibtex-Ci_nEsc7.js","./jsonc-CYpm1nAK.js","./log-BNLmms1o.js","./powershell-QtSnmXcu.js","./swift-CyEgAFGc.js","./system-verilog-Dh5ihWbf.js","./verilog-B2gwz-sJ.js","./vue-BMcQkxhM.js","./vue-html-BBM4UO8W.js","./vue-vine-CEJFhGMr.js","./stylus-B6D30XZt.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{t as r}from"./preload-helper-CRzLMJPS.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./lib-BFrBoEqQ.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var te=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ne(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,te)}catch(e){te(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function re(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ne(re.bind(null,e))}var ie={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=re,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ne,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),p=n(((e,t)=>{t.exports=f()})),m=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=n(((e,t)=>{t.exports=m()})),g=n((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),_=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=n((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function g(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=m(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),N=Symbol.for(`react.profiler`),P=Symbol.for(`react.consumer`),F=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),oe=Symbol.for(`react.legacy_hidden`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.for(`react.view_transition`),le=Symbol.for(`react.recoverable`),ue=Symbol.iterator;function I(e){return typeof e!=`object`||!e?null:(e=ue&&e[ue]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case N:return`Profiler`;case M:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case ae:return`Activity`;case ce:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case F:return e.displayName||`Context`;case P:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,L=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function _e(e){return{current:e}}function ve(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function ye(e,t){ge++,he[ge]=e.current,e.current=t}var be=_e(null),xe=_e(null),Se=_e(null),Ce=_e(null);function we(e,t){switch(ye(Se,t),ye(xe,e),ye(be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(be),ye(be,e)}function Te(){ve(be),ve(xe),ve(Se)}function Ee(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,ye(Ce,e)),t=be.current;var n=dp(t,e.type);t!==n&&(ye(xe,e),ye(be,n))}function De(e){xe.current===e&&(ve(be),ve(xe)),Ce.current===e&&(ve(Ce),sh._currentValue=me)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`
|
|
3
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
-
`+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
-
`),l=s.split(`
|
|
6
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);case 30:return Ae(`ViewTransition`);default:return``}}function Pe(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
-
Error generating stack: `+e.message+`
|
|
9
|
-
`+e.stack}}var Fe=Object.prototype.hasOwnProperty,Ie=t.unstable_scheduleCallback,Le=t.unstable_cancelCallback,Re=t.unstable_shouldYield,ze=t.unstable_requestPaint,Be=t.unstable_now,Ve=t.unstable_getCurrentPriorityLevel,He=t.unstable_ImmediatePriority,Ue=t.unstable_UserBlockingPriority,We=t.unstable_NormalPriority,Ge=t.unstable_LowPriority,Ke=t.unstable_IdlePriority,qe=t.log,Je=t.unstable_setDisableYieldValue,Ye=null,Xe=null;function Ze(e){if(typeof qe==`function`&&Je(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Ye,e)}catch{}}var Qe=Math.clz32?Math.clz32:tt,$e=Math.log,et=Math.LN2;function tt(e){return e>>>=0,e===0?32:31-($e(e)/et|0)|0}var nt=256,rt=262144,it=4194304;function at(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ot(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=at(n))):i=at(o):i=at(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=at(n))):i=at(o)):i=at(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function st(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ct(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Qe(n),i=1<<r;t|=e[r],n&=~i}return t}function lt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ut(){var e=it;return it<<=1,!(it&62914560)&&(it=4194304),e}function dt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ft(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Qe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&mt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function mt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ht(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function gt(e,t){var n=t&-t;return n=n&42?1:_t(n),(n&(e.suspendedLanes|t))===0?n:0}function _t(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function vt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function yt(){var e=R.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function bt(e,t){var n=R.p;try{return R.p=e,t()}finally{R.p=n}}var xt=Math.random().toString(36).slice(2),St=`__reactFiber$`+xt,Ct=`__reactProps$`+xt,wt=`__reactContainer$`+xt,Tt=`__reactEvents$`+xt,Et=`__reactListeners$`+xt,Dt=`__reactHandles$`+xt,Ot=`__reactResources$`+xt,kt=`__reactMarker$`+xt,At=`__reactLoad$`+xt;function jt(e){delete e[St],delete e[Ct],delete e[Et],delete e[Dt]}function z(e){var t;if(t=e[St])return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[St])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[St]||e[wt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pt(e){var t=e[Ot];return t||=e[Ot]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ft(e){e[kt]=!0}function It(e){e[At]=void 0}var Lt=new Set,Rt={};function zt(e,t){Bt(e,t),Bt(e+`Capture`,t)}function Bt(e,t){for(Rt[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var Vt=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]*$`),Ht={},Ut={};function Wt(e){return Fe.call(Ut,e)?!0:Fe.call(Ht,e)?!1:Vt.test(e)?Ut[e]=!0:(Ht[e]=!0,!1)}var B=!1;function Gt(){var e=B;return B=!1,e}function Kt(e,t,n){if(Wt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function qt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Yt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Xt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Zt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qt(e){if(!e._valueTracker){var t=Xt(e)?`checked`:`value`;e._valueTracker=Zt(e,t,``+e[t])}}function $t(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Xt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var en=/[\n"\\]/g;function tn(e){return e.replace(en,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function V(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Yt(t)):e.value!==``+Yt(t)&&(e.value=``+Yt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):rn(e,Yt(n)):o===`number`&&e.value==t?rn(e,Yt(e.value)):rn(e,Yt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Yt(s):e.removeAttribute(`name`)}function nn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Qt(e);return}n=n==null?``:``+Yt(n),t=t==null?n:``+Yt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Qt(e)}function rn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function an(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Yt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function on(e,t,n){t!=null&&(t=``+Yt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Yt(n)}function sn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Yt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Qt(e)}function cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ln=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 un(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||ln.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function dn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,B=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(un(e,a,r),B=!0)}else for(var o in t)t.hasOwnProperty(o)&&un(e,o,t[o])}function fn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var pn=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`],[`maskType`,`mask-type`],[`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`]]),mn=/^[\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 hn(e){return mn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function gn(){}var _n=null;function vn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,bn=null;function xn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[Ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(V(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+tn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ct]||null;if(!a)throw Error(i(90));V(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&$t(r)}break a;case`textarea`:on(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}}}var Sn=!1;function Cn(e,t,n){if(Sn)return e(t,n);Sn=!0;try{return e(t)}finally{if(Sn=!1,(yn!==null||bn!==null)&&(Ld(),yn&&(t=yn,e=bn,bn=yn=null,xn(t),e)))for(t=0;t<e.length;t++)xn(e[t])}}function wn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Tn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,En=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){En=!0}}),window.addEventListener(`test`,Dn,Dn),window.removeEventListener(`test`,Dn,Dn)}catch{En=!1}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function Mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nn(){return!0}function Pn(){return!1}function Fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),Rn=D({},In,{view:0,detail:0}),zn=Fn(Rn),Bn,Vn,Hn,Un=D({},Rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:er,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Hn&&(Hn&&e.type===`mousemove`?(Bn=e.screenX-Hn.screenX,Vn=e.screenY-Hn.screenY):Vn=Bn=0,Hn=e),Bn)},movementY:function(e){return`movementY`in e?e.movementY:Vn}}),Wn=Fn(Un),Gn=Fn(D({},Un,{dataTransfer:0})),Kn=Fn(D({},Rn,{relatedTarget:0})),qn=Fn(D({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),Jn=Fn(D({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Yn=Fn(D({},In,{data:0})),Xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Zn={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`},Qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function $n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qn[e])?!!t[e]:!1}function er(){return $n}var tr=Fn(D({},Rn,{key:function(e){if(e.key){var t=Xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:er,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),nr=Fn(D({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),rr=Fn(D({},In,{submitter:0})),ir=Fn(D({},Rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:er})),ar=Fn(D({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),or=Fn(D({},Un,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),sr=Fn(D({},In,{newState:0,oldState:0,source:0})),cr=[9,13,27,32],lr=Tn&&`CompositionEvent`in window,ur=null;Tn&&`documentMode`in document&&(ur=document.documentMode);var dr=Tn&&`TextEvent`in window&&!ur,fr=Tn&&(!lr||ur&&8<ur&&11>=ur),pr=` `,mr=!1;function hr(e,t){switch(e){case`keyup`:return cr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var _r=!1;function vr(e,t){switch(e){case`compositionend`:return gr(t);case`keypress`:return t.which===32?(mr=!0,pr):null;case`textInput`:return e=t.data,e===pr&&mr?null:e;default:return null}}function yr(e,t){if(_r)return e===`compositionend`||!lr&&hr(e,t)?(e=jn(),An=kn=On=null,_r=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return fr&&t.locale!==`ko`?null:t.data;default:return null}}var br={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 xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!br[e.type]:t===`textarea`}function Sr(e,t,n,r){yn?bn?bn.push(r):bn=[r]:yn=r,t=qf(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Cr=null,wr=null;function Tr(e){Bf(e,0)}function Er(e){if($t(Nt(e)))return e}function Dr(e,t){if(e===`change`)return t}var Or=!1;if(Tn){var kr;if(Tn){var Ar=`oninput`in document;if(!Ar){var jr=document.createElement(`div`);jr.setAttribute(`oninput`,`return;`),Ar=typeof jr.oninput==`function`}kr=Ar}else kr=!1;Or=kr&&(!document.documentMode||9<document.documentMode)}function Mr(){Cr&&(Cr.detachEvent(`onpropertychange`,Nr),wr=Cr=null)}function Nr(e){if(e.propertyName===`value`&&Er(wr)){var t=[];Sr(t,wr,e,vn(e)),Cn(Tr,t)}}function Pr(e,t,n){e===`focusin`?(Mr(),Cr=t,wr=n,Cr.attachEvent(`onpropertychange`,Nr)):e===`focusout`&&Mr()}function Fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Er(wr)}function Ir(e,t){if(e===`click`)return Er(t)}function Lr(e,t){if(e===`input`||e===`change`)return Er(t)}function Rr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var zr=typeof Object.is==`function`?Object.is:Rr;function Br(e,t){if(zr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Fe.call(t,i)||!zr(e[i],t[i]))return!1}return!0}function Vr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ur(e,t){var n=Hr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Hr(n)}}function Wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vr(e.document)}return t}function Kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var qr=Tn&&`documentMode`in document&&11>=document.documentMode,Jr=null,Yr=null,Xr=null,Zr=!1;function Qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zr||Jr==null||Jr!==Vr(r)||(r=Jr,`selectionStart`in r&&Kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xr&&Br(Xr,r)||(Xr=r,r=qf(Yr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Jr)))}function $r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ei={animationend:$r(`Animation`,`AnimationEnd`),animationiteration:$r(`Animation`,`AnimationIteration`),animationstart:$r(`Animation`,`AnimationStart`),transitionrun:$r(`Transition`,`TransitionRun`),transitionstart:$r(`Transition`,`TransitionStart`),transitioncancel:$r(`Transition`,`TransitionCancel`),transitionend:$r(`Transition`,`TransitionEnd`)},ti={},ni={};Tn&&(ni=document.createElement(`div`).style,`AnimationEvent`in window||(delete ei.animationend.animation,delete ei.animationiteration.animation,delete ei.animationstart.animation),`TransitionEvent`in window||delete ei.transitionend.transition);function ri(e){if(ti[e])return ti[e];if(!ei[e])return e;var t=ei[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ni)return ti[e]=t[n];return e}var ii=ri(`animationend`),ai=ri(`animationiteration`),oi=ri(`animationstart`),si=ri(`transitionrun`),ci=ri(`transitionstart`),li=ri(`transitioncancel`),ui=ri(`transitionend`),di=new Map,fi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);fi.push(`scrollEnd`);function pi(e,t){di.set(e,t),zt(t,[e])}var mi=0;function hi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=vd.identifierPrefix;var n=mi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function gi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ed;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function _i(e,t){return e=gi(e),t=gi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var vi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},yi=[],bi=0,xi=0;function Si(){for(var e=bi,t=xi=bi=0;t<e;){var n=yi[t];yi[t++]=null;var r=yi[t];yi[t++]=null;var i=yi[t];yi[t++]=null;var a=yi[t];if(yi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ei(n,i,a)}}function Ci(e,t,n,r){yi[bi++]=e,yi[bi++]=t,yi[bi++]=n,yi[bi++]=r,xi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function wi(e,t,n,r){return Ci(e,t,n,r),Di(e)}function Ti(e,t){return Ci(e,null,null,t),Di(e)}function Ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Qe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Di(e){if(50<Dd)throw Dd=0,Od=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oi={};function ki(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ai(e,t,n,r){return new ki(e,t,n,r)}function ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mi(e,t){var n=e.alternate;return n===null?(n=Ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ni(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Pi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)ji(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,be.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ae:return e=Ai(31,n,t,a),e.elementType=ae,e.lanes=o,e;case j:return Fi(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=Ai(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case te:return e=Ai(13,n,t,a),e.elementType=te,e.lanes=o,e;case ne:return e=Ai(19,n,t,a),e.elementType=ne,e.lanes=o,e;case oe:case ce:return e=a|32,e=Ai(30,n,t,e),e.elementType=ce,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case F:s=10;break a;case P:s=9;break a;case ee:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Fi(e,t,n,r){return e=Ai(7,e,r,t),e.lanes=n,e}function Ii(e,t,n){return e=Ai(6,e,null,t),e.lanes=n,e}function Li(e){var t=Ai(18,null,null,0);return t.stateNode=e,t}function Ri(e,t,n){return t=Ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zi=new WeakMap;function Bi(e,t){if(typeof e==`object`&&e){var n=zi.get(e);return n===void 0?(t={value:e,source:t,stack:Pe(t)},zi.set(e,t),t):n}return{value:e,source:t,stack:Pe(t)}}var Vi=[],Hi=0,Ui=null,Wi=0,Gi=[],Ki=0,qi=null,Ji=1,Yi=``;function Xi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Ui,Ui=e,Wi=t}function Zi(e,t,n){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,qi=e;var r=Ji;e=Yi;var i=32-Qe(r)-1;r&=~(1<<i),n+=1;var a=32-Qe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ji=1<<32-Qe(t)+i|n<<i|r,Yi=a+e}else Ji=1<<a|n<<i|r,Yi=e}function Qi(e){e.return!==null&&(Xi(e,1),Zi(e,1,0))}function $i(e){for(;e===Ui;)Ui=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null;for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Yi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null}function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,Ji=t.id,Yi=t.overflow,qi=e}var ta=null,na=null,H=!1,ra=null,ia=!1,aa=Error(i(519));function oa(e){throw fa(Bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),aa}function sa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[St]=e,t[Ct]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<Rf.length;n++)$(Rf[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),sn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||$f(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=gn),t=!0):t=!1,t||oa(e,!0)}function ca(e){for(ta=e.return;ta;)switch(ta.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:ta=ta.return}}function la(e){if(e!==ta)return!1;if(!H)return ca(e),H=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&na&&oa(e),ca(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));na=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));na=dm(e)}else t===27?(t=na,Sp(e.type)?(e=um,um=null,na=e):na=t):na=ta?lm(e.stateNode.nextSibling):null;return!0}function ua(){na=ta=null,H=!1}function da(){var e=ra;return e!==null&&(ud===null?ud=e:ud.push.apply(ud,e),ra=null),e}function fa(e){ra===null?ra=[e]:ra.push(e)}var pa=_e(null),ma=null,ha=null;function ga(e,t,n){ye(pa,t._currentValue),t._currentValue=n}function _a(e){e._currentValue=pa.current,ve(pa)}function va(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ya(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),va(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),va(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),va(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ba(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;zr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&ya(t,e,n,r),t.flags|=262144,e!==null}function xa(e){for(e=e.firstContext;e!==null;){if(!zr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){ma=e,ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ca(e){return Ta(ma,e)}function wa(e,t){return ma===null&&Sa(e),Ta(e,t)}function Ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ha===null){if(e===null)throw Error(i(308));ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ha=ha.next=t;return n}var Ea=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Da=t.unstable_scheduleCallback,Oa=t.unstable_NormalPriority,ka={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Aa(){return{controller:new Ea,data:new Map,refCount:0}}function ja(e){e.refCount--,e.refCount===0&&Da(Oa,function(){e.controller.abort()})}function Ma(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Na=null;function Pa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Fa=null,Ia=0,La=0,Ra=null;function za(e,t){if(Fa===null){var n=Fa=[];Ia=0,La=Nf(),Ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ia++,t.then(Ba,Ba),t}function Ba(){if(--Ia===0&&(Na=null,Fa!==null)){Ra!==null&&(Ra.status=`fulfilled`);var e=Fa;Fa=null,La=0,Ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ha=L.S;L.S=function(e,t){if(pd=Be(),typeof t==`object`&&t&&typeof t.then==`function`&&za(e,t),Na!==null)for(var n=yf;n!==null;)Ma(n,Na),n=n.next;if(n=e.types,n!==null){for(var r=yf;r!==null;)Ma(r,n),r=r.next;if(La!==0){r=Na,r===null&&(r=Na=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ha!==null&&Ha(e,t)};var Ua=_e(null);function Wa(){var e=Ua.current;return e===null?J.pooledCache:e}function Ga(e,t){t===null?ye(Ua,Ua.current):ye(Ua,t.pool)}function Ka(){var e=Wa();return e===null?null:{parent:ka._currentValue,pool:e}}var qa=Error(i(460)),Ja=Error(i(474)),Ya=Error(i(542)),Xa={then:function(){}};function Za(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Qa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(gn,gn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(gn,gn);else{if(e=J,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e}throw eo=t,qa}}function $a(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(eo=e,qa):e}}var eo=null;function to(){if(eo===null)throw Error(i(459));var e=eo;return eo=null,e}function no(e){if(e===qa||e===Ya)throw Error(i(483))}var ro=null,io=0;function ao(e){var t=io;return io+=1,ro===null&&(ro=[]),Qa(ro,e,t)}function oo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function so(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function co(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Mi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ii(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),oo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ie&&$a(i)===t.type)?(t=a(t,n.props),oo(t,n),t.return=e,t):(t=Pi(n.type,n.key,n.props,null,e.mode,r),oo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ri(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Fi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ii(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Pi(t.type,t.key,t.props,null,e.mode,n),oo(n,t),n.return=e,n;case A:return t=Ri(t,e.mode,n),t.return=e,t;case ie:return t=$a(t),f(e,t,n)}if(pe(t)||I(t))return t=Fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ao(t),n);if(t.$$typeof===F)return f(e,wa(e,t),n);so(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case ie:return n=$a(n),p(e,t,n,r)}if(pe(n)||I(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ao(n),r);if(n.$$typeof===F)return p(e,t,wa(e,n),r);so(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ie:return r=$a(r),m(e,t,n,r,i)}if(pe(r)||I(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ao(r),i);if(r.$$typeof===F)return m(e,t,n,wa(t,r),i);so(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),H&&Xi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return H&&Xi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),H&&Xi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),H&&Xi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return H&&Xi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),H&&Xi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),oo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&$a(l)===r.type){n(e,r.sibling),c=a(r,o.props),oo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Fi(o.props.children,e.mode,c,o.key),oo(c,o),c.return=e,e=c):(c=Pi(o.type,o.key,o.props,null,e.mode,c),oo(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ri(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=$a(o),_(e,r,o,c)}if(pe(o))return h(e,r,o,c);if(I(o)){if(l=I(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ao(o),c);if(o.$$typeof===F)return _(e,r,wa(e,o),c);so(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Ii(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{io=0;var i=_(e,t,n,r);return ro=null,i}catch(t){if(t===qa||t===Ya)throw t;var a=Ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var lo=co(!0),uo=co(!1),fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Di(e),Ei(e,null,n),t}return Ci(e,r,t,n),Di(e)}function _o(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ht(e,n)}}function vo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var yo=!1;function bo(){if(yo){var e=Ra;if(e!==null)throw e}}function xo(e,t,n,r){yo=!1;var i=e.updateQueue;fo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(X&f)===f:(r&f)===f){f!==0&&f===La&&(yo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:fo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),id|=o,e.lanes=o,e.memoizedState=d}}function So(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var wo=_e(null),To=_e(0);function Eo(e,t){e=nd,ye(To,e),ye(wo,t),nd=e|t.baseLanes}function Do(){ye(To,nd),ye(wo,wo.current)}function Oo(){nd=To.current,ve(wo),ve(To)}var ko=_e(null),Ao=null;function jo(e){var t=e.alternate;ye(Io,Io.current&1),ye(ko,e),Ao===null&&(t===null||wo.current!==null||t.memoizedState!==null)&&(Ao=e)}function Mo(e){ye(Io,Io.current),ye(ko,e),Ao===null&&(Ao=e)}function No(e){e.tag===22?(ye(Io,Io.current),ye(ko,e),Ao===null&&(Ao=e)):Po()}function Po(){ye(Io,Io.current),ye(ko,ko.current)}function Fo(e){ve(ko),Ao===e&&(Ao=null),ve(Io)}var Io=_e(0);function Lo(e,t){ye(ko,ko.current),ye(Io,t)}function Ro(e){ve(Io),ve(ko),Ao===e&&(Ao=null)}function zo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bo=0,U=null,Vo=null,Ho=null,Uo=!1,Wo=!1,Go=!1,Ko=0,qo=0,Jo=null,Yo=0;function Xo(){throw Error(i(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zr(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,a){return Bo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?hc:gc,Go=!1,a=n(r,i),Go=!1,Wo&&(a=es(t,n,r,i)),$o(e),a}function $o(e){L.H=mc;var t=Vo!==null&&Vo.next!==null;if(Bo=0,Ho=Vo=U=null,Uo=!1,qo=0,Jo=null,t)throw Error(i(300));e===null||Nc||(e=e.dependencies,e!==null&&xa(e)&&(Nc=!0))}function es(e,t,n,r){U=e;var a=0;do{if(Wo&&(Jo=null),qo=0,Wo=!1,25<=a)throw Error(i(301));if(a+=1,Ho=Vo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}L.H=_c,o=t(n,r)}while(Wo);return o}function ts(){var e=L.H,t=e.useState()[0];return t=typeof t.then==`function`?cs(t):t,e=e.useState()[0],(Vo===null?null:Vo.memoizedState)!==e&&(U.flags|=1024),t}function ns(){var e=Ko!==0;return Ko=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}Bo=0,Ho=Vo=U=null,Wo=!1,qo=Ko=0,Jo=null}function as(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function os(){if(Vo===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=Vo.next;var t=Ho===null?U.memoizedState:Ho.next;if(t!==null)Ho=t,Vo=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));Vo=e,e={memoizedState:Vo.memoizedState,baseState:Vo.baseState,baseQueue:Vo.baseQueue,queue:Vo.queue,next:null},Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=qo;return qo+=1,Jo===null&&(Jo=[]),e=Qa(Jo,e,t),t=U,(Ho===null?t.memoizedState:Ho.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?hc:gc),e}function ls(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return cs(e);if(e.$$typeof===le)return;if(e.$$typeof===F)return Ca(e)}throw Error(i(438,String(e)))}function us(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ss(),U.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=se;return t.index++,n}function ds(e,t){return typeof t==`function`?t(e):t}function fs(e){return ps(os(),Vo,e)}function ps(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Bo&f)===f:(X&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===La&&(d=!0);else if((Bo&p)===p){u=u.next,p===La&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,U.lanes|=p,id|=p;f=u.action,Go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,U.lanes|=f,id|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!zr(o,e.memoizedState)&&(Nc=!0,d&&(n=Ra,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ms(e){var t=os(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);zr(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function hs(e,t,n){var r=U,a=os(),o=H;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!zr((Vo||a).memoizedState,n);if(s&&(a.memoizedState=n,Nc=!0),a=a.queue,Bs(vs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ho!==null&&!!(Ho.memoizedState.tag&1),Fs(e?9:8,{destroy:void 0},_s.bind(null,r,a,n,t),null),e){if(r.flags|=2048,J===null)throw Error(i(349));o||Bo&127||gs(r,t,n)}return n}function gs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=ss(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&bs(e)}function vs(e,t,n){return n(function(){ys(t)&&bs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zr(e,n)}catch{return!0}}function bs(e){var t=Ti(e,2);t!==null&&Md(t,e,2)}function xs(e){var t=as();if(typeof e==`function`){var n=e;if(e=n(),Go){Ze(!0);try{n()}finally{Ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:e},t}function Ss(e,t,n,r){return e.baseState=n,ps(e,Vo,typeof r==`function`?r:ds)}function Cs(e,t,n,r,a){if(dc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};L.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ws(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ws(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=L.T,o={};o.types=a===null?null:a.types,L.T=o;try{var s=n(i,r),c=L.S;c!==null&&c(o,s),Ts(e,t,s)}catch(n){Ds(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),L.T=a}}else try{a=n(i,r),Ts(e,t,a)}catch(n){Ds(e,t,n)}}function Ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Es(e,t,n)},function(n){return Ds(e,t,n)}):Es(e,t,n)}function Es(e,t,n){t.status=`fulfilled`,t.value=n,Os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ws(e,n)))}function Ds(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Os(t),t=t.next;while(t!==r)}e.action=null}function Os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ks(e,t){return t}function As(e,t){if(H){var n=J.formState;if(n!==null){a:{var r=U;if(H){if(na){b:{for(var i=na,a=ia;i.nodeType!==8;)if(!a||(i=lm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){na=lm(i.nextSibling),r=i.data===`F!`;break a}}oa(r)}r=!1}r&&(t=n[0])}}return n=as(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:t},n.queue=r,n=cc.bind(null,U,r),r.dispatch=n,r=xs(!1),a=uc.bind(null,U,!1,r.queue),r=as(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Cs.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function js(e){return Ms(os(),Vo,e)}function Ms(e,t,n){if(t=ps(e,t,ks)[0],e=fs(ds)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=cs(t)}catch(e){throw e===qa?Ya:e}else r=t;t=os();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,Fs(9,{destroy:void 0},Ns.bind(null,i,n),null)),[r,a,e]}function Ns(e,t){e.action=t}function Ps(e){var t=os(),n=Vo;if(n!==null)return Ms(t,n,e);os(),t=t.memoizedState,n=os();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=ss(),U.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Is(){return os().memoizedState}function Ls(e,t,n,r){var i=as();U.flags|=e,i.memoizedState=Fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rs(e,t,n,r){var i=os();r=r===void 0?null:r;var a=i.memoizedState.inst;Vo!==null&&r!==null&&Zo(r,Vo.memoizedState.deps)?i.memoizedState=Fs(t,a,n,r):(U.flags|=e,i.memoizedState=Fs(1|t,a,n,r))}function zs(e,t){Ls(8390656,8,e,t)}function Bs(e,t){Rs(2048,8,e,t)}function Vs(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=ss(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hs(e){var t=os().memoizedState;return Vs({ref:t,nextImpl:e}),function(){if(q&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Us(e,t){return Rs(4,2,e,t)}function Ws(e,t){return Rs(4,4,e,t)}function Gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ks(e,t,n){n=n==null?null:n.concat([e]),Rs(4,4,Gs.bind(null,t,e),n)}function qs(){}function Js(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zo(t,r[1]))return r[0];if(r=e(),Go){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return n===void 0||Bo&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ad(),U.lanes|=e,id|=e,n)}function Zs(e,t,n,r){return zr(n,t)?n:wo.current===null?!(Bo&106)||Bo&1073741824&&!(X&261930)?(Nc=!0,e.memoizedState=n):(e=Ad(),U.lanes|=e,id|=e,t):(e=Xs(e,n,r),zr(e,t)||(Nc=!0),e)}function Qs(e,t,n,r,i){var a=R.p;R.p=a!==0&&8>a?a:8;var o=L.T,s={};s.types=o===null?null:o.types,L.T=s,uc(e,!1,t,n);try{var c=i(),l=L.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?lc(e,t,Va(c,r),kd(e)):lc(e,t,r,kd(e))}catch(n){lc(e,t,{then:function(){},status:`rejected`,reason:n},kd())}finally{R.p=a,o!==null&&s.types!==null&&(o.types=s.types),L.T=o}}function $s(){}function ec(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=tc(e).queue;Qs(e,a,t,me,n===null?$s:function(){return nc(e),n(r)})}function tc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nc(e){var t=tc(e);t.next===null&&(t=e.alternate.memoizedState),lc(e,t.next.queue,{},kd())}function rc(){return Ca(sh)}function ic(){return os().memoizedState}function ac(){return os().memoizedState}function oc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=kd();e=ho(n);var r=go(t,e,n);r!==null&&(Md(r,t,n),_o(r,t,n)),t={cache:Aa()},e.payload=t;return}t=t.return}}function sc(e,t,n){var r=kd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)?fc(t,n):(n=wi(e,t,n,r),n!==null&&(Md(n,e,r),pc(n,t,r)))}function cc(e,t,n){lc(e,t,n,kd())}function lc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))fc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,zr(s,o))return Ci(e,t,i,0),J===null&&Si(),!1}catch{}if(n=wi(e,t,i,r),n!==null)return Md(n,e,r),pc(n,t,r),!0}return!1}function uc(e,t,n,r){if(r={lane:2,revertLane:Nf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(i(479))}else t=wi(e,n,r,2),t!==null&&Md(t,e,2)}function dc(e){var t=e.alternate;return e===U||t!==null&&t===U}function fc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ht(e,n)}}var mc={readContext:Ca,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},hc={readContext:Ca,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:Ca,useEffect:zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ls(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){Ze(!0);try{n(t)}finally{Ze(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=sc.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,n=cc.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qs,useDeferredValue:function(e,t){return Xs(as(),e,t)},useTransition:function(){var e=xs(!1);return e=Qs.bind(null,U,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=as();if(H){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),J===null)throw Error(i(349));X&127||gs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,zs(vs.bind(null,r,o,e),[e]),r.flags|=2048,Fs(9,{destroy:void 0},_s.bind(null,r,o,n,t),null),n},useId:function(){var e=as(),t=J.identifierPrefix;if(H){var n=Yi,r=Ji;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:As,useActionState:As,useOptimistic:function(e){var t=as();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:us,useCacheRefresh:function(){return as().memoizedState=oc.bind(null,U)},useEffectEvent:function(e){var t=as(),n={impl:e};return t.memoizedState=n,function(){if(q&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},gc={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:fs,useRef:Is,useState:function(){return fs(ds)},useDebugValue:qs,useDeferredValue:function(e,t){return Zs(os(),Vo.memoizedState,e,t)},useTransition:function(){var e=fs(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:js,useActionState:js,useOptimistic:function(e,t){return Ss(os(),Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs},_c={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:ms,useRef:Is,useState:function(){return ms(ds)},useDebugValue:qs,useDeferredValue:function(e,t){var n=os();return Vo===null?Xs(n,e,t):Zs(n,Vo.memoizedState,e,t)},useTransition:function(){var e=ms(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){var n=os();return Vo===null?(n.baseState=e,[e,n.queue.dispatch]):Ss(n,Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs};function vc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=kd(),i=ho(r);i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Md(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=kd(),i=ho(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Md(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kd(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=go(e,r,n),t!==null&&(Md(t,e,n),_o(t,e,n))}};function bc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Br(n,r)||!Br(i,a):!0}function xc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yc.enqueueReplaceState(t,t.state,null)}function Sc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Cc(e){vi(e)}function wc(e){console.error(e)}function Tc(e){vi(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Oc(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=ho(e),e.tag=3,e}function Ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(gd===null?gd=new Set([this]):gd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ba(t,n,a,!0),n=ko.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ao===null?Wd():n.alternate===null&&rd===0&&(rd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),pf(e,r,a)),!1;case 22:return n.flags|=65536,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),pf(e,r,a)),!1}throw Error(i(435,n.tag))}return pf(e,r,a),Wd(),!1}if(H)return t=ko.current,t===null?(r!==aa&&(t=Error(i(423),{cause:r}),fa(Bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Bi(r,n),a=Oc(e.stateNode,r,a),vo(e,a),rd!==4&&(rd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==aa&&(e=Error(i(422),{cause:r}),fa(Bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Bi(o,n),ld===null?ld=[o]:ld.push(o),rd!==4&&(rd=2),t===null)return!0;r=Bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,r,e),vo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(gd===null||!gd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=kc(a),Ac(a,e,n,r),vo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(i(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?uo(t,null,n,r):lo(t,e.child,n,r)}function Fc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Sa(t),r=Qo(e,t,n,o,a,i),s=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(H&&s&&Qi(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ji(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Br:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=Mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Br(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ga(t,a===null?null:a.cachePool),a===null?Do():Eo(t,a),No(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ga(t,null),Do(),Po()):(Ga(t,a.cachePool),Eo(t,a),Po(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Wa();return a=a===null?null:{parent:ka._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ga(t,null),Do(),No(t),e!==null&&ba(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return lo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Fo(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(Mo(t),(e=na)?(e=am(e,ia),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Mo(t),a){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Nc||ba(e,t,n,!1),a=(n&e.childLanes)!==0,Nc||a){if(wo.current===null){if(r=J,r!==null&&(s=gt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ti(e,s),Md(r,e,s),Mc;Wd()}t=Hc(e,t,n)}else e=o.treeContext,na=lm(s.nextSibling),ta=t,H=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=Mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Gc(e,t,n,r,i){return Sa(t),n=Qo(e,t,n,r,void 0,i),r=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(H&&r&&Qi(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Sa(t),t.updateQueue=null,n=es(t,r,n,i),$o(e),r=ns(),e!==null&&!Nc?(rs(e,t,a),ll(e,t,a)):(H&&r&&Qi(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Sa(t),t.stateNode===null){var a=Oi,o=n.contextType;typeof o==`object`&&o&&(a=Ca(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},po(t),o=n.contextType,a.context=typeof o==`object`&&o?Ca(o):Oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(vc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&yc.enqueueReplaceState(a,a.state,null),xo(t,r,a,i),bo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Sc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Oi,typeof u==`object`&&u&&(o=Ca(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&xc(t,a,r,o),fo=!1;var f=t.memoizedState;a.state=f,xo(t,r,a,i),bo(),l=t.memoizedState,s||f!==l||fo?(typeof d==`function`&&(vc(t,n,d,r),l=t.memoizedState),(c=fo||bc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,mo(e,t),o=t.memoizedProps,u=Sc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Oi,typeof l==`object`&&l&&(c=Ca(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&xc(t,a,r,c),fo=!1,f=t.memoizedState,a.state=f,xo(t,r,a,i),bo();var p=t.memoizedState;o!==d||f!==p||fo||e!==null&&e.dependencies!==null&&xa(e.dependencies)?(typeof s==`function`&&(vc(t,n,s,r),p=t.memoizedState),(u=fo||bc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&xa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Wc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=lo(t,e.child,null,i),t.child=lo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return ua(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:Ka()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=sd),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Io.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(H){if(i?jo(t):Po(),(e=na)?(e=am(e,ia),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Po(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Fi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(jo(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Po(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Mi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Fi(i,a,n,null),i.flags|=2):i=Mi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=Ka():(s=ka._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(jo(t),n=e.child,e=n.sibling,n=Mi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=Ai(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return lo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(jo(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Po(),o=a.fallback,s=t.mode,a=el({mode:`visible`,children:a.children},s),o=Fi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,lo(t,e.child,null,c),a=t.child,a.memoizedState=Xc(c),a.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,a)):(Po(),t.child=e.child,t.flags|=128,null);if(jo(t),sm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,fa({value:a,source:null,stack:null})),tl(e,t,c)}if(Nc||ba(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(wo.current!==null)return tl(e,t,c);if(r=J,r!==null&&(a=gt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ti(e,a),Md(r,e,a),Mc;return om(o)||Wd(),tl(e,t,c)}return om(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,na=lm(o.nextSibling),ta=t,H=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=$c(t,a.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),va(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&zo(n)===null&&(t=e),e=e.sibling}return t}function al(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function ol(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Io.current;if(t.flags&128)return Lo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Lo(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=H?Wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&zo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return ga(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),id|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ba(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&xa(e)))}function dl(e,t,n){switch(t.tag){case 3:we(t,t.stateNode.containerInfo),ga(t,ka,e.memoizedState.cache),ua();break;case 27:case 5:Ee(t);break;case 4:we(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return jo(t),t.flags|=128,null;r=ba(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(jo(t),e=ll(e,t,n),e===null?null:e.sibling)}jo(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ba(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Lo(t,Io.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:ga(t,ka,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,H&&t.flags&1048576&&Zi(t,Wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=$a(t.elementType),t.type=e,typeof e==`function`)ji(e)?(r=Sc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=Fc(null,t,e,r,n);break a}if(a===re){t.tag=14,t=Ic(null,t,e,r,n);break a}if(a===F){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Sc(r,t.pendingProps),qc(e,t,r,a,n);case 3:a:{if(we(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,mo(e,t),xo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ga(t,ka,r),r!==o.cache&&ya(t,[ka],n,!0),bo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Jc(e,t,r,n);break a}if(r!==a){a=Bi(Error(i(424)),t),fa(a),t=Jc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(na=lm(e.firstChild),ta=t,H=!0,ra=null,ia=!0,n=uo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ua(),r===a){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(t.stateNode=fp(t.type,t.pendingProps,Se.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ee(t),e===null&&H&&(r=t.stateNode=hm(t.type,t.pendingProps,Se.current),ta=t,ia=!0,a=na,Sp(t.type)?(um=a,na=lm(r.firstChild)):na=a),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((a=r=na)&&(r=rm(r,t.type,t.pendingProps,ia),r===null?a=!1:(t.stateNode=r,ta=t,na=lm(r.firstChild),ia=!1,a=!0)),a||oa(t)),Ee(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,pp(a,o)?r=null:s!==null&&pp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Qo(e,t,ts,null,null,n),sh._currentValue=a),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=na)&&(n=im(n,t.pendingProps,ia),n===null?e=!1:(t.stateNode=n,ta=t,na=null,e=!0)),e||oa(t)),null;case 13:return Qc(e,t,n);case 4:return we(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Sa(t),a=Ca(a),r=r(a),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Sa(t),r=Ca(ka),e===null?(a=Wa(),a===null&&(a=J,o=Aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},po(t),ga(t,ka,a)):((e.lanes&n)!==0&&(mo(e,t),xo(t,null,null,n),bo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ga(t,ka,r),r!==a.cache&&ya(t,[ka],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ga(t,ka,r))),Pc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:H&&Qi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Vd())e.flags|=8192;else throw eo=Xa,Ja}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Vd())e.flags|=8192;else throw eo=Xa,Ja}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ut(),e.lanes|=t,cd|=t)}function _l(e,t){if(!H)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function vl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yl(e,t,n){var r=t.pendingProps;switch($i(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vl(t),null;case 1:return vl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),_a(ka),Te(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(la(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,da())),vl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(vl(t),ml(t,a,null,r,n)):(vl(t),hl(t,o))):o?o===e.memoizedState?(vl(t),t.flags&=-16777217):(pl(t),vl(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),vl(t),ml(t,a,e,r,n)),null;case 27:if(De(t),n=Se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}e=be.current,la(t)?sa(t,e):(e=hm(a,r,n),t.stateNode=e,pl(t))}return vl(t),t.subtreeFlags&=-33554433,null;case 5:if(De(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}if(o=be.current,la(t))sa(t,o);else{var s=lp(Se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[St]=t,o[Ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&pl(t)}}return vl(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Se.current,la(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ta,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||$f(e.nodeValue,n)),e||oa(t,!0)}else e=lp(e).createTextNode(r),e[St]=t,t.stateNode=e}return vl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=la(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[St]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),e=!1}else n=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Fo(t),t):(Fo(t),null);if(t.flags&128)throw Error(i(558))}return vl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=la(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[St]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),a=!1}else a=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Fo(t),t):(Fo(t),null)}return Fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gl(t,t.updateQueue),vl(t),null);case 4:return Te(),e===null&&Uf(t.stateNode.containerInfo),t.flags|=67108864,vl(t),null;case 10:return _a(t.type),vl(t),null;case 19:if(Ro(t),r=t.memoizedState,r===null)return vl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)_l(r,!1);else{if(rd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=zo(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ni(n,e),n=n.sibling;return Lo(t,Io.current&1|2),H&&Xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Be()>md&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}}else{if(!a){if(e=zo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!H)return vl(t),null}else 2*Be()-r.renderingStartTime>md&&n!==536870912&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Be(),e.sibling=null,o=Io.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||H?Lo(t,o):(n=o,ye(ko,t),ye(Io,n),Ao===null&&(Ao=t)),H&&Xi(t,r.treeForkCount),e}return vl(t),null;case 22:case 23:return Fo(t),Oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),n=t.updateQueue,n!==null&&gl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ve(Ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_a(ka),vl(t),null;case 25:return null;case 30:return t.flags|=33554432,vl(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch($i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(ka),Te(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(Fo(t),t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ro(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Te(),null;case 10:return _a(t.type),null;case 22:case 23:return Fo(t),Oo(),e!==null&&ve(Ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _a(ka),null;case 25:return null;default:return null}}function xl(e,t){switch($i(t),t.tag){case 3:_a(ka),Te();break;case 26:case 27:case 5:De(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&Fo(t);break;case 13:Fo(t);break;case 19:Ro(t);break;case 10:_a(t.type);break;case 22:case 23:Fo(t),Oo(),e!==null&&ve(Ua);break;case 24:_a(ka)}}function Sl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ff(t,t.return,e)}}function Cl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ff(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ff(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Co(t,n)}catch(t){ff(e,e.return,t)}}}function Tl(e,t,n){n.props=Sc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ff(e,t,n)}}function El(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=hi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);f(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ff(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ff(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ff(e,t,n)}else n.current=null}}function Ol(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function kl(e){for(var t=e.return;t!==null&&(Ml(t)&&em(e.stateNode,t.stateNode),!jl(t));)t=t.return}function Al(e){for(var t=e.return;t!==null&&(Ml(t)&&tm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function jl(e){return e.tag===5||e.tag===3||e.tag===27}function Ml(e){return e&&e.tag===7&&e.stateNode!==null}function Nl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ff(e,e.return,t)}}function Pl(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[Ct]=t}catch(t){ff(e,e.return,t)}}function Fl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function W(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Fl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Il(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gn)),Ol(e,r),B=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ol(e,r),B=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);np(t,r,n),t[St]=e,t[Ct]=n}catch(t){ff(e,e.return,t)}}var zl=!1,Bl=null;function Vl(e){(e.tag===30||e.subtreeFlags&33554432)&&(zl=!0)}var Hl=null;function Ul(){var e=Hl;return Hl=null,e}var Wl=0;function Gl(e,t,n,r,i){return Wl=0,Kl(e.child,t,n,r,i)}function Kl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);zl=!0,Tp(o,Wl===0?t:t+`_`+Wl,n),Wl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Kl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function ql(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||ql(e.child,t),e=e.sibling}function Jl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Jl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=_i(t.default,t.share),t!==`none`&&(Gl(e,n,t,null,!1)||ql(e.child,!1))}e=e.sibling}}function Yl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=hi(r,n),a=_i(r.default,n.paired?r.share:r.enter);a===`none`?Jl(e):Gl(e,i,a,null,!1)?(Jl(e),n.paired||t||jd(e,r.onEnter)):ql(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e,t),e=e.sibling;else Jl(e)}function Xl(e){if(Bl!==null&&Bl.size!==0){var t=Bl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=_i(n.default,n.share);if(a!==`none`&&(Gl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,jd(e,n.onShare)):ql(e.child,!1)),t.delete(r),t.size===0)break}}}Xl(e)}e=e.sibling}}}function Zl(e){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode),r=Bl===null?void 0:Bl.get(n),i=_i(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Gl(e,n,i,null,!1)?r===void 0?jd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Bl.delete(n),jd(e,t.onShare)):ql(e.child,!1)),Bl!==null&&Xl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Bl!==null&&Xl(e)}function Ql(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode);t=_i(t.default,t.update),e.flags&=-5,t!==`none`&&Gl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Ql(e);e=e.sibling}}function $l(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,ql(e.child,!1))}$l(e)}e=e.sibling}}function eu(e){if(e.tag===30)e.stateNode.paired=null,ql(e.child,!1),$l(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e),e=e.sibling;else $l(e)}function tu(e){for(e=e.child;e!==null;)e.tag===30?ql(e.child,!1):e.subtreeFlags&33554432&&tu(e),e=e.sibling}function nu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Wl<a.length){var l=a[Wl],u=Op(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tp(c,Wl===0?n:n+`_`+Wl,i),s&&e.flags&4||(Hl===null&&(Hl=[]),Hl.push(c,Wl===0?r:r+`_`+Wl,t.memoizedProps)),Wl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:nu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function ru(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=hi(n,r),a=_i(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Wl=0,i=nu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||jd(e,n.onUpdate))}else e.subtreeFlags&33554432&&ru(e,t);e=e.sibling}}var iu=!1,G=!1,au=!1,ou=!1,su=typeof WeakSet==`function`?WeakSet:Set,cu=null,lu=!1,uu=!1,du=!1,fu=!1;function pu(e,t,n){if(e=e.containerInfo,sp=gh,e=Gr(e),Kr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,cu=t,t=n?9270:1024;cu!==null;){if(e=cu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Zl(r[a]);if(e.alternate===null&&e.flags&2)n&&Vl(e),mu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Zl(r),mu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Vl(e),mu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cu=r):(n&&Ql(e),mu(n))}}Bl=null}function mu(e){for(;cu!==null;){var t=cu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Sc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){ff(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=hi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=_i(a.default,a.update),a!==`none`&&Gl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,cu=r;break}cu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&Sl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ff(n,n.return,e)}else{var i=Sc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ff(n,n.return,e)}}}r&64&&wl(n),r&512&&El(n,n.return);break;case 3:if(Fu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Co(e,t)}catch(e){ff(n,n.return,e)}}break;case 27:t===null&&r&4&&Rl(n);case 26:case 5:Fu(e,n),t===null&&r&4&&Nl(n),r&512&&El(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&wu(e,n);break;case 13:Fu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gf.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||iu,!r){var a=t!==null&&t.memoizedState!==null||G;t=iu,i=G,iu=r,(G=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),iu=t,G=i}break;case 30:Fu(e,n),r&512&&El(n,n.return);break;case 7:r&512&&El(n,n.return);default:Fu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){ff(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,B=!0}catch(t){ff(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){ff(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount==`function`)try{Xe.onCommitFiberUnmount(Ye,n)}catch{}switch(n.tag){case 26:G||Dl(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!G&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:G||Dl(n,t),Al(n);var r=bu,i=xu;Sp(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:G||Dl(n,t),Al(n);case 6:if(n.tag===6&&Al(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),B=!0}catch(e){ff(n,t,e)}else try{bu.removeChild(n.stateNode),B=!0}catch(e){ff(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:Cl(2,n,t),G||Cl(4,n,t),Su(e,t,n);break;case 1:G||(Dl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Tl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:G=(r=G)||n.memoizedState!==null,Su(e,t,n),G=r;break;case 30:Dl(n,t),Su(e,t,n);break;case 7:G||Dl(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){ff(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){ff(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new su),t;default:throw Error(i(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=_f.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(i(160));Cu(s,c,o),bu=null,xu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Ou(t,e,n),ju(e),a&4&&(Cl(3,e,e.return),Sl(3,e),Cl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),a&512&&(G||r===null||Dl(r,r.return)),a&64&&iu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=ku,Ou(t,e,n),ju(e),a&512&&(G||r===null||Dl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(iu)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[kt]||r[St]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),np(r,t,n),r[St]=e,Ft(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[St]=e,Ft(r),t=r}e.stateNode=t}}else iu||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||G||t.parentNode.removeChild(t)):a.count--,n===null?iu||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),a&512&&(G||r===null||Dl(r,r.return)),r!==null&&a&4&&Pl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=au,au=!1,Ou(t,e,n),au=o,ju(e),a&512&&(G||r===null||Dl(r,r.return)),e.flags&32){t=e.stateNode;try{cn(t,``),B=!0}catch(t){ff(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Pl(e,t,r===null?t:r.memoizedProps)),a&1024&&(ou=!0);break;case 6:if(Ou(t,e,n),ju(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,B=!0}catch(t){ff(e,e.return,t)}}break;case 3:if(B=!1,Wm=null,o=ku,ku=bm(t.containerInfo),Ou(t,e,n),ku=o,ju(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){ff(e,e.return,t)}ou&&(ou=!1,Mu(e)),B=!1;break;case 4:a=au,au=iu,r=Gt(),o=ku,ku=bm(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=o,B&&uu&&(du=!0),B=r,au=a;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(fd=Be()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=iu,l=G,u=au;iu=c||o,au=u||o,G=l||s,Ou(t,e,n),G=l,au=u,iu=c,ju(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||iu||G||(t=s||G,n=iu,r=G,iu=o||iu,G=t,Iu(e,2),iu=n,G=r),!o&&au||gu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:a&512&&(G||r===null||Dl(r,r.return)),a=Gt(),o=uu,s=(n&335544064)===n,c=e.memoizedProps,uu=s&&_i(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),s&&r!==null&&B&&(e.flags|=4),uu=o,B=a;break;case 21:break;case 7:a&512&&(G||r===null||Dl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Fl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ml(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(jl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Ll(e,W(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(cn(l,``),n.flags&=-33),Ll(e,W(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Il(e,W(e),u,s);break;default:throw Error(i(161))}}catch(t){ff(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else ru(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Yl(e,!1);else switch(e.tag){case 3:if(fu=lu=!1,Ul(),Nu(t,e),!lu&&!du){if(e=Hl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),fu=!0}Hl=null;break;case 5:Nu(t,e);break;case 4:r=lu,lu=!1,Nu(t,e),lu&&(du=!0),lu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Yl(e,!1));break;case 30:r=lu,i=Ul(),lu=!1,Nu(t,e),lu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=hi(a,o),o=hi(n.memoizedProps,o);var s=_i(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Wl=0,t=nu(e,n,t,o,s,a,!0),Wl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(jd(e,e.memoizedProps.onUpdate),Hl=i):i!==null&&(i.push.apply(i,Hl),Hl=i),lu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Cl(4,n,n.return),Iu(n,r);break;case 1:Dl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Tl(n,n.return,i),Iu(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:Dl(n,n.return),n.tag!==5&&n.tag!==27||Al(n),Iu(n,r);break;case 6:Al(n);break;case 26:Dl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||G||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:Dl(n,n.return),Iu(n,r);break;case 7:Dl(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Lu(i,a,n),Sl(4,a);break;case 1:if(Lu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ff(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)So(l[i],c)}catch(e){ff(r,r.return,e)}}s&&o&64&&wl(a),El(a,a.return);break;case 27:n&2&&Rl(a);case 5:a.tag!==5&&a.tag!==27||kl(a),Lu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 6:kl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||iu||Km(bm(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),El(a,a.return);break;case 30:Lu(i,a,n),El(a,a.return);break;case 7:El(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function Ru(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ja(n))}function zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ja(e))}function Bu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Vu(e,t,n,r),t=t.sibling;else i&&tu(t)}function Vu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&eu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Bu(e,t,n,r),a&2048&&Sl(9,t);break;case 1:Bu(e,t,n,r);break;case 3:Bu(e,t,n,r),i&&fu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&ja(a)));break;case 12:if(a&2048){Bu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){ff(t,t.return,e)}}else Bu(e,t,n,r);break;case 31:Bu(e,t,n,r);break;case 13:Bu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&eu(t),o._visibility&2?Bu(e,t,n,r):(o._visibility|=2,Hu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&eu(s),o._visibility&2?Bu(e,t,n,r):Uu(e,t)),a&2048&&Ru(s,t);break;case 24:Bu(e,t,n,r),a&2048&&zu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(ql(a.child,!0),ql(t.child,!0))),Bu(e,t,n,r);break;default:Bu(e,t,n,r)}}function Hu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Hu(a,o,s,c,i),Sl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Hu(a,o,s,c,i)):u._visibility&2?Hu(a,o,s,c,i):Uu(a,o),i&&l&2048&&Ru(o.alternate,o);break;case 24:Hu(a,o,s,c,i),i&&l&2048&&zu(o.alternate,o);break;default:Hu(a,o,s,c,i)}t=t.sibling}}function Uu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Uu(n,r),i&2048&&Ru(r.alternate,r);break;case 24:Uu(n,r),i&2048&&zu(r.alternate,r);break;default:Uu(n,r)}t=t.sibling}}var Wu=8192;function Gu(e,t,n){if(e.subtreeFlags&Wu)for(e=e.child;e!==null;)Ku(e,t,n),e=e.sibling}function Ku(e,t,n){switch(e.tag){case 26:Gu(e,t,n),e.flags&Wu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Gu(e,t,n),e.flags&Wu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=ku;ku=bm(e.stateNode.containerInfo),Gu(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Wu,Wu=16777216,Gu(e,t,n),Wu=r):Gu(e,t,n));break;case 30:if((e.flags&Wu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Bl===null&&(Bl=new Map),Bl.set(r,i)}Gu(e,t,n);break;default:Gu(e,t,n)}}function qu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yu(e),e=e.sibling}function Yu(e){switch(e.tag){case 0:case 11:case 15:Ju(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Ju(e);break;case 12:Ju(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xu(e)):Ju(e);break;default:Ju(e)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),Xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Xu(t));break;default:Xu(t)}e=e.sibling}}function Zu(e,t){for(;cu!==null;){var n=cu;switch(n.tag){case 0:case 11:case 15:Cl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ja(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cu=r;else a:for(n=e;cu!==null;){r=cu;var i=r.sibling,a=r.return;if(yu(r),r===n){cu=null;break a}if(i!==null){i.return=a,cu=i;break a}cu=a}}}var Qu={getCacheForType:function(e){var t=Ca(ka),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ca(ka).controller.signal}},K=typeof WeakMap==`function`?WeakMap:Map,q=0,J=null,Y=null,X=0,Z=0,$u=null,Q=!1,ed=!1,td=!1,nd=0,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=null,ud=null,dd=!1,fd=0,pd=0,md=1/0,hd=null,gd=null,_d=0,vd=null,yd=null,bd=0,xd=0,Sd=null,Cd=null,wd=null,Td=null,Ed=null,Dd=0,Od=null;function kd(){return q&2&&X!==0?X&-X:L.T===null?yt():Nf()}function Ad(){if(sd===0){if(!(X&536870912)||H){var e=rt;rt<<=1,!(rt&3932160)&&(rt=262144),sd=e}else sd=536870912}return e=ko.current,e!==null&&(e.flags|=32),sd}function jd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(hi(e.memoizedProps,n))),Td===null&&(Td=[]),Td.push(t.bind(null,r))}}function Md(e,t,n){(e===J&&(Z===2||Z===9)||e.cancelPendingCommit!==null)&&(zd(e,0),Id(e,X,sd,!1)),ft(e,n),q&2&&e===J||(e===J&&(!(q&2)&&(ad|=n),rd===4&&Id(e,X,sd,!1)),Tf(e))}function Nd(e,t,n){if(q&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||st(e,t),a=r?qd(e,t):Gd(e,t,!0),o=r;do{if(a===0){ed&&!r&&Id(e,t,0,!1);break}if(n=e.current.alternate,o&&!Fd(n))a=Gd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ld;var l=c.current.memoizedState.isDehydrated;if(l&&(zd(c,s).flags|=256),s=Gd(c,s,!1),s!==2&&s!==6){if(td&&!l){c.errorRecoveryDisabledLanes|=o,ad|=o,a=4;break a}o=ud,ud=a,o!==null&&(ud===null?ud=o:ud.push.apply(ud,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){zd(e,0),Id(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Id(r,t,sd,!Q);break a;case 2:ud=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=fd+300-Be(),10<a)){if(Id(r,t,sd,!Q),ot(r,0,!0)!==0)break a;bd=t,r.timeoutHandle=gp(Pd.bind(null,r,n,ud,hd,dd,t,sd,ad,cd,Q,o,`Throttled`,-0,0),a);break a}Pd(r,n,ud,hd,dd,t,sd,ad,cd,Q,o,null,-0,0)}break}}while(1);Tf(e)}function Pd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gn},Bl=null,Ku(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?fd-Be():(a&4194048)===a?pd-Be():0,m=eh(d,m),m!==null)?(bd=a,e.cancelPendingCommit=m(ef.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Id(e,a,o,!l)):ef(e,t,a,n,r,i,o,s,c,l,u,d)}function Fd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!zr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Id(e,t,n,r){t=ct(e,t),t&=~od,t&=~ad,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Qe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&mt(e,n,t)}function Ld(){return q&6?!0:(Ef(0,!1),!1)}function Rd(){if(Y!==null){if(Z===0)var e=Y.return;else e=Y,ha=ma=null,is(e),ro=null,io=0,e=Y;for(;e!==null;)xl(e.alternate,e),e=e.return;Y=null}}function zd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),bd=0,Rd(),J=e,Y=n=Mi(e.current,null),X=t,Z=0,$u=null,Q=!1,ed=st(e,t),td=!1,cd=sd=od=ad=id=rd=0,ud=ld=null,dd=!1,nd=ct(e,t),Si(),n}function Bd(e,t){U=null,L.H=mc,t===qa||t===Ya?(t=to(),Z=3):t===Ja?(t=to(),Z=4):Z=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,Y===null&&(rd=1,Ec(e,Bi(t,e.current)))}function Vd(){var e=ko.current;return e===null?!0:(X&4194048)===X?Ao===null:(X&62914560)===X||X&536870912?e===Ao:!1}function Hd(){var e=L.H;return L.H=mc,e===null?mc:e}function Ud(){var e=L.A;return L.A=Qu,e}function Wd(){rd=4,Q||(X&4194048)!==X&&ko.current!==null||(ed=!0),!(id&134217727)&&!(ad&134217727)||J===null||Id(J,X,sd,!1)}function Gd(e,t,n){var r=q;q|=2;var i=Hd(),a=Ud();(J!==e||X!==t)&&(hd=null,zd(e,t)),t=!1;var o=rd;a:do try{if(Z!==0&&Y!==null){var s=Y,c=$u;switch(Z){case 8:Rd(),o=6;break a;case 3:case 2:case 9:case 6:ko.current===null&&(t=!0);var l=Z;if(Z=0,$u=null,Zd(e,s,c,l),n&&ed){o=0;break a}break;default:l=Z,Z=0,$u=null,Zd(e,s,c,l)}}Kd(),o=rd;break}catch(t){Bd(e,t)}while(1);return t&&e.shellSuspendCounter++,ha=ma=null,q=r,L.H=i,L.A=a,Y===null&&(J=null,X=0,Si()),o}function Kd(){for(;Y!==null;)Yd(Y)}function qd(e,t){var n=q;q|=2;var r=Hd(),a=Ud();J!==e||X!==t?(hd=null,md=Be()+500,zd(e,t)):ed=st(e,t);a:do try{if(Z!==0&&Y!==null){t=Y;var o=$u;b:switch(Z){case 1:Z=0,$u=null,Zd(e,t,o,1);break;case 2:case 9:if(Za(o)){Z=0,$u=null,Xd(t);break}t=function(){Z!==2&&Z!==9||J!==e||(Z=7),Tf(e)},o.then(t,t);break a;case 3:Z=7;break a;case 4:Z=5;break a;case 7:Za(o)?(Z=0,$u=null,Xd(t)):(Z=0,$u=null,Zd(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Ym(s):c.stateNode.complete){Z=0,$u=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,Qd(u))}break b}}Z=0,$u=null,Zd(e,t,o,5);break;case 6:Z=0,$u=null,Zd(e,t,o,6);break;case 8:Rd(),rd=6;break a;default:throw Error(i(462))}}Jd();break}catch(t){Bd(e,t)}while(1);return ha=ma=null,L.H=r,L.A=a,q=n,Y===null?(J=null,X=0,Si(),rd):0}function Jd(){for(;Y!==null&&!Re();)Yd(Y)}function Yd(e){var t=fl(e.alternate,e,nd);e.memoizedProps=e.pendingProps,t===null?Qd(e):Y=t}function Xd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:is(t);var r=t;r===ta&&(H?(ca(r),r.tag===5&&r.stateNode!=null&&(na=r.stateNode)):(ca(r),H=!0));default:xl(n,t),t=Y=Ni(t,nd),t=fl(n,t,nd)}e.memoizedProps=e.pendingProps,t===null?Qd(e):Y=t}function Zd(e,t,n,r){ha=ma=null,is(t),ro=null,io=0;var i=t.return;try{if(jc(e,i,t,n,X)){rd=1,Ec(e,Bi(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;rd=1,Ec(e,Bi(n,e.current)),Y=null;return}t.flags&32768?(H||r===1?e=!0:ed||X&536870912?e=!1:(Q=e=!0,(r===2||r===9||r===3||r===6)&&(r=ko.current,r!==null&&r.tag===13&&(r.flags|=16384))),$d(t,e)):Qd(t)}function Qd(e){var t=e;do{if(t.flags&32768){$d(t,Q);return}e=t.return;var n=yl(t.alternate,t,nd);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);rd===0&&(rd=5)}function $d(e,t){do{var n=bl(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);rd=6,Y=null}function ef(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do lf();while(_d!==0);if(q&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===J&&(Y=J=null,X=0),yd=t,vd=e,bd=n,Sd=a,Cd=r,tf(e,t,n,s,c,l,f)}}function tf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(xd=s,s|=xi,pt(e,n,s,r,i,a),Td=null,(n&335544064)===n?(Ed=Pa(e),r=10262):(Ed=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,vf(We,function(){return uf(),null})):(e.callbackNode=null,e.callbackPriority=0),zl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=L.T,L.T=null,i=R.p,R.p=2,a=q,q|=4;try{pu(e,t,n)}finally{q=a,R.p=i,L.T=r}}_d=1,zl?wd=Mp(o,e.containerInfo,Ed,af,of,rf,sf,uf,nf,null,null):(af(),of(),sf())}function nf(e){if(_d!==0){var t=vd.onRecoverableError;t(e,{componentStack:null})}}function rf(){_d===3&&(_d=0,Pu(yd,vd),_d=4)}function af(){if(_d===1){_d=0;var e=vd,t=yd,n=bd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=L.T,L.T=null;var i=R.p;R.p=2;var a=q;q|=4;try{uu=du=!1,Au(t,e,n),n=cp;var o=Gr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Wr(s.ownerDocument.documentElement,s)){if(c!==null&&Kr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Ur(s,h),v=Ur(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!sp,cp=sp=null}finally{q=a,R.p=i,L.T=r}}e.current=t,_d=2}}function of(){if(_d===2){_d=0;var e=vd,t=yd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=L.T,L.T=null;var r=R.p;R.p=2;var i=q;q|=4;try{hu(e,t.alternate,t)}finally{q=i,R.p=r,L.T=n}}_d=3}}function sf(){if(_d===4||_d===3){_d=0;var e=wd;wd=null,ze();var t=vd,n=yd,r=bd,i=Cd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?_d=5:(_d=0,yd=vd=null,cf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(gd=null),vt(r),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Ye,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=L.T,a=R.p,R.p=2,L.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{L.T=n,R.p=a}}if(i=Td,o=Ed,Ed=null,i!==null&&(Td=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);bd&3&&lf(),Tf(t),a=t.pendingLanes,r&261930&&a&42?t===Od?Dd++:(Dd=0,Od=t):(Dd=0,Od=null),Ef(0,!1)}}function cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ja(t)))}function lf(){return wd!==null&&(wd.skipTransition(),wd=null),af(),of(),sf(),uf()}function uf(){if(_d!==5)return!1;var e=vd,t=xd;xd=0;var n=vt(bd),r=L.T,a=R.p;try{R.p=32>n?32:n,L.T=null,n=Sd,Sd=null;var o=vd,s=bd;if(_d=0,yd=vd=null,bd=0,q&6)throw Error(i(331));var c=q;if(q|=4,Yu(o.current),Vu(o,o.current,s,n),q=c,Ef(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Ye,o)}catch{}return!0}finally{R.p=a,L.T=r,cf(e,t)}}function df(e,t,n){t=Bi(n,t),t=Oc(e.stateNode,t,2),e=go(e,t,2),e!==null&&(ft(e,2),Tf(e))}function ff(e,t,n){if(e.tag===3)df(e,e,n);else for(;t!==null;){if(t.tag===3){df(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gd===null||!gd.has(r))){e=Bi(n,e),n=kc(2),r=go(t,n,2),r!==null&&(Ac(n,r,t,e),ft(r,2),Tf(r));break}}t=t.return}}function pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new K;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(td=!0,i.add(n),e=mf.bind(null,e,t,n),t.then(e,e))}function mf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,J===e&&(X&n)===n&&(rd===4||rd===3&&(X&62914560)===X&&300>Be()-fd?q&2?od|=n:zd(e,0):od|=n,cd===X&&(cd=0)),Tf(e)}function hf(e,t){t===0&&(t=ut()),e=Ti(e,t),e!==null&&(ft(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function _f(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),hf(e,n)}function vf(e,t){return Ie(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,Mf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,jf(r,a))}else a=X,a=ot(r,r===J?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||st(r,a)||(n=!0,jf(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&hp()&&(e=wf);for(var t=Be(),n=null,r=yf;r!==null;){var i=r.next,a=kf(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}_d!==0&&_d!==5||Ef(e,!1),wf!==0&&(wf=0)}function kf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Qe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=lt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=J,n=X,n=ot(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Z===2||Z===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Le(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||st(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Le(r),vt(n)){case 2:case 8:n=Ue;break;case 32:n=We;break;case 268435456:n=Ke;break;default:n=We}return r=Af.bind(null,e),n=Ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Le(r),e.callbackPriority=2,e.callbackNode=null,2}function Af(e,t){if(_d!==0&&_d!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lf()&&e.callbackNode!==n)return null;var r=X;return r=ot(e,e===J?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Nd(e,r,t),kf(e,Be()),e.callbackNode!=null&&e.callbackNode===n?Af.bind(null,e):null)}function jf(e,t){if(lf())return null;Nd(e,t,!0)}function Mf(){bp(function(){q&6?Ie(He,Df):Of()})}function Nf(){if(wf===0){var e=La;e===0&&(e=nt,nt<<=1,!(nt&261888)&&(nt=256)),wf=e}return wf}function Pf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:hn(e)}function Ff(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Pf((i[Ct]||null).action),o=r.submitter;o&&(t=(t=o[Ct]||null)?Pf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Ln(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(wf!==0){var e=new FormData(i,o);ec(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ec(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var If=0;If<fi.length;If++){var Lf=fi[If];pi(Lf.toLowerCase(),`on`+(Lf[0].toUpperCase()+Lf.slice(1)))}pi(ii,`onAnimationEnd`),pi(ai,`onAnimationIteration`),pi(oi,`onAnimationStart`),pi(`dblclick`,`onDoubleClick`),pi(`focusin`,`onFocus`),pi(`focusout`,`onBlur`),pi(si,`onTransitionRun`),pi(ci,`onTransitionStart`),pi(li,`onTransitionCancel`),pi(ui,`onTransitionEnd`),Bt(`onMouseEnter`,[`mouseout`,`mouseover`]),Bt(`onMouseLeave`,[`mouseout`,`mouseover`]),Bt(`onPointerEnter`,[`pointerout`,`pointerover`]),Bt(`onPointerLeave`,[`pointerout`,`pointerover`]),zt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),zt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),zt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),zt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Rf=`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(` `),zf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Rf));function Bf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){vi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){vi(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[Tt];n===void 0&&(n=t[Tt]=new Set);var r=e+`__bubble`;n.has(r)||(Wf(t,e,2,!1),n.add(r))}function Vf(e,t,n){var r=0;t&&(r|=4),Wf(n,e,r,t)}var Hf=`_reactListening`+Math.random().toString(36).slice(2);function Uf(e){if(!e[Hf]){e[Hf]=!0,Lt.forEach(function(t){t!==`selectionchange`&&(zf.has(t)||Vf(t,!1,e),Vf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hf]||(t[Hf]=!0,Vf(`selectionchange`,!1,t))}}function Wf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!En||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Gf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=z(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Cn(function(){var r=a,i=vn(n),s=[];a:{var c=di.get(e);if(c!==void 0){var l=Ln,u=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:l=tr;break;case`focusin`:u=`focus`,l=Kn;break;case`focusout`:u=`blur`,l=Kn;break;case`beforeblur`:case`afterblur`:l=Kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ir;break;case ii:case ai:case oi:l=qn;break;case ui:l=ar;break;case`scroll`:case`scrollend`:l=zn;break;case`wheel`:l=or;break;case`copy`:case`cut`:case`paste`:l=Jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=nr;break;case`submit`:l=rr;break;case`toggle`:case`beforetoggle`:l=sr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=wn(m,p),g!=null&&d.push(Kf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==_n&&(u=n.relatedTarget||n.fromElement)&&(z(u)||u[wt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?z(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=nr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Nt(c),h=l==null?u:Nt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,z(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Jf):null,c!==null&&Yf(s,u,c,d,!1),l!==null&&f!==null&&Yf(s,f,l,d,!0)))}a:{if(c=r?Nt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Dr;else if(xr(c)){if(Or)_=Lr;else{_=Fr;var v=Pr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&fn(r.elementType)&&(_=Dr):_=Ir;if(_&&=_(e,r)){Sr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Nt(r):window,e){case`focusin`:(xr(v)||v.contentEditable===`true`)&&(Jr=v,Yr=r,Xr=null);break;case`focusout`:Xr=Yr=Jr=null;break;case`mousedown`:Zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Zr=!1,Qr(s,n,i);break;case`selectionchange`:if(qr)break;case`keydown`:case`keyup`:Qr(s,n,i)}var y;if(lr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else _r?hr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(fr&&n.locale!==`ko`&&(_r||b!==`onCompositionStart`?b===`onCompositionEnd`&&_r&&(y=jn()):(On=i,kn=`value`in On?On.value:On.textContent,_r=!0)),v=qf(r,b),0<v.length&&(b=new Yn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=gr(n),y!==null&&(b.data=y)))),(y=dr?vr(e,n):yr(e,n))&&(b=qf(r,`onBeforeInput`),0<b.length&&(v=new Yn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Ff(s,e,r,n,i)}Bf(s,t)})}function Kf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=wn(e,n),i!=null&&r.unshift(Kf(e,i,a)),i=wn(e,t),i!=null&&r.push(Kf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Jf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=wn(n,a),l!=null&&o.unshift(Kf(n,l,c))):i||(l=wn(n,a),l!=null&&o.push(Kf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Xf=/\r\n?/g,Zf=/\u0000|\uFFFD/g;function Qf(e){return(typeof e==`string`?e:``+e).replace(Xf,`
|
|
10
|
-
`).replace(Zf,``)}function $f(e,t){return t=Qf(t),Qf(e)===t}function ep(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&cn(e,``+r);else return;break;case`className`:qt(e,`class`,r);break;case`tabIndex`:qt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:qt(e,n,r);break;case`style`:dn(e,r,o);return;case`data`:if(t!==`object`){qt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ep(e,t,`name`,a.name,a,null),ep(e,t,`formEncType`,a.formEncType,a,null),ep(e,t,`formMethod`,a.formMethod,a,null),ep(e,t,`formTarget`,a.formTarget,a,null)):(ep(e,t,`encType`,a.encType,a,null),ep(e,t,`method`,a.method,a,null),ep(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=gn);return;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=hn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Kt(e,`popover`,r);break;case`xlinkActuate`:Jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Kt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=pn.get(n)||n,Kt(e,n,r);else return}B=!0}function tp(e,t,n,r,a,o){switch(n){case`style`:dn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)cn(e,``+r);else return;break;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=gn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Ct]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}B=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Kt(e,n,r)}return}B=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ep(e,t,o,s,n,null)}}a&&ep(e,t,`srcSet`,n.srcSet,n,null),r&&ep(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ep(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ep(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&an(e,!!r,n,!0):an(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ep(e,t,s,c,n,null)}sn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ep(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)$(Rf[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ep(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ep(e,t,c,r,n,null))}var rp={};function ip(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ep(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(B=!0),o=m;break;case`name`:m!==f&&(B=!0),a=m;break;case`checked`:m!==f&&(B=!0),u=m;break;case`defaultChecked`:m!==f&&(B=!0),d=m;break;case`value`:m!==f&&(B=!0),s=m;break;case`defaultValue`:m!==f&&(B=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ep(e,t,p,m,r,f)}}V(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ep(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(B=!0),p=o;break;case`defaultValue`:o!==l&&(B=!0),c=o;break;case`multiple`:o!==l&&(B=!0),s=o;default:o!==l&&ep(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?an(e,!!n,n?[]:``,!1):an(e,!!n,t,!0)):an(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ep(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(B=!0),p=a;break;case`defaultValue`:a!==o&&(B=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ep(e,t,s,a,r,o)}on(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ep(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(B=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ep(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ep(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ep(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ep(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ep(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&ap(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function fp(e,t,n,r){return n=lp(n).createElement(e),n[St]=r,n[Ct]=t,np(n,e,t),Ft(n),n}function pp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[kt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,g(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=g(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=z(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(f(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(f(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Zp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nm(n),jt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[kt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ep(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===gn&&(e.onclick=null),jt(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jt(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=R.d;R.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=Ld();return e||t}function Cm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=tn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+tn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+tn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+tn(n.imageSizes)+`"]`)):i+=`[href="`+tn(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[At]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+tn(r)+`"][href="`+tn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Pt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Ft(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Pt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ft(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Pt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Ft(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Se.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Pt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Pt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+tn(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[At]){r.loading=1;return}}else t=e.createElement(`link`),t[At]=!0,t.onload=t.onerror=It.bind(null,t),np(t,`link`,n),Ft(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+tn(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+tn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Ft(a),a):(r=n,(a=vm.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[kt]||a[St]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:F,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dt(0),this.hiddenUpdates=dt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ai(3,null,null,t),e.current=a,a.stateNode=e,t=Aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function uh(e){return e?(e=Oi,e):Oi}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Md(n,e,t),_o(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Ti(e,67108864);t!==null&&Md(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=kd();t=_t(t);var n=Ti(e,t);n!==null&&Md(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=2,yh(e,t,n,r)}finally{R.p=a,L.T=i}}function vh(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=8,yh(e,t,n,r)}finally{R.p=a,L.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Gf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=at(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Qe(o);s.entanglements[1]|=c,o&=~c}Tf(a),!(q&6)&&(md=Be()+500,Ef(0,!1))}}break;case 31:case 13:s=Ti(a,2),s!==null&&Md(s,a,2),Ld(),ph(a,2)}if(a=bh(r),a===null&&Gf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Gf(e,t,r,null,n)}}function bh(e){return e=vn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=z(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ve()){case He:return 2;case Ue:return 8;case We:case Ge:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`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 Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Mt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=z(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,bt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,bt(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_n=r,n.target.dispatchEvent(r),_n=null}else return t=Mt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Ct]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ct]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,kd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Ld(),t[wt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=yt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));R.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:L,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Ye=Jh.inject(qh),Xe=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Cc,s=wc,c=Tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[wt]=t.current,Uf(e),new Wh(t)}})),y=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=v()})),b=t(p(),1),x=y();function S(e){return e.anchor.kind===`line`}function C(e){return e.anchor.kind===`detached`}function w(e){let t=new Map;for(let n of e){if(!S(n))continue;let e={lineNumber:n.anchor.lineNumber,side:n.anchor.side,metadata:{type:`thread`,thread:n}},r=t.get(n.anchor.fileId);r?r.push(e):t.set(n.anchor.fileId,[e])}return t}function T(e){let t=new Map;for(let n of e)S(n)&&t.set(n.anchor.fileId,(t.get(n.anchor.fileId)??0)+1);return t}function E(e,t,n,r){return!r||n?.fileId!==t?e:[...e,r]}function D(e,t){let n=t.find(t=>t.id===e.fileId);return e.side===`deletions`?n?.oldRepoPath??n?.newRepoPath??e.fileId:n?.newRepoPath??n?.oldRepoPath??e.fileId}function O(e){let t=(0,b.useRef)(e);return(0,b.useInsertionEffect)(()=>void(t.current=e)),(0,b.useCallback)((...e)=>t.current(...e),[])}var k=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),A=n(((e,t)=>{t.exports=k()}))(),j=(0,b.createContext)(void 0);function M(){return(0,b.useContext)(j)}var N={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},P={display:`contents`};function F(){return null}var ee=`diffs-container`,te=/(?=^From [a-f0-9]+ .+$)/m,ne=/(?=^diff --git)/gm,re=/(?<=\n)/,ie=/^(---|\+\+\+)\s+([^\t\r\n]+)/,ae=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,oe=`header-prefix`,se=`header-filename-suffix`,ce=`header-metadata`,le=`header-custom`,ue={dark:`pierre-dark`,light:`pierre-light`},I=`data-theme-css`,de=`data-unsafe-css`,fe=`data-diffs-scrollbar-measure`,pe=`--diffs-scrollbar-gutter-measured`,L=1e5,R={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...R});var me=Object.freeze({fromStart:0,fromEnd:0}),he={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},ge=Object.freeze([]),_e={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function ve(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function ye({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function be(e,t){return e-(t===0?0:1)}function xe(e,t){return be(e,t)+t}function Se(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:Ce(n,e.startContentIndex)}}function Ce(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function we({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d,getAnnotationSlotName:f=ve}){let p=n?.(e),m=r?.(e),h=i?.(e),g=a?.(e);return(0,A.jsxs)(A.Fragment,{children:[p==null?(0,A.jsxs)(A.Fragment,{children:[m!=null&&(0,A.jsx)(`div`,{slot:`header-prefix`,children:m}),h!=null&&(0,A.jsx)(`div`,{slot:`header-filename-suffix`,children:h}),g!=null&&(0,A.jsx)(`div`,{slot:`header-metadata`,children:g})]}):(0,A.jsx)(`div`,{slot:le,children:p}),o!=null&&l?.map((t,n)=>(0,A.jsx)(`div`,{slot:f(t),children:o(t,e)},n)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=Te(t,e);return(0,A.jsx)(`div`,{slot:n,style:P,children:c(t,d)},n)}),s!=null&&(0,A.jsx)(`div`,{slot:`gutter-utility-slot`,style:N,children:s(u)})]})}function Te(e,t){let n=Se(e,t);return n==null?void 0:ye({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}var Ee,De=0,Oe=class extends Error{constructor(){super(`Highlighter is disposed`),this.name=`HighlighterDisposedError`}};function ke(){return Ee}function Ae(e){return e??Ee??`shiki-js`}function je(e){if(Ee!=null&&Ee!==e)throw Error(`Cannot load the "${e}" highlighter while "${Ee}" is in use. Only one highlighter type can be active at a time; dispose every "${Ee}" instance (disposeHighlighter() disposes the shared one) before switching.`)}function Me(e){je(e),Ee=e,De++}function Ne(){De--,De===0&&(Ee=void 0)}function Pe(e=ue){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}var Fe=new Map,Ie=new Map,Le=new Map,Re=new Set;function ze(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}function Be(e){let t;return()=>t??=e().then(e=>(t=e,e),e=>{throw t=void 0,e})}function Ve(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var He=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},Ue=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},We=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function Ge(e={}){let t=new Map,n=new Map,r=new Map,i=0;function a(e,n){if(t.has(e))throw new He(e);t.set(e,n)}function o(e,n){return!t.has(e)&&(t.set(e,n),!0)}function s(e){return t.has(e)}function c(a){let o=n.get(a);if(o!==void 0)return Promise.resolve(o);let s=r.get(a);if(s!==void 0)return s;let c=t.get(a);if(c===void 0&&e.fallbackLoader===void 0)return Promise.reject(new Ue(a));let l=i,u=Promise.resolve().then(()=>c===void 0?e.fallbackLoader?.(a):c()).then(async t=>{if(t===void 0)throw new Ue(a);let o=Ve(t),s=e.normalizeTheme===void 0?o:await e.normalizeTheme(o,a);return l===i&&n.set(a,s),r.get(a)===u&&r.delete(a),s}).catch(e=>{throw r.get(a)===u&&r.delete(a),e});return r.set(a,u),u}function l(e){return Promise.all(e.map(e=>c(e)))}function u(e,t){n.set(e,t)}function d(e){for(let[t,n]of e)u(t,n)}function f(e){return n.get(e)}function p(e){let t=[];for(let r of e){let e=n.get(r);if(e===void 0)throw new We(r);t.push(e)}return t}function m(e){return n.has(e)}function h(e){for(let t of e)if(!n.has(t))return!1;return!0}function g(e){let t=n.get(e);return t===void 0?c(e):t}function _(){i++,n.clear(),r.clear()}return{clearResolvedThemes:_,getResolvedOrResolveTheme:g,getResolvedTheme:f,getResolvedThemes:p,hasRegisteredTheme:s,hasResolvedTheme:m,hasResolvedThemes:h,registerTheme:a,registerThemeIfAbsent:o,resolveTheme:c,resolveThemes:l,seedResolvedTheme:u,seedResolvedThemes:d}}var Ke=new Map,qe=new Map,Je=Be(()=>r(()=>import(`./loader-DYYMIDWx.js`),__vite__mapDeps([0,1]),import.meta.url)),Ye=Be(()=>r(()=>import(`./themes-D3P9yN9_.js`),__vite__mapDeps([2,1]),import.meta.url)),Xe=Be(()=>r(()=>import(`./core-NkxL1yZC.js`),[],import.meta.url)),Ze=[[`editor.lineHighlightBackground`,`editor.active_line.background`],[`editor.selectionBackground`,`element.selected`],[`editor.findMatchBackground`,`search.match_background`],[`editor.findMatchHighlightBackground`,`search.match_background`],[`editorBracketMatch.background`,`editor.document_highlight.bracket_background`],[`editorError.foreground`,`error`],[`editorWarning.foreground`,`warning`],[`editorInfo.foreground`,`info`],[`editorHint.foreground`,`hint`],[`gitDecoration.addedResourceForeground`,`created`,`terminal.ansi.green`],[`gitDecoration.deletedResourceForeground`,`deleted`,`terminal.ansi.red`],[`gitDecoration.modifiedResourceForeground`,`modified`,`terminal.ansi.blue`]];function Qe(e,t){let n=`themes`in t?t.themes[0]:t;if(n==null)throw Error(`Theme "${e}" is an empty Zed theme family.`);let r={...n,name:e},i={};for(let[e,t]of Object.entries(r.style))typeof t==`string`&&(i[e]=t);let a=r.style.players?.[0];a?.cursor!=null&&(i[`editorCursor.foreground`]??=a.cursor),a?.selection!=null&&(i[`editor.selectionBackground`]??=a.selection);for(let[e,...t]of Ze){if(i[e]!=null)continue;let n=t.find(e=>i[e]!=null);n!=null&&(i[e]=i[n])}if(r.cssVariables===!0)i[`editor.foreground`]=`var(--hls-foreground)`,i[`editor.background`]=`var(--hls-background)`;else if(typeof r.cssVariables==`object`){i[`editor.foreground`]??=i.text??i.foreground??`foreground`,i[`editor.background`]??=i.background??`background`;let{prefix:e=`--hls-`,defaults:t}=r.cssVariables;for(let[n,r]of Object.entries(i)){let a=t?.[r];i[n]=`var(${e}${r}${a?`, ${a}`:``})`}}let o=r.appearance===`light`?`light`:`dark`;return{name:e,type:o,colors:i,zed:r,fg:i[`editor.foreground`]??i.text??i.foreground??(o===`light`?`#333333`:`#bbbbbb`),bg:i[`editor.background`]??i.background??(o===`light`?`#ffffff`:`#1e1e1e`)}}function $e(e){let t=qe.get(e);return t??(t=Ge({fallbackLoader:async t=>{if(typeof __DIFFS_WORKER__<`u`?__DIFFS_WORKER__:ze())throw Error(`Theme "${t}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedThemes parameter.`);let n=Ke.get(t);if(e===`highlights`){let e=n?.zed??n?.diffs;if(e!=null){let n=await e(),r=`default`in n?n.default:n;if(`zed`in r&&r.zed!=null)return r;if(`style`in r||`themes`in r)return Qe(t,r);throw Error(`Theme "${t}" is a TextMate theme; register a Zed theme with registerCustomTheme(name, loader, 'zed') for Highlights.`)}let r=Je(),{themes:i}=r instanceof Promise?await r:r,a=i[t];if(a!=null)return Qe(t,(await a()).default);if(n?.textmate!=null)throw Error(`Theme "${t}" is only registered for TextMate; use registerCustomTheme(name, loader, 'zed') for Highlights.`)}else{let e=n?.textmate??n?.diffs,r;if(e!=null){let t=await e();r=`default`in t?t.default:t}else{let e=Ye(),{themes:i}=e instanceof Promise?await e:e,a=i.getTheme(t);if(a==null&&n?.zed!=null)throw Error(`Theme "${t}" is only registered for Zed; use registerCustomTheme(name, loader, 'textmate') for Shiki.`);if(a==null)throw Error(`No valid theme loader registered for "${t}"`);let o=await a.load();r=`default`in o?o.default:o}if(`style`in r||`themes`in r)throw Error(`Theme "${t}" is a Zed theme; use preferredHighlighter: 'highlights' or register a TextMate theme for Shiki.`);let i=Xe(),{normalizeTheme:a,createCssVariablesTheme:o}=i instanceof Promise?await i:i;if(`cssVariables`in r&&r.cssVariables!=null)return{...r,textmate:a(o(r.cssVariables))};if(`textmate`in r&&r.textmate!=null)return{...r,textmate:a(r.textmate)};let s=a(r);return{name:s.name,type:s.type,fg:s.fg,bg:s.bg,colors:s.colors,textmate:s}}throw Error(`No valid theme loader registered for "${t}"`)},normalizeTheme:(e,t)=>{if(e.name!==t)throw Error(`resolvedTheme: themeName: ${t} does not match theme.name: ${e.name}`);return e}}),qe.set(e,t)),t}function et(e,t=Ae()){return typeof t!=`string`&&t.isDisposed?!1:(typeof t==`string`?$e(t):t.themeResolver).hasResolvedThemes(Pe(e))}var tt;async function nt(e){let t=Ae(e);Me(t);try{if(t===`highlights`){let{HighlightsHighlighter:e}=await r(async()=>{let{HighlightsHighlighter:e}=await import(`./highlights-Coi8xHW0.js`);return{HighlightsHighlighter:e}},__vite__mapDeps([3,4]),import.meta.url);return new e}let{ShikiHighlighter:e}=await r(async()=>{let{ShikiHighlighter:e}=await import(`./shiki-B8l9Ufae.js`);return{ShikiHighlighter:e}},__vite__mapDeps([5,1,4]),import.meta.url);return await e.create(t)}finally{Ne()}}async function rt({themes:e,langs:t,preferredHighlighter:n}){it();let r=tt??=nt(ke()??n),i;try{i=await r}catch(e){throw tt===r&&(tt=void 0),e}if(tt===r&&(tt=i),await Promise.all([i.themeResolver.resolveThemes(e),i.loadLanguages(t)]),i.isDisposed)throw new Oe;return i}function it(){tt!=null&&!(`then`in tt)&&tt.isDisposed&&(tt=void 0)}function at({theme:e,lang:t,langs:n}={}){it();let r=tt;if(!(r==null||`then`in r||e!=null&&!et(e,r)||(t!=null||n!=null)&&!r.hasLoadedLanguages([...t==null?[]:[t],...n??[]])))return r}async function ot(e){await rt(e)}function st(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function ct(e,t){let n=Array.isArray(e)?e:[e];return t==null?n.every(e=>e===`text`||e===`ansi`||Re.has(e)):t.hasLoadedLanguages(n)}var lt=new Map,ut={"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`,odin:`odin`,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`,BUCK:`python`,BUILD:`python`,PACKAGE:`python`,WORKSPACE:`python`,Tiltfile:`python`,bazel:`python`,bxl:`python`,bzl:`python`,bzlmod:`python`,star:`python`,sky:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,jbuilder:`ruby`,builder:`ruby`,rabl:`ruby`,arb:`ruby`,ru:`ruby`,podspec:`ruby`,Gemfile:`ruby`,Rakefile:`ruby`,Guardfile:`ruby`,Capfile:`ruby`,Berksfile:`ruby`,Brewfile:`ruby`,Vagrantfile:`ruby`,Thorfile:`ruby`,Appraisals:`ruby`,Dangerfile:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function dt(e){let t=ft(e);if(t!=null)return t;let n=e.split(/[/\\]/).pop()??e;return n===e?`text`:ft(n)??`text`}function ft(e){if(lt.has(e))return lt.get(e)??`text`;if(Object.hasOwn(ut,e))return ut[e]??null;let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(lt.has(t[1]))return lt.get(t[1])??`text`;if(Object.hasOwn(ut,t[1]))return ut[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return lt.has(n)?lt.get(n)??`text`:Object.hasOwn(ut,n)?ut[n]??`text`:null}function pt(e,t){for(let n of t)e.push(n)}function mt(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var ht=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,gt=/^0(?:\.0+)?%?$/;function _t(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function vt(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function yt(e){if(e==null)return null;let t=vt(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function bt(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||ht.test(t))return!0;let n=_t(t);return n!=null&>.test(n)}function xt(e,t,n){if(t==null||n==null)return!1;let r=yt(e),i=yt(t),a=yt(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}var St=new WeakMap;function Ct(e){let t=St.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;wt(r,`editor.background`,i),wt(r,`editor.foreground`,a),wt(r,`sideBar.background`,o),wt(r,`sideBar.foreground`,s),wt(r,`input.background`,n[`input.background`]??o),wt(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),wt(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),wt(r,`gitDecoration.addedResourceForeground`,Tt(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),wt(r,`gitDecoration.modifiedResourceForeground`,Tt(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),wt(r,`gitDecoration.deletedResourceForeground`,Tt(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(bt(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(bt(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(Et(l,o)||xt(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return St.set(e,u),u}function wt(e,t,n){n!=null&&n!==``&&(e[t]=n)}function Tt(...e){for(let t of e)if(t!=null&&t!==``)return t}function Et(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function Dt({theme:e=ue,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=Ot(i,t);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${mt(`global`)}fg:${a.fg};`,r+=`${mt(`global`)}bg:${a.bg};`,r+=kt(i,n)}else{let n=t.getTheme(e.dark),i=Ot(n,t);r+=`${mt(`global`)}dark:${i.fg};`,r+=`${mt(`global`)}dark-bg:${i.bg};`,r+=kt(n,`dark`),n=t.getTheme(e.light),i=Ot(n,t),r+=`${mt(`global`)}light:${i.fg};`,r+=`${mt(`global`)}light-bg:${i.bg};`,r+=kt(n,`light`)}return r}function Ot(e,t){if(t.name===`highlights`&&e.zed?.cssVariables===!0){let e=mt(`token`);return{fg:`var(${e}foreground)`,bg:`var(${e}background)`}}return Ct(e)}function kt(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${mt(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${mt(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${mt(`global`)}${t}modified-color:${a};`),n}function At(e,t,n){return{lang:e,...typeof t==`string`?{theme:t}:{themes:t},defaultColor:!1,cssVariablePrefix:mt(`token`),tokenizeMaxLineLength:n,tokenizeTimeLimit:0}}function jt(e){return{type:`text`,value:e}}function z({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function Mt({name:e,width:t=16,height:n=16,properties:r}){return z({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[z({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function Nt(e){return z({tagName:`div`,properties:{"data-gutter":``},children:e})}function Pt(e,t,n,r={}){return z({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[z({tagName:`span`,properties:{"data-line-number-content":``},children:[jt(`${t}`)]})]})}function Ft(e,t,n){return z({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function It(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(jt(`
|
|
11
|
-
`)),e}function Lt(e,t,n,{retain:r=!0}={}){let i=!1,a;Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){if(i)return a;let o=n();return r?(a=o,i=!0,Object.getOwnPropertyDescriptor(e,t)?.configurable===!0&&Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:a}),a):o},set(n){if(Object.getOwnPropertyDescriptor(e,t)?.configurable===!0)Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n});else if(Object.isFrozen(e))throw TypeError(`Cannot assign to read only array index '${t}'`);else a=n,i=!0}})}var Rt=new WeakMap;function zt(e,t=!1){let{htmlStyle:n}=e;if(n!=null){let e=t?Rt.get(n):void 0;if(e==null){e=``;for(let t in n)e+=`${e===``?``:`;`}${t}:${n[t]}`;t&&Rt.set(n,e)}return e}let r=e.color==null?``:`color:${e.color}`;if(e.bgColor!=null&&(r+=`;background-color:${e.bgColor}`),e.fontStyle!=null){e.fontStyle&1&&(r+=`;font-style:italic`),e.fontStyle&2&&(r+=`;font-weight:bold`);let t=!!(e.fontStyle&4),n=!!(e.fontStyle&8);(t||n)&&(r+=`;text-decoration:${t?`underline`:``}${t&&n?` `:``}${n?`line-through`:``}`)}return r.replace(/^;/,``)}var Bt=Symbol(`no-token`),Vt=Symbol(`multiple-tokens`);function Ht(e){let t=Ut(e);if(t!=null)return t;let n=Bt,r=[],i=[],a,o=()=>{if(i.length===0||a==null)i=[],a=void 0;else if(i.length===1){let e=i[0];if(e?.type===`element`){B(e,a);for(let t of e.children)Wt(t)}else Wt(e);r.push(e),i=[],a=void 0}else{for(let e of i)Wt(e);r.push(z({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0}},s=e=>{e!==Bt&&(e===Vt?n=Vt:n===Bt?n=e:n!==e&&(n=Vt))};for(let t of e.children){let e=t.type===`element`?Ht(t):Bt;s(e),typeof e==`number`?(a!=null&&a!==e&&o(),a??=e,i.push(t)):(o(),r.push(t))}return o(),e.children=r,n}function Ut(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function Wt(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)Wt(t)}}function B(e,t){e.properties[`data-char`]=t}function Gt(e,{state:t,lazyLineAST:n=!1,cacheHtmlStyles:r=!1,useTokenTransformer:i=!1,mergeWhitespaces:a=`always`,decorations:o=[],lineOffsets:s=[]}){let c;for(let t of o){let n=c??=new Map,r={...t,start:Yt(t.start,s),end:Yt(t.end,s)},i=Math.min(r.end.line,e.length-1);for(let e=r.start.line;e<=i;e++){let t=n.get(e);t??n.set(e,t=[]),t.push(r)}}let l=(e,n)=>{let o;if(i||a!==`never`){let t=``,n=0;for(let r=0;r<e.length;r++){let a=e[r];if(i){let t=a.content.trim();if(t!==``&&t!==a.content){o??=e.slice(0,r);let n=a.content.indexOf(t);n>0&&o.push({content:a.content.slice(0,n),offset:a.offset}),o.push({...a,content:t,offset:a.offset+n});let i=n+t.length;i<a.content.length&&o.push({content:a.content.slice(i),offset:a.offset+i});continue}}else{let i=!!((a.fontStyle??0)&12);if(!i&&/^\s+$/.test(a.content)&&r<e.length-1){o??=e.slice(0,r),t===``&&(n=a.offset),t+=a.content;continue}t!==``&&o!=null&&(i?o.push({content:t,offset:n}):a={...a,content:t+a.content,offset:n},t=``)}o?.push(a)}}o??=e;let s={type:`element`,tagName:t==null?`span`:`div`,properties:t==null?{class:`line`}:{},children:[]},l=c?.get(n),u=l==null?Kt(s,o,i,r):qt(s,o,l,n,i,r);return i&&u===0&&s.children.push({type:`element`,tagName:`br`,properties:{},children:[]}),i&&l!=null&&Ht(s),t==null?s:It(s,n+1,t)};if(!n)return e.map(l);let u=Array(e.length);for(let t=0;t<e.length;t++){let n=e[t];Lt(u,t,()=>l(n,t))}return u}function Kt(e,t,n,r){let i=0;for(let a of t)a.content!==``&&(e.children.push(Jt(a,zt(a,r),a.content,i,n)),i+=a.content.length);return i}function qt(e,t,n,r,i,a){n.length>1&&n.sort((e,t)=>e.start.line===t.start.line?e.start.character===t.start.character?e.end.line===t.end.line?t.end.character-e.end.character:t.end.line-e.end.line:e.start.character-t.start.character:e.start.line-t.start.line);let o=t.reduce((e,t)=>e+t.content.length,0),s=[];for(let e=0;e<n.length;e++){let t=n[e],i={decoration:t,order:e,from:t.start.line===r?t.start.character:0,to:t.end.line===r?t.end.character:o};s.push({position:Math.max(0,Math.min(i.from,o)),range:i,start:!0},{position:Math.max(0,Math.min(i.to,o)),range:i,start:!1})}s.sort((e,t)=>e.position-t.position);let c=[],l=[],u=0,d=(e,t)=>{let n=0,r=c.length;for(;n<r;){let t=n+r>>>1;c[t].order<e.order?n=t+1:r=t}t?c.splice(n,0,e):c[n]===e&&c.splice(n,1)},f=()=>{let t=e,n=0;for(let e of c){if(l[n]?.range!==e){l.length=n;let r={type:`element`,tagName:`span`,properties:{...e.decoration.properties},children:[]};t.children.push(r),l.push({range:e,node:r})}t=l[n++].node}return l.length=n,t},p=e,m=e=>{let t=u;for(;s[u]?.position===e;)u++;let n=!1;for(let n=t;n<u;n++){let{range:t,start:r}=s[n];!r&&t.from!==t.to&&e<o&&d(t,!1)}for(let r=t;r<u;r++){let{range:t,start:i}=s[r];i&&t.from<=e&&t.to>=e&&(t.to>e||t.from===e||e===o)&&(d(t,!0),t.from===t.to&&(n=!0))}if(n){f();for(let e=t;e<u;e++){let{range:t,start:n}=s[e];n&&t.from===t.to&&d(t,!1)}}e<o&&(p=f())},h=0;for(let e of t){if(e.content===``)continue;let t=h,n=t+e.content.length,r=zt(e,a);for(;h<n;){s[u]?.position===h&&m(h);let a=Math.min(n,s[u]?.position??n);p.children.push(Jt(e,r,h===t&&a===n?e.content:e.content.slice(h-t,a-t),t,i)),h=a}}return s[u]?.position===h&&m(h),h}function Jt(e,t,n,r,i){let a=e.htmlAttrs==null?{}:{...e.htmlAttrs};return t!==``&&(a.style=t),i&&(a[`data-char`]=r),{type:`element`,tagName:`span`,properties:a,children:[{type:`text`,value:n}]}}function Yt(e,t){if(typeof e!=`number`)return e;let n=0,r=t.length;for(;n+1<r;){let i=n+r>>>1;t[i]<=e?n=i:r=i}return{line:n,character:e-(t[n]??0)}}var Xt=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`),this.name=`WorkerPoolTerminatedError`}},Zt=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`),this.name=`WorkerPoolTaskCanceledError`}},Qt=class extends Error{constructor(e,t){super(e,t),this.name=`WorkerPoolWorkerError`}},$t=new WeakSet;function en(e){return e instanceof Xt||e instanceof Zt}function tn(e){return en(e)||e instanceof Qt&&$t.has(e)}function V(e,t){return e?.cacheKey!=null||t?.cacheKey!=null?e?.cacheKey===t?.cacheKey:e===t}function nn(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function rn(e,t){return st(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function an(e){let t=e.lang??dt(e.name),n=e.lang??(e.prevName==null?`text`:dt(e.prevName));return t===`text`&&n===`text`}function on(e){return{...R,...e}}function sn(e,t){return cn(e,t)+ln(e,t)}function cn(e,t){return t?0:e.diffHeaderHeight}function ln(e,t){return e.paddingTop??(t?e.spacing:0)}function un(e){return e.paddingBottom??e.spacing}function dn(e){switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}function fn(e){return[be(e.additionStart,e.additionCount)+1,xe(e.additionStart,e.additionCount)+1]}function pn({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function mn(e){let t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;let n=e.additionLines.length-xe(t.additionStart,t.additionCount),r=e.deletionLines.length-xe(t.deletionStart,t.deletionCount);return n<=0&&r<=0?!1:n!==r}function hn({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-xe(n.additionStart,n.additionCount),i=e.deletionLines.length-xe(n.deletionStart,n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function gn({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=hn({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function _n({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return!0;for(let[i,a]of e.hunks.entries()){let[o,s]=fn(a);if(t<o){let s=pn({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}),c=o-s.rangeSize;return s.renderAll||t<c+s.fromStart||t>=o-s.fromEnd}if(t<s)return!0}let i=gn({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:`isAdditionLineRenderable`});if(i==null||i.renderAll)return!0;let a=e.hunks[e.hunks.length-1],[,o]=fn(a);return t<o+i.fromStart||t>=o+i.rangeSize}function vn({fileDiff:e,lineNumber:t,direction:n,expandedHunks:r,collapsedContextThreshold:i}){if(r===!0||e.isPartial)return t;let a=[],o=1;for(let[t,n]of e.hunks.entries()){let[s,c]=fn(n),l=pn({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:r,hunkIndex:t,collapsedContextThreshold:i}),u=s-l.rangeSize;l.renderAll?a.push([u,s]):(l.fromStart>0&&a.push([u,u+l.fromStart]),l.fromEnd>0&&a.push([s-l.fromEnd,s])),a.push([s,c]),o=c}let s=gn({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:r,collapsedContextThreshold:i,errorPrefix:`getNearestRenderableAdditionLine`});if(s!=null){let e=o;o=e+s.rangeSize,s.renderAll?a.push([e,o]):s.fromStart>0&&a.push([e,e+s.fromStart])}if(t>=o)return t;if(n===`down`){for(let[e,n]of a)if(n>t)return Math.max(e,t)}else for(let e=a.length-1;e>=0;e--){let[n,r]=a[e];if(n<=t)return Math.min(r-1,t)}}function yn({type:e,metrics:t}){return t.hunkSeparatorHeight??dn(e)}function bn({type:e,metrics:t}){return e===`simple`||e===`metadata`||e===`line-info-basic`?0:t.spacing}function xn({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case`simple`:return t>0;case`metadata`:return n!=null;case`line-info`:case`line-info-basic`:case`custom`:return!0}}function Sn(e){return e!==`simple`&&e!==`metadata`}function Cn({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!xn({type:e,hunkIndex:n,hunkSpecs:r}))return;let i=yn({type:e,metrics:t}),a=bn({type:e,metrics:t}),o=n>0?a:0,s=a;return{height:i,gapBefore:o,gapAfter:s,totalHeight:o+i+s}}function wn({type:e,metrics:t}){if(!Sn(e))return;let n=yn({type:e,metrics:t}),r=bn({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function Tn({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=En({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=e>0&&c.unifiedCount+e<=n,a=r>0&&c.splitCount+r<=n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=be(r.deletionStart,r.deletionCount),s=be(r.additionStart,r.additionCount),l=!e.isPartial&&r.deletionCount===0?o:r.deletionLineIndex,u=!e.isPartial&&r.additionCount===0?s:r.additionLineIndex,d=pn({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),f=n===c.finalHunkIndex?gn({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,p=d.fromStart+d.fromEnd;function m(e,n){return f==null||f.collapsedLines<=0||f.fromStart+f.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?f.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?f.collapsedLines:0}let h=d.collapsedLines===0;function g(){return h?0:(h=!0,d.collapsedLines)}if(c.shouldSkip(p,p))c.incrementCounts(p,p),g();else{let e=r.unifiedLineStart-d.rangeSize,i=r.splitLineStart-d.rangeSize,a=l-d.rangeSize,f=u-d.rangeSize,p=o+1-d.rangeSize,m=s+1-d.rangeSize;if(kn(c,d.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-d.fromEnd,i=r.splitLineStart-d.fromEnd,a=l-d.fromEnd,f=u-d.fromEnd,p=o+1-d.fromEnd,m=s+1-d.fromEnd,kn(c,d.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}),()=>{g()})))break hunkIterator}let _=r.unifiedLineStart,v=r.splitLineStart,y=l,b=u,x=o+1,S=s+1,C=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===C;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),g();else if(kn(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=_+t,s=v+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:m(o,s),type:`context`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:b+t,lineNumber:S+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{g()}))break hunkIterator;_+=e.lines,v+=e.lines,y+=e.lines,b+=e.lines,x+=e.lines,S+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=An(c,e,t);(s[0]?.[0]??0)>0&&g();for(let[l,u]of s)for(let s=l;s<u;s++){let l=m(_+s,t===`unified`?v+(s<e.deletions?s:s-e.deletions):v+s);if(c.emit(jn({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:_,splitLineIndex:v,additionLineIndex:b,deletionLineIndex:y,additionLineNumber:S,deletionLineNumber:x,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}g(),c.incrementCounts(o,a),_+=o,v+=a,y+=e.deletions,b+=e.additions,x+=e.deletions,S+=e.additions}}if(f!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=f,a=r+i;if(kn(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:!1,unifiedLineIndex:_+t,splitLineIndex:v+t},additionLine:{unifiedLineIndex:_+t,splitLineIndex:v+t,lineIndex:b+t,lineNumber:S+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function En({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=Dn({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function Dn({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=pn({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?gn({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function On(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function kn(e,t,n,r,i,a){let[o,s]=On(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function An(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function jn({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,w=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,T=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:w}:void 0;if(T==null&&E!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:E};if(T!=null&&E==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:void 0};if(T==null||E==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:E}}function Mn(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var Nn=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r)setTimeout(function(){r(e)},0);else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h)d[r]=void 0;else{if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Pn=new class extends Nn{};function Fn(e,t,n){return Pn.diff(e,t,n)}function In(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function Ln(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Rn(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function zn(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Bn(e,t){return Rn(e,t,``)}function Vn(e,t){return zn(e,t,``)}function Hn(e,t){return t.slice(0,Un(e,t))}function Un(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function Wn(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function Gn(e,t){if(t)return qn(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function Kn(e,t){if(t)return qn(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function qn(e,t){if(!t)return[Kn(e),Gn(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=Wn(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var Jn=`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}`,Yn=RegExp(`[${Jn}]+|\\s+|[^${Jn}]`,`ug`);new class extends Nn{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=Wn(e,r)}else n=e.match(Yn)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&Xn(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&Xn(n,i,r,null,t.intlSegmenter),e}};function Xn(e,t,n,r,i){if(t&&n){let[a,o]=qn(t.value,i),[s,c]=qn(n.value,i);if(e){let r=In(a,s);e.value=zn(e.value,s,r),t.value=Bn(t.value,r),n.value=Bn(n.value,r)}if(r){let e=Ln(o,c);r.value=Rn(r.value,c,e),t.value=Vn(t.value,e),n.value=Vn(n.value,e)}}else if(n){if(e){let e=Kn(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=Kn(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=Kn(r.value,i),[a,o]=qn(t.value,i),s=In(n,a);t.value=Bn(t.value,s);let c=Ln(Bn(n,s),o);t.value=Vn(t.value,c),r.value=Rn(r.value,n,c),e.value=zn(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=Kn(r.value,i),n=Hn(Gn(t.value,i),e);t.value=Vn(t.value,n)}else if(e){let n=Hn(Gn(e.value,i),Kn(t.value,i));t.value=Bn(t.value,n)}}var Zn=new class extends Nn{tokenize(e){let t=RegExp(`(\\r?\\n)|[${Jn}]+|[^\\S\\n\\r]+|[^${Jn}]`,`ug`);return e.match(t)||[]}};function Qn(e,t,n){return Zn.diff(e,t,n)}var $n=new class extends Nn{constructor(){super(...arguments),this.tokenize=tr}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes(`
|
|
12
|
-
`)||(e=e.trim()),n.newlineIsToken&&t.includes(`
|
|
13
|
-
`)||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
14
|
-
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
15
|
-
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function er(e,t,n){return $n.diff(e,t,n)}function tr(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
16
|
-
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function nr(e){return e==`.`||e==`!`||e==`?`}new class extends Nn{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(nr(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends Nn{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends Nn{constructor(){super(...arguments),this.tokenize=tr}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(rr(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function rr(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a=0;for(;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=rr(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=rr(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends Nn{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function ir(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function ar(e){if(!ir(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];t+=e===7?`\\a`:e===8?`\\b`:e===9?`\\t`:e===10?`\\n`:e===11?`\\v`:e===12?`\\f`:e===13?`\\r`:e===34?`\\"`:e===92?`\\\\`:e>=32&&e<=126?String.fromCharCode(e):`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var or={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function sr(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;er(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(er(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||ur(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
|
|
17
|
-
`)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function cr(e,t){if(t||=or,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw 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(e=>cr(e,t)).join(`
|
|
18
|
-
`)}let n=[];if(e.isGit){if(t=or,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+ar(r)+` `+ar(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+ar((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+ar((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+ar((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+ar((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+ar(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+ar(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
|
|
19
|
-
`)+`
|
|
20
|
-
`}function lr(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;sr(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?cr(e,o.headerOptions):void 0)}}))}else{let s=sr(e,t,n,r,i,a,o);return s?cr(s,o?.headerOptions):void 0}}function ur(e){let t=e.endsWith(`
|
|
21
|
-
`),n=e.split(`
|
|
22
|
-
`).map(e=>e+`
|
|
23
|
-
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function dr({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function fr({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;r===o||r&&e.value.length===1&&!o?a[1]+=e.value:t.push([+!r,e.value])}var pr={forcePlainText:!1};function mr(e,t,n,{forcePlainText:r,lazyLineAST:i=!1,startingLine:a,totalLines:o,expandedHunks:s,collapsedContextThreshold:c=1}=pr){r?(a??=0,o??=1/0):(a=0,o=1/0);let l=a>0||o<1/0;i&&=!r&&!n.useTokenTransformer;let u=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,d=Dt({theme:n.theme,highlighter:t}),f=r&&!l&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,p={deletionLines:[],additionLines:[]},{maxLineDiffLength:m}=n,h=!r&&!e.isPartial,g=r?s:void 0,_=new Map;function v(e){let t=h?0:e,n=_.get(t)??_r();return _.set(t,n),n}function y(e,t,n,r){if(l){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}Tn({diff:e,diffStyle:`both`,startingLine:a,totalLines:o,expandedHunks:!l||g,collapsedContextThreshold:c,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=v(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&gr({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:f,maxLineDiffLength:m}),r!=null&&(y(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(y(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let a of _.values()){if(a.deletionContent.length===0&&a.additionContent.length===0)continue;let o={name:e.prevName??e.name,contents:a.deletionContent.value},s={name:e.name,contents:a.additionContent.value},{deletionLines:c,additionLines:l}=vr({deletionFile:o,deletionInfo:a.deletionInfo,deletionDecorations:a.deletionDecorations,additionFile:s,additionInfo:a.additionInfo,additionDecorations:a.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang,lazyLineAST:i});if(h)p.deletionLines=c,p.additionLines=l;else for(let[e,t,n]of[[p.deletionLines,c,a.deletionSegments],[p.additionLines,l,a.additionSegments]])if(n.length>0)for(let r of n)for(let n=0;n<r.count;n++)e[r.targetIndex+n]=t[r.originalOffset+n];else if(i){let n=e.length;for(let r=0;r<t.length;r++)Lt(e,n+r,()=>t[r])}else pt(e,t)}return{code:p,themeStyles:d,baseThemeType:u}}function hr(e,{deletionLineIndex:t,additionLineIndex:n,deletionDecorations:r,additionDecorations:i}){let a=0,o=0,s=-1,c=0,l=-1,u=0;for(let{value:t,added:n,removed:r}of e)r?(s===-1&&(s=a),a+=t.length,c=a):n?(l===-1&&(l=o),o+=t.length,u=o):(a+=t.length,o+=t.length);s!==-1&&r.push(dr({line:t,spanStart:s,spanLength:c-s})),l!==-1&&i.push(dr({line:n,spanStart:l,spanLength:u-l}))}function gr({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=Mn(e),t=Mn(t),e.length>s||t.length>s))return;let c=o===`char`?Fn(e,t):Qn(e,t);if(o===`word-line`){hr(c,{deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a});return}let l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(fr({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),fr({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?fr({item:e,arr:l,enableJoin:d,isLastItem:t}):fr({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(dr({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(dr({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function _r(){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 vr({lazyLineAST:e,deletionFile:t,additionFile:n,deletionInfo:r,additionInfo:i,highlighter:a,deletionDecorations:o,additionDecorations:s,languageOverride:c,options:{theme:l,useTokenTransformer:u,tokenizeMaxLineLength:d}}){let f=(t,n,r)=>t.contents===``?[]:Gt(a.codeToTokens(Mn(t.contents),At(c??dt(t.name),l,d)).tokens,{state:{lineInfo:n},useTokenTransformer:u,decorations:r,lazyLineAST:e,cacheHtmlStyles:a.name===`highlights`});return{deletionLines:f(t,r,o),additionLines:f(n,i,s)}}var yr=(0,b.createContext)(void 0);function br(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function xr(e,t){let n=e?.theme??ue,r=t?.theme??ue,i=Sr(e),a=Sr(t);return st(n,r)&&br(e,t,[`theme`,`parseDiffOptions`])&&br(i,a)}function Sr(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}var Cr=new Set,wr=null;function Tr(e){Cr.add(e),wr??=requestAnimationFrame(Dr)}function Er(e){Cr.delete(e)&&Cr.size===0&&wr!=null&&(cancelAnimationFrame(wr),wr=null)}function Dr(e){let t=new Set(Cr);Cr.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}wr=Cr.size>0?requestAnimationFrame(Dr):null}function Or(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function kr(e){if(typeof HTMLStyleElement<`u`&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return typeof t==`string`&&t.toLowerCase()===`style`}var Ar=void 0;function jr(){return Ar??=`safari`in window&&`pushNotification`in window.safari||/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Mr(e,t){return e?.getPreferredHighlighter()??t.preferredHighlighter}function Nr(e,t){return e?.cacheKey!=null||t?.cacheKey!=null?e?.cacheKey===t?.cacheKey:e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Pr(e){return e?.some(e=>e.lineNumber===0)??!1}function Fr(e){let t=e[0];return t!=null&&t.length>0?t:void 0}function Ir(e){return e.startingLine===0&&e.totalLines>0}var Lr={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`},Rr=new Set([`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),zr=new Set([`svg`,`template`,`script`,`style`]),Br={class:`class`,className:`class`,id:`id`,role:`role`,style:`style`,tabIndex:`tabindex`,tabindex:`tabindex`,title:`title`},Vr=/^data-[\w.:-]+$/,Hr=/[<&]/g,Ur=/[\0"&'`]/g,Wr={"<":`<`,"&":`&`,'"':`"`,"'":`'`,"`":```,"\0":`�`},Gr=256;function Kr(e){let t=new Map;return Array.isArray(e)?qr(e,t):Jr(e,t)}function qr(e,t){let n=``;for(let r of e)n+=Jr(r,t);return n}function Jr(e,t){switch(e.type){case`text`:return Qr(e.value);case`element`:return Yr(e,t);case`root`:return qr(e.children,t);default:return d(e)}}function Yr(e,t){let{tagName:n}=e;if(n===`span`&&e.children.length===1&&e.children[0].type===`text`&&typeof e.properties?.style==`string`){let n=!0;for(let t in e.properties)if(t!==`style`&&e.properties[t]!=null){n=!1;break}if(n)return`<span ${Xr(e.properties.style,t)}>${Qr(e.children[0].value)}</span>`}if(zr.has(n))return d(e);let r=Zr(e.properties,t);if(r==null)return d(e);let i=r===``?`<${n}>`:`<${n} ${r}>`,a=qr(e.children,t);return a===``&&Rr.has(n.toLowerCase())?i:`${i}${a}</${n}>`}function Xr(e,t){let n=t.get(e);return n??(n=`style="${$r(e)}"`,t.size<Gr&&t.set(e,n)),n}function Zr(e,t){let n=``;for(let r in e){let i=e[r];if(i==null)continue;let a=Br[r]??(Vr.test(r)?r:void 0);if(a==null)return;if(i===!1||typeof i==`number`&&Number.isNaN(i))continue;let o=r===`style`&&typeof i==`string`?Xr(i,t):i===!0?a:`${a}="${$r(Array.isArray(i)?i.join(` `).trim():String(i))}"`;n+=n===``?o:` ${o}`}return n}function Qr(e){return e.indexOf(`<`)<0&&e.indexOf(`&`)<0?e:e.replace(Hr,ei)}function $r(e){return e.replace(Ur,ei)}function ei(e){return Wr[e]}function ti(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function ni(){return z({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[Mt({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}function ri(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}var ii=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),Er(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||Or(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;(this.isSelectionDirty()||n||i)&&(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;(this.isSelectionDirty()||r||i)&&(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;t==null&&n==null&&r==null&&a==null&&i==null||this.options.onGutterUtilityClick!=null&&ri(e.composedPath())||(wi(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e}))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;(t!==`disabled`||o||n!=null||r!=null||i!=null||a!=null)&&(wi(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;wi(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null?wi(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`):(this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility())};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();wi(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);wi(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=li(i)&&this.hoveredLine?.lineElement===i.lineElement;ci(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),ci(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),li(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(di(i)&&p!=null){p(i);break}if(ui(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!li(i))break;ci(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!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,wi(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),wi(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),wi(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&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);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&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;let t=e.composedPath();ri(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}else if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners()}else this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(ti(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{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??(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??(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){let e=document.createElement(`div`);e.innerHTML=Kr(ni());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);si(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){this.placeUtilityFromSelection()||(this.hoveredLine==null?this.hideUtility():this.showUtilityOnLine(this.hoveredLine))}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(mi(t));if(si(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(si(n)&&(!t||n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(si(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&ri(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=mi(e);if(t&&ri(n))return;let r=hi(e);return r==null?this.pathFromAnnotationSlot(e):mi(r)}pathFromAnnotationSlot(e){let t=gi(e)?.previousElementSibling;if(t instanceof HTMLElement&&(t.hasAttribute(`data-line`)||t.hasAttribute(`data-column-number`)))return mi(t);let n=vi(_i(e));if(n==null)return;let r=this.targetForSelectionPoint(n);return r==null?void 0:mi(r.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=yi(t)?t:yi(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}Or(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,Tr(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{Er(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!xi(this.renderedSelectedLinesState,n),i=!xi(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);fi(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=Ci(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=Ci(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e)}else if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:pi(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:pi(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Si(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Si(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function ai({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:oi({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function oi({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function si(e){return e!=null&&`kind`in e&&e.kind===`line`}function ci(e){return e!=null&&`kind`in e&&e.kind===`token`}function li(e){return si(e)||ci(e)}function ui(e){return`type`in e&&e.type===`line-info`}function di(e){return`kind`in e&&e.kind===`merge-conflict-action`}function fi(e){return e===`current`||e===`incoming`||e===`both`}function pi(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function mi(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function hi(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function gi(e){let t=e.closest(`[slot^="annotation-"]`),n=(t instanceof HTMLElement&&t.assignedSlot!=null?t.assignedSlot:e.tagName===`SLOT`?e:void 0)?.closest(`[data-line-annotation]`);return n instanceof HTMLElement?n:void 0}function _i(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function vi(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function yi(e){return e!=null&&typeof e.elementFromPoint==`function`}function bi(e,t){return e===t||Or(e??void 0,t??void 0)}function xi(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&bi(e?.range??null,t.range)}function Si(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function Ci(e){let 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 wi(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var Ti=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),Oi(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?ji(t):Mi(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null)console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);else if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:Ei(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:Di(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;(i||a)&&(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&ki(t,{codeWidthChanged:i,numberWidthChanged:a}))}};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 Ei(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function Di(e){return Math.max(Math.ceil(e),0)}function Oi(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?ki(e,{codeWidthChanged:!0,numberWidthChanged:!0}):Ai(e))}function ki(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function Ai(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function ji(e){e.codeElement.isConnected&&Ai(e)}function Mi(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}function Ni(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 Pi(e,t){return e.endsWith(`\r
|
|
24
|
-
`)?t+`\r
|
|
25
|
-
`:e.endsWith(`\r`)?t+`\r`:e.endsWith(`
|
|
26
|
-
`)?t+`
|
|
27
|
-
`:t}function Fi(e){return z({tagName:`div`,children:[z({tagName:`div`,children:e.annotations?.map(e=>z({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function Ii(e,t){return z({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}function Li(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 Ri({fileOrDiff:e,mode:t,stickyHeader:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?``:void 0};return z({tagName:`div`,children:[t===`custom`?z({tagName:`slot`,properties:{name:le}}):zi({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[Bi(r)]],properties:i})}function zi({name:e,prevName:t,iconType:n}){let r=[z({tagName:`slot`,properties:{name:oe}}),Mt({name:Li(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(z({tagName:`div`,children:[z({tagName:`bdi`,children:[jt(t)]})],properties:{"data-prev-name":``}})),r.push(Mt({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(z({tagName:`div`,children:[z({tagName:`bdi`,children:[jt(e)]})],properties:{"data-title":``}})),r.push(z({tagName:`slot`,properties:{name:se}})),z({tagName:`div`,children:r,properties:{"data-header-content":``}})}function Bi(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(z({tagName:`span`,children:[jt(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(z({tagName:`span`,children:[jt(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(z({tagName:`slot`,properties:{name:ce}})),z({tagName:`div`,children:t,properties:{"data-metadata":``}})}function Vi(e){return z({tagName:`pre`,properties:Hi(e)})}function Hi({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}function Ui(e,{theme:t,preferredHighlighter:n}){return{langs:Array.isArray(e)?e:[e??`text`],themes:Pe(t),preferredHighlighter:Ae(n)}}function Wi(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}var Gi=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
28
|
-
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
29
|
-
<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"/>
|
|
30
|
-
</symbol>
|
|
31
|
-
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
32
|
-
<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"/>
|
|
33
|
-
</symbol>
|
|
34
|
-
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
35
|
-
<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"/>
|
|
36
|
-
</symbol>
|
|
37
|
-
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
38
|
-
<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"/>
|
|
39
|
-
</symbol>
|
|
40
|
-
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
41
|
-
<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"/>
|
|
42
|
-
</symbol>
|
|
43
|
-
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
44
|
-
<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"/>
|
|
45
|
-
</symbol>
|
|
46
|
-
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
47
|
-
<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"/>
|
|
48
|
-
</symbol>
|
|
49
|
-
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
50
|
-
<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"/>
|
|
51
|
-
</symbol>
|
|
52
|
-
<symbol id="diffs-icon-eye-slash" viewBox="0 0 16 16">
|
|
53
|
-
<path d="m13.47 1.47-12 12 1.06 1.06 12-12zM8 14c-.92 0-1.802-.208-2.624-.547l1.173-1.174c.476.142.963.221 1.451.221 1.66 0 3.307-.949 4.626-2.196a10.4 10.4 0 0 0 1.494-1.751A5 5 0 0 0 14.443 8a5 5 0 0 0-.323-.553 10 10 0 0 0-1.238-1.5l1.061-1.062C15.222 6.173 16 7.511 16 8c0 1.05-3.582 6-8 6"/><path d="M8 11q-.084 0-.167-.005l3.162-3.162q.006.083.005.167a3 3 0 0 1-3 3M5.005 8.167l3.162-3.162a3 3 0 0 0-3.162 3.162"/><path d="M8 3.5c.485 0 .97.081 1.445.227l1.168-1.169C9.794 2.212 8.915 2 8 2 3.582 2 0 6.8 0 8c0 .555.766 1.88 2.027 3.144l1.06-1.06a9.5 9.5 0 0 1-1.203-1.461 4.3 4.3 0 0 1-.345-.617L1.536 8l.003-.006c.064-.149.176-.359.345-.617a9.8 9.8 0 0 1 1.482-1.73C4.675 4.427 6.326 3.5 8 3.5"/>
|
|
54
|
-
</symbol>
|
|
55
|
-
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
56
|
-
<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"/>
|
|
57
|
-
</symbol>
|
|
58
|
-
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
59
|
-
<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"/>
|
|
60
|
-
</symbol>
|
|
61
|
-
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
62
|
-
<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"/>
|
|
63
|
-
</symbol>
|
|
64
|
-
<symbol id="diffs-icon-symbol-added-duo" viewBox="0 0 16 16">
|
|
65
|
-
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><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"/>
|
|
66
|
-
</symbol>
|
|
67
|
-
<symbol id="diffs-icon-symbol-added-fill" viewBox="0 0 16 16">
|
|
68
|
-
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 4a.75.75 0 0 0-.75.75v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5A.75.75 0 0 0 8 4" clip-rule="evenodd"/>
|
|
69
|
-
</symbol>
|
|
70
|
-
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
71
|
-
<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"/>
|
|
72
|
-
</symbol>
|
|
73
|
-
<symbol id="diffs-icon-symbol-deleted-duo" viewBox="0 0 16 16">
|
|
74
|
-
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><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"/>
|
|
75
|
-
</symbol>
|
|
76
|
-
<symbol id="diffs-icon-symbol-deleted-fill" viewBox="0 0 16 16">
|
|
77
|
-
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M4.75 7.25a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/>
|
|
78
|
-
</symbol>
|
|
79
|
-
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
80
|
-
<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"/>
|
|
81
|
-
</symbol>
|
|
82
|
-
<symbol id="diffs-icon-symbol-diffstat-duo" viewBox="0 0 16 16">
|
|
83
|
-
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><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"/>
|
|
84
|
-
</symbol>
|
|
85
|
-
<symbol id="diffs-icon-symbol-diffstat-fill" viewBox="0 0 16 16">
|
|
86
|
-
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5zM8 3.546a.75.75 0 0 0-.75.75V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2V4.296a.75.75 0 0 0-.75-.75" clip-rule="evenodd"/>
|
|
87
|
-
</symbol>
|
|
88
|
-
<symbol id="diffs-icon-symbol-extracted" viewBox="0 0 16 16">
|
|
89
|
-
<path d="M8.25 4.25a.75.75 0 0 1 0 1.5H6.81l3.302 3.302a1.5 1.5 0 1 1-1.06 1.06L5.75 6.811V8.25a.75.75 0 0 1-1.5 0V5A.75.75 0 0 1 5 4.25z"/><path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 1.5c-1.613 0-2.807.089-3.704.288-.88.196-1.382.477-1.706.802-.325.324-.606.826-.802 1.706C1.588 5.193 1.5 6.387 1.5 8s.089 2.807.288 3.704c.196.88.477 1.382.802 1.706.324.325.826.606 1.706.802.897.2 2.091.288 3.704.288s2.807-.089 3.704-.288c.88-.196 1.382-.477 1.706-.802.325-.324.606-.826.802-1.706.2-.897.288-2.091.288-3.704s-.089-2.807-.288-3.704c-.196-.88-.477-1.382-.802-1.706-.324-.325-.826-.606-1.706-.802C10.807 1.588 9.613 1.5 8 1.5" clip-rule="evenodd"/>
|
|
90
|
-
</symbol>
|
|
91
|
-
<symbol id="diffs-icon-symbol-extracted-duo" viewBox="0 0 16 16">
|
|
92
|
-
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8" clip-rule="evenodd" opacity=".2"/><path d="M8.25 4.25a.75.75 0 0 1 0 1.5H6.81l3.302 3.302a1.5 1.5 0 1 1-1.06 1.06L5.75 6.811V8.25a.75.75 0 0 1-1.5 0V5A.75.75 0 0 1 5 4.25z"/>
|
|
93
|
-
</symbol>
|
|
94
|
-
<symbol id="diffs-icon-symbol-extracted-fill" viewBox="0 0 16 16">
|
|
95
|
-
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5 4.25a.75.75 0 0 0-.75.75v3.25a.75.75 0 0 0 1.5 0V6.81l3.302 3.302a1.5 1.5 0 1 0 1.06-1.06L6.811 5.75H8.25a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/>
|
|
96
|
-
</symbol>
|
|
97
|
-
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
98
|
-
<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"/>
|
|
99
|
-
</symbol>
|
|
100
|
-
<symbol id="diffs-icon-symbol-ignored-duo" viewBox="0 0 16 16">
|
|
101
|
-
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M11.53 4.47a.75.75 0 0 1 0 1.06l-6 6a.75.75 0 0 1-1.06-1.06l6-6a.75.75 0 0 1 1.06 0"/>
|
|
102
|
-
</symbol>
|
|
103
|
-
<symbol id="diffs-icon-symbol-ignored-fill" viewBox="0 0 16 16">
|
|
104
|
-
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m3.53 4.47a.75.75 0 0 0-1.06 0l-6 6a.75.75 0 1 0 1.06 1.06l6-6a.75.75 0 0 0 0-1.06" clip-rule="evenodd"/>
|
|
105
|
-
</symbol>
|
|
106
|
-
<symbol id="diffs-icon-symbol-inlined" viewBox="0 0 16 16">
|
|
107
|
-
<path d="M7.75 11.75a.75.75 0 0 1 0-1.5h1.44L5.887 6.948a1.5 1.5 0 1 1 1.06-1.06l3.302 3.301V7.75a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-.75.75z"/><path fill-rule="evenodd" d="M8 16c-6.588 0-8-1.412-8-8s1.412-8 8-8 8 1.412 8 8-1.412 8-8 8m0-1.5c1.613 0 2.807-.089 3.704-.288.88-.196 1.382-.477 1.706-.802.325-.324.606-.826.802-1.706.2-.897.288-2.091.288-3.704s-.089-2.807-.288-3.704c-.196-.88-.477-1.382-.802-1.706-.324-.325-.826-.606-1.706-.802C10.807 1.588 9.613 1.5 8 1.5s-2.807.089-3.704.288c-.88.196-1.382.477-1.706.802-.325.324-.606.826-.802 1.706C1.588 5.193 1.5 6.387 1.5 8s.089 2.807.288 3.704c.196.88.477 1.382.802 1.706.324.325.826.606 1.706.802.897.2 2.091.288 3.704.288" clip-rule="evenodd"/>
|
|
108
|
-
</symbol>
|
|
109
|
-
<symbol id="diffs-icon-symbol-inlined-duo" viewBox="0 0 16 16">
|
|
110
|
-
<path fill-rule="evenodd" d="M8 16c-6.588 0-8-1.412-8-8s1.412-8 8-8 8 1.412 8 8-1.412 8-8 8" clip-rule="evenodd" opacity=".2"/><path d="M7.75 11.75a.75.75 0 0 1 0-1.5h1.44L5.887 6.948a1.5 1.5 0 1 1 1.06-1.06l3.302 3.301V7.75a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-.75.75z"/>
|
|
111
|
-
</symbol>
|
|
112
|
-
<symbol id="diffs-icon-symbol-inlined-fill" viewBox="0 0 16 16">
|
|
113
|
-
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5.5 4a1.5 1.5 0 1 0 .388 2.948l3.301 3.302H7.75a.75.75 0 0 0 0 1.5H11a.75.75 0 0 0 .75-.75V7.75a.75.75 0 0 0-1.5 0v1.44L6.948 5.887A1.5 1.5 0 0 0 5.5 4" clip-rule="evenodd"/>
|
|
114
|
-
</symbol>
|
|
115
|
-
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
116
|
-
<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"/>
|
|
117
|
-
</symbol>
|
|
118
|
-
<symbol id="diffs-icon-symbol-modified-duo" viewBox="0 0 16 16">
|
|
119
|
-
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0"/>
|
|
120
|
-
</symbol>
|
|
121
|
-
<symbol id="diffs-icon-symbol-modified-fill" viewBox="0 0 16 16">
|
|
122
|
-
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 5a3 3 0 1 0 0 6 3 3 0 0 0 0-6" clip-rule="evenodd"/>
|
|
123
|
-
</symbol>
|
|
124
|
-
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
125
|
-
<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"/>
|
|
126
|
-
</symbol>
|
|
127
|
-
<symbol id="diffs-icon-symbol-moved-duo" viewBox="0 0 16 16">
|
|
128
|
-
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M8.496 4.695a.75.75 0 0 0-.051 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-.051 1.06L6.49 8.003 4.693 9.998a.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"/>
|
|
129
|
-
</symbol>
|
|
130
|
-
<symbol id="diffs-icon-symbol-moved-fill" viewBox="0 0 16 16">
|
|
131
|
-
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m1.555 4.745a.75.75 0 0 0-1.11 1.01L10.486 8l-2.04 2.245a.75.75 0 0 0 1.109 1.01l2.5-2.75a.75.75 0 0 0 0-1.01zm-4 0a.75.75 0 0 0-1.11 1.01l2.043 2.248-1.796 1.995a.75.75 0 0 0 1.116 1.004l2.25-2.5a.75.75 0 0 0-.003-1.007z" clip-rule="evenodd"/>
|
|
132
|
-
</symbol>
|
|
133
|
-
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
134
|
-
<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"/>
|
|
135
|
-
</symbol>
|
|
136
|
-
</svg>`;function Ki(e,t){return e==null||t==null?e===t:Ji(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}var qi={};function Ji(e=qi,t=qi){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function Yi(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function Xi(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e.style.touchAction=`none`,e}function Zi(){let e=document.createElement(`style`);return e.setAttribute(de,``),e}var Qi;function $i(e){if(Qi!=null)return Qi;let t=e.host;if(typeof HTMLElement<`u`&&t instanceof HTMLElement&&!t.isConnected)return;let n=document.createElement(`div`);n.setAttribute(`data-code`,``),n.setAttribute(fe,`true`);let r=document.createElement(`div`);return r.style.position=`relative`,r.style.width=`200%`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n),Qi=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),Qi}function ea(e){return`${pe}: ${e==null?`var(--diffs-scrollbar-gutter-fallback)`:`${e}px`};`}var ta=`@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;--diffs-warning-light:#d5a910;--diffs-warning-dark:#ffd452;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}input,button{font-family:inherit;font-size:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-diffs-header][data-sticky]{z-index:1;background-color:var(--diffs-bg);position:sticky;top:0}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr;&[data-dehydrated]{--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}&: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,[data-edit-prediction-suffix] 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))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions],[data-editor-overlay]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-computed-editor-active-line-bg:var(--diffs-computed-selected-line-bg);--diffs-computed-hovered-line-bg:var(--diffs-computed-editor-active-line-bg);--diffs-hover-mix-target:var(--diffs-bg-hover-override,var(--diffs-mixer));--diffs-line-bg:var(--diffs-computed-hovered-line-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}[data-line],[data-no-newline]{&[data-decoration-bg]{--mix-deco-light:92%;--mix-deco-dark:85%;&[data-decoration-bg-depth="2"]{--mix-deco-light:88%;--mix-deco-dark:80%}&[data-decoration-bg-depth="3"]{--mix-deco-light:85%;--mix-deco-dark:78%}--diffs-hover-mix-target:var(--diffs-decoration-bg);--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)))}}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-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-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[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-hover-mix-target:var(--diffs-computed-editor-active-line-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-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}:where([data-background]){& [data-gutter-buffer],& [data-column-number]{--mix-light:91%;--mix-dark:85%}& [data-line],& [data-no-newline]{--mix-light:88%;--mix-dark:80%}& [data-gutter-buffer],& [data-column-number],& [data-line],& [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg);&[data-line-type=change-deletion]{--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&: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))}--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)))}&[data-line-type=change-addition]{--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&: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))}--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)))}&[data-merge-conflict=current]{--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&: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))}--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)))}&[data-merge-conflict=incoming]{--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&: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))}--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)))}}}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline],[data-editor-overlay]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base));--diffs-selection-emphasis-mix-target:var(--diffs-selection-mix-target);&:where([data-editor-overlay]),&:where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline])[data-selected-line]{--mix-selection-light:82%;--mix-selection-dark:75%;--diffs-hover-mix-target:var(--diffs-selection-mix-target)}&:where([data-gutter-buffer][data-selected-line],[data-column-number]:is([data-selected-line],[data-editor-active-line])){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base));--diffs-hover-mix-target:var(--diffs-selection-mix-target)}&:where([data-line][data-selected-line]):is([data-line-type=change-addition],[data-line-type=change-deletion]){--diffs-selection-emphasis-mix-target:light-dark(color-mix(in lab, var(--diffs-diff-line-mix-target,var(--diffs-selection-mix-target)) var(--mix-selection-light), var(--diffs-selection-mix-target)),var(--diffs-selection-mix-target))}&:where([data-editor-overlay]),&[data-selected-line]{--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)))}}[data-line][data-editor-active-line],[data-column-number][data-editor-active-line]{--diffs-computed-editor-active-line-bg:color-mix(in lab, var(--diffs-computed-selected-line-bg) var(--diffs-editor-active-line-source-mix,100%), var(--diffs-selection-emphasis-mix-target))}@media (pointer:fine){[data-line][data-hovered],[data-gutter-buffer][data-hovered],[data-column-number][data-hovered],[data-line-annotation][data-hovered],[data-no-newline][data-hovered],[data-merge-conflict][data-hovered],[data-merge-conflict-actions][data-hovered],[data-editor-overlay][data-hovered]{--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-editor-active-line-bg) 97%, var(--diffs-hover-mix-target)),color-mix(in lab, var(--diffs-computed-editor-active-line-bg) 91%, var(--diffs-hover-mix-target)))}}[data-gutter-buffer][data-selected-line],[data-column-number]:is([data-selected-line],[data-editor-active-line]){color:var(--diffs-selection-number-fg)}[data-no-newline]{user-select:none;& span{opacity:.6}}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid;& [data-additions]{border-left:1px solid var(--diffs-bg)}& [data-deletions]{border-right:1px solid var(--diffs-bg)}}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overflow:var(--diffs-overflow-override,scroll) clip;overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - var(--diffs-scrollbar-gutter)));scrollbar-gutter:stable;align-self:flex-start;display:grid}[data-diffs-scrollbar-measure]{opacity:0;pointer-events:none;scrollbar-gutter:auto;grid-template-columns:none;width:100px;height:100px;padding:0;position:absolute;top:-200px;left:-200px}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:var(--diffs-scrollbar-gutter)}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}[data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]{& [data-code],&[data-overflow=wrap],&[data-dehydrated][data-diff-type=split][data-overflow=scroll]{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-buffer],& [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-overflow=scroll]:not([data-dehydrated],[data-custom-styles],:has(>[data-code]>[contenteditable],>[data-code]>*>:is([data-line-annotation],[data-separator],[data-merge-conflict],[data-merge-conflict-actions])))>[data-code]{display:flex;&>[data-gutter]{flex-shrink:0;display:block}&>[data-content]{flex:1 0 max-content;display:block}}[data-diff-type=split][data-overflow=wrap],[data-dehydrated][data-diff-type=split][data-overflow=scroll]{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-code]{display:contents}& [data-deletions]{& [data-gutter]{grid-column:1}& [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}}& [data-additions]{& [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}& [data-content]{grid-column:4}}}[data-dehydrated][data-diff-type=split][data-overflow=scroll] [data-content]{overflow:clip}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-interactive-line-numbers] [data-column-number]{cursor:pointer;touch-action:none}[data-content-buffer],[data-gutter-buffer]{user-select:none;min-height:1lh;position:relative}[data-gutter-buffer]{padding-left:2ch;padding-right:1ch;&:before{content:"";min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));display:block}}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent calc(3px * 1.414), var(--diffs-bg-buffer) calc(3px * 1.414), var(--diffs-bg-buffer) calc(4px * 1.414));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]{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-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;&:hover{color:var(--diffs-fg)}&[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}[data-separator=line-info],[data-separator=line-info-basic]{& [data-separator-content]{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;& [data-separator-content]{border-radius:6px}}& [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-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}& [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);& [data-separator-wrapper]{display:none}}& [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;& [data-separator-content],& [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;& [data-separator-content],& [data-expand-button]{display:none}}[data-separator=line-info] [data-separator-wrapper]{& [data-expand-both],& [data-expand-down],& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}}@media (pointer:fine){[data-separator=line-info] [data-separator-wrapper]{&[data-separator-multi-button]{& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}& [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;& [data-separator-content]{grid-column:unset;grid-row:unset}}@supports (width:1cqi){[data-separator=line-info] [data-separator-wrapper]{& [data-expand-both],& [data-expand-down],& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}&[data-separator-multi-button]{& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}& [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-content]{grid-area:1/2/-1;min-width:min-content}& [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}[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)}& [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}[data-indicators=classic]{& [data-line-type=change-addition],& [data-line-type=change-deletion]{&[data-no-newline],&[data-line]{&:before{user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}}}& [data-line-type=change-addition]{&[data-line],&[data-no-newline]{&:before{content:"+";color:var(--diffs-addition-base)}}}& [data-line-type=change-deletion]{&[data-line],&[data-no-newline]{&:before{content:"-";color:var(--diffs-deletion-base)}}}}[data-indicators=bars]{& [data-line-type=change-deletion],& [data-line-type=change-addition]{&[data-column-number]{&:before{content:"";user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}}}& [data-line-type=change-deletion]{&[data-column-number]{&: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-line-type=change-addition]{&[data-column-number]{&:before{background-color:var(--diffs-addition-base)}}}}[data-overflow=wrap]{& [data-line]{white-space:pre-wrap;word-break:break-word}& [data-annotation-content]{word-break:break-word}}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-overflow=scroll] [data-column-number]{min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;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-column-number]{min-width:4px;padding:0;&:before{min-width:0}}& [data-line-number-content]{display:none}& [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}&[data-indicators=bars] [data-gutter-utility-slot]{left:6px}}[data-file][data-disable-line-numbers]{& [data-gutter-buffer],& [data-column-number]{border-right:0;min-width:0}}[data-diff-span]{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;&: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;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;white-space:normal;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{touch-action:none;justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;touch-action:none;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(-1lh + 1ch);padding:0;display:flex;position:relative;&:before{content:"";display:block;position:absolute;inset:0 0 0 -4px}}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px;[data-decoration-bar-depth="1"] &{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] &{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] &{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] &{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] &{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-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}& [data-error-stack]{color:var(--diffs-fg-number)}}}@layer theme,rendered,unsafe;
|
|
137
|
-
`,na=`@layer base, theme, rendered, unsafe;`,H=RegExp(`${oa(pe)}\\s*:\\s*[^;]+;`);function ra(e){return`${na}
|
|
138
|
-
@layer unsafe {
|
|
139
|
-
${e}
|
|
140
|
-
}`}function ia(e,t=`system`,n){let r=t===`system`?``:`
|
|
141
|
-
color-scheme: ${t};`,i=ea(n);return`${na}
|
|
142
|
-
@layer base {
|
|
143
|
-
${(t===`system`?[`light`,`dark`]:[t]).map(e=>{let n=`
|
|
144
|
-
[data-line] span, [data-edit-prediction-suffix] span {
|
|
145
|
-
font-weight: var(--diffs-token-${e}-font-weight, inherit);
|
|
146
|
-
font-style: var(--diffs-token-${e}-font-style, inherit);
|
|
147
|
-
text-decoration: var(--diffs-token-${e}-text-decoration, inherit);
|
|
148
|
-
}`;return t===`system`&&e===`dark`?`@media (prefers-color-scheme: dark) {${n}\n}`:n}).join(`
|
|
149
|
-
`)}
|
|
150
|
-
}
|
|
151
|
-
@layer rendered {
|
|
152
|
-
:host {${r}
|
|
153
|
-
${i}
|
|
154
|
-
${e}
|
|
155
|
-
}
|
|
156
|
-
}`}function aa(e,t){let n=ea(t);return e.replace(H,n)}function oa(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var sa=new WeakMap;function ca(e){return sa.get(e)??e}function la(e,t,n){let r=new Map;for(let i of e){let e=ca(i);r.set(e,n?.slotNames.get(e)??t(i))}return{provided:e,current:e,slotNames:r}}function ua(e,t,n){for(let r of t){let t=ca(r);e.slotNames.has(t)||e.slotNames.set(t,n(r))}e.provided=t,e.current=t}function da(e,t,n){if(e==null)return n(t);let r=ca(t),i=e.slotNames.get(r);return i??(i=n(t),e.slotNames.set(r,i)),i}function fa(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function pa({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function ma(e,t){let n=e?.offsetHeight??0;if(e==null||n===0)t();else{e.style.minHeight=`${n}px`;try{t(),e.offsetHeight}finally{e.style.minHeight=``}}}function ha({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``)t?.remove();else return t??=ga(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function ga(){let e=document.createElement(`style`);return e.setAttribute(I,``),e}function _a(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function va(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`)}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(ta)),t.adoptedStyleSheets=[e]}connectedCallback(){$i(this.shadowRoot??this.attachShadow({mode:`open`}))}}customElements.define(ee,t)}async function ya(e,t=300){let n;try{await Promise.race([e(),new Promise(e=>{n=setTimeout(e,t)})])}finally{n!=null&&clearTimeout(n)}}function ba({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:i,expandedHunks:a,collapsedContextThreshold:o,canHydratePartialDiff:s}){let c=sn(t,n),l=c,u=i?!0:a,d=e.hunks.length-1;for(let n=0;n<e.hunks.length;n++){let i=e.hunks[n];if(i==null)throw Error(`computeEstimatedDiffHeights: invalid hunk index`);let a=pn({isPartial:e.isPartial,rangeSize:i.collapsedBefore,expandedHunks:u,hunkIndex:n,collapsedContextThreshold:o}),f=(a.fromStart+a.fromEnd)*t.lineHeight;if(c+=f,l+=f,a.collapsedLines>0){let e=Cn({type:r,metrics:t,hunkIndex:n,hunkSpecs:i.hunkSpecs})?.totalHeight??0;c+=e,l+=e}c+=i.splitLineCount*t.lineHeight,l+=i.unifiedLineCount*t.lineHeight;let p=xa(i);c+=p.split*t.lineHeight,l+=p.unified*t.lineHeight;let m=n===d?gn({fileDiff:e,hunkIndex:n,expandedHunks:u,collapsedContextThreshold:o,errorPrefix:`computeEstimatedDiffHeights`}):void 0;if(m!=null){let e=(m.fromStart+m.fromEnd)*t.lineHeight;if(c+=e,l+=e,m.collapsedLines>0){let e=wn({type:r,metrics:t})?.totalHeight??0;c+=e,l+=e}}else if(n===d&&e.isPartial&&s){let e=wn({type:r,metrics:t})?.totalHeight??0;c+=e,l+=e}}if(e.hunks.length>0){let e=un(t);c+=e,l+=e}return{splitHeight:c,unifiedHeight:l}}function xa(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};let t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type===`context`){let e=+(t.lines>0);return{split:e,unified:e}}return Sa(e,t)}function Sa(e,t){let n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,i=t.additions>0&&e.noEOFCRAdditions;return{split:r||i?1:0,unified:n}}function Ca({oldFile:e,newFile:t},n){if(e!==void 0||t!==void 0){if(e===void 0||t===void 0)throw Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return{oldFile:e,newFile:t}}}function wa(e){return e.map(e=>({...e,hunkContent:e.hunkContent.map(e=>({...e}))}))}function Ta(e){return{...e,hunks:wa(e.hunks),deletionLines:[...e.deletionLines],additionLines:[...e.additionLines]}}var Ea=1;function Da(e,...t){return`ck${Ea}:${JSON.stringify([e,...t])}`}function Oa(e){return e===``?[]:e.split(re)}function ka(e,t,n){let r=e===`clone`?Ta(t):t;if(!r.isPartial)throw Error(`hydratePartialDiff: fileDiff must be partial`);switch(r.type){case`change`:case`rename-changed`:return Aa(r,Ma(r,n),Na(r,n));case`rename-pure`:{let e=Na(r,n);Pa(r,n);let t=Oa(e.contents);return r.isPartial=!1,r.deletionLines=t,r.additionLines=t,r.deletionCharacterCount=e.contents.length,r.additionCharacterCount=e.contents.length,Ia(r,null,e),r}}throw Error(`hydratePartialDiff: ${r.type} diffs cannot be hydrated from loaded files`)}function Aa(e,t,n){let r=Oa(t.contents),i=Oa(n.contents),{hunks:a,splitLineCount:o,unifiedLineCount:s}=ja(e.hunks,i.length);return e.hunks=a,e.splitLineCount=o,e.unifiedLineCount=s,e.isPartial=!1,e.deletionLines=r,e.additionLines=i,e.deletionCharacterCount=t.contents.length,e.additionCharacterCount=n.contents.length,Ia(e,t,n),e}function ja(e,t){let n=0,r=0,i=0,a=[];for(let t of e){let e=Math.max(t.additionStart-1,0),o=Math.max(t.deletionStart-1,0),s=e,c=o,l=0,u=0,d=0,f=0,p=[];for(let e of t.hunkContent)e.type===`context`?(p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.lines,c+=e.lines,d+=e.lines,f+=e.lines):(p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.additions,c+=e.deletions,l+=e.additions,u+=e.deletions,d+=Math.max(e.additions,e.deletions),f+=e.additions+e.deletions);let m=Math.max(be(t.additionStart,t.additionCount)-i,0);a.push({...t,collapsedBefore:m,additionLineIndex:e,deletionLineIndex:o,additionLines:l,deletionLines:u,hunkContent:p,splitLineStart:n+m,unifiedLineStart:r+m,splitLineCount:d,unifiedLineCount:f}),n+=m+d,r+=m+f,i=xe(t.additionStart,t.additionCount)}if(a.length>0){let e=a[a.length-1],i=xe(e.additionStart,e.additionCount),o=Math.max(t-i,0);n+=o,r+=o}return{hunks:a,splitLineCount:n,unifiedLineCount:r}}function Ma(e,t){if(t.oldFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile`);return t.oldFile}function Na(e,t){if(t.newFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires newFile`);return t.newFile}function Pa(e,t){if(t.oldFile!==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile to be null`)}function Fa(e,t,n){return e.cacheKey==null?La(t,n):`${e.cacheKey}:hydrated`}function Ia(e,t,n){let r=Fa(e,t,n);r==null?delete e.cacheKey:e.cacheKey=r}function La(e,t){return e!=null&&t!=null?e.cacheKey!=null&&t.cacheKey!=null?Da(`hydrated-files`,e.cacheKey,t.cacheKey):void 0:e?.cacheKey??t?.cacheKey}var Ra=new TextEncoder,za=new TextDecoder(`utf-8`,{ignoreBOM:!0}),Ba=/[\uD800-\uDFFF]/,Va=1024,Ha=new Uint8Array(Va);function Ua(){Ha.length!==Va&&(Ha=new Uint8Array(Va))}function Wa(e){if(e.length===0)return e;if(Ba.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;Ha.length<t&&(Ha=new Uint8Array(t));let{written:n}=Ra.encodeInto(e,Ha);return za.decode(Ha.subarray(0,n))}var Ga=new TextDecoder(`utf-8`,{ignoreBOM:!0}),Ka={'"':`"`,"\\":`\\`,a:`\x07`,b:`\b`,t:` `,n:`
|
|
157
|
-
`,v:`\v`,f:`\f`,r:`\r`};function qa(e){if(e[0]!==`"`)return;let t=``,n=1;for(;n<e.length;){let r=e[n];if(r===`"`)return{fileName:t,rawLength:n+1};if(r!==`\\`){t+=r,n++;continue}let i=Ka[e[n+1]];if(i!=null){t+=i,n+=2;continue}let a=[];do{let t=Ja(e,n+1);if(t==null)return;a.push(t),n+=4}while(e[n]===`\\`&&e[n+1]>=`0`&&e[n+1]<=`7`);t+=Ga.decode(new Uint8Array(a))}}function Ja(e,t){let n=e.charCodeAt(t)-48,r=e.charCodeAt(t+1)-48,i=e.charCodeAt(t+2)-48;if(n>=0&&n<=3&&r>=0&&r<=7&&i>=0&&i<=7)return n*64+r*8+i}var Ya=4096,Xa=.5;function Za(e){for(let t of e.hunks)for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=$a(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}}function Qa(e,t,n){let{hunkContent:r}=e;for(let e=1;e<r.length;e++){let i=r[e],a=r[e-1];if(i.type!==`change`||i.additions>0&&i.deletions>0||a.type!==`context`)continue;let o=i.additions>0,s=o?t.additionLines:t.deletionLines,c=o?i.additionLineIndex:i.deletionLineIndex,l=o?i.additions:i.deletions,u=s[c]??``;if(u.trim()!==``)continue;let d=!0;for(let e=1;e<l;e++)if(s[c+e]!==u){d=!1;break}if(!d)continue;let f=0;for(;f<a.lines&&t.additionLines[a.additionLineIndex+a.lines-1-f]===u;)f++;if(f===0||e===1&&f===a.lines||n!=null&&(f=n(i,f),f===0))continue;i.additionLineIndex-=f,i.deletionLineIndex-=f;let p=i.additionLineIndex+i.additions,m=i.deletionLineIndex+i.deletions,h=r[e+1];h?.type===`context`?(h.lines+=f,h.additionLineIndex=p,h.deletionLineIndex=m):r.splice(e+1,0,{type:`context`,lines:f,additionLineIndex:p,deletionLineIndex:m}),a.lines-=f,a.lines===0&&(r.splice(e-1,1),e--)}}function $a(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>Ya)return null;let c=[];for(let t=0;t<n;t++)c.push(to(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(to(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=no(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*Xa:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var eo=/\s+/g;function to(e){return e.replace(eo,``)}function no(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}var ro=/^diff --git ("a\/(?:[^"\\]|\\.)*"|a\/.+?) ("b\/(?:[^"\\]|\\.)*"|b\/.+?)$/;function io(e,t,n=!1,r){let i=wo(e),a=i?po(e):mo(e),o,s=[];for(let e of a){if(i&&!ne.test(e)||!i&&!ho(e)){if(o==null)o=Wa(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let a=oo(e,{cacheKey:t==null?void 0:r==null?Da(`patch-file`,t,String(s.length)):Da(`patch-file`,t,String(r),String(s.length)),isGitDiff:i,throwOnError:n});a!=null&&s.push(a)}return{patchMetadata:o,files:s}}function ao(e,t){try{return oo(e,t)}finally{Ua()}}function oo(e,{cacheKey:t,isGitDiff:n=ne.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=To(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=fo(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=xo(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?uo(i.contents):[],deletionLines:!l&&r!=null&&i!=null?uo(r.contents):[],additionCharacterCount:!l&&r!=null&&i!=null?i.contents.length:0,deletionCharacterCount:!l&&r!=null&&i!=null?r.contents.length:0,cacheKey:Do(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(ro);if(t==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}let n=co(t[1],!0),r=co(t[2],!0);c.name=Wa(r),n!==r&&(c.prevName=Wa(n));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(ie):null;if(t!=null){let[,e,r]=t,i=co(r,n);if(e===`---`&&i!==`/dev/null`){let e=Wa(i);c.prevName=e,c.name=e}else e===`+++`&&i!==`/dev/null`&&(c.name=Wa(i))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=Wa(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=Wa(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=Wa(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=Wa(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(ae)??[];t!=null&&(c.prevObjectId=Wa(t)),n!=null&&(c.newObjectId=Wa(n)),r!=null&&(c.mode=Wa(r))}(e.startsWith(`rename from `)||e.startsWith(`copy from `))&&(c.prevName=Wa(co(e.slice(e.startsWith(`rename`)?12:10)))),(e.startsWith(`rename to `)||e.startsWith(`copy to `))&&(c.name=Wa(co(e.slice(e.startsWith(`rename`)?10:8))))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
158
|
-
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
159
|
-
`||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:Do(p.hunkContext),hunkSpecs:Wa(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(!yo(t)||bo(t))break;if(a)throw Error(`parsePatchContent: hunk has more lines than expected`)}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=Oo(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=ko(t);(g==null||g.type!==`change`)&&(g=Ao(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&(c.additionLines.push(e),c.additionCharacterCount+=e.length),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=ko(t);(g==null||g.type!==`change`)&&(g=Ao(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&(c.deletionLines.push(e),c.deletionCharacterCount+=e.length),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=ko(t);(g==null||g.type!==`context`)&&(g=Ao(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e),c.deletionCharacterCount+=e.length,c.additionCharacterCount+=e.length),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;if(e>=0){let t=c.additionLines[e],n=Mn(t);c.additionLines[e]=n,c.additionCharacterCount+=n.length-t.length}}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;if(e>=0){let t=c.deletionLines[e],n=Mn(t);c.deletionLines[e]=n,c.deletionCharacterCount+=n.length-t.length}}}}if(x!==b.additionCount||S!==b.deletionCount){if(a)throw Error(`parsePatchContent: hunk line count mismatch`);console.error(`parsePatchContent: hunk line count mismatch: "${f.trimEnd()}", declared old/new ${b.deletionCount}/${b.additionCount}, parsed old/new ${S}/${x}`);let e=be(b.additionStart,b.additionCount)+(x===0?0:1),t=be(b.deletionStart,b.deletionCount)+(S===0?0:1);if(!l){let n=e-b.additionStart,r=t-b.deletionStart;b.additionLineIndex+=n,b.deletionLineIndex+=r;for(let e of b.hunkContent)e.additionLineIndex+=n,e.deletionLineIndex+=r}b.additionStart=e,b.deletionStart=t,b.additionCount=x,b.deletionCount=S}b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(be(b.additionStart,b.additionCount)-o,0),c.hunks.push(b),o=xe(b.additionStart,b.additionCount);for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=xe(e.additionStart,e.additionCount),n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),Za(c),c}}function so(e,t,n=!1){let r=[],i=lo(e)?e.split(te):[e];for(let e of i)try{r.push(io(e,t,n,t==null?void 0:r.length))}catch(e){if(n)throw e;console.error(e)}finally{Ua()}return r}function co(e,t=!1){let n=e.trim(),r=n.startsWith(`"`)?qa(n)?.fileName??n:n;return t&&(r.startsWith(`a/`)||r.startsWith(`b/`))?r.slice(2):r}function lo(e){return e.startsWith(`From `)||e.includes(`
|
|
160
|
-
From `)}function uo(e){let t=fo(e);for(let e=0;e<t.length;e++)t[e]=Wa(t[e]);return t}function fo(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
|
|
161
|
-
`,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function po(e){return To(e,`diff --git`)}function mo(e){if(e.length===0)return[``];let t=[],n=0,r=0,i=0,a=0,o=!1;for(;r<e.length;){let s=vo(e,r);if(i<=0&&a<=0){if(go(e,r)){r>n&&t.push(e.slice(n,r)),n=r,o=!0,r=vo(e,s);continue}if(o&&e.startsWith(`@@ -`,r)){let t=xo(e.slice(r,s));t!=null&&(i=t.deletionCount,a=t.additionCount)}r=s;continue}let c=e[r];c===`\\`||(c===` `?(i=Math.max(i-1,0),a=Math.max(a-1,0)):c===`-`?i=Math.max(i-1,0):c===`+`&&(a=Math.max(a-1,0))),r=s}return t.push(e.slice(n)),t}function ho(e){return go(e,0)}function go(e,t){let n=vo(e,t);return _o(e,t,`---`)&&_o(e,n,`+++`)}function _o(e,t,n){if(!e.startsWith(n,t))return!1;let r=e[t+n.length];if(r!==` `&&r!==` `)return!1;for(let r=t+n.length+1;r<e.length;r++){let t=e[r];if(t===`
|
|
162
|
-
`||t===`\r`)break;if(t!==` `&&t!==` `)return!0}return!1}function vo(e,t){let n=e.indexOf(`
|
|
163
|
-
`,t);return n===-1?e.length:n+1}function yo(e){let t=e[0];return t===`+`||t===`-`||t===` `}function bo(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
164
|
-
`&&n!==`\r`)return!1}return!0}function xo(e){if(!e.startsWith(`@@ -`))return;let t=4,n=So(e,t);if(n==null)return;let r=n.value;t=n.endIndex;let i=1;if(e[t]===`,`){let n=So(e,t+1);if(n==null)return;i=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`+`)return;t+=2;let a=So(e,t);if(a==null)return;let o=a.value;t=a.endIndex;let s=1;if(e[t]===`,`){let n=So(e,t+1);if(n==null)return;s=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`@`||e[t+2]!==`@`)return;let c,l=t+3;return e[l]===` `&&(c=Co(e.slice(l+1))),{additionCount:s,additionStart:o,deletionCount:i,deletionStart:r,hunkContext:c}}function So(e,t){let n=t,r=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;r=r*10+t}if(n!==t)return{value:r,endIndex:n}}function Co(e){return e.endsWith(`\r
|
|
165
|
-
`)?e.slice(0,-2):e.endsWith(`
|
|
166
|
-
`)?e.slice(0,-1):e}function wo(e){return e.startsWith(`diff --git`)||e.includes(`
|
|
167
|
-
diff --git`)}function To(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:Eo(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=Eo(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function Eo(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function Do(e){return e==null?e:Wa(e)}function Oo(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function ko(e){let t=e.slice(1);return Wa(t===``?`
|
|
168
|
-
`:t)}function Ao(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}var jo=`/dev/null`;function Mo(e,t,n,r=!1){if(e===null&&t===null)throw Error(`parseDiffFromFile: You must pass oldFile, newFile, or both`);let i=e??No(),a=t??No(),o=ao(lr(i.name,a.name,i.contents,a.contents,i.header,a.header,n),{cacheKey:(()=>{let n=e?.cacheKey,r=t?.cacheKey;return n!=null&&r!=null?Da(`diff`,n,r):void 0})(),oldFile:i,newFile:a,throwOnError:r});if(o==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);e===null?(o.type=`new`,o.prevName=void 0):t===null&&(o.type=`deleted`,o.prevName=void 0);let s=t?.lang??(t===null?e?.lang:void 0);return s!=null&&(o.lang=s),o}function No(){return{name:jo,contents:``}}var Po=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,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));n==null||t==null?this.cleanUp():(this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0)}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function Fo(e,t){let n=Mo({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t);return{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,additionLines:n.additionLines,deletionLines:n.deletionLines,additionCharacterCount:n.additionCharacterCount,deletionCharacterCount:n.deletionCharacterCount,type:n.type}}function Io(e,t){let n=Math.max(e,1),r=Array.from({length:n},(e,t)=>`${` `.repeat(t+1)}\n`).join(``);return r===t&&(r=Array.from({length:n},(e,t)=>`\u0000${` `.repeat(t)}\n`).join(``)),r}function Lo(e){for(let t of e)if(t.trim().length>0)return!1;return!0}function Ro(e,t){return t.length>0&&t.length<e.deletionLines.length&&Lo(t)}function zo(e,t,n,r){let i=e.deletionLines.join(``),a=Io(t.length,i),o=Mo({name:e.prevName??e.name,contents:i},{name:e.name,contents:a,lang:e.lang},r);return{hunks:o.hunks,splitLineCount:o.splitLineCount,unifiedLineCount:o.unifiedLineCount,additionLines:t,deletionLines:o.deletionLines,additionCharacterCount:n,deletionCharacterCount:o.deletionCharacterCount,type:o.type}}function Bo(e,t){return zo(e,[``],0,t)}function U(e,t){if(e.additionLines.length===0)return Bo(e,t);if(Ro(e,e.additionLines))return zo(e,e.additionLines,e.additionCharacterCount,t);let n=e.additionLines,r=Fo(e,t);return Ho(r,n),r}function Vo(e){return e.length>1&&e.at(-1)===``}function Ho(e,t){if(!Vo(t))return;let n=t.length-e.additionLines.length;if(n<=0)return;let r=e.additionLines.length,i=e.hunks.at(-1);if(i!=null&&xe(i.additionStart,i.additionCount)===r){for(let a of i.hunkContent)if(a.type===`change`&&a.additions<a.deletions&&a.additionLineIndex+a.additions===r){e.additionLines=t,a.additions+=n,i.additionCount+=n,i.additionLines+=n,Qo(e);return}}}function Uo(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return Wo(e,Fo(e,n));let r=Array.from(t);if(r.length===0)return Wo(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(let t of r){let r=e.additionLines[t],i=e.deletionLines[t];if(r==null||i==null||Mn(r)===Mn(i))return Wo(e,Fo(e,n))}let i=Go(e,r);if(i.size===0)return Wo(e,Fo(e,n));for(let t of i)if(!qo(e,t,n))return Wo(e,Fo(e,n));return Qo(e),mn(e)?Wo(e,Fo(e,n)):Wo(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function Wo(e,t){return Object.assign(e,t),t}function Go(e,t){let n=new Set;for(let r of t){let t=Ko(e,r);if(t==null)return new Set;n.add(t)}return n}function Ko(e,t){for(let[n,r]of e.hunks.entries()){let e=r.additionLineIndex+r.additionCount;if(t>=r.additionLineIndex&&t<e)return n}}function qo(e,t,n){let r=e.hunks[t];if(r==null)return!1;let i=e.deletionLines.slice(r.deletionLineIndex,r.deletionLineIndex+r.deletionCount),a=e.additionLines.slice(r.additionLineIndex,r.additionLineIndex+r.additionCount),o=Mo({name:e.prevName??e.name,contents:i.join(``)},{name:e.name,contents:a.join(``),lang:e.lang},{...n,context:0}),s=o.hunks[0];return s==null||o.hunks.length!==1?!1:(Yo(r,s),Jo(e,t),!0)}function Jo(e,t){let n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}let r=e.additionLines.at(-1),i=e.deletionLines.at(-1);n.noEOFCRAdditions=r!=null&&r!==``&&!r.endsWith(`
|
|
169
|
-
`),n.noEOFCRDeletions=i!=null&&i!==``&&!i.endsWith(`
|
|
170
|
-
`)}function Yo(e,t){let n=e.additionLineIndex,r=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(e=>Xo(e,n,r)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart+=t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=r+t.deletionLineIndex,e.deletionStart+=t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,Zo(e)}function Xo(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function Zo(e){let t=0,n=0;for(let r of e.hunkContent)r.type===`context`?(t+=r.lines,n+=r.lines):(t+=Math.max(r.additions,r.deletions),n+=r.additions+r.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function Qo(e){let t=0,n=0,r=0;for(let i of e.hunks)i.collapsedBefore=Math.max(be(i.additionStart,i.additionCount)-r,0),i.splitLineStart=t+i.collapsedBefore,i.unifiedLineStart=n+i.collapsedBefore,Zo(i),t+=i.collapsedBefore+i.splitLineCount,n+=i.collapsedBefore+i.unifiedLineCount,r=xe(i.additionStart,i.additionCount);if(e.hunks.length>0){let r=e.hunks[e.hunks.length-1],i=Math.max(e.additionLines.length-xe(r.additionStart,r.additionCount),0);t+=i,n+=i}e.splitLineCount=t,e.unifiedLineCount=n}var $o=new WeakMap;function es(e){return e.length>1&&e[e.length-1]===``?e.slice(0,-1):e}function ts(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r++;let i=e.length,a=t.length;for(;i>r&&a>r&&e[i-1]===t[a-1];)i--,a--;if(r!==i||r!==a)return{start:r,deletionEnd:i,additionEnd:a}}function ns(e,t,n){let r=e.hunks,i=e.additionLines,a=es(i),o=a===i?e:{...e,additionLines:a},s=ps(r,ds(o,t,n),e.deletionLines.length),c=gs(o,s);if(e.additionLines=a,e.hunks=c,e.editSessionDirty=!0,Es(e),Ho(e,i),ys(r,e.hunks))return{regions:s.map(e=>e.previousSpan)}}function rs(e,t,n,r){let i=new Set(t),a=Array.from(i).filter(t=>t>=0&&t<e.additionLines.length).sort((e,t)=>e-t);if(a.length===0)return;let o=t=>i.has(t)?r?.get(t):e.additionLines[t],{hunks:s}=e,c,l=0;for(let t of a){for(;l<s.length;){let e=s[l];if(t<Ss(e)+e.additionCount)break;l++}let r=s[l],i=r==null?void 0:Ss(r);if(i==null||t<i||c!=null&&c!==l)return ns(e,n,o);c=l}if(c!=null){if(is(e,a,c,r,n))e.editSessionDirty=!0;else return ns(e,n,o)}}function is(e,t,n,r,i){if(r==null||i?.ignoreWhitespace===!0||i?.stripTrailingCr===!0)return!1;let a=as(e),o=e.hunks[n];if(o.hunkContent.some(os))return!1;for(let n of t){let t=r.get(n),i=e.additionLines[n];if(t==null||i==null||a.has(t)||a.has(i))return!1;let s=!1;for(let e of o.hunkContent)if(e.type===`change`&&e.additions===e.deletions&&n>=e.additionLineIndex&&n<e.additionLineIndex+e.additions){s=!0;break}if(!s)return!1}return!0}function as(e){let t=$o.get(e);if(t?.lines===e.deletionLines)return t.set;let n=new Set(e.deletionLines);return $o.set(e,{lines:e.deletionLines,set:n}),n}function os(e){return e?.type===`change`&&(e.additions===0||e.deletions===0)}function ss(e,t){let n=new Map,{regions:r}=t;for(let t=0;t<=r.length;t++){let i=r[t-1],a=r[t],o=t===0?e.get(0):i==null?void 0:e.get(i.lastIndex+1),s=a==null?void 0:e.get(a.firstIndex),c=o?.fromStart??0,l=s?.fromEnd??0;(c>0||l>0)&&n.set(t,{fromStart:c,fromEnd:l})}return n}function cs(e,t,n){let r=[];if(e.isPartial)return r;for(let[i,a]of e.hunks.entries()){let o=pn({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:t,hunkIndex:i,collapsedContextThreshold:n});if(o.rangeSize<=n)continue;let s=Cs(a),c=s-o.rangeSize;o.fromStart>0&&r.push([c,c+o.fromStart]),o.fromEnd>0&&r.push([s-o.fromEnd,s])}let i=gn({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`captureExpansionAnchors`});if(i!=null&&i.fromStart>0&&i.rangeSize>n){let t=e.hunks[e.hunks.length-1],n=Cs(t)+t.deletionCount;r.push([n,n+i.fromStart])}return r}function ls(e,t){let n=new Map;if(t.length===0)return n;let r=(e,r,i)=>{if(i<=r)return;let a=0,o=0;for(let[e,n]of t)n<=r||e>=i||(e<=r&&(a=Math.max(a,Math.min(n,i)-r)),n>=i&&(o=Math.max(o,i-Math.max(e,r))));(a>0||o>0)&&n.set(e,{fromStart:a,fromEnd:o})};for(let[t,n]of e.hunks.entries()){let e=Cs(n);r(t,e-Math.max(n.collapsedBefore,0),e)}let i=e.hunks[e.hunks.length-1];return i!=null&&!e.isPartial&&e.deletionLines.length>0&&r(e.hunks.length,Cs(i)+i.deletionCount,e.deletionLines.length),n}function us(e,t){return e.editSessionDirty===!0&&(delete e.editSessionDirty,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join(``)===``?Fo(e,t):U(e,t)),!0)}function ds(e,t,n){if(ts(e.deletionLines,e.additionLines)==null)return[];let r=Mo({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t),i,a=(t,a)=>{i??=fs(e.hunks);for(let e=0;e<=a;e++){let o=i.get(t.deletionLineIndex-e);if(o!=null&&o.additions===t.additions&&o.deletions===t.deletions){if(t.additions>0&&n!=null){for(let e=0;e<t.additions;e++)if(n(o.additionLineIndex+e)!==r.additionLines[t.additionLineIndex+e])return a}return e}}return a},o=[],s=0,c=0;for(let e of r.hunks){Qa(e,r,a);let t=e.additionCount>0?e.additionLineIndex-s:e.deletionLineIndex-c;s+=t,c+=t;for(let t of e.hunkContent){if(t.type===`context`){s+=t.lines,c+=t.lines;continue}let e=Xo(t,0,0);e.additions===0&&(e.additionLineIndex=s),e.deletions===0&&(e.deletionLineIndex=c),o.push(e),s+=e.additions,c+=e.deletions}}return o}function fs(e){let t=new Map;for(let n of e)for(let e of n.hunkContent)e.type===`change`&&(e.additions===0||e.deletions===0)&&t.set(e.deletionLineIndex,e);return t}function ps(e,t,n){let r=e.map((e,t)=>{let n=Cs(e);return{deletionStart:n,deletionEnd:n+e.deletionCount,blocks:[],previousSpan:{firstIndex:t,lastIndex:t}}}),i=[],a=0;for(let e of t){let t=e.deletionLineIndex,o=t+e.deletions;for(;a<r.length&&r[a].deletionEnd<t;)i.push(r[a]),a++;let s=i.length>0&&ms(t,o,i[i.length-1])?i.pop():void 0;for(;a<r.length&&r[a].deletionStart<=o;)s=hs(s,r[a]),a++;if(s==null){let c=t,l=o;if((e.deletions===0||e.additions===0)&&n>e.deletions){let e=i[i.length-1]?.deletionEnd??0,s=r[a]?.deletionStart??n;t>e?c--:o<s&&l++}s={deletionStart:c,deletionEnd:l,blocks:[],previousSpan:void 0}}s.deletionStart=Math.min(s.deletionStart,t),s.deletionEnd=Math.max(s.deletionEnd,o),s.blocks.push(e),i.push(s)}for(;a<r.length;)i.push(r[a]),a++;return i}function ms(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function hs(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function gs(e,t){let n=[],r=0,i=0;for(let a of t){let t=a.deletionStart-r;if(t<0)throw Error(`buildRegionHunks: overlapping old-side regions`);r+=t,i+=t;let o=i,s=[];for(let e of a.blocks){let t=e.deletionLineIndex-r,n=e.additionLineIndex-i;if(t<0||t!==n)throw Error(`buildRegionHunks: canonical block context mismatch`);vs(s,t,i,r),r+=t,i+=n,s.push({...e}),r+=e.deletions,i+=e.additions}let c=a.deletionEnd-r;if(c<0)throw Error(`buildRegionHunks: block exceeds its old-side region`);vs(s,c,i,r),r+=c,i+=c,n.push(_s(e,{additionStart:o,additionEnd:i,deletionStart:a.deletionStart,deletionEnd:a.deletionEnd},s))}if(e.deletionLines.length-r!==e.additionLines.length-i)throw Error(`buildRegionHunks: trailing context mismatch`);return n}function _s(e,t,n){let r=t.additionEnd-t.additionStart,i=t.deletionEnd-t.deletionStart,a=0,o=0;for(let e of n)e.type===`change`&&(a+=e.additions,o+=e.deletions);let s={collapsedBefore:0,additionStart:ws(t.additionStart,r),additionCount:r,additionLines:a,additionLineIndex:Ts(t.additionStart,r),deletionStart:ws(t.deletionStart,i),deletionCount:i,deletionLines:o,deletionLineIndex:Ts(t.deletionStart,i),hunkContent:n,hunkSpecs:`@@ -${ws(t.deletionStart,i)},${i} +${ws(t.additionStart,r)},${r} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return Zo(s),s}function vs(e,t,n,r){t>0&&e.push({type:`context`,lines:t,additionLineIndex:n,deletionLineIndex:r})}function ys(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(Cs(r)!==Cs(i)||r.deletionCount!==i.deletionCount||Ss(r)!==Ss(i)||r.additionCount!==i.additionCount||r.splitLineCount!==i.splitLineCount||!bs(r,i))return!0}return!1}function bs(e,t){let n=xs(e),r=xs(t);for(;;){let e=n.next(),t=r.next();if(e.done===!0||t.done===!0)return e.done===t.done;if(e.value[0]!==t.value[0]||e.value[1]!==t.value[1])return!1}}function*xs(e){for(let t of e.hunkContent){if(t.type===`context`){for(let e=0;e<t.lines;e++)yield[t.deletionLineIndex+e,t.additionLineIndex+e];continue}let e=Math.max(t.deletions,t.additions);for(let n=0;n<e;n++)yield[n<t.deletions?t.deletionLineIndex+n:void 0,n<t.additions?t.additionLineIndex+n:void 0]}}function Ss(e){return be(e.additionStart,e.additionCount)}function Cs(e){return be(e.deletionStart,e.deletionCount)}function ws(e,t){return t===0?e:e+1}function Ts(e,t){return t===0?e-1:e}function Es(e){Qo(e);for(let t=0;t<e.hunks.length;t++)Jo(e,t)}function Ds(e){return z({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Os(e){return z({tagName:`div`,children:[z({tagName:`span`,children:[jt(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function ks(e){return z({tagName:`div`,children:[Mt({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 As({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(z({tagName:`div`,children:[jt(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(ks(`up`)),s++),o||(e.push(ks(`down`)),s++)):(e.push(ks(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(z({tagName:`div`,children:[z({tagName:`span`,children:[jt(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(z({tagName:`div`,children:[jt(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(z({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(z({tagName:`slot`,properties:{name:i}})),z({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function js(e,t){return`hunk-separator-${e}-${t}`}function Ms(e){let t=e.at(-1);return t==null?0:Math.max(xe(t.additionStart,t.additionCount),xe(t.deletionStart,t.deletionCount))}var Ns=-1,Ps=class{options;annotationSlotName;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++Ns}`;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLangs=[`text`];renderCache;pendingHighlightResult;pendingStructuralRows;editSessionActive=!1;constructor(e={theme:ue},t=ve,n,r){this.options=e,this.annotationSlotName=t,this.onRenderUpdate=n,this.workerManager=r}cleanUp(){this.endEditSession(),this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.diff=void 0,this.editSessionActive?(this.renderCache!=null&&(this.renderCache.renderRange=void 0),this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0):this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}beginEditSession(e,t){let{editSessionActive:n}=this;this.editSessionActive=!0,n||(this.pendingHighlightResult=void 0),this.diff=e,n&&this.renderCache!=null&&this.renderCache.diff!==e&&this.clearRenderCache();let{renderCache:r}=this;if(!e.isPartial&&e.additionLines.length===0){Object.assign(e,Bo(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache();return}if(r==null||n&&r.diff===e)return;let{options:i}=this.getRenderOptions(e),a=r.diff===e,o=t!=null&&V(r.diff,t),{result:s}=r;!r.highlighted||s==null||!rn(r.options,i)||!a&&!o?this.clearRenderCache():a||(this.renderCache={diff:e,options:i,highlighted:!0,result:{...s,code:{...s.code,additionLines:[...s.code.additionLines]}},renderRange:r.renderRange})}endEditSession(){this.editSessionActive=!1,this.pendingHighlightResult=void 0,this.diff??this.clearRenderCache()}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){let{diff:e,renderCache:t,workerManager:n}=this;return e==null||t==null||!V(t.diff,e)||an(e)||Js(e,this.getTokenizeMaxLength())?Promise.resolve():!this.editSessionActive&&n?.isWorkingPool()===!0&&e.cacheKey!=null?(n.evictDiffFromCache(e.cacheKey),n.primeDiffHighlightCache(e).then(()=>{this.applyRefreshedResult(e,n.getDiffResultCache(e))}).catch(e=>{tn(e)||this.onHighlightError(e)})):this.asyncHighlight(e).then(t=>this.applyRefreshedResult(e,t)).catch(e=>this.onHighlightError(e))}applyRefreshedResult(e,t){let{diff:n,renderCache:r}=this;if(t==null||n==null||r==null||!V(n,e)||!V(r.diff,e)||this.editSessionActive)return;let{options:i}=this.getRenderOptions(n);rn(i,t.options)&&(this.pendingHighlightResult={diff:n,options:t.options,highlighted:!0,result:t.result},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){this.renderCache=void 0,this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??me}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}updateRenderCache(e,t,n=!1,r,i){this.pendingStructuralRows=void 0;let{renderCache:a}=this;if(a==null)return!1;let{result:o,diff:s}=a;if(o==null)return!1;if(s.isPartial)throw Error(`Could not update render cache for partial diff`);let c=o.code.additionLines,l=this.pendingStructuralRows=n?new Map:void 0,u=[],d=new Map;if(l==null&&r!=null){let t=s.additionLines.length,n=Ws(s.additionLines,i);for(let[i,a]of r){if(i<0||i>t||i===t&&(a===``||!n))continue;let r=s.additionLines[i]??``;r!==a&&(s.additionLines[i]=a,s.additionCharacterCount+=a.length-r.length,u.push(i),d.set(i,r),e.has(i)||(c[i]=Gs(i,Mn(a))))}}for(let[t,n]of e){let e=c[t]?.properties??{},i=n.map(e=>e[2]).join(``),a=t<s.additionLines.length,o=a?s.additionLines[t]??``:``,f=Mn(o);if(l==null&&a&&r?.has(t)!==!0){let e=Pi(o,i);s.additionLines[t]=e,s.additionCharacterCount+=e.length-o.length,f!==i&&(u.push(t),d.set(t,o))}let p={type:`element`,tagName:`div`,properties:{"data-line":e[`data-line`]??t+1,"data-line-index":e[`data-line-index`]??t,"data-line-type":e[`data-line-type`]??`context`},children:n.map(([e,t,n])=>e===0&&t===``?n===``?{type:`element`,tagName:`br`,properties:{},children:[]}:{type:`text`,value:n}:{type:`element`,tagName:`span`,properties:{"data-char":e,style:`color:${t};`},children:[{type:`text`,value:n}]})};l==null?c[t]=p:l.set(t,p)}let f=!1;if(u.length>0){if(this.editSessionActive){if(s.additionLines.length<=1&&s.additionLines.join(``)===``)this.applyRecomputePreservingSessionType(s,Bo(s,this.options.parseDiffOptions)),f=!0;else if(Ro(s,s.additionLines))this.applyRecomputePreservingSessionType(s,zo(s,s.additionLines,s.additionCharacterCount,this.options.parseDiffOptions)),f=!0;else{let e=rs(s,u,this.options.parseDiffOptions,d);this.applyExpansionRemap(e),f=e!=null}}else Object.assign(s,Uo(s,u,this.options.parseDiffOptions))}return o.baseThemeType=t,a.isDirty=!0,f}applyExpansionRemap(e){e!=null&&(this.expandedHunks=ss(this.expandedHunks,e))}applyDocumentChange(e){let{pendingStructuralRows:t,renderCache:n}=this;this.pendingStructuralRows=void 0;let r=this.diff??n?.diff;if(r==null)return;let i=n?.result;if(r.isPartial)throw Error(`Could not apply document change for partial diff`);let{additionLines:a}=r,{lines:o,characterCount:s}=Ks(e);if(r.additionLines=o,r.additionCharacterCount=s,i!=null&&(i.code.additionLines=Us(a,r.additionLines,i.code.additionLines,e)),r.additionLines.length<=1&&r.additionLines.join(``)===``?(this.applyRecomputePreservingSessionType(r,Bo(r,this.options.parseDiffOptions)),i!=null&&(i.code.additionLines[0]=Gs(0,e.getLineText(0)))):this.editSessionActive?this.applySessionDocumentChange(r,a):Object.assign(r,U(r,this.options.parseDiffOptions)),t!=null&&i!=null)for(let[e,n]of t)e<i.code.additionLines.length&&(i.code.additionLines[e]=n);n!=null&&(n.isDirty=!0)}applySessionDocumentChange(e,t){let{parseDiffOptions:n}=this.options,r=e.additionLines;Ro(e,r)?this.applyRecomputePreservingSessionType(e,zo(e,r,e.additionCharacterCount,n)):this.applyExpansionRemap(ns(e,n,e=>t[e]))}applyRecomputePreservingSessionType(e,t){let n=this.editSessionActive?e.type:void 0;Object.assign(e,t),n!=null&&(e.type=n),this.markEditSessionPass(e)}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){let n=t===`change`?e===`deletions`?`change-deletion`:`change-addition`:t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>Fi(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=ue,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=L,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}initializeHighlighter(){return rt(Ui(this.computedLangs,{theme:this.getLocalHighlightTheme(),preferredHighlighter:Mr(this.workerManager,this.options)}))}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=Js(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!rn(t,r.options)&&(r=void 0),this.renderCache??={diff:e,hydrated:!0,highlighted:!n&&!an(e),options:t,result:n?void 0:r?.result,renderRange:void 0};let i=this.getHighlightWorkerManager(e);i==null?at({theme:this.getLocalHighlightTheme()})??(this.computedLangs=qs(e),this.initializeHighlighter().catch(e=>{e instanceof Oe||this.onHighlightError(e)})):this.renderCache.result==null&&!n&&i.highlightDiffAST(this,this.diff)}getHighlightWorkerManager(e){let{editSessionActive:t,workerManager:n}=this;return!t&&n?.isWorkingPool()===!0&&!n.shouldHighlightOnMainThread(e)?n:void 0}cacheHighlightResult(e,t){let{editSessionActive:n,workerManager:r}=this;!n&&r?.isWorkingPool()===!0&&r.setDiffResultCache(e.cacheKey,t)}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??ue}getEffectiveCodeOptions(){let e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0){let e=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&e.useTokenTransformer!==!0?{...e,useTokenTransformer:!0}:e}let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!V(e,n.diff)||!rn(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getDiffForNextRender(e){let{options:t}=this.getRenderOptions(e);if(this.getReadyRenderResult(e,t)!=null||this.renderCache==null)return e;if(V(this.renderCache.diff,e))return this.renderCache.diff;let n=!(e.additionLines.length>0||e.deletionLines.length>0)||an(e)||Js(e,this.getTokenizeMaxLength());return this.canRenderDiff(e,t,n)?e:this.renderCache.diff}canRenderDiff(e,t,n){let{renderCache:r}=this;return r==null||V(r.diff,e)?!0:n?r.result==null&&r.hydrated!==!0||this.workerManager?.isWorkingPool()===!0&&!this.workerManager.shouldHighlightOnMainThread(e)||at({theme:t.theme})!=null:r.result==null&&r.hydrated!==!0?!0:this.getHighlightWorkerManager(e)==null?at({theme:t.theme})!=null:!r.highlighted}renderDiff(e=this.diff,t=he){if(this.diff=e,e==null){this.pendingHighlightResult=void 0;return}let{expandUnchanged:n,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getReadyRenderResult(e,i);this.pendingHighlightResult=void 0,o!=null&&(this.renderCache={...o,diff:e,renderRange:void 0},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||an(e)||Js(e,this.getTokenizeMaxLength()),l=this.canRenderDiff(e,i,c),u=!V(e,this.renderCache.diff),d=!Ni(this.renderCache.renderRange,t),f=this.getHighlightWorkerManager(e);if(f!=null){let o=this.renderCache.result==null&&this.renderCache.highlighted&&!c&&!u&&Wi(t);l&&!o&&(c||this.renderCache.result==null||!this.renderCache.highlighted&&(u||d))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||u||d||a)&&(this.renderCache.result=f.getPlainDiffAST(e,t.startingLine,t.totalLines,Wi(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&f.highlightDiffAST(this,e)}else{this.computedLangs=qs(e);let n=at(),r=n!=null&&et(i.theme,n),o=n!=null&&ct(this.computedLangs,n),s=!c&&o,u=Number.isFinite(t.totalLines);if(l&&n!=null&&r&&(a||c||!this.renderCache.highlighted&&s||this.renderCache.result==null)){let{result:t,options:r}=this.renderDiffWithHighlighter(e,n,c||!o,u);this.renderCache={diff:e,options:r,highlighted:s,result:t,renderRange:void 0},s&&this.cacheHighlightResult(e,{result:t,options:r})}r&&(c||o)||this.asyncHighlight(e,u).then(({result:t,options:n})=>{c||this.cacheHighlightResult(e,{result:t,options:n}),this.applyHighlightResult(e,t,n,!c)}).catch(e=>{e instanceof Oe||this.onHighlightError(e)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=he){this.diff=e;let{result:n}=await this.asyncHighlight(e,Number.isFinite(t.totalLines));return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return Vi({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e,t=!1){let n=Js(e,this.getTokenizeMaxLength());this.computedLangs=n?[`text`]:qs(e);let r=at(),i=r!=null&&et(this.getLocalHighlightTheme(),r),a=n||r!=null&&ct(this.computedLangs,r);return r!=null&&i&&a||(r=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,r,n,t)}renderDiffWithHighlighter(e,t,n=!1,r=!1){let{options:i}=this.getRenderOptions(e),{collapsedContextThreshold:a}=this.getOptionsWithDefaults(),o=mr(e,t,i,{forcePlainText:n,lazyLineAST:r,expandedHunks:n?!0:void 0,collapsedContextThreshold:a});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===``&&o.code.additionLines[0]==null){let t;if(Tn({diff:e,diffStyle:`both`,expandedHunks:n?!0:void 0,collapsedContextThreshold:a,callback:({additionLine:e})=>{if(e?.lineIndex===0)return t=e,!0}}),t==null)throw Error(`DiffHunksRenderer: missing empty addition line`);o.code.additionLines[0]=Gs(0,``,t.unifiedLineIndex,t.splitLineIndex)}return{result:o,options:i}}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){let{diff:i,renderCache:a}=this;i!=null&&a!=null&&V(i,e)&&rn(n,this.getRenderOptions(i).options)&&(a.result!=null&&a.highlighted&&rn(a.options,n)&&V(a.diff,i)||(this.pendingHighlightResult={diff:i,options:n,highlighted:r,result:t},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;let n=this.workerManager?.getDiffResultCache(e);if(n!=null&&rn(t,n.options))return n}getReadyRenderResult(e,t){let{pendingHighlightResult:n}=this;if(n!=null&&V(n.diff,e)&&rn(n.options,t))return n;let r=this.getMatchingWorkerResultCache(e,t);if(!(r==null||this.hasHighlightedRenderCache(e,t)))return{diff:e,highlighted:!0,...r}}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&V(e,n.diff)&&rn(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults(),d=this.renderCache?.isDirty??!1,f=a===`unified`,p=Ys(e,this.options.loadDiffFiles!=null),m=!e.isPartial||p,h=[],g=[],_=[],v=[],{additionLines:y,deletionLines:b}=n,x={rowCount:0,hunkSeparators:u,additionsContentAST:h,deletionsContentAST:g,unifiedContentAST:_,unifiedGutterAST:Nt(),deletionsGutterAST:Nt(),additionsGutterAST:Nt(),expansionLineCount:c,hunkData:v,incrementRowCount(e=1){x.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:x.unifiedGutterAST.children.push(t);break;case`deletions`:x.deletionsGutterAST.children.push(t);break;case`additions`:x.additionsGutterAST.children.push(t)}}},S=hn({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),C={size:0,side:void 0,increment(){this.size+=1},flush(){a!==`unified`&&(this.size<=0||this.side==null?(this.side=void 0,this.size=0):(this.side===`additions`?(x.pushToGutter(`additions`,Ft(void 0,`buffer`,this.size)),h?.push(Ds(this.size))):(x.pushToGutter(`deletions`,Ft(void 0,`buffer`,this.size)),g?.push(Ds(this.size))),this.size=0,this.side=void 0))}},w=(e,t,n,r,i)=>{x.pushToGutter(e,Pt(t,n,r,i))};function T(e){C.flush(),a===`unified`?Bs(`unified`,e,x):(Bs(`deletions`,e,x),Bs(`additions`,e,x))}this.pushFileLevelAnnotations(e,a,t,x),Tn({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,h=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&C.flush(),r>0&&T({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:m});let g=a===`unified`?h:l,_={type:c,hunkIndex:t,lineIndex:g,unifiedLineIndex:h,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(_);n?.before!=null&&Ls(n.before,x);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});w(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${h},${l}`,u.gutterProperties),i==null?r!=null&&(r=Vs(r,u.contentProperties,d&&s!=null?{"data-line":s.lineNumber,"data-line-index":`${h},${l}`}:void 0)):i=Vs(i,u.contentProperties,d&&o!=null?{"data-line":o.lineNumber,"data-line-index":`${h},${l}`}:void 0),zs({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,g),createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&Ls(n.after,x)}else{let n=this.getSplitInjectedRowsForLine?.(_);n?.before!=null&&Rs(n.before,x,C);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let f=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();f==null?c===`change`&&C.flush():(C.side!=null&&C.side!==f&&C.flush(),C.side=f,C.increment());let p=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,g);if(p!=null&&C.size>0&&C.flush(),s!=null){let e=Vs(r,a.contentProperties,d?{"data-line":s.lineNumber,"data-line-index":`${s.unifiedLineIndex},${l}`}:void 0);w(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=Vs(i,u.contentProperties,d?{"data-line":o.lineNumber,"data-line-index":`${o.unifiedLineIndex},${l}`}:void 0);w(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}zs({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...p,createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&Rs(n.after,x,C)}let v=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,E=t===e.hunks.length-1&&n!=null&&(a===`split`?l===n.splitLineStart+n.splitLineCount-1:h===n.unifiedLineStart+n.unifiedLineCount-1),D=v?n.noEOFCRDeletions:!1,O=v?n.noEOFCRAdditions:!1,k=(s?.noEOFCR??!1)||D,A=(o?.noEOFCR??!1)||O;if(A||k){if(a===`split`&&C.flush(),k){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(x.unifiedContentAST.push(Os(e)),x.pushToGutter(`unified`,Ft(e,`metadata`,1))):(x.deletionsContentAST.push(Os(e)),x.pushToGutter(`deletions`,Ft(e,`metadata`,1)),A||(x.pushToGutter(`additions`,Ft(void 0,`buffer`,1)),x.additionsContentAST.push(Ds(1))))}if(A&&!(f&&k&&c!==`change`)){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(x.unifiedContentAST.push(Os(e)),x.pushToGutter(`unified`,Ft(e,`metadata`,1))):(x.additionsContentAST.push(Os(e)),x.pushToGutter(`additions`,Ft(e,`metadata`,1)),k||(x.pushToGutter(`deletions`,Ft(void 0,`buffer`,1)),x.deletionsContentAST.push(Ds(1))))}x.incrementRowCount(1)}u!==`simple`&&u!==`metadata`&&(i>0||E&&p)&&T({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:E&&p?`unknown`:i,rangeSize:S,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:m}),x.incrementRowCount(1)}}),a===`split`&&C.flush();let E=Math.max(Ms(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),D=t.bufferBefore>0||t.bufferAfter>0,O=!f&&e.type!==`deleted`,k=!f&&e.type!==`new`,A=x.rowCount>0||D;h=O&&A?h:void 0,g=k&&A?g:void 0,_=f&&A?_:void 0;let j=this.createPreElement(g!=null&&h!=null,E);return{fileDiff:e,unifiedGutterAST:f&&A?x.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:k&&A?x.deletionsGutterAST.children:void 0,deletionsContentAST:g,additionsGutterAST:O&&A?x.additionsGutterAST.children:void 0,additionsContentAST:h,hunkData:v,preNode:j,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(e),totalLines:E,rowCount:x.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=Nt(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,Ii(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(z({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(z({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(z({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Kr(this.renderFullAST(e,t))}renderPartialHTML(e,t){return Kr(t==null?e:z({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}pushFileLevelAnnotations(e,t,n,r){if(!Ir(n))return;let i=e.type===`new`?[]:this.getAnnotationNames(Fr(this.deletionAnnotations)),a=e.type===`deleted`?[]:this.getAnnotationNames(Fr(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;zs(t===`unified`?{diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r}:{diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(this.annotationSlotName(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(this.annotationSlotName(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(o.annotations.length!==0||a.annotations.length!==0)return{deletionSpan:a,additionSpan:o}}getAnnotationNames(e){return e?.map(e=>this.annotationSlotName(e))??[]}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return Ri({fileOrDiff:e,mode:t,stickyHeader:n})}},Fs=new Intl.PluralRules(`en-US`);function Is(e){return`${e} unmodified line${Fs.select(e)===`one`?``:`s`}`}function Ls(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function Rs(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function zs({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,Ft(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,Ft(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,Ft(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function Bs(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(typeof n==`number`&&n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,As({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(As({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,As({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(As({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=js(e,t),d=r>c.expansionLineCount,f=s?t:void 0,p=typeof n==`number`?Is(n):`More unchanged context may be available`;c.pushToGutter(e,As({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(As({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:typeof n==`number`?n:0,lineCountKnown:typeof n==`number`,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function Vs(e,t,n){return e==null||e.type!==`element`||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function Hs(e){return e.length>0&&e[e.length-1]===``?e.length-1:e.length}function Us(e,t,n,r){let i=Hs(e),a=Hs(t),o=Math.min(i,a),s=0;for(;s<o&&e[s]===t[s];)s++;let c=0;for(;c<o-s&&e[i-1-c]===t[a-1-c];)c++;let l=Array(t.length);for(let e=0;e<s;e++)l[e]=n[e];for(let e=0;e<c;e++)l[a-1-e]=n[i-1-e];i<e.length&&a<t.length&&(l[t.length-1]=n[e.length-1]);for(let e=s;e<t.length;e++)l[e]??=Gs(e,r.getLineText(e));return l}function Ws(e,t){return t===e.length+1&&e.at(-1)?.endsWith(`
|
|
171
|
-
`)===!0}function Gs(e,t,n=e,r=e){return{type:`element`,tagName:`div`,properties:{"data-line":e+1,"data-line-index":`${n},${r}`,"data-line-type":`context`},children:[{type:`element`,tagName:`span`,properties:{"data-char":0},children:[{type:`text`,value:t}]}]}}function Ks(e){let t=[],n=0;for(let r=0;r<e.lineCount;r++){let i=e.getLineText(r,!0);t.push(i),n+=i.length}return{lines:t,characterCount:n}}function qs(e){if(e.lang!=null)return[e.lang];let t=dt(e.prevName??e.name),n=dt(e.name);return t===n?[n]:[t,n]}function Js(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function Ys(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function Xs(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function Zs(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function Qs(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:fa(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,parseDiffOptions:e?.parseDiffOptions,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function $s(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}function ec(e){let t={...e};return delete t.cacheKey,t}function tc(e,t){if(e.isPartial||t.isPartial)throw Error(`FileDiff.shouldResetEditorForExternalDiff: diffs must be fully hydrated`);let n=e.lang??dt(e.name),r=t.lang??dt(t.name),i=e.type!==`new`,a=t.type!==`new`;return e.name!==t.name||n!==r||i!==a||e.deletionLines.length!==t.deletionLines.length||e.deletionLines.some((e,n)=>e!==t.deletionLines[n])}function nc(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function rc(e,t){let{oldFile:n}=e;return n==null?t.type===`new`:t.type!==`new`&&n.name===(t.prevName??t.name)&&nc(n.lines,t.deletionLines)}var ic=-1,ac=class{options;workerManager;requestOwnerRender;static LoadedCustomComponent=!0;__id=`file-diff:${++ic}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;get lineAnnotations(){return this.renderedData?.lineAnnotations??ge}managersDirty=!1;deletionFile;additionFile;fileDiff;editSession;renderedData;pendingData;forceRenderOverride;renderRange;pendingFiles;appliedPreAttributes;headerCache={lastRenderedHTML:void 0,html:void 0,fileDiff:void 0};lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:ue},t,n){this.options=e,this.workerManager=t,this.requestOwnerRender=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new Ti,this.scrollSyncManager=new Po,this.interactionManager=new ii(`diff`,ai(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??ue}getHunksRendererOptions(e){return Qs(e)}createHunksRenderer(e){return new Ps(this.getHunksRendererOptions(e),this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>this.getLineIndexForDiff(this.getDiffForLineIndex(),e,t);getDiffForLineIndex(){return this.getRenderedDiff()}getLineIndexForDiff(e,t,n){if(e==null)return;let r=e.hunks.at(-1),i,a;hunkIterator:for(let o of e.hunks){let e=n===`deletions`?o.deletionStart:o.additionStart,s=n===`deletions`?o.deletionCount:o.additionCount,c=be(e,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(t<c){let e=c-t;i=Math.max(u-e,0),a=Math.max(l-e,0);break hunkIterator}if(t>=c+s){if(o===r){let e=t-(c+s);i=u+o.unifiedLineCount+e,a=l+o.splitLineCount+e;break hunkIterator}}else{for(let e of o.hunkContent)if(e.type===`context`){if(t<c+e.lines){let e=t-c;a=l+e,i=u+e;break hunkIterator}c+=e.lines,l+=e.lines,u+=e.lines}else{let r=n===`deletions`?e.deletions:e.additions;if(t<c+r){let r=t-c;i=u+(n===`additions`?e.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(e.deletions,e.additions),u+=e.deletions+e.additions}break hunkIterator}}if(i!=null&&a!=null)return[i,a]}setOptions(e){e!=null&&(this.options=e,this.clearReusableHeader(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(ai(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!st(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();getAnnotationSlotName=e=>da(this.editSession?.annotations,e,ve);getLatestAnnotations(){return this.pendingData?.lineAnnotations??this.editSession?.annotations?.current??this.lineAnnotations}getAnnotationsForDiff(e){let{pendingData:t}=this;return t!=null&&V(e,t.fileDiff)?t.lineAnnotations:this.lineAnnotations}isNewAnnotations(e){let t=this.editSession?.annotations;return e===this.getLatestAnnotations()?!1:t==null||e!==t.provided&&e!==t.current}setLineAnnotations(e){let t=this.editSession?.annotations;if(t!=null){if(!this.isNewAnnotations(e))return;ua(t,e,ve)}let n=this.getWorkingDiff();n!=null&&(this.pendingData={fileDiff:n,lineAnnotations:e})}syncEditSessionAnnotationsFromEditor(e){let t=this.editSession?.annotations;return t==null||e===t.current?!1:(t.current=e,this.renderedData!=null&&(this.renderedData.lineAnnotations=e),this.pendingData=void 0,this.hunksRenderer.setLineAnnotations(e),this.renderAnnotations(),!0)}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.lineAnnotations.length>0||this.pre?.hasAttribute(`data-has-merge-conflict`)===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){let{editor:t}=this;Er(this.handleEditSessionRender),this.emitPostRender(!0),t?.cleanUp(e?`recycle`:`discard`),e||(this.editor=void 0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,e||(this.pendingFiles=void 0),this.isComponentManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.renderedData=void 0,this.pendingData=void 0),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre?.remove(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement?.remove(),this.headerElement=void 0,this.clearHeaderSlots(),this.placeHolder?.remove(),this.placeHolder=void 0,this.headerCache.lastRenderedHTML=void 0,e||this.clearReusableHeader(),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.editSession=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=Ca(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t);let l=this.editor!=null;l||uc(this.pre,cc({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||dc(this.headerElement,lc({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,forceRender:l||a.forceRender,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),_a(e,t);for(let t of e.shadowRoot?.children??[])if(t instanceof SVGElement)this.spriteSVG=t;else if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)e instanceof HTMLElement&&e.tagName.toLowerCase()===`code`&&(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e))}else`diffsHeader`in t.dataset?this.headerElement=t:t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)?this.themeCSSStyle=t:t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent)}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){let i=r??this.getLatestAnnotations();this.pendingData=void 0,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?Mo(t,n,this.options.parseDiffOptions):void 0),this.renderedData=this.fileDiff==null?void 0:{fileDiff:this.fileDiff,lineAnnotations:i},this.fileDiff!=null&&this.adoptRenderData(this.fileDiff),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.getInputDiff()==null&&this.additionFile==null&&this.deletionFile==null||this.requestRender()||this.render({forceRender:!0,renderRange:this.renderRange})}requestRender(){let{requestOwnerRender:e}=this;return this.editSession!=null||e==null?!1:(this.forceRenderOverride=!0,e(),!0)}get isComponentManaged(){return this.requestOwnerRender!=null}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.loadFilesIfNecessary(),this.hunksRenderer.expandHunk(e,t,n),this.rerender()};loadFilesIfNecessary(){let e=this.getInputDiff(),{loadDiffFiles:t}=this.options;if(e==null||!$s(e)||this.pendingFiles?.fileDiff===e)return;if(t==null)throw Error(`FileDiff: loadDiffFiles is required to load full files for a partial diff`);let n=this.loadFilesForDiff(e,t),r=this.pendingFiles={fileDiff:e,promise:n};r.promise=n.finally(()=>{this.pendingFiles===r&&(this.pendingFiles=void 0)})}__canAttachEditor(){let e=this.getInputDiff();return e!=null&&!e.isPartial}async prepareForEditing(){if(this.__canAttachEditor())return;let e=this.__prepareForEditing();if(e==null){let e=this.getInputDiff();throw e?.isPartial===!0&&!$s(e)?Error(`FileDiff.prepareForEditing: this partial diff cannot be hydrated; provide a complete diff`):Error(`FileDiff.prepareForEditing: a partial diff requires loadDiffFiles`)}if(await e,!this.__canAttachEditor())throw Error(`FileDiff.prepareForEditing: the diff did not finish loading`)}__prepareForEditing(){if(this.__canAttachEditor())return;let e=this.getInputDiff();if(e?.isPartial===!0&&!$s(e))throw Error(`FileDiff: this partial diff cannot be hydrated; provide a complete diff to edit`);return this.loadFilesIfNecessary(),this.pendingFiles?.promise}async loadFilesForDiff(e,t){try{let n=await t(e);if(this.getInputDiff()!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}}async handleFilesLoaded(e,t){this.getInputDiff()===e&&e.isPartial&&(ka(`merge`,e,t),this.setHydratedState(t),this.installHydratedSessionDiff(e)?this.rerender():(await ya(()=>this.primeHighlightCache(e)),this.enabled&&this.getInputDiff()===e&&this.rerender()))}installHydratedSessionDiff(e){if(e.isPartial)throw Error(`FileDiff.installHydratedSessionDiff: diffs cannot be partial for editing`);return this.getInputDiff()===e&&this.editSession?.outgoingDiff!=null&&(this.installEditSession(e),!0)}updateInputDiff(e,t){if(V(this.getInputDiff(),e))return!1;let n=this.getLatestAnnotations();this.fileDiff=e;let{editSession:r}=this,i=r?.outgoingDiff??r?.diff;return r!=null&&(e.isPartial?r.inputDiff=e:this.installEditSession(e),this.editSession!=null&&(this.editSession.outgoingDiff=i)),this.editSession?.annotations!=null&&t!=null&&(this.editSession.annotations=la(t,ve,this.editSession.annotations)),this.pendingData={fileDiff:this.editSession?.diff??e,lineAnnotations:this.editSession?.annotations?.current??t??n},i!=null&&e.isPartial&&this.loadFilesIfNecessary(),!0}installEditSession(e,t,n){let r=e.additionLines.join(``),i=t==null?void 0:Oa(t.contents),a=n!=null&&rc(n,e);if(n!=null&&!a)throw Error(`FileDiff: retained session cannot resume against a different old file`);if(t!=null&&t.contents!==r&&!a)throw Error(`FileDiff: retained edits are missing their diff session state`);let o=t==null||t.name===e.name&&t.lang===e.lang&&t.contents===r,s=ec(e);t!=null&&i!=null&&!o&&(s.name=t.name,s.lang=t.lang),a&&n!=null&&t!=null&&i!=null&&(s.additionLines=i,s.additionCharacterCount=t.contents.length,s.type=n.type,s.hunks=n.hunks,s.editSessionDirty=!0,Qo(s));let c=this.editSession?.annotations??la(this.getLatestAnnotations(),ve);this.editSession={diff:s,inputDiff:e,annotations:c,outgoingDiff:this.editSession?.outgoingDiff},this.pendingData={fileDiff:s,lineAnnotations:c.current},this.hunksRenderer.beginEditSession(s,o&&!a?e:void 0)}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);n=this.forceRenderOverride??n,this.forceRenderOverride=void 0;let l=Ca(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!sc(u,this.deletionFile)||!sc(d,this.additionFile)),y=e!=null&&!V(e,this.getInputDiff()),b=i!=null&&(i.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(i);if(!f&&Ni(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&!y||e==null&&!v)){let e=this.applyCachedThemeState(p);return e&&this.finalizeRender(),e}let x;e==null&&_&&(v||this.getInputDiff()==null)&&(x=Mo(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e!=null&&y?this.updateInputDiff(e,i):x!=null&&(y=!0,this.updateInputDiff(x,i)),y&&this.clearReusableHeader(),i!=null&&this.setLineAnnotations(i);let C=this.getWorkingDiff();if(C==null)return!1;C.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(us(C,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.prepareRenderData(this.hunksRenderer.getDiffForNextRender(C));let{disableErrorHandling:w=!1,disableFileHeader:T=!1}=this.options;if(T&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.headerCache.lastRenderedHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(C,_e);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a,e.fileDiff),this.renderSeparators([]),this.adoptRenderData(e?.fileDiff??C),this.injectUnsafeCSS()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return this.finalizeRender(),r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(this.canPartiallyRender(n,b,v||y||g||!V(this.getRenderedDiff(),C))&&this.applyPartialRender({fileDiff:C,previousRenderRange:S,renderRange:h})){let e=this.getRenderedDiff();e!=null&&this.adoptRenderData(e)}else{let t=this.hunksRenderer.renderDiff(C,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a,t.fileDiff),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData),this.adoptRenderData(t.fileDiff)}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.finalizeRender(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}getInputDiff(){return this.fileDiff}getWorkingDiff(e=this.fileDiff){return this.editSession?.diff??e}getRenderedDiff(){return this.renderedData?.fileDiff}__getNextRenderData({fileDiff:e,lineAnnotations:t}){let n=this.editSession?.annotations;if(n!=null)return{fileDiff:e,lineAnnotations:t!=null&&this.isNewAnnotations(t)?t:n.provided};let r=this.getWorkingDiff(e)??e,i=this.hunksRenderer.getDiffForNextRender(r);return{fileDiff:i,lineAnnotations:t!=null&&V(i,r)?t:this.getAnnotationsForDiff(i)}}prepareRenderData(e){this.hunksRenderer.setLineAnnotations(this.getAnnotationsForDiff(e))}adoptRenderData(e){let{pendingData:t}=this,n=t!=null&&V(e,t.fileDiff);this.renderedData={fileDiff:e,lineAnnotations:n?t.lineAnnotations:this.lineAnnotations},n&&(this.pendingData=void 0)}syncRenderViewToEditor(){let{editor:e,fileContainer:t}=this,n=this.getLatestAnnotations(),r=this.computeEditorRenderRange(this.renderRange),i=this.getWorkingDiff();if(e==null||t==null||i==null||i.isPartial)return;let a=a=>{if(!this.enabled||this.editor!==e||this.fileContainer!==t||this.getWorkingDiff()!==i)return;let o=this.editSession?.outgoingDiff,s=this.getInputDiff(),c=o!=null&&s!=null&&o!==i,l=c&&o!=null&&s!=null?tc(o,s):!1;e.__syncRenderView({highlighter:a,fileContainer:t,fileDiff:i,lineAnnotations:n,renderRange:r,externalDocument:c,resetHistory:l})},o=this.getTheme(),s=i.lang??dt(i.name),c=at({theme:o,lang:s});c==null?rt({themes:Pe(o),langs:[`text`,s],preferredHighlighter:Mr(this.workerManager,this.options)}).then(a).catch(e=>{e instanceof Oe||console.error(e)}):a(c)}computeEditorRenderRange(e){let t=this.getWorkingDiff();if(e==null||t==null||Wi(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return Tn({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}__acknowledgeDocumentUpdate(){this.editSession!=null&&(this.editSession.outgoingDiff=void 0)}__acceptEditorChange(e){let{lineAnnotations:t}=e;t!=null&&this.syncEditSessionAnnotationsFromEditor(t)}emitEditChange(e){let{onEditChange:t}=this.options;t?.(e)}__captureDocumentSessionState(e=!0){let t=this.getInputDiff(),{diff:n,outgoingDiff:r}=this.editSession??{};if(r!=null&&t!=null){if(!t.isPartial&&tc(r,t))return;n=r}if(!(n==null||n.isPartial))return{diffSession:{oldFile:n.type===`new`?null:{name:n.prevName??n.name,lines:e?[...n.deletionLines]:n.deletionLines},type:n.type,hunks:e?wa(n.hunks):n.hunks},hasChanges:n.editSessionDirty===!0}}__attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.__attachEditor: cannot attach an editor to a "${this.type}" diff`);if(this.editor!=null)throw Error(`FileDiff.__attachEditor: an editor is already attached`);if(!this.__canAttachEditor())throw Error(`FileDiff.__attachEditor: a complete diff is required before editing`);let t=()=>{this.editor=void 0,this.finishEditSession()};try{return this.resumeEditorRendering(e),t}catch(e){throw t(),e}}__resumeEditor(e){if(this.editor!==e)throw Error(`FileDiff.__resumeEditor: editor association changed`);this.resumeEditorRendering(e)}resumeEditorRendering(e){let t=this.getInputDiff(),n=this.editSession?.outgoingDiff;n!=null&&t!=null&&!t.isPartial&&this.editSession?.diff===n&&this.installEditSession(t);let r=this.editSession==null&&t!=null&&!t.isPartial?t:void 0;r==null?this.editSession!=null&&this.hunksRenderer.beginEditSession(this.editSession.diff):this.installEditSession(r,e.__getDocumentContents(oc(r)),e.__getDocumentSessionState()),this.editor=e,this.getInputDiff()?.isPartial===!0&&this.loadFilesIfNecessary();let i=this.editSession?.diff;this.hunksRenderer.editorRenderReady()?(i!=null&&this.hunksRenderer.diffCache===i&&this.adoptRenderData(i),this.syncRenderViewToEditor()):this.rerender()}finishEditSession(){this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks()}__completeEditSession(e,t){this.settleEditSession(t===`install`,e)}settleEditSession(e,t){let{editSession:n}=this;if(n==null)return;let{diff:r,inputDiff:i,annotations:a}=n,o=a?.provided??this.lineAnnotations;if(this.editor!=null)throw Error(`FileDiff.__completeEditSession: detach the editor before completing the session`);this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks();let s=a?.current,c,l=null,u=null,d=!1,f;if(t==null)throw Error(`FileDiff.__completeEditSession: editor is required for completion`);let p=Ta(r),m={name:p.name,contents:p.additionLines.join(``)};p.lang!=null&&(m.lang=p.lang);let h={fileDiff:p,editor:t,originalFileDiff:i,oldFile:p.type===`new`?null:{name:p.prevName??p.name,contents:p.deletionLines.join(``)},newFile:m,lineAnnotations:s,originalLineAnnotations:o};Object.freeze(h);try{if(t.__emitEditComplete(h),this.options.onEditComplete?.(h)===`accept`){if(p.cacheKey!=null&&p.cacheKey===i.cacheKey)throw Error(`FileDiff.__completeEditSession: an accepted diff must not reuse the replaced diff cacheKey`);c=p,l=h.oldFile,u=h.newFile}}catch(e){d=!0,f=e}if(e&&c!=null&&this.additionFile!=null&&(this.deletionFile=l,this.additionFile=u),this.editSession=void 0,this.fileDiff=e&&c!=null?c:i,this.pendingData={fileDiff:this.fileDiff,lineAnnotations:e&&c!=null?s??o:o},e&&this.fileContainer!=null&&this.rerender(),d)throw f}finalizeEditSessionHunks(){let e=this.getWorkingDiff();if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=cs(e,this.hunksRenderer.getExpandedHunksMap(),t);return us(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(ls(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){let n=this.editSession?.diff;if(n==null)throw Error(`FileDiff.applyDocumentChange: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(n),this.hunksRenderer.applyDocumentChange(e),t!=null&&this.syncEditSessionAnnotationsFromEditor(t),this.rerender(),this.interactionManager.setSelectionDirty()}applySuspendedDocumentChange(e,t){this.applyDocumentChange(e,t),this.hunksRenderer.clearRenderCache()}updateRenderCache(e,t,n={}){let r=this.editSession?.diff;if(r==null)throw Error(`FileDiff.updateRenderCache: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(r);let{shouldRefreshDiffsView:i,lineCountChangeInFlight:a}=n;this.hunksRenderer.updateRenderCache(e,t,a,n.changedDocumentLines,n.documentLineCount)?(this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender()):i===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle===`split`?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}detachAdditionLines(){let{diff:e,inputDiff:t}=this.editSession??{};e!=null&&(e.additionLines===t?.additionLines||e.additionLines===e.deletionLines)&&(e.additionLines=[...e.additionLines])}isLineRenderable(e){let t=this.getRenderedDiff();if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return _n({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.getRenderedDiff();if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return vn({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.getRenderedDiff(),{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=fn(o);if(e<s){let c=pn({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=gn({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=fn(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){Tr(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.setPlaceholderHeight(e)}setPlaceholderHeight(e){return this.placeHolder!=null&&(this.placeHolder.style.setProperty(`height`,`${e}px`),!0)}async primeHighlightCache(e=this.getInputDiff()){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||an(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{tn(e)||console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.headerCache.lastRenderedHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isComponentManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!Zs(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isComponentManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderedData:t,options:{renderAnnotation:n}}=this;if(n!=null&&t!=null){let{fileDiff:r,lineAnnotations:i}=t;for(let[t,a]of i.entries()){let i=this.getAnnotationSlotName(a),o=`${t}-${i}`,s=this.annotationCache.get(o);if(s==null||s.fileDiff!==r||!Xs(a,s.annotation)){s?.element.remove();let e=n(a,r);if(e==null)continue;s={element:Yi(i),annotation:a,fileDiff:r},s.element.appendChild(e),this.fileContainer.appendChild(s.element),this.annotationCache.set(o,s)}e.delete(o)}}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=Xi();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.headerCache.lastRenderedHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:kr(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):kr(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=Gi;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.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,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{headerCache:{fileDiff:r,html:i,lastRenderedHTML:a}}=this,o=(n!==this.editSession?.diff&&V(r,n)?i:void 0)??Kr(e);if(this.headerCache.html=o,this.headerCache.fileDiff=n,o!==a){let e=document.createElement(`div`);e.innerHTML=o;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.headerCache.lastRenderedHTML=o}if(this.isComponentManaged)return;let{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderFilenameSuffix:l,renderHeaderMetadata:u}=this.options;if(s!=null){let e=s(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,le,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let d=c?.(n)??void 0,f=l?.(n)??void 0,p=u?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,oe,d),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,se,f),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,ce,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearReusableHeader(){this.headerCache.html=void 0,this.headerCache.fileDiff=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options;this.pre?.toggleAttribute(`data-custom-styles`,!!e);let t=this.fileContainer?.shadowRoot;t!=null&&(e==null||e===``?(this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0):(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=Zi(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=ra(e),this.appliedUnsafeCSS=e))}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.getTheme(),s=typeof o==`string`?o:{...o},c=$i(i);this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c?this.appliedThemeCSS.theme=s:this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i?(this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}):(this.themeCSSStyle=ha({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:ia(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c})}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=aa(this.themeCSSStyle.textContent??``,$i(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&jr()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?ma(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=fc(t[0]),a=fc(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=Kr(i),r.content.innerHTML=Kr(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=pa({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=pa({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=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=pa({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({fileDiff:e,previousRenderRange:t,renderRange:n}){let{pre:r,codeUnified:i,codeAdditions:a,codeDeletions:o,options:{diffStyle:s=`split`}}=this;if(r==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;let c=this.getCodeColumns(s,i,o,a);if(c==null)return!1;let l=t.startingLine,u=n.startingLine,d=l+t.totalLines,f=u+n.totalLines,p=Math.max(l,u),m=Math.min(d,f);if(m<=p)return!1;let h=Math.max(0,p-l),g=Math.max(0,d-m),_=this.trimColumns({columns:c,trimStart:h,trimEnd:g,previousStart:l,overlapStart:p,overlapEnd:m,diffStyle:s});if(_<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<_)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let v=this.lastRowCount-_,y=(t,n)=>{if(!(n<=0))return this.hunksRenderer.renderDiff(e,{startingLine:t,totalLines:n,bufferBefore:0,bufferAfter:0})},b=y(u,Math.max(p-u,0));if(b==null&&u<p)return!1;let x=y(m,Math.max(f-m,0));if(x==null&&f>m)return!1;let S=(e,t)=>{if(e!=null){if(s===`unified`&&!Array.isArray(c))this.insertPartialHTML(s,c,e,t);else if(s===`split`&&Array.isArray(c))this.insertPartialHTML(s,c,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);v+=e.rowCount,this.adoptRenderData(e.fileDiff)}};return this.cleanupErrorWrapper(),S(b,`afterbegin`),S(x,`beforeend`),this.lastRowCount!==v&&(this.applyRowSpan(s,c,v),this.lastRowCount=v),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){let e=this.getWorkingDiff();if(this.options.diffStyle!==`split`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;let r=(e,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(e,t),i=fc(r?.[0]),a=fc(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};r(`deletions`,n[0]),r(`additions`,n[1]),this.adoptRenderData(t.fileDiff)}refreshUnifiedDiffView(){let e=this.getWorkingDiff();if(this.options.diffStyle!==`unified`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;let r=this.hunksRenderer.renderCodeAST(`unified`,t),i=fc(r?.[0]),a=fc(r?.[1]),o=()=>{for(let[e,t]of[[n.gutter,i],[n.content,a]])t!=null&&(e.innerHTML=Kr(t));t.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,n,t.rowCount),this.lastRowCount=t.rowCount),this.adoptRenderData(t.fileDiff)};this.shouldGuardRebuildScroll()?ma(this.pre,o):o(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=fc(t[0]),i=fc(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset))e.remove(),u.remove(),i++;else if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset)(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;else if(`separator`in e.dataset&&`separator`in u.dataset)(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);else if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset)(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);else if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);else if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a}else throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){t==null||this.shouldDisableVirtualizationBuffers()?(this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)):(t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0))}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};Ki(u,this.appliedPreAttributes)||(va(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function oc(e){return{name:e.name,lang:e.lang,contents:e.additionLines.join(``)}}function sc(e,t){return e==null||t==null?e==null&&t==null:nn(e,t)}function cc({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function lc({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function uc(e,t,n=!1){return!n&&e==null&&t}function dc(e,t,n=!1){return e==null&&t&&!n}function fc(e){if(e!=null&&e.type===`element`)return e.children??[]}var pc=3e3,mc=new Map,hc=-1,gc=class extends ac{__id=`little-virtualized-file-diff:${++hc}`;renderType=`virtualized`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0,ghostTextRows:mc,ghostTextRowsByIndex:new Map};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;currentCollapsed;pendingHydratedDiff;pendingExpansions;pendingRender;constructor(e,t,n,r,i){super(e,r,i),this.virtualizer=t,this.metrics=on(n)}setMetrics(e,t=!1){let n=on(e);(t||!br(this.metrics,n))&&(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&(this.forceRenderOverride=!0)}syncLineAnnotations(e){return e==null||!this.isNewAnnotations(e)||e.length===0&&this.getLatestAnnotations().length===0?!1:(super.setLineAnnotations(e),!0)}syncEditSessionAnnotationsFromEditor(e){return super.syncEditSessionAnnotationsFromEditor(e)?(this.forceRenderOverride=!0,!0):!1}setFileAnnotationHeight(e){let t=this.cache.fileAnnotationHeight;return e!==t&&(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e){let t=this.getLayoutAnnotations();return Pr(t)?t.some(t=>t.lineNumber===0?e.type===`new`?t.side===`additions`:e.type!==`deleted`||t.side===`deletions`:!1):!1}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){let t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!xr(t,e),r=n&&wc(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:Tc(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.`);super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1,resetRenderRange:n=!0}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal=0,this.cache.ghostTextRows=mc,this.cache.ghostTextRowsByIndex.size>0&&this.cache.ghostTextRowsByIndex.clear(),this.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&t&&(this.renderRange=void 0)}applyGhostTextRows(e,t){let{cache:{heightDeltas:n,ghostTextRows:r,ghostTextRowsByIndex:i},metrics:{lineHeight:a}}=this;if(r===t)return!1;let o=this.getDiffStyle(),s=new Map;for(let[n,r]of t){let t=this.getLineIndexForDiff(e,n+1,`additions`);t!=null&&s.set(o===`split`?t[1]:t[0],r)}let c=!1;for(let e of new Set([...i.keys(),...s.keys()])){let t=((s.get(e)??0)-(i.get(e)??0))*a;if(t===0)continue;let r=(n.get(e)??0)+t;r===0?n.delete(e):n.set(e,r),this.cache.measuredHeightDeltaTotal+=t,c=!0}return this.cache.ghostTextRows=t,this.cache.ghostTextRowsByIndex=s,c}reconcileHeights(){let e=!1,{options:{overflow:t=`scroll`},metrics:{lineHeight:n}}=this,r=this.placeHolder==null?this.getRenderedDiff():this.getLayoutDiff();if(this.fileContainer==null||r==null)return this.height!==0&&(e=!0),this.height=0,e;this.top=this.getVirtualizedTop(),e=this.applyGhostTextRows(r,this.editor?.__getGhostTextRows()??mc);let{ghostTextRowsByIndex:i}=this.cache,a=t!==`scroll`||this.lineAnnotations.length>0||this.isResizeDebuggingEnabled();if(this.placeHolder!=null||!a&&this.cache.heightDeltas.size===0&&this.cache.fileAnnotationHeight===0)return e&&(this.computeApproximateSize(!0),this.setPlaceholderHeight(this.height)),e;let o=this.getDiffStyle(),s=o===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];if(this.renderRange!=null&&Ir(this.renderRange)){let t=_c(s)??0;this.setFileAnnotationHeight(t)&&(e=!0)}for(let t of s){if(t==null)continue;let r=t.children[1];if(!(r instanceof HTMLElement))continue;let s=o===`split`&&t===this.codeDeletions;for(let t of r.children){if(!(t instanceof HTMLElement))continue;let r=t.dataset.lineIndex;if(r==null)continue;let c=kc(r,o),l=i.get(c)??0;if(s&&l>0)continue;let u=this.cache.heightDeltas.get(c)??0;if(!a&&u===l*n)continue;let d=t.getBoundingClientRect().height+l*n,f=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(f=!0),d+=t.nextElementSibling.getBoundingClientRect().height);let p=this.getEstimatedLineHeight(f),m=d-p;m!==u&&(e=!0,this.cache.measuredHeightDeltaTotal+=m-u,m===0?this.cache.heightDeltas.delete(c):this.cache.heightDeltas.set(c,m))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer!=null&&(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}updateCodeViewLayout(e,t,n,r){let i=!1,a=!1,{pendingExpansions:o,pendingHydratedDiff:s,options:{collapsed:c=!1}}=this;if(s!=null&&(this.pendingHydratedDiff=void 0,s.expectedDiff===e&&(Object.assign(e,s.nextDiff),this.setHydratedState(s.files),this.installHydratedSessionDiff(e),this.forceRenderOverride=!0,i=!0,a=!0)),o!=null){this.pendingExpansions=void 0;for(let{hunkIndex:e,direction:t,expansionLineCountOverride:n}of o)this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,a=!0}let l=this.updateInputDiff(e,r),{pendingRenderDiff:u,layoutDiffChanged:d,renderedDiffChanged:f,annotationsChanged:p}=this.updatePendingRender(e,r);return!this.forceRenderOverride&&(l||f||p)&&(this.forceRenderOverride=!0),(n?.resetDiffLayoutCache===!0||d)&&(i=!0),(d||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights)&&(a=!0),n?.metrics!=null&&(this.metrics=on(n.metrics),i=!0,a=!0),this.currentCollapsed!==c&&(this.currentCollapsed=c,i=!0),i?this.resetLayoutCache({includeEstimatedHeights:a}):a&&this.invalidateDerivedLayoutCache(!0),this.top=t,this.computeApproximateSize(!1,u),this.height}getLinePosition(e,t=`additions`){let n=this.getLayoutDiff();if(n==null||e<1)return;let r=this.getLineIndexForDiff(n,e,t);if(r==null)return;let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsed:o=!1,collapsedContextThreshold:s=1}=this.options,c=this.getDiffStyle(),l=this.getHunkSeparatorType(),u=c===`split`?r[1]:r[0];this.approximateLayoutCheckpoints(n);let d=sn(this.metrics,i),f=this.getLayoutCheckpointBeforeLineIndex(u),p=f?.top??d+this.cache.fileAnnotationHeight;if(o)return{top:cn(this.metrics,i),height:0};let m;return Tn({diff:n,diffStyle:c,startingLine:f?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:r,deletionLine:i,additionLine:a})=>{let o=c===`split`?a?.splitLineIndex??i?.splitLineIndex:a?.unifiedLineIndex??i?.unifiedLineIndex;if(o==null)throw Error(`VirtualizedFileDiff.getLinePosition: missing line index data`);if(n>0){let r=Cn({type:l,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(r!=null){if(p+=r.gapBefore,u>=o-n&&u<o)return m={top:p,height:r.height},!0;p+=r.height+r.gapAfter}}let s=this.getLineHeight(o,(a?.noEOFCR??!1)||(i?.noEOFCR??!1));if(o===u)return m={top:p,height:s},!0;if(p+=s,r>0){let e=wn({type:l,metrics:this.metrics});if(e!=null){if(u>o&&u<=o+r)return m={top:p+e.gapBefore,height:e.height},!0;p+=e.totalHeight}}return!1}}),m}getEditorViewport(){return this.virtualizer.type===`simple`?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){let t=this.getLayoutDiff();if(t==null)return;let{disableFileHeader:n=!1,expandUnchanged:r=!1,collapsed:i=!1,collapsedContextThreshold:a=1}=this.options;if(i)return;let o=this.getDiffStyle(),s=this.getHunkSeparatorType();this.approximateLayoutCheckpoints(t);let c=this.getLayoutCheckpointBeforeTop(e),l=c?.top??sn(this.metrics,n)+this.cache.fileAnnotationHeight,u;return Tn({diff:t,diffStyle:o,startingLine:c?.renderedLineIndex??0,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,deletionLine:a,additionLine:c})=>{let d=o===`split`?c?.splitLineIndex??a?.splitLineIndex:c?.unifiedLineIndex??a?.unifiedLineIndex;if(d==null)throw Error(`VirtualizedFileDiff.getNumericScrollAnchor: missing line index data`);if(r>0){let e=Cn({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});e!=null&&(l+=e.totalHeight)}if(l>=e&&(a==null?c!=null&&(u={lineNumber:c.lineNumber,side:`additions`,top:l}):u={lineNumber:a.lineNumber,side:`deletions`,top:l},u!=null))return!0;let f=this.getLineHeight(d,(c?.noEOFCR??!1)||(a?.noEOFCR??!1));if(l+=f,i>0){let e=wn({type:s,metrics:this.metrics});e!=null&&(l+=e.totalHeight)}return!1}}),u}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){let t=this.getLayoutDiff();if(this.top==null||t==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let n=e==null?this.renderRange:this.computeRenderRangeFromWindow(t,this.top,e);if(n==null)return;let{bufferBefore:r,bufferAfter:i,totalLines:a}=n,o=0;if(a===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(o=i)}return{topOffset:this.top+r+o,height:this.height-(r+i)}}cleanUp(e=!1){let t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);let n=e&&this.isAdvancedMode()&&this.fileContainer!=null&&(t||!V(this.getRenderedDiff(),this.getWorkingDiff()));this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}expandHunk=(e,t,n)=>{this.getInputDiff()!=null&&(this.loadFilesIfNecessary(),this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(this.getInputDiff()===e&&e.isPartial){if(this.isAdvancedMode()){let n=ka(`clone`,e,t);if(await ya(()=>this.primeHighlightCache(n)),this.getInputDiff()!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(ka(`merge`,e,t),this.setHydratedState(t),!this.installHydratedSessionDiff(e)&&(await ya(()=>this.primeHighlightCache(e)),this.getInputDiff()!==e))return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}loadFilesIfNecessary(){if(this.pendingHydratedDiff!=null){if(this.pendingHydratedDiff.expectedDiff===this.getInputDiff())return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;let{pendingExpansions:t}=this,n=this.getRenderedDiff();if(t==null||t.length===0||n==null)return!1;let{expansionLineCount:r=100,collapsedContextThreshold:i=1}=this.options,a=new Map(this.hunksRenderer.getExpandedHunksMap());for(let e of t){let t={...a.get(e.hunkIndex)??{fromStart:0,fromEnd:0}},n=e.expansionLineCountOverride??r;(e.direction===`up`||e.direction===`both`)&&(t.fromStart+=n),(e.direction===`down`||e.direction===`both`)&&(t.fromEnd+=n),a.set(e.hunkIndex,t)}return _n({fileDiff:n,lineNumber:e,expandedHunks:a,collapsedContextThreshold:i})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),this.enabled&&this.getInputDiff()!=null&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){if(!this.enabled||this.getInputDiff()==null&&this.additionFile==null&&this.deletionFile==null)return;let e=this.getWorkingDiff(),t=e==null?void 0:this.hunksRenderer.getDiffForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,!(this.isSimpleMode()&&this.requestRender())&&this.virtualizer.instanceChanged(this,!V(this.getRenderedDiff(),t))}get isComponentManaged(){return this.getAdvancedVirtualizer()?.isComponentManaged??super.isComponentManaged}syncGhostTextRows(){let e=this.getAdvancedVirtualizer();e==null?this.getSimpleVirtualizer()?.requestHeightReconcile(this):(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0))}applyDocumentChange(e,t,n=!1){let{renderRange:r}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1});let i=this.getRenderedDiff();if(!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!=null&&i!=null){let e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(i,this.top??0,e);t.bufferAfter!==r.bufferAfter&&this.updateBuffers(t)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutDiff()){let n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;let r=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}this.applyGhostTextRows(t,this.editor?.__getGhostTextRows()??mc);let{disableFileHeader:i=!1,collapsed:a=!1}=this.options;a?(this.height+=cn(this.metrics,i),this.layoutDirty=!1):(this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!r&&this.validateComputedHeight(t),this.layoutDirty=!1)}getLayoutDiff(){return this.pendingRender?.diff??this.getRenderedDiff()}getLayoutAnnotations(){let{pendingRender:e}=this;return e==null?this.lineAnnotations:this.getAnnotationsForDiff(e.diff)}getActiveEstimatedHeight(e=this.getLayoutDiff()){this.ensureEstimatedDiffHeights(e);let t=this.getDiffStyle()===`split`?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw Error(`VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height`);return t}ensureEstimatedDiffHeights(e=this.getLayoutDiff()){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,{splitHeight:i,unifiedHeight:a}=ba({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r,canHydratePartialDiff:Ec(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=i,this.cache.estimatedUnifiedHeight=a}validateComputedHeight(e=this.getLayoutDiff()){if(this.fileContainer==null||e==null)return;let t=this.fileContainer.getBoundingClientRect();t.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:e.name,elementHeight:t.height,computedHeight:this.height})}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:r,...i}={}){let a=Ca(i,`VirtualizedFileDiff.render`),o=a!=null,s=a?.oldFile,c=a?.newFile,l=o&&(!Oc(s,this.deletionFile)||!Oc(c,this.additionFile)),u=t??this.getInputDiff();t==null&&o&&(l||this.getInputDiff()==null)&&(u=Mo(a.oldFile,a.newFile,this.options.parseDiffOptions));let{forceRenderOverride:d,isSetup:f}=this;this.forceRenderOverride=void 0;let p=u!=null&&!V(this.getInputDiff(),u),m=p||l;if(e=this.getOrCreateFileContainer(e),u==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;p&&this.updateInputDiff(u,r);let{pendingRenderDiff:h,layoutDiffChanged:g,renderedDiffChanged:_,annotationsChanged:v}=this.pendingRender!=null&&this.pendingRender.workingDiff===(this.getWorkingDiff(u)??u)?{pendingRenderDiff:this.pendingRender.diff,layoutDiffChanged:!1,renderedDiffChanged:!1,annotationsChanged:this.syncLineAnnotations(r)}:this.updatePendingRender(u,r);if(g&&this.resetLayoutCache({includeEstimatedHeights:!0}),f)this.top??=this.getVirtualizedTop(),this.layoutDirty&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,h));else{this.computeApproximateSize(!1,h);let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFileDiff.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!m||!f))return a!=null&&(this.deletionFile=s,this.additionFile=c),p&&this.clearReusableHeader(),this.renderPlaceholder(this.height);let y=this.virtualizer.getWindowSpecs(),b=this.top??0,x=this.computeRenderRangeFromWindow(h,b,y);return super.render({fileDiff:u,fileContainer:e,renderRange:x,lineAnnotations:r,forceRender:(d??n)||v||_||p,...a,...i})}finalizeRender(){if(!V(this.getRenderedDiff(),this.pendingRender?.diff))throw Error(`VirtualizedFileDiff.render: rendered a different diff than its prepared layout`);this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){let n=this.getWorkingDiff(e)??e,r=this.getRenderedDiff(),{pendingRender:i}=this,a=i?.diff??r,o=this.hunksRenderer.getDiffForNextRender(n);return this.pendingRender={workingDiff:n,diff:o},{pendingRenderDiff:o,annotationsChanged:this.syncLineAnnotations(t),layoutDiffChanged:!V(a,o),renderedDiffChanged:!V(r,o)}}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type===`simple`}isAdvancedMode(){return this.virtualizer.type===`advanced`}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}getSimpleVirtualizer(){return this.virtualizer.type===`simple`?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type===`advanced`?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??`split`}getHunkSeparatorType(){return Dc(this.options.hunkSeparators)}approximateLayoutCheckpoints(e){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e.hunks.length===0||this.options.collapsed===!0)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,i=e.hunks.length-1,a=Ec(e,this.options.loadDiffFiles!=null),o=this.getDiffStyle(),s=this.getHunkSeparatorType(),c=n?!0:this.hunksRenderer.getExpandedHunksMap(),l=vc(this.cache.heightDeltas),u=sn(this.metrics,t)+this.cache.fileAnnotationHeight,d=0,f=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:r=0,metadataOffsets:i=[]})=>{if(e<=0)return;let a=d,o=d+e,s=xc(a);for(;s<o;){let e=s-a,r=u+(e>0?n:0)+e*this.metrics.lineHeight+Sc(i,e)*this.metrics.lineHeight+yc(l,t,t+e);this.cache.checkpoints.push({renderedLineIndex:s,lineIndex:t+e,top:r}),s+=pc}u+=n+e*this.metrics.lineHeight+i.length*this.metrics.lineHeight+yc(l,t,t+e)+r,d=o};for(let t=0;t<e.hunks.length;t++){let n=e.hunks[t];if(n==null)throw Error(`VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index`);let l=pn({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:c,hunkIndex:t,collapsedContextThreshold:r}),u=l.collapsedLines>0?Cn({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n.hunkSpecs})?.totalHeight??0:0;f({rowCount:l.fromStart,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.rangeSize});let d=u;f({rowCount:l.fromEnd,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.fromEnd,preSeparatorHeight:d}),l.fromEnd>0&&(d=0);let p=t===i?gn({fileDiff:e,hunkIndex:t,expandedHunks:c,collapsedContextThreshold:r,errorPrefix:`VirtualizedFileDiff`}):void 0,m=p!=null&&p.collapsedLines>0||t===i&&a?wn({type:s,metrics:this.metrics})?.totalHeight??0:0,h=p==null?0:p.fromStart+p.fromEnd,g=o===`split`?n.splitLineCount:n.unifiedLineCount,_=o===`split`?n.splitLineStart:n.unifiedLineStart;f({rowCount:g,startLineIndex:_,preSeparatorHeight:d,postSeparatorHeight:h===0?m:0,metadataOffsets:Cc({diffStyle:o,hunk:n,rowCount:g})}),p!=null&&h>0&&f({rowCount:h,startLineIndex:_+g,postSeparatorHeight:m})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a=r?!0:this.hunksRenderer.getExpandedHunksMap();for(let[r,o]of e.hunks.entries()){let s=t===`split`?o.splitLineCount:o.unifiedLineCount;n+=s;let c=Math.max(o.collapsedBefore,0),{fromStart:l,fromEnd:u,renderAll:d}=pn({isPartial:e.isPartial,rangeSize:c,expandedHunks:a,hunkIndex:r,collapsedContextThreshold:i});c>0&&(n+=d?c:l+u)}let o=gn({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:i,errorPrefix:`VirtualizedFileDiff`});return o!=null&&(n+=o.fromStart+o.fromEnd),n}getLayoutLineCount(e,t){let n=this.getExpandedLineCount(e,t),r=t===`split`?e.splitLineCount:e.unifiedLineCount;return Math.max(n,r,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,{hunkLineCount:s,lineHeight:c}=this.metrics,l=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=Ec(e,this.options.loadDiffFiles!=null),f=this.height,p=this.getLayoutLineCount(e,l),m=sn(this.metrics,i),h=e.hunks.length>0?un(this.metrics):0,{fileAnnotationHeight:g}=this.cache,_=m+g,v=Math.max(0,f-m-g-h),y=this.hasFileAnnotations(e),b=t+m,x=g>0&&y&&b<r&&b+g>n;if(t<n-f||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h};if(p<=s||e.hunks.length===0)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),p=this.getLayoutLineCount(e,l);let S=Math.ceil(Math.max(r-n,0)/c),C=Math.ceil(S/s)*s+s,w=C/s,T=w,E=[],D=(n+r)/2,O=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-C*c*2),s),k=t+(O?.top??_),A=O?.renderedLineIndex??0,j,M,N;if(Tn({diff:e,diffStyle:l,startingLine:O?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:i,hunk:a,collapsedBefore:o,collapsedAfter:c,deletionLine:f,additionLine:p})=>{let m=p==null?f.splitLineIndex:p.splitLineIndex,h=p==null?f.unifiedLineIndex:p.unifiedLineIndex,g=(p?.noEOFCR??!1)||(f?.noEOFCR??!1),v=i===e.hunks.length-1&&a!=null&&(l===`split`?m===a.splitLineStart+a.splitLineCount-1:h===a.unifiedLineStart+a.unifiedLineCount-1),y=(o>0?Cn({type:u,metrics:this.metrics,hunkIndex:i,hunkSpecs:a?.hunkSpecs}):void 0)?.totalHeight??0;k+=y;let b=A%s===0,x=Math.floor(A/s);if(b&&(E[x]=k-(t+_+y),N!=null)){if(N<=0)return!0;N--}let S=this.getLineHeight(l===`split`?m:h,g);if(k>n-S&&k<r&&(j??=x),M==null&&k+S>D&&(M=x),N==null&&k>=r&&b&&(N=T),A++,k+=S,c>0||v&&d){let e=wn({type:u,metrics:this.metrics});e!=null&&(k<r&&k+e.totalHeight>n&&(j??=x),M==null&&k+e.totalHeight>D&&(M=x),k+=e.totalHeight)}return!1}}),j==null){if(x)j=0,M=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h}}M??=j;let P=Math.round(M-w/2),F=Math.max(0,Math.ceil(p/s)-w),ee=Math.max(0,Math.min(P,F)),te=ee*s,ne=P<0?C+P*s:C,re=E[ee]??0,ie=te===0?0:g+re,ae=ee+ne/s,oe=ae<E.length?v-E[ae]:v-(k-t-_);return{startingLine:te,totalLines:ne,bufferBefore:ie,bufferAfter:Math.max(0,oe)}}};function _c(e){let t;for(let n of e){if(n==null)continue;let e=n.children[1];if(e instanceof HTMLElement)for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===`-1,-1`&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}function vc(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],r=[0],i=0;for(let[e,a]of t)n.push(e),i+=a,r.push(i);return{lineIndexes:n,prefixTotals:r}}function yc({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;let i=bc(e,n);return(t[bc(e,r)]??0)-(t[i]??0)}function bc(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1,a=e[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid prefix index`);a<t?n=i+1:r=i}return n}function xc(e){return Math.ceil(e/pc)*pc}function Sc(e,t){let n=0;for(let r of e)r<t&&n++;return n}function Cc({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let r=t.hunkContent.at(-1);if(r==null)return[];if(r.type===`context`)return[n-1];let i=Math.max(r.deletions,r.additions),a=r.deletions+r.additions;if(e===`split`)return i>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let o=[],s=n-a;return r.deletions>0&&t.noEOFCRDeletions&&o.push(s+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function wc(e,t){return(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function Tc(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function Ec(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function Dc(e){return typeof e==`function`?`custom`:e??`line-info`}function Oc(e,t){return e==null||t==null?e==null&&t==null:nn(e,t)}function kc(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}function Ac(e,t){return typeof window>`u`&&t!=null?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,A.jsx)(A.Fragment,{children:e})}var jc=(0,b.createContext)(void 0);function Mc(){return(0,b.useContext)(jc)}function Nc(){let[e]=(0,b.useState)(()=>{let e=0,t;return{getSnapshot:()=>e,subscribe(e){return t=e,()=>{t=void 0}},forceUpdate(){e++,t?.()}}});return(0,b.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot),e.forceUpdate}function Pc(e,t){"use no memo";return e.current?.__getNextRenderData(t)}var Fc=typeof window>`u`?b.useEffect:b.useLayoutEffect;function Ic({fileDiff:e,oldFile:t,newFile:n,options:r,editorOptions:i,editStateKey:a,lineAnnotations:o,selectedLines:s,prerenderedHTML:c,metrics:l,hasGutterRenderUtility:u,hasCustomHeader:d,disableWorkerPool:f,edit:p,onEditChange:m,onEditComplete:h}){let g=Mc(),_=s!==void 0,v=(0,b.useContext)(yr),y=M(),[x,S]=(0,b.useState)(),C=O(e=>m?.(e)),w=m==null?void 0:C,T=(0,b.useRef)(null),E=O(r=>{let i=h?.(r)??`reject`;return i===`accept`&&(T.current={fileDiff:{installed:r.fileDiff,stale:r.originalFileDiff},filePair:e==null?{fileDiff:r.fileDiff,installed:{oldFile:r.oldFile,newFile:r.newFile},stale:{oldFile:t??null,newFile:n??null}}:null,annotations:{installed:r.lineAnnotations,stale:r.originalLineAnnotations}}),i}),D=h==null?void 0:E,k=Lc({acceptedCache:T,fileDiff:e,newFile:n,oldFile:t,parseDiffOptions:r?.parseDiffOptions}),A=(0,b.useRef)(null),j=Nc(),N=Pc(A,zc(T,k,o))??{fileDiff:k,lineAnnotations:o??ge},P=(0,b.useRef)(null),F=(0,b.useRef)(null),ee=O(()=>{if(y==null)throw Error(`FileDiff: EditContext is not attached`);return y(`file-diff`,i??{},a)}),te=O(e=>{if(e!=null){if(A.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);g==null?A.current=new ac(Hc({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:w,onEditComplete:D,options:r}),f?void 0:v,j):A.current=new gc(Hc({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:w,onEditComplete:D,options:r}),g,l,f?void 0:v,j),A.current.hydrate({fileDiff:k,fileContainer:e,lineAnnotations:o,prerenderedHTML:c})}else{if(A.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);F.current=null,A.current.cleanUp(),A.current=null,P.current=null}});Fc(()=>{let{current:e}=A;if(e==null)return;let t=Hc({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:w,onEditComplete:D,options:r}),n=!xr(e.options,t);if(e.setOptions(t),!p&&(F.current=null,P.current!=null)){let{current:e}=P;P.current=null,e()}let i=Vc(k,o,T);if(e.render({forceRender:n,fileDiff:i.fileDiff,lineAnnotations:i.lineAnnotations}),s!==void 0&&e.setSelectedLines(s),!p||P.current!=null)return;if(y==null)throw Error(`FileDiff: EditContext is not attached`);let a=()=>{A.current===e&&P.current==null&&e.__canAttachEditor()&&(P.current=Uc(e,ee),j())};if(e.__canAttachEditor()){F.current=null,a();return}let c=e.__prepareForEditing();if(c==null){F.current=null;return}if(F.current?.promise===c)return;let l={promise:c};F.current=l,c.then(()=>{F.current===l&&(a(),F.current=null)}).catch(e=>{F.current===l&&(F.current=null,S(e))})});let ne=(0,b.useCallback)(()=>A.current?.getHoveredLine(),[]),re=(0,b.useCallback)(e=>A.current?.getAnnotationSlotName(e)??ve(e),[]);if(x!=null)throw x;return{...N,ref:te,getHoveredLine:ne,getAnnotationSlotName:re}}function Lc({acceptedCache:e,fileDiff:t,newFile:n,oldFile:r,parseDiffOptions:i}){return(0,b.useMemo)(()=>{if(t!=null)return t;let{current:a}=e,o=a?.filePair;if(a!=null&&o!=null){if(Rc(r,n,o.stale)||Rc(r,n,o.installed))return o.fileDiff;a.filePair=null}return Mo(r??null,n??null,i)},[e,t,r,n,i])}function Rc(e,t,n){return Nr(e??void 0,n.oldFile??void 0)&&Nr(t??void 0,n.newFile??void 0)}function zc(e,t,n){"use no memo";return Bc(t,n,e.current)}function Bc(e,t,n){return{fileDiff:n?.fileDiff!=null&&V(e,n.fileDiff.stale)?n.fileDiff.installed:e,lineAnnotations:n?.annotations!=null&&t===n.annotations.stale?n.annotations.installed:t}}function Vc(e,t,n){let{current:r}=n,i=Bc(e,t,r);return r==null||(r.fileDiff!=null&&!V(e,r.fileDiff.stale)&&(r.fileDiff=null),t!==r.annotations?.stale&&(r.annotations=null),r.fileDiff==null&&r.annotations==null&&r.filePair==null&&(n.current=null)),i}function Hc({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r,onEditChange:i,onEditComplete:a}){return{...e,controlledSelection:t,renderCustomHeader:n?F:e?.renderCustomHeader,renderGutterUtility:r?F:e?.renderGutterUtility,onEditChange:i,onEditComplete:a}}function Uc(e,t){let n=t();try{return n.edit(e)}catch(e){throw n.cleanUp(),e}}function Wc({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:l,renderAnnotation:u,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderGutterUtility:h,disableWorkerPool:g=!1,edit:_=!1,onEditChange:v,onEditComplete:y}){let{ref:b,getHoveredLine:x,getAnnotationSlotName:S,fileDiff:C,lineAnnotations:w}=Ic({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:l,hasGutterRenderUtility:h!=null,hasCustomHeader:d!=null,disableWorkerPool:g,edit:_,onEditChange:v,onEditComplete:y}),T=we({fileDiff:C,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderAnnotation:u,renderGutterUtility:h,lineAnnotations:w,getHoveredLine:x,getAnnotationSlotName:S});return(0,A.jsx)(ee,{ref:b,className:s,style:c,children:Ac(T,l)})}var Gc=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Kc(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Gc(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var qc=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Jc=e=>{let t=qc(e);return t.charAt(0).toUpperCase()+t.slice(1)},Yc=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Xc={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Zc(e){return e!=null}function Qc(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Xc.width,a=e.size??e.height??Xc.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Yc(...c):Yc(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Xc[`stroke-width`])*Number(e.size??e.width??Xc.width)/Number(t.size??t.width??Xc.width):t.strokeWidth??Xc[`stroke-width`];return[`svg`,{...Object.entries(Xc).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Zc(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Zc(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Zc(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function $c(e,t={}){return Qc(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var el=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},tl=(0,b.createContext)({}),nl=()=>(0,b.useContext)(tl),rl=(0,b.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=nl()??{},y=!!c||el(d),[x,S,C=[]]=$c(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Yc(v,s),hasA11yProp:y,attributes:d});return(0,b.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function il(e,t=[],n=[]){let r=typeof e==`string`?Kc(e,t,n):e,i=(0,b.forwardRef)(({className:e,...t},n)=>(0,b.createElement)(rl,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Jc(r.name)),i}var al={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};al.node;var ol=il(al),sl={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};sl.node;var cl=il(sl),ll={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};ll.node;var ul=il(ll),dl={name:`chevrons-down-up`,size:24,node:[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]};dl.node;var fl=il(dl),pl={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};pl.node;var ml=il(pl),hl={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};hl.node;var gl=il(hl),_l={name:`eye-off`,size:24,node:[[`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`}]]};_l.node;var vl=il(_l),yl={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};yl.node;var bl=il(yl),xl={name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]};xl.node;var Sl=il(xl),Cl={name:`message-square`,size:24,node:[[`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`}]]};Cl.node;var wl=il(Cl),Tl={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Tl.node;var El=il(Tl),Dl={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};Dl.node;var Ol=il(Dl),kl={name:`sparkles`,size:24,node:[[`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`}]],aliases:[`stars`]};kl.node;var Al=il(kl),jl={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};jl.node;var Ml=il(jl),Nl={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Nl.node;var Pl=il(Nl);function Fl({checked:e,label:t,onChange:n,className:r}){return(0,A.jsxs)(`label`,{className:`checkbox-btn${r?` ${r}`:``}`,children:[(0,A.jsx)(`input`,{type:`checkbox`,className:`checkbox-input`,checked:e,onChange:e=>n(e.target.checked)}),(0,A.jsx)(`span`,{className:`checkbox-box`,"aria-hidden":`true`,children:e&&(0,A.jsx)(ol,{size:10,strokeWidth:3})}),(0,A.jsx)(`span`,{children:t})]})}function W({variant:e=`default`,active:t=!1,muted:n=!1,iconOnly:r=!1,pill:i=!1,type:a=`button`,className:o,...s}){let c=[`button`,`button-${e}`,t&&`button-active`,n&&`button-muted`,r&&`button-icon-only`,i&&`button-pill`,o].filter(Boolean).join(` `);return(0,A.jsx)(`button`,{...s,type:a,className:c})}function Il({className:e,inputClassName:t,actionsClassName:n,placeholder:r,submitLabel:i,cancelLabel:a=`Cancel`,value:o,rows:s=3,autoFocus:c=!1,allowEmptySubmit:l=!1,children:u,onValueChange:d,onSubmit:f,onCancel:p}){let[m,h]=(0,b.useState)(``),g=(0,b.useRef)(null),_=o??m,v=_.trim();(0,b.useEffect)(()=>{c&&g.current?.focus()},[c]);let y=e=>{o===void 0&&h(e),d?.(e)},x=()=>{(v||l)&&(o===void 0&&h(``),f(v))},S=(0,A.jsx)(`textarea`,{ref:g,className:[`text-input-area`,t].filter(Boolean).join(` `),value:_,rows:s,autoFocus:c,placeholder:r,onChange:e=>y(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),x()),e.key===`Escape`&&p&&(e.preventDefault(),p())}});return(0,A.jsxs)(`form`,{className:e,onSubmit:e=>{e.preventDefault(),x()},children:[S,(0,A.jsxs)(`div`,{className:n,children:[u,p&&(0,A.jsx)(W,{variant:`ghost`,onClick:p,children:a}),(0,A.jsx)(W,{type:`submit`,variant:`primary`,disabled:!v&&!l,children:i})]})]})}var Ll=(0,b.memo)(function({onSave:e,onCancel:t}){let[n,r]=(0,b.useState)(!1);return(0,A.jsx)(Il,{className:`comment-editor`,inputClassName:`comment-input`,actionsClassName:`comment-actions`,placeholder:`Add a comment…`,submitLabel:`comment`,rows:2,autoFocus:!0,allowEmptySubmit:!0,onSubmit:t=>e(t,n),onCancel:t,children:(0,A.jsx)(Fl,{checked:n,label:`ask agent`,onChange:r})})});function Rl({additions:e,deletions:t,className:n}){let r=[`diff-stats`,n].filter(Boolean).join(` `);return(0,A.jsxs)(`span`,{className:r,children:[(0,A.jsxs)(`span`,{className:`stat-add`,children:[`+`,e]}),(0,A.jsxs)(`span`,{className:`stat-del`,children:[`-`,t]})]})}var zl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vl={};function Hl(e,t){return((t||Vl).jsx?Bl:zl).test(e)}var Ul=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
172
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Wl=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(Ul());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),Gl=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Kl=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Wl()),i=Gl();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),ql=Yl(`end`),Jl=Yl(`start`);function Yl(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Xl(e){let t=Jl(e),n=ql(e);if(t&&n)return{start:t,end:n}}function Zl(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?$l(e.position):`start`in e||`end`in e?$l(e):`line`in e||`column`in e?Ql(e):``}function Ql(e){return eu(e&&e.line)+`:`+eu(e&&e.column)}function $l(e){return Ql(e&&e.start)+`-`+Ql(e&&e.end)}function eu(e){return e&&typeof e==`number`?e:1}var tu=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Zl(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};tu.prototype.file=``,tu.prototype.name=``,tu.prototype.reason=``,tu.prototype.message=``,tu.prototype.stack=``,tu.prototype.column=void 0,tu.prototype.line=void 0,tu.prototype.ancestors=void 0,tu.prototype.cause=void 0,tu.prototype.fatal=void 0,tu.prototype.place=void 0,tu.prototype.ruleId=void 0,tu.prototype.source=void 0;var nu=t(Kl(),1),ru={}.hasOwnProperty,iu=new Map,G=/[A-Z]/g,au=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ou=new Set([`td`,`th`]),su=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function cu(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=yu(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=vu(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?u:c,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=lu(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function lu(e,t,n){if(t.type===`element`)return uu(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return du(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return pu(e,t,n);if(t.type===`mdxjsEsm`)return fu(e,t);if(t.type===`root`)return mu(e,t,n);if(t.type===`text`)return hu(e,t)}function uu(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=u,e.schema=i),e.ancestors.push(t);let a=Tu(e,t.tagName,!1),o=bu(e,t),c=Su(e,t);return au.has(t.tagName)&&(c=c.filter(function(e){return typeof e!=`string`||!s(e)})),gu(e,o,a,t),_u(o,c),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function du(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Eu(e,t.position)}function fu(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Eu(e,t.position)}function pu(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=u,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Tu(e,t.name,!0),o=xu(e,t),s=Su(e,t);return gu(e,o,a,t),_u(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function mu(e,t,n){let r={};return _u(r,Su(e,t)),e.create(t,e.Fragment,r,n)}function hu(e,t){return t.value}function gu(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _u(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function vu(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function yu(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Jl(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function bu(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&ru.call(t.properties,i)){let a=Cu(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ou.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function xu(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Eu(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Eu(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Su(e,t){let n=[],r=-1,i=e.passKeys?new Map:iu;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=lu(e,a,o);s!==void 0&&n.push(s)}return n}function Cu(e,t,n){let r=a(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?o(n):l(n)),r.property===`style`){let t=typeof n==`object`?n:wu(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Du(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Lr[r.property]||r.property:r.attribute,n]}}function wu(e,t){try{return(0,nu.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new tu("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=su+`#cannot-parse-style-attribute`,r}}function Tu(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Hl(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Hl(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return ru.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Eu(e)}function Eu(e,t){let n=new tu("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=su+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Du(e){let t={},n;for(n in e)ru.call(e,n)&&(t[Ou(n)]=e[n]);return t}function Ou(e){let t=e.replace(G,ku);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function ku(e){return`-`+e.toLowerCase()}var Au={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`]},ju={};function Mu(e,t){let n=t||ju;return Nu(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Nu(e,t,n){if(Fu(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Pu(e.children,t,n)}return Array.isArray(e)?Pu(e,t,n):``}function Pu(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Nu(e[i],t,n);return r.join(``)}function Fu(e){return!!(e&&typeof e==`object`)}var Iu=document.createElement(`i`);function Lu(e){let t=`&`+e+`;`;Iu.innerHTML=t;let n=Iu.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Ru(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function zu(e,t){return e.length>0?(Ru(e,e.length,0,t),e):t}var Bu={}.hasOwnProperty;function Vu(e){let t={},n=-1;for(;++n<e.length;)Hu(t,e[n]);return t}function Hu(e,t){let n;for(n in t){let r=(Bu.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Bu.call(r,a)||(r[a]=[]);let e=i[a];Uu(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Uu(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Ru(e,0,0,r)}function Wu(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Gu(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Ku=Z(/[A-Za-z]/),qu=Z(/[\dA-Za-z]/),Ju=Z(/[#-'*+\--9=?A-Z^-~]/);function Yu(e){return e!==null&&(e<32||e===127)}var Xu=Z(/\d/),Zu=Z(/[\dA-Fa-f]/),Qu=Z(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function q(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}var Y=Z(/\p{P}|\p{S}/u),X=Z(/\s/);function Z(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function $u(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&qu(e.charCodeAt(n+1))&&qu(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Q(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return J(r)?(e.enter(n),s(r)):t(r)}function s(r){return J(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function ed(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&J(t)?(e.enter(r),c(t)):l(t)}function c(t){return J(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var td={tokenize:nd};function nd(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return K(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var rd=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){id(this,e,t,n,!1)}addBefore(e,t,n){id(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function id(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var ad={tokenize:sd},od={tokenize:cd};function sd(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new rd;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(od,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(od,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return K(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new rd;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function cd(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function ld(e){if(e===null||q(e)||X(e))return 1;if(Y(e))return 2}function ud(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var dd={name:`attention`,resolveAll:fd,tokenize:pd};function fd(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};md(o,-a),md(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=zu(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=zu(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=zu(r,ud(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=zu(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=zu(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),Ru(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function pd(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ld(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=ld(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function md(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var hd={name:`autolink`,tokenize:gd};function gd(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Ku(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||qu(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||qu(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Yu(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Ju(t)?(e.consume(t),l):n(t)}function u(e){return qu(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||qu(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var _d={partial:!0,tokenize:vd};function vd(e,t,n){return r;function r(t){return J(t)?Q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||K(e)?t(e):n(e)}}var yd={continuation:{tokenize:xd},exit:Sd,name:`blockQuote`,tokenize:bd};function bd(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return J(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function xd(e,t,n){let r=this;return i;function i(t){return J(t)?Q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(yd,t,n)(r)}}function Sd(e){e.exit(`blockQuote`)}var Cd={name:`characterEscape`,tokenize:wd};function wd(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Qu(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Td={name:`characterReference`,tokenize:Ed};function Ed(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=qu,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Zu,u):(e.enter(`characterReferenceValue`),a=7,o=Xu,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===qu&&!Lu(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Dd={partial:!0,tokenize:Od};function Od(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var kd={concrete:!0,name:`codeFenced`,tokenize:Ad};function Ad(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),J(t)?Q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||K(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Dd,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Q(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||K(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&J(t)?Q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||K(t)?e.check(Dd,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||K(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),J(t)?Q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),J(t)?Q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||K(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var jd={name:`codeIndented`,tokenize:Nd},Md={partial:!0,tokenize:Pd};function Nd(e,t,n){return r;function r(t){return e.enter(`codeIndented`),ed(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):K(t)?e.attempt(Md,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||K(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Pd(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):K(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):ed(e,t,a,`linePrefix`,4,4)(o)}function a(e){return K(e)?i(e):n(e)}}var Fd={name:`codeText`,previous:Ld,resolve:Id,tokenize:Rd};function Id(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ld(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Rd(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||K(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var zd=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Bd(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Bd(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Bd(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Bd(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Bd(this.left,t.reverse())}}}};function Bd(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Vd(e){let t={},n=-1,r,i,a,o,s,c,l,u=new zd(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Hd(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Ru(e,0,1/0,u.slice(0)),!l}function Hd(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Ud={resolve:Gd,tokenize:Kd},Wd={partial:!0,tokenize:qd};function Gd(e){return Vd(e),e}function Kd(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):K(t)?e.check(Wd,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function qd(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,a,`linePrefix`)}function a(i){if(i===null||K(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Jd(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Yu(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||K(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||q(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Yu(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Yd(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):K(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||K(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!J(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Xd(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||K(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Zd(e,t){let n;return r;function r(i){return K(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):J(i)?Q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Qd={name:`definition`,tokenize:ef},$d={partial:!0,tokenize:tf};function ef(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Yd.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Gu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return q(t)?Zd(e,l)(t):l(t)}function l(t){return Jd(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt($d,d,d)(t)}function d(t){return J(t)?Q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||K(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function tf(e,t,n){return r;function r(t){return q(t)?Zd(e,i)(t):n(t)}function i(t){return Xd(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return J(t)?Q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||K(e)?t(e):n(e)}}var nf={name:`hardBreakEscape`,tokenize:rf};function rf(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return K(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var af={name:`headingAtx`,resolve:of,tokenize:sf};function of(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};Ru(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function sf(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||q(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||K(n)?(e.exit(`atxHeading`),t(n)):J(n)?Q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||q(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var cf=`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`.split(`.`),lf=[`pre`,`script`,`style`,`textarea`],uf={concrete:!0,name:`htmlFlow`,resolveTo:ff,tokenize:pf},df={partial:!0,tokenize:mf};function ff(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 pf(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ee):Ku(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Ku(a)?(e.consume(a),i=4,r.interrupt?t:ee):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ee):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Ku(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||q(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&lf.includes(l)?(i=1,r.interrupt?t(s):O(s)):cf.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||qu(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return J(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Ku(t)?(e.consume(t),b):J(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||qu(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):J(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):J(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||K(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||q(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||J(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||K(t)?O(t):J(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),te):t===63&&i===3?(e.consume(t),ee):t===93&&i===5?(e.consume(t),F):K(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(df,ne,k)(t)):t===null||K(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Dd,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||K(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),ee):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return lf.includes(n)?(e.consume(t),te):O(t)}return Ku(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),ee):O(t)}function ee(t){return t===62?(e.consume(t),te):t===45&&i===2?(e.consume(t),ee):O(t)}function te(t){return t===null||K(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),te)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function mf(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(_d,t,n)}}var hf={name:`htmlText`,tokenize:gf};function gf(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Ku(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Ku(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):K(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):K(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):K(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):K(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Ku(t)?(e.consume(t),S):n(t)}function S(t){return t===45||qu(t)?(e.consume(t),S):C(t)}function C(t){return K(t)?(o=C,N(t)):J(t)?(e.consume(t),C):M(t)}function w(t){return t===45||qu(t)?(e.consume(t),w):t===47||t===62||q(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Ku(t)?(e.consume(t),E):K(t)?(o=T,N(t)):J(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||qu(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):K(t)?(o=D,N(t)):J(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):K(t)?(o=O,N(t)):J(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):K(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||q(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||q(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return J(t)?Q(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var _f={name:`labelEnd`,resolveAll:xf,resolveTo:Sf,tokenize:Cf},vf={tokenize:wf},yf={tokenize:Tf},bf={tokenize:Ef};function xf(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Ru(e,0,e.length,n),e}function Sf(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=zu(o,e.slice(i+1,i+r+3)),o=zu(o,[[`enter`,l,t]]),o=zu(o,ud(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=zu(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=zu(o,e.slice(a+1)),o=zu(o,[[`exit`,s,t]]),Ru(e,i,e.length,o),e}function Cf(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Gu(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(vf,u,o?u:d)(t):t===91?e.attempt(yf,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(bf,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function wf(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return q(t)?Zd(e,a)(t):a(t)}function a(t){return t===41?u(t):Jd(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return q(t)?Zd(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Xd(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return q(t)?Zd(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Tf(e,t,n){let r=this;return i;function i(t){return Yd.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Gu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ef(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Df={name:`labelStartImage`,resolveAll:_f.resolveAll,tokenize:Of};function Of(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var kf={name:`labelStartLink`,resolveAll:_f.resolveAll,tokenize:Af};function Af(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var jf={name:`lineEnding`,tokenize:Mf};function Mf(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}}var Nf={name:`thematicBreak`,tokenize:Pf};function Pf(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||K(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),J(t)?Q(e,s,`whitespace`)(t):s(t))}}var Ff={continuation:{tokenize:zf},exit:$,name:`list`,tokenize:Rf},If={partial:!0,tokenize:Vf},Lf={partial:!0,tokenize:Bf};function Rf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Xu(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Nf,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Xu(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(_d,r.interrupt?n:u,e.attempt(If,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return J(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function zf(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(_d,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!J(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Lf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(Ff,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Bf(e,t,n){let r=this;return Q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function $(e){e.exit(this.containerState.type)}function Vf(e,t,n){let r=this;return Q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!J(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Hf={name:`setextUnderline`,resolveTo:Uf,tokenize:Wf};function Uf(e,t){let n=new rd,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function Wf(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),J(t)?Q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||K(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Gf={tokenize:Kf};function Kf(e){let t=this,n=e.attempt(_d,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ud,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var qf={resolveAll:Zf()},Jf=Xf(`string`),Yf=Xf(`text`);function Xf(e){return{resolveAll:Zf(e===`text`?Qf:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Zf(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Qf(e,t){let n=new rd,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var $f=e({attentionMarkers:()=>sp,contentInitial:()=>tp,disable:()=>cp,document:()=>ep,flow:()=>rp,flowInitial:()=>np,insideSpan:()=>op,string:()=>ip,text:()=>ap}),ep={42:Ff,43:Ff,45:Ff,48:Ff,49:Ff,50:Ff,51:Ff,52:Ff,53:Ff,54:Ff,55:Ff,56:Ff,57:Ff,62:yd},tp={91:Qd},np={[-2]:jd,[-1]:jd,32:jd},rp={35:af,42:Nf,45:[Hf,Nf],60:uf,61:Hf,95:Nf,96:kd,126:kd},ip={38:Td,92:Cd},ap={[-5]:jf,[-4]:jf,[-3]:jf,33:Df,38:Td,42:dd,60:[hd,hf],91:kf,92:[nf,Cd],93:_f,95:dd,96:Fd},op={null:[dd,qf]},sp={null:[42,95]},cp={null:[]};function lp(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=zu(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ud(a,l.events,l),l.events):[]}function f(e,t){return dp(p(e),t)}function p(e){return up(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){K(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Ru(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function up(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function dp(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
173
|
-
`;break;case-3:o=`\r
|
|
174
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function fp(e){let t={constructs:Vu([$f,...(e||{}).extensions||[]]),content:n(td),defined:[],document:n(ad),flow:n(Gf),lazy:{},string:n(Jf),text:n(Yf)};return t;function n(e){return n;function n(n){return lp(t,e,n)}}}function pp(e){for(;!Vd(e););return e}var mp=/[\0\t\n\r]/g;function hp(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){mp.lastIndex=c;let n=mp.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var gp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _p(e){return e.replace(gp,vp)}function vp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Wu(n.slice(t?2:1),t?16:10)}return Lu(n)||e}var yp={}.hasOwnProperty;function bp(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),xp(n)(pp(fp(n).document().write(hp()(e,t,!0))))}function xp(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(_e),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(R),blockQuote:o(I),characterEscape:E,characterReference:E,codeFenced:o(de),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(de,s),codeText:o(fe,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(pe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(L),hardBreakEscape:o(me),hardBreakTrailing:o(me),htmlFlow:o(he,s),htmlFlowData:E,htmlText:o(he,s),htmlTextData:E,image:o(ge),label:s,link:o(_e),listItem:o(ye),listItemValue:p,listOrdered:o(ve,f),listUnordered:o(ve),paragraph:o(be),reference:ie,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(R),strong:o(xe),thematicBreak:o(Ce)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:se,characterReference:ce,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:ee,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:te,resourceTitleString:ne,resource:re,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Cp(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),yp.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Tp).call(o,void 0,e[0])}for(r.position={start:Sp(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Sp(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Sp(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+Zl({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Tp).call(this,e,r[0])),n.position.end=Sp(e.end)}function d(){return Mu(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gu(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Se(),n.position={start:Sp(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Sp(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Sp(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=_p(t),n.identifier=Gu(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function re(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gu(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Wu(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Lu(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=Sp(e.end)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ue(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function I(){return{type:`blockquote`,children:[],position:void 0}}function de(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function fe(){return{type:`inlineCode`,value:``,position:void 0}}function pe(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function L(){return{type:`emphasis`,children:[],position:void 0}}function R(){return{type:`heading`,depth:0,children:[],position:void 0}}function me(){return{type:`break`,position:void 0}}function he(){return{type:`html`,value:``,position:void 0}}function ge(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function _e(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function be(){return{type:`paragraph`,children:[],position:void 0}}function xe(){return{type:`strong`,children:[],position:void 0}}function Se(){return{type:`text`,value:``,position:void 0}}function Ce(){return{type:`thematicBreak`,position:void 0}}}function Sp(e){return{line:e.line,column:e.column,offset:e.offset}}function Cp(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Cp(e,r):wp(e,r)}}function wp(e,t){let n;for(n in t)if(yp.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Tp(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Zl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zl({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Zl({start:t.start,end:t.end})+`) is still open`)}function Ep(e){let t=this;t.parser=n;function n(n){return bp(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Dp(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Op(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
175
|
-
`}]}function kp(e,t){let n=t.value?t.value+`
|
|
176
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Ap(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jp(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mp(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=$u(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Np(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pp(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Fp(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Ip(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fp(e,t);let i={src:$u(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Lp(e,t){let n={src:$u(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Rp(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function zp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fp(e,t);let i={href:$u(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Bp(e,t){let n={href:$u(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Vp(e,t,n){let r=e.all(t),i=n?Hp(n):Up(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
177
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
178
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Hp(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Up(n[r])}return t}function Up(e){return e.spread??e.children.length>1}function Wp(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Gp(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kp(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qp(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jp(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Jl(t.children[1]),o=ql(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Yp(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Xp(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Zp=9,Qp=32;function $p(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(em(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(em(t.slice(i),i>0,!1)),a.join(``)}function em(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Zp||t===Qp;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Zp||t===Qp;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function tm(e,t){let n={type:`text`,value:$p(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nm(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var rm={blockquote:Dp,break:Op,code:kp,delete:Ap,emphasis:jp,footnoteReference:Mp,heading:Np,html:Pp,imageReference:Ip,image:Lp,inlineCode:Rp,linkReference:zp,link:Bp,listItem:Vp,list:Wp,paragraph:Gp,root:Kp,strong:qp,table:Jp,tableCell:Xp,tableRow:Yp,text:tm,thematicBreak:nm,toml:im,yaml:im,definition:im,footnoteDefinition:im};function im(){}var{defineProperty:am}=Object,om=typeof self==`object`?self:globalThis,sm=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new om[e](t)},cm=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?am(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof om[e]==`function`?sm(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(sm(a,o),i)};return r},lm=e=>cm(new Map,e)(0),um=``,{toString:dm}={},{keys:fm,is:pm}=Object,mm=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=dm.call(e).slice(8,-1);switch(n){case`Array`:return[1,um];case`Object`:return[2,um];case`Date`:return[3,um];case`RegExp`:return[4,um];case`Map`:return[5,um];case`Set`:return[6,um];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},hm=([e,t])=>e===0&&(t===`function`||t===`symbol`),gm=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=mm(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&pm(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of fm(o))(e||!hm(mm(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?um:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(hm(mm(n))||hm(mm(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!hm(mm(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},_m=(e,{json:t,lossy:n}={})=>{let r=[];return gm(!(t||n),!!t,new Map,r)(e),r},vm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?lm(_m(e,t)):structuredClone(e):(e,t)=>lm(_m(e,t));function ym(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function bm(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function xm(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||ym,r=e.options.footnoteBackLabel||bm,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=$u(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...vm(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
179
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
180
|
-
`}]}}var Sm=(function(e){if(e==null)return Dm;if(typeof e==`function`)return Em(e);if(typeof e==`object`)return Array.isArray(e)?Cm(e):wm(e);if(typeof e==`string`)return Tm(e);throw Error(`Expected function, string, or object as test`)});function Cm(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Sm(e[n]);return Em(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function wm(e){let t=e;return Em(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Tm(e){return Em(t);function t(t){return t&&t.type===e}}function Em(e){return t;function t(t,n,r){return!!(Om(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Dm(){return!0}function Om(e){return typeof e==`object`&&!!e&&`type`in e}function km(e){return e}var Am=[],jm=`skip`;function Mm(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=Sm(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+km(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=Am;if(s&&r&&(o=Nm(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=Nm(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function Nm(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Am:[e]}function Pm(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?Mm(e,i,Im(a),o):Mm(e,i,Fm(a),o)}function Fm(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?Im(e.enter):e.enter,exit:typeof e.exit==`function`?Im(e.exit):e.exit}}function Im(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var Lm={}.hasOwnProperty,Rm={};function zm(e,t){let n=t||Rm,r=new Map,i=new Map,a={all:s,applyData:Vm,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...rm,...n.handlers},one:o,options:n,patch:Bm,wrap:Um};return Pm(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Lm.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=vm(n);return r.children=a.all(e),r}return vm(e)}return(a.options.unknownHandler||Hm)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Wm(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Wm(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Bm(e,t){e.position&&(t.position=Xl(e))}function Vm(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,vm(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Hm(e,t){let n=t.data||{},r=`value`in t&&!(Lm.call(n,`hProperties`)||Lm.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Um(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
181
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
182
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
183
|
-
`}),n}function Wm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Gm(e,t){let n=zm(e,t),r=n.one(e,void 0),i=xm(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
184
|
-
`},i)),a}function Km(e,t){return e&&`run`in e?async function(n,r){let i=Gm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Gm(n,{file:r,...e||t})}}function qm(e){if(e)throw e}var Jm=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Ym(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Xm(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Zm(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Zm(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Qm={basename:$m,dirname:eh,extname:th,join:nh,sep:`/`};function $m(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);ah(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function eh(e){if(ah(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function th(e){ah(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function nh(...e){let t=-1,n;for(;++t<e.length;)ah(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:rh(n)}function rh(e){ah(e);let t=e.codePointAt(0)===47,n=ih(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ih(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function ah(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var oh={cwd:sh};function sh(){return`/`}function ch(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function lh(e){if(typeof e==`string`)e=new URL(e);else if(!ch(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return uh(e)}function uh(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var dh=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],fh=class{constructor(e){let t;t=e?ch(e)?{path:e}:typeof e==`string`||gh(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:oh.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<dh.length;){let e=dh[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)dh.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Qm.basename(this.path):void 0}set basename(e){mh(e,`basename`),ph(e,`basename`),this.path=Qm.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Qm.dirname(this.path):void 0}set dirname(e){hh(this.basename,`dirname`),this.path=Qm.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Qm.extname(this.path):void 0}set extname(e){if(ph(e,`extname`),hh(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Qm.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){ch(e)&&(e=lh(e)),mh(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Qm.basename(this.path,this.extname):void 0}set stem(e){mh(e,`stem`),ph(e,`stem`),this.path=Qm.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new tu(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ph(e,t){if(e&&e.includes(Qm.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Qm.sep+"`")}function mh(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function hh(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function gh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var _h=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),vh=t(Jm(),1),yh={}.hasOwnProperty,bh=new class e extends _h{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=Xm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,vh.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Ch(`data`,this.frozen),this.namespace[e]=t,this):yh.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ch(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Eh(e),n=this.parser||this.Parser;return xh(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),xh(`process`,this.parser||this.Parser),Sh(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Eh(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Oh(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),xh(`processSync`,this.parser||this.Parser),Sh(`processSync`,this.compiler||this.Compiler),this.process(e,r),Th(`processSync`,`process`,t),n;function r(e,r){t=!0,qm(e),n=r}}run(e,t,n){wh(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Eh(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Th(`runSync`,`run`,n),r;function i(e,t){qm(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Eh(t),r=this.compiler||this.Compiler;return Sh(`stringify`,r),wh(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Ch(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,vh.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Ym(o)&&Ym(r)&&(r=(0,vh.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function xh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Sh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Ch(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wh(e){if(!Ym(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Th(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Eh(e){return Dh(e)?e:new fh(e)}function Dh(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Oh(e){return typeof e==`string`||kh(e)}function kh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ah=[],jh={allowDangerousHtml:!0},Mh=/^(https?|ircs?|mailto|xmpp)$/i,Nh=[{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 Ph(e){let t=Fh(e),n=Ih(e);return Lh(t.runSync(t.parse(n),n),e)}function Fh(e){let t=e.rehypePlugins||Ah,n=e.remarkPlugins||Ah,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...jh}:jh;return bh().use(Ep).use(n).use(Km,r).use(t)}function Ih(e){let t=e.children||``,n=new fh;return typeof t==`string`?n.value=t:``+t,n}function Lh(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Rh;for(let e of Nh)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Pm(e,l),cu(e,{Fragment:A.Fragment,components:i,ignoreInvalidStyle:!0,jsx:A.jsx,jsxs:A.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Au)if(Object.hasOwn(Au,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Au[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Rh(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Mh.test(e.slice(0,t))?e:``}function zh(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Bh(e,t,n){let r=Sm((n||{}).ignore||[]),i=Vh(t),a=-1;for(;++a<i.length;)Mm(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return jm}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Vh(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Hh(e[0]),Uh(e[1])])}return t}function Hh(e){return typeof e==`string`?new RegExp(zh(e),`g`):e}function Uh(e){return typeof e==`function`?e:function(){return e}}var Wh=`phrasing`,Gh=[`autolink`,`link`,`image`,`label`];function Kh(){return{transforms:[eg],enter:{literalAutolink:Jh,literalAutolinkEmail:Yh,literalAutolinkHttp:Yh,literalAutolinkWww:Yh},exit:{literalAutolink:$h,literalAutolinkEmail:Qh,literalAutolinkHttp:Xh,literalAutolinkWww:Zh}}}function qh(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Wh,notInConstruct:Gh},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Wh,notInConstruct:Gh},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Wh,notInConstruct:Gh}]}}function Jh(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Yh(e){this.config.enter.autolinkProtocol.call(this,e)}function Xh(e){this.config.exit.autolinkProtocol.call(this,e)}function Zh(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Qh(e){this.config.exit.autolinkEmail.call(this,e)}function $h(e){this.exit(e)}function eg(e){Bh(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tg],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ng]],{ignore:[`link`,`linkReference`]})}function tg(e,t,n,r,i){let a=``;if(!ag(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!rg(n)))return!1;let o=ig(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function ng(e,t,n,r){return!ag(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function rg(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ig(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),a=i(e,`(`),o=i(e,`)`);for(;r!==-1&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),o++;return[e,n]}function ag(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||X(n)||Y(n))&&(!t||n!==47)}hg.peek=mg;function og(){this.buffer()}function sg(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function cg(){this.buffer()}function lg(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function ug(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dg(e){this.exit(e)}function fg(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pg(e){this.exit(e)}function mg(){return`[`}function hg(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function gg(){return{enter:{gfmFootnoteCallString:og,gfmFootnoteCall:sg,gfmFootnoteDefinitionLabelString:cg,gfmFootnoteDefinition:lg},exit:{gfmFootnoteCallString:ug,gfmFootnoteCall:dg,gfmFootnoteDefinitionLabelString:fg,gfmFootnoteDefinition:pg}}}function _g(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:hg},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
185
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?yg:vg))),s(),o}}function vg(e,t,n){return t===0?e:yg(e,t,n)}function yg(e,t,n){return(n?``:` `)+e}var bg=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Tg.attention=Eg,Tg.peek=Dg;function xg(){return{canContainEols:[`delete`],enter:{strikethrough:Cg},exit:{strikethrough:wg}}}function Sg(){return{handlers:{delete:Tg},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:bg}]}}function Cg(e){this.enter({type:`delete`,children:[],position:void 0},e)}function wg(e){this.exit(e)}function Tg(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Eg(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Dg(){return`~`}function Og(e){return e.length}function kg(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Og,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Ag(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=jg(r[d]);else{let e=jg(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
186
|
-
`)}function Ag(e){return e==null?``:String(e)}function jg(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Mg=Sm([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Ng(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Pg);return i(),o}function Pg(e,t,n){return`>`+(n?``:` `)+e}function Fg(e,t){return Ig(e,t.inConstruct,!0)&&!Ig(e,t.notInConstruct,!1)}function Ig(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Lg(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
187
|
-
`&&!e.before&&!e.after&&Fg(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
188
|
-
`}function Rg(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function zg(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Bg(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Vg(e,t,n,r){let i=Bg(n),a=e.value||``;if(zg(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Hg);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(Rg(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
189
|
-
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
190
|
-
`),a&&(u+=o.move(a+`
|
|
191
|
-
`)),u+=o.move(s),c(),u}function Hg(e,t,n){return(n?``:` `)+e}function Ug(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Wg(e,t,n,r){let i=Ug(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
192
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Gg(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Kg(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function qg(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function Jg(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Yg(e,t,n){let r=ld(e),i=ld(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Xg(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:Ku(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!Ku(a))return;for(;a===45||qu(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&lf.includes(o)?1:cf.includes(o)?6:7}var Zg=new Map([[`*`,!1],[`_`,!0]]);function Qg(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function $g(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=Zg.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=ld(u.charCodeAt(u.length-1)),f=ld((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(n_(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:Qg(e,t,a),index:o}}}function e_(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?Kg(n.value):qg(n.value),i=Jg(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function t_(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=o_(e,c,r,i),u=$g(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function n_(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function r_(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Qu(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function i_(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?Kg(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
|
|
193
|
-
`)&&l.type===`html`&&Xg(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(s_(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=a_(l,f.attention,t,c);a.push(e),s=qg(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=qg(n)}}return r.pop(),a}function a_(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=r_(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=i_(e,n,{...r.current(),before:c,after:c});return r.move(s_(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function o_(e,t,n,r){let i=[],a,o=qg(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===Kg(n)&&e_([e],!0),a=void 0,i.push(e),e.value&&(o=qg(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=Kg(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=o_(n.children,t,c,c),m=p.length>0?p[0].value:``,h=Yg(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&e_(p,!0);let g=p.length>0?qg(p[p.length-1].value):``,_=Yg(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&e_(p,!1),h.outside&&d!==`
|
|
194
|
-
`&&d!==`\r`&&e_(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function s_(e,t,n){let r=new Map,i=o_(e,r,t,n),a=i,o=$g(a,t,n);for(;o;){let s=t_(e,r,o,t,n);if(!s){a=i;break}r=s.chosen,a=s.tokens,o=s.mistake}let s=``;for(let e of a)s+=e.value;return s}c_.attention=l_,c_.peek=u_;function c_(e,t,n,r){let i=n.enter(`phrasing`),a=s_([a_(e,l_,n,n.createTracker(r))],r.before,r.after);return i(),a}function l_(e,t){return{construct:`emphasis`,markers:Gg(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function u_(e,t,n){return n.options.emphasis||`*`}function d_(e,t){let n=!1;return Pm(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Mu(e)&&(t.options.setext||n))}function f_(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(d_(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
195
|
-
`,after:`
|
|
196
|
-
`});return r(),t(),o+`
|
|
197
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
198
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
199
|
-
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Jg(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}p_.peek=m_;function p_(e){return e.value||``}function m_(){return`<`}h_.peek=g_;function h_(e,t,n,r){let i=Ug(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function g_(){return`!`}__.peek=v_;function __(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function v_(){return`!`}y_.peek=b_;function y_(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function b_(){return"`"}function x_(e,t){let n=Mu(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}S_.peek=C_;function S_(e,t,n,r){let i=Ug(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(x_(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
|
|
200
|
-
`||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function C_(e,t,n){return x_(e,n)?`<`:`[`}w_.peek=T_;function w_(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function T_(){return`[`}function E_(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function D_(e){let t=E_(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function O_(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function k_(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function A_(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?O_(n):E_(n),s=e.ordered?o===`.`?`)`:`.`:D_(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),k_(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function j_(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function M_(e,t,n,r){let i=j_(n),a=n.bulletCurrent||E_(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function N_(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function P_(e,t,n,r){if(!e.children.some(function(e){return Mg(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function F_(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}I_.attention=L_,I_.peek=R_;function I_(e,t,n,r){let i=n.enter(`phrasing`),a=s_([a_(e,L_,n,n.createTracker(r))],r.before,r.after);return i(),a}function L_(e,t){return{construct:`strong`,markers:F_(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function R_(e,t,n){return n.options.strong||`*`}function z_(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function B_(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function V_(e,t,n){let r=(k_(n)+(n.options.ruleSpaces?` `:``)).repeat(B_(n));return n.options.ruleSpaces?r.slice(0,-1):r}var H_={blockquote:Ng,break:Lg,code:Vg,definition:Wg,emphasis:c_,hardBreak:Lg,heading:f_,html:p_,image:h_,imageReference:__,inlineCode:y_,link:S_,linkReference:w_,list:A_,listItem:M_,paragraph:N_,root:P_,strong:I_,text:z_,thematicBreak:V_};function U_(){return{enter:{table:W_,tableData:J_,tableHeader:J_,tableRow:K_},exit:{codeText:Y_,table:G_,tableData:q_,tableHeader:q_,tableRow:q_}}}function W_(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function G_(e){this.exit(e),this.data.inTable=void 0}function K_(e){this.enter({type:`tableRow`,children:[]},e)}function q_(e){this.exit(e)}function J_(e){this.enter({type:`tableCell`,children:[]},e)}function Y_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,X_));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function X_(e,t){return t===`|`?t:e}function Z_(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
201
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
202
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return kg(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=H_.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Q_(){return{exit:{taskListCheckValueChecked:ev,taskListCheckValueUnchecked:ev,paragraph:tv}}}function $_(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:nv}}}function ev(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function tv(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function nv(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=H_.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function rv(){return[Kh(),gg(),xg(),U_(),Q_()]}function iv(e){return{extensions:[qh(),_g(e),Sg(),Z_(e),$_()]}}var av={tokenize:yv,partial:!0},ov={tokenize:bv,partial:!0},sv={tokenize:xv,partial:!0},cv={tokenize:Sv,partial:!0},lv={tokenize:Cv,partial:!0},uv={name:`wwwAutolink`,tokenize:_v,previous:wv},dv={name:`protocolAutolink`,tokenize:vv,previous:Tv},fv={name:`emailAutolink`,tokenize:gv,previous:Ev},pv={};function mv(){return{text:pv}}for(var hv=48;hv<123;)pv[hv]=fv,hv++,hv===58?hv=65:hv===91&&(hv=97);pv[43]=fv,pv[45]=fv,pv[46]=fv,pv[95]=fv,pv[72]=[fv,dv],pv[104]=[fv,dv],pv[87]=[fv,uv],pv[119]=[fv,uv];function gv(e,t,n){let r=this,i,a;return o;function o(t){return!Dv(t)||!Ev.call(r,r.previous)||Ov(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Dv(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(lv,u,l)(t):t===45||t===95||qu(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Ku(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function _v(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!wv.call(r,r.previous)||Ov(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(av,e.attempt(ov,e.attempt(sv,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function vv(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Tv.call(r,r.previous)&&!Ov(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Ku(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Yu(t)||q(t)||X(t)||Y(t)?n(t):e.attempt(ov,e.attempt(sv,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function yv(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function bv(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(cv,c,s)(t):t===null||q(t)||X(t)||t!==45&&Y(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function xv(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(cv,t,a)(o):o===null||q(o)||X(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Sv(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||q(o)||X(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||q(e)||X(e)?t(e):r(e)}function a(e){return Ku(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Ku(t)?(e.consume(t),o):n(t)}}function Cv(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return qu(e)?n(e):t(e)}}function wv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||q(e)}function Tv(e){return!Ku(e)}function Ev(e){return!(e===47||Dv(e))}function Dv(e){return e===43||e===45||e===46||e===95||qu(e)}function Ov(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var kv={tokenize:Lv,partial:!0};function Av(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Pv,continuation:{tokenize:Fv},exit:Iv}},text:{91:{name:`gfmFootnoteCall`,tokenize:Nv},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:jv,resolveTo:Mv}}}}function jv(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Gu(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Mv(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Nv(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||q(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Gu(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return q(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Pv(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||q(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Gu(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return q(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Q(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Fv(e,t,n){return e.check(_d,t,e.attempt(kv,t,n))}function Iv(e){e.exit(`gfmFootnoteDefinition`)}function Lv(e,t,n){let r=this;return Q(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Rv(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Ru(o,o.length,0,ud(s,e.slice(r+1,n),t)),Ru(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Ru(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=ld(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=ld(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var zv=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Bv(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Bv(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Vv(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Hv(){return{flow:{null:{name:`table`,tokenize:Uv,resolveAll:Wv}}}}function Uv(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):K(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):J(t)?Q(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||q(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,J(t)?Q(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return J(t)?Q(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||K(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return J(t)?Q(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||K(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||K(n)?(e.exit(`tableRow`),t(n)):J(n)?Q(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||q(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Wv(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new zv;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Kv(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Gv(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Gv(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Gv(f,t,o,i,n,d)):(o[0]=o[1],d=Gv(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Kv(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Vv(t.events,n))}return e}function Gv(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},qv(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=qv(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=qv(t.events,n[2]),a=qv(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},qv(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Kv(e,t,n,r,i){let a=[],o=qv(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function qv(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Jv={name:`tasklistCheck`,tokenize:Xv};function Yv(){return{text:{91:Jv}}}function Xv(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return q(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return K(r)?t(r):J(r)?e.check({tokenize:Zv},t,n)(r):n(r)}}function Zv(e,t,n){return Q(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Qv(e){return Vu([mv(),Av(),Rv(e),Hv(),Yv()])}var $v={};function ey(e){let t=this,n=e||$v,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Qv(n)),a.push(rv()),o.push(iv(n))}var ty=Object.defineProperty,ny=Object.getOwnPropertyDescriptor,ry=Object.getOwnPropertyNames,iy=Object.prototype.hasOwnProperty,ay=(e,t)=>{let n={};for(var r in e)ty(n,r,{get:e[r],enumerable:!0});return t||ty(n,Symbol.toStringTag,{value:`Module`}),n},oy=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ry(t),a=0,o=i.length,s;a<o;a++)s=i[a],!iy.call(e,s)&&s!==n&&ty(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ny(t,s))||r.enumerable});return e},sy=(e,t,n)=>(oy(e,t,`default`),n&&oy(n,t,`default`)),cy=[{id:`abap`,name:`ABAP`,import:(()=>r(()=>import(`./abap-CLvhMVsD.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>r(()=>import(`./actionscript-3-Cs6JJXT5.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>r(()=>import(`./ada-X3Y2mlq2.js`),[],import.meta.url))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>r(()=>import(`./ahk-DwADkxyd.js`),[],import.meta.url))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>r(()=>import(`./ahk2-_6rzW9BS.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>r(()=>import(`./angular-html-DbefOYVd.js`).then(e=>e.n),__vite__mapDeps([6,7,8,9,10]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>r(()=>import(`./angular-ts-CvKvjrwq.js`),__vite__mapDeps([11,6,7,8,9,10,12]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>r(()=>import(`./apache-U0d_L8uA.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>r(()=>import(`./apex-KFGFyKwG.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>r(()=>import(`./apl-oXhhIufm.js`),__vite__mapDeps([13,9,7,10,8,14,15,16]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>r(()=>import(`./applescript-CCn79oCD.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>r(()=>import(`./ara-4CJ0cIlV.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>r(()=>import(`./asciidoc-SCjQUq34.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>r(()=>import(`./asm-Cmm7eHzH.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>r(()=>import(`./astro-BSfvy1I6.js`),__vite__mapDeps([17,9,7,10,16,18,19,20]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>r(()=>import(`./awk-BWXHIvNe.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>r(()=>import(`./ballerina-B7ZEbQpA.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>r(()=>import(`./bat-qdxAdBWQ.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>r(()=>import(`./beancount-C2IN4Vk8.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>r(()=>import(`./berry-DKpUyyne.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>r(()=>import(`./bibtex-Ci_nEsc7.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>r(()=>import(`./bicep-CUHmPFLl.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>r(()=>import(`./bird2-CYIUgYqB.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>r(()=>import(`./blade-BPJIqBv7.js`),__vite__mapDeps([21,9,7,10,8,14,15,16,22,23]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>r(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([24,25]),import.meta.url))},{id:`c`,name:`C`,import:(()=>r(()=>import(`./c-NZxYjD9R.js`).then(e=>e.n),__vite__mapDeps([26,7]),import.meta.url))},{id:`c3`,name:`C3`,import:(()=>r(()=>import(`./c3-D0apG41V.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>r(()=>import(`./cadence-CQ2zXKGN.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>r(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([27,28]),import.meta.url))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>r(()=>import(`./chapel-C_yIxKK6.js`),__vite__mapDeps([29,26,7]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>r(()=>import(`./clarity-CtfBBspg.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>r(()=>import(`./clojure-DqKBuwfJ.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>r(()=>import(`./cmake-Bj61d0ZC.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>r(()=>import(`./cobol-DJ9emjzS.js`),__vite__mapDeps([30,8,7,9,10,15]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>r(()=>import(`./codeowners-C8r90Shi.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>r(()=>import(`./codeql-oeQT6MSM.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>r(()=>import(`./coffee-DCXaW2x4.js`),__vite__mapDeps([31,9,7]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>r(()=>import(`./common-lisp-Cv5bFMCO.js`),[],import.meta.url))},{id:`coq`,name:`Rocq`,import:(()=>r(()=>import(`./coq-CGaSfhwR.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>r(()=>import(`./cpp-Y8tBED_W.js`).then(e=>e.n),__vite__mapDeps([32,7,33,34,26]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>r(()=>import(`./crystal-BGOEqbwF.js`),__vite__mapDeps([35,9,7,10,8,23,26,36]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>r(()=>import(`./csharp-dmMxLVLW.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>r(()=>import(`./css-28T6ABEL.js`).then(e=>e.n),__vite__mapDeps([10,7]),import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>r(()=>import(`./csv-Dx-8-gkx.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>r(()=>import(`./cue-CE9AQfxI.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>r(()=>import(`./cypher-ClKdZ_lG.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>r(()=>import(`./d-qD-0Kul2.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>r(()=>import(`./dart-CHZY9Xhz.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>r(()=>import(`./dax-BkyTk9wS.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>r(()=>import(`./desktop-Dlh5hvp9.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>r(()=>import(`./diff-woXpYk--.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>r(()=>import(`./docker-IyjqRm3v.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>r(()=>import(`./dotenv-CuH5my32.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>r(()=>import(`./dream-maker-DW3nJb8Q.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>r(()=>import(`./edge-CQJH3_5t.js`),__vite__mapDeps([37,8,7,9,10,18,22]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>r(()=>import(`./elixir-BQwyj_cP.js`),__vite__mapDeps([38,8,7,9,10]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>r(()=>import(`./elm-x2IF6yQx.js`),__vite__mapDeps([39,34,7,26]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>r(()=>import(`./emacs-lisp-DR2vtWaj.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>r(()=>import(`./erb-DZNowPeY.js`),__vite__mapDeps([40,8,7,9,10,41,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>r(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([47,48]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>r(()=>import(`./fennel-DQxkIbk2.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>r(()=>import(`./fish-BJitypiv.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>r(()=>import(`./fluent-C03EYrpw.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>r(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([49,50]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>r(()=>import(`./fortran-free-form-CYNrtFtB.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>r(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([51,48]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>r(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([52,53,54]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>r(()=>import(`./gdscript-DYvRD3hg.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>r(()=>import(`./gdshader-CBce3t8t.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>r(()=>import(`./genie-CV2tkWYe.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>r(()=>import(`./gherkin-DExj1W_8.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>r(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([55,56]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>r(()=>import(`./git-rebase-WKrMcflD.js`),__vite__mapDeps([57,36,7]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>r(()=>import(`./gleam-CSRkHgEL.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>r(()=>import(`./glimmer-js-jxYiQSCJ.js`),__vite__mapDeps([58,9,7,10,8,18]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>r(()=>import(`./glimmer-ts-DoFbDDKI.js`),__vite__mapDeps([59,9,7,10,8,18]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>r(()=>import(`./glsl-DBf8kQxW.js`).then(e=>e.n),__vite__mapDeps([34,7,26]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>r(()=>import(`./gn-CAXYAgV-.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>r(()=>import(`./gnuplot-7GGW24-e.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>r(()=>import(`./go-rLFTqkRN.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>r(()=>import(`./graphql-CA_BX0d6.js`).then(e=>e.n),__vite__mapDeps([43,7,9,18,20,44]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>r(()=>import(`./groovy-CacY0gHj.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>r(()=>import(`./hack-gtYgwEcA.js`),__vite__mapDeps([60,8,7,9,10,23]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>r(()=>import(`./haml-MvCfcv0X.js`).then(e=>e.n),__vite__mapDeps([42,7,9,10]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>r(()=>import(`./handlebars-Bumg1nhL.js`),__vite__mapDeps([61,9,7,10,8,46]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>r(()=>import(`./haskell-D8IpX4py.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>r(()=>import(`./haxe-C8oCnwJJ.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>r(()=>import(`./hcl-Dh228itO.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>r(()=>import(`./hjson-CxZEssPk.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>r(()=>import(`./hlsl-Cvrh5tZx.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>r(()=>import(`./html-xg5kwvwR.js`).then(e=>e.n),__vite__mapDeps([8,7,9,10]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>r(()=>import(`./html-derivative-zG1x8fML.js`),__vite__mapDeps([22,8,7,9,10]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>r(()=>import(`./http-Dt-6KBlS.js`),__vite__mapDeps([62,14,7,15,16,36,43,9,18,20,44]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>r(()=>import(`./hurl-DUghBkZb.js`),__vite__mapDeps([63,14,7,15,64,43,9,18,20,44]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>r(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([65,66]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>r(()=>import(`./hy-CZbG8q4J.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>r(()=>import(`./imba-DsUTQ-LC.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>r(()=>import(`./ini-B5eOa1yu.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>r(()=>import(`./java-DmZF03nx.js`).then(e=>e.n),__vite__mapDeps([15,7]),import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>r(()=>import(`./javascript-DF6j-435.js`).then(e=>e.n),__vite__mapDeps([9,7]),import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>r(()=>import(`./jinja-B2nuVHF1.js`),__vite__mapDeps([67,8,7,9,10]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>r(()=>import(`./jison-CZsiyrSO.js`),__vite__mapDeps([68,9,7]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>r(()=>import(`./json-42mipy3Q.js`).then(e=>e.n),__vite__mapDeps([16,7]),import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>r(()=>import(`./json5-BR5RXkoi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>r(()=>import(`./jsonc-CYpm1nAK.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>r(()=>import(`./jsonl-CmCQp5Yx.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>r(()=>import(`./jsonnet-CJTPZ8u_.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>r(()=>import(`./jssm-DXw9l8Rf.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>r(()=>import(`./jsx-vimVRUsC.js`).then(e=>e.n),__vite__mapDeps([44,7]),import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>r(()=>import(`./julia-CRQfdd-b.js`),__vite__mapDeps([69,9,7,23,28,32,33,34,26,70]),import.meta.url))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>r(()=>import(`./just-CePkuXj4.js`),__vite__mapDeps([71,9,7,18,28,36,41,10,8,14,15,23,26,32,33,34,42,43,20,44,45,46,72]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>r(()=>import(`./kdl-CsD5j6eV.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>r(()=>import(`./kotlin-DhhofPvG.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>r(()=>import(`./kusto-C7mF5XQf.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>r(()=>import(`./latex-CdMZza0I.js`),__vite__mapDeps([73,74,7,70]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>r(()=>import(`./lean-CewbzKMR.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>r(()=>import(`./less-DVTAwKKz.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>r(()=>import(`./liquid-DBxKJhTy.js`),__vite__mapDeps([75,9,7,10,8,16]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>r(()=>import(`./llvm-DqHOMS-s.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>r(()=>import(`./log-BNLmms1o.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>r(()=>import(`./logo-Cluzi2Zq.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>r(()=>import(`./lua-CxMwO_Mz.js`).then(e=>e.n),__vite__mapDeps([45,7,26]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>r(()=>import(`./luau-VGWVLoqX.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>r(()=>import(`./make-Dixweg8N.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>r(()=>import(`./markdown-BYOwaDjH.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>r(()=>import(`./marko-CjRgUMoV.js`),__vite__mapDeps([76,10,7,12,18,77]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>r(()=>import(`./matlab-D7qyCx1q.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>r(()=>import(`./mdc-AoEkrSRV.js`),__vite__mapDeps([78,22,8,7,9,10,46,48]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>r(()=>import(`./mdx-DQZ5AkYe.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>r(()=>import(`./mermaid-BxpfTIzt.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>r(()=>import(`./mipsasm-BMqwQI7S.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>r(()=>import(`./mojo-fg40_ntQ.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>r(()=>import(`./moonbit-D9W784E_.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>r(()=>import(`./move-BYnGhZoM.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>r(()=>import(`./narrat-_X_XdTYD.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>r(()=>import(`./nextflow-CSgcYZcx.js`),__vite__mapDeps([79,80]),import.meta.url))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>r(()=>import(`./nextflow-groovy-D7IRt6Pp.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>r(()=>import(`./nginx-BiHSRcGz.js`),__vite__mapDeps([81,45,7,26]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>r(()=>import(`./nim-CdOSsVN7.js`),__vite__mapDeps([82,9,7,10,8,14,15,26,34,48]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>r(()=>import(`./nix-IvuFDN5E.js`),[],import.meta.url))},{id:`nsis`,name:`NSIS`,import:(()=>r(()=>import(`./nsis-CjNLYCLg.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>r(()=>import(`./nushell--0fT3PI1.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>r(()=>import(`./objective-c-D1A_Heim.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>r(()=>import(`./objective-cpp-BsSzOQcm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>r(()=>import(`./ocaml-O90oeIOV.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>r(()=>import(`./odin-B1RWQWA5.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>r(()=>import(`./openscad-BUDT5pXO.js`),[],import.meta.url))},{id:`org`,name:`Org Markup`,import:(()=>r(()=>import(`./org-wLn5ov6u.js`),__vite__mapDeps([83,9,7,10,8,12,15,14,16,18,20,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,55,57,88,89,90,70,72,73,74,77,91,82,92,93,94,95,96,97,98,99,100]),import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>r(()=>import(`./pascal-4ZHwLPI5.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>r(()=>import(`./perl-D1d-UYsx.js`),__vite__mapDeps([72,9,7,10,8,14,15,23]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>r(()=>import(`./php-BXtg-e-b.js`),__vite__mapDeps([94,9,7,10,8,14,15,16,23]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>r(()=>import(`./pkl-ot-7Btpt.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>r(()=>import(`./plsql-DGHpHOYJ.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>r(()=>import(`./po-BiJDBrnU.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>r(()=>import(`./polar-C7UOKdEL.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>r(()=>import(`./postcss-BXeXVLqQ.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>r(()=>import(`./powerquery-DNMTfnFr.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>r(()=>import(`./powershell-QtSnmXcu.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>r(()=>import(`./prisma-DMgNhnYS.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>r(()=>import(`./prolog-iXnhIJG7.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>r(()=>import(`./proto-DB4EqR-F.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>r(()=>import(`./pug-CueMe1Oe.js`),__vite__mapDeps([101,9,7,10,8]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>r(()=>import(`./puppet-CDv2pdJW.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>r(()=>import(`./purescript-9MfHhQsQ.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>r(()=>import(`./python-gzcpVVnB.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>r(()=>import(`./qml-BQ_VstfA.js`),__vite__mapDeps([102,9,7]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>r(()=>import(`./qmldir-DCQb3MpD.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>r(()=>import(`./qss-Fe1Jh2GI.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>r(()=>import(`./r-C0eHyz6n.js`).then(e=>e.n),__vite__mapDeps([70,7]),import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>r(()=>import(`./racket-DcIDlBhZ.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>r(()=>import(`./raku-B3gFvitq.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>r(()=>import(`./razor-DKbaSFqp.js`),__vite__mapDeps([103,8,7,9,10,85]),import.meta.url))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>r(()=>import(`./rbs-C0MpOrj4.js`),[],import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>r(()=>import(`./reg-CRGYupPL.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>r(()=>import(`./regexp-CCN76yWg.js`).then(e=>e.n),__vite__mapDeps([33,7]),import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>r(()=>import(`./rel-BtDbiS_P.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>r(()=>import(`./riscv-Ckw8ddFX.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>r(()=>import(`./ron-VUp2lXgN.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>r(()=>import(`./rosmsg-CAekHB0j.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>r(()=>import(`./rst-D9EQsBp-.js`),__vite__mapDeps([104,9,7,22,8,10,28,105,32,33,34,26,36,46,41,14,15,23,42,43,18,20,44,45]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>r(()=>import(`./ruby-DAY5ZYSg.js`),__vite__mapDeps([41,9,7,10,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>r(()=>import(`./rust-DpiIf5JO.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>r(()=>import(`./sas-DC4F9y1U.js`),__vite__mapDeps([106,23,7]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>r(()=>import(`./sass-DXrisJhu.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>r(()=>import(`./scala-BiFt_7mu.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>r(()=>import(`./scheme-DQCgrYNe.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>r(()=>import(`./scss-CNJYx4G4.js`).then(e=>e.n),__vite__mapDeps([12,7,10]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>r(()=>import(`./sdbl-bTVj8UrX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>r(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([107,108]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>r(()=>import(`./shellscript-DG0er0mb.js`).then(e=>e.n),__vite__mapDeps([36,7]),import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>r(()=>import(`./shellsession-DZdJuHd_.js`),__vite__mapDeps([109,36,7]),import.meta.url))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>r(()=>import(`./smalltalk-BHpQb5nM.js`),[],import.meta.url))},{id:`smithy`,name:`Smithy`,import:(()=>r(()=>import(`./smithy-Dgaz7aur.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>r(()=>import(`./solidity-Bj7E1mRn.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>r(()=>import(`./soy-DBgMV_3R.js`),__vite__mapDeps([110,8,7,9,10]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>r(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([111,112]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>r(()=>import(`./splunk-BC2Px7Mm.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>r(()=>import(`./sql-BJYzzGx2.js`).then(e=>e.n),__vite__mapDeps([23,7]),import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>r(()=>import(`./ssh-config-BgfXC-Er.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>r(()=>import(`./stata-CANxZdMU.js`),__vite__mapDeps([113,23,7]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>r(()=>import(`./stylus-B6D30XZt.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>r(()=>import(`./surrealql-h0PQCFLw.js`),__vite__mapDeps([114,9,7]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>r(()=>import(`./svelte-CouSRXXN.js`),__vite__mapDeps([115,9,7,10,18,19]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>r(()=>import(`./swift-CyEgAFGc.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>r(()=>import(`./system-verilog-Dh5ihWbf.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>r(()=>import(`./systemd-BxMlprV5.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>r(()=>import(`./talonscript-CohzipZa.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>r(()=>import(`./tasl-DMoTqEGO.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>r(()=>import(`./tcl-CZd0xW_V.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>r(()=>import(`./templ-nHebsoOx.js`),__vite__mapDeps([116,9,7,10,88]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>r(()=>import(`./terraform-DswuEJGm.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>r(()=>import(`./tex-Bmmg45Le.js`).then(e=>e.n),__vite__mapDeps([74,7,70]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>r(()=>import(`./toml-CcmNWLt0.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>r(()=>import(`./ts-tags-ByyA0QCx.js`),__vite__mapDeps([117,9,7,10,8,14,15,18,23,34,26]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>r(()=>import(`./tsv-sltzmVWM.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>r(()=>import(`./tsx-r6-X8vM1.js`).then(e=>e.n),__vite__mapDeps([20,7]),import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>r(()=>import(`./turtle-ByJddavk.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>r(()=>import(`./twig-DUDRwdST.js`),__vite__mapDeps([118,9,7,10,12,28,41,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46,94,16]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>r(()=>import(`./typescript-Dvuj33DD.js`).then(e=>e.n),__vite__mapDeps([18,7]),import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>r(()=>import(`./typespec-BGhR2SqG.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>r(()=>import(`./typst-DE5bnHEE.js`),__vite__mapDeps([119,9,7,10,8,12,15,14,16,18,20,120,121,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,51,55,57,88,89,61,90,122,70,69,72,73,74,77,123,91,92,94,95,96,97,98,100,124,101,125,126,118,127]),import.meta.url))},{id:`v`,name:`V`,import:(()=>r(()=>import(`./v-DBj4K9d_.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>r(()=>import(`./vala-zf12oZj6.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,import:(()=>r(()=>import(`./vb-DOwzaHZ0.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>r(()=>import(`./verilog-B2gwz-sJ.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>r(()=>import(`./vhdl-BroJfC0k.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>r(()=>import(`./viml-DvXPmvsu.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>r(()=>import(`./vue-BMcQkxhM.js`),__vite__mapDeps([128,9,7,10,8,16,18,22]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>r(()=>import(`./vue-html-BBM4UO8W.js`),__vite__mapDeps([129,9,7]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>r(()=>import(`./vue-vine-CEJFhGMr.js`),__vite__mapDeps([130,9,7,10,12,19,77,131]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>r(()=>import(`./vyper-CgoNMtux.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>r(()=>import(`./wasm-ByWQv1Qj.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>r(()=>import(`./wenyan-C8pVoKbM.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>r(()=>import(`./wgsl-BsKzXJz4.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>r(()=>import(`./wikitext-ClFFjSW2.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>r(()=>import(`./wit-DdvCle-K.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>r(()=>import(`./wolfram-DLL8P-h_.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>r(()=>import(`./xml-CJx_hAt3.js`).then(e=>e.n),__vite__mapDeps([14,7,15]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>r(()=>import(`./xsl-Bd7alYZi.js`),__vite__mapDeps([100,14,7,15]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>r(()=>import(`./yaml-BY1dOrT3.js`).then(e=>e.n),__vite__mapDeps([46,7]),import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>r(()=>import(`./zenscript-BnlCZFoB.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>r(()=>import(`./zig-CMLA9XwU.js`),[],import.meta.url))}],ly=Object.fromEntries(cy.map(e=>[e.id,e.import])),uy=Object.fromEntries(cy.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),dy={...ly,...uy},fy=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>r(()=>import(`./andromeeda-vGVdxbeo.js`),[],import.meta.url))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>r(()=>import(`./aurora-x-CDeNXAV0.js`),[],import.meta.url))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>r(()=>import(`./ayu-dark-DluEY0Gj.js`),[],import.meta.url))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>r(()=>import(`./ayu-light-C3h-C4tm.js`),[],import.meta.url))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>r(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[],import.meta.url))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>r(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[],import.meta.url))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>r(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[],import.meta.url))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>r(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[],import.meta.url))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>r(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[],import.meta.url))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>r(()=>import(`./dark-plus-Cs2F2srj.js`),[],import.meta.url))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>r(()=>import(`./dracula-BHWKrbxM.js`),[],import.meta.url))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>r(()=>import(`./dracula-soft-5eyTD99u.js`),[],import.meta.url))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>r(()=>import(`./everforest-dark-sB-x3p7T.js`),[],import.meta.url))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>r(()=>import(`./everforest-light-Df2xbC6M.js`),[],import.meta.url))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>r(()=>import(`./github-dark-C-LZuMrd.js`),[],import.meta.url))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>r(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>r(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[],import.meta.url))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>r(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[],import.meta.url))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>r(()=>import(`./github-light-EUqPIrTm.js`),[],import.meta.url))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>r(()=>import(`./github-light-default-BXViO-2h.js`),[],import.meta.url))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>r(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[],import.meta.url))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>r(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[],import.meta.url))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>r(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[],import.meta.url))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>r(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[],import.meta.url))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>r(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[],import.meta.url))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>r(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[],import.meta.url))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>r(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[],import.meta.url))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>r(()=>import(`./horizon-CE9ld1lL.js`),[],import.meta.url))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>r(()=>import(`./horizon-bright-DSNQnXHK.js`),[],import.meta.url))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>r(()=>import(`./houston-CsvMBhTu.js`),[],import.meta.url))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>r(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[],import.meta.url))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>r(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[],import.meta.url))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>r(()=>import(`./kanagawa-wave-BML5mF2J.js`),[],import.meta.url))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>r(()=>import(`./laserwave-C_8bwKvT.js`),[],import.meta.url))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>r(()=>import(`./light-plus-DVQuIRkW.js`),[],import.meta.url))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>r(()=>import(`./material-theme-Bm3Qr25_.js`),[],import.meta.url))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>r(()=>import(`./material-theme-darker-2IIEA8gg.js`),[],import.meta.url))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>r(()=>import(`./material-theme-lighter-uhdI0v04.js`),[],import.meta.url))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>r(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[],import.meta.url))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>r(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[],import.meta.url))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>r(()=>import(`./min-dark-BSWPekZh.js`),[],import.meta.url))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>r(()=>import(`./min-light-DDpmG2fV.js`),[],import.meta.url))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>r(()=>import(`./monokai-BscAjiQZ.js`),[],import.meta.url))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>r(()=>import(`./night-owl-DhmEMT88.js`),[],import.meta.url))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>r(()=>import(`./night-owl-light-eJ-hLW7d.js`),[],import.meta.url))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>r(()=>import(`./nord-Cb4Vim4T.js`),[],import.meta.url))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>r(()=>import(`./one-dark-pro-C6YyR8OD.js`),[],import.meta.url))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>r(()=>import(`./one-light-D7Lr4KcI.js`),[],import.meta.url))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>r(()=>import(`./plastic-DQwYfKfQ.js`),[],import.meta.url))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>r(()=>import(`./poimandres-DRFjx7u4.js`),[],import.meta.url))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>r(()=>import(`./red-CYlAq2b0.js`),[],import.meta.url))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>r(()=>import(`./rose-pine-aMsaMD1D.js`),[],import.meta.url))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>r(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[],import.meta.url))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>r(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[],import.meta.url))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>r(()=>import(`./slack-dark-DnToyrRv.js`),[],import.meta.url))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>r(()=>import(`./slack-ochin-B2OO5cIa.js`),[],import.meta.url))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>r(()=>import(`./snazzy-light-4G7pJPwS.js`),[],import.meta.url))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>r(()=>import(`./solarized-dark-b97czJOk.js`),[],import.meta.url))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>r(()=>import(`./solarized-light-DFPxpIYQ.js`),[],import.meta.url))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>r(()=>import(`./synthwave-84-nFMaYfgc.js`),[],import.meta.url))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>r(()=>import(`./tokyo-night-oM2G3aXe.js`),[],import.meta.url))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>r(()=>import(`./vesper-DdrHHSXu.js`),[],import.meta.url))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>r(()=>import(`./vitesse-black-fwtXNY1n.js`),[],import.meta.url))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>r(()=>import(`./vitesse-dark-BZCL-v6S.js`),[],import.meta.url))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>r(()=>import(`./vitesse-light-VbXTXTou.js`),[],import.meta.url))}].map(e=>[e.id,e.import])),py=e({createOnigurumaEngine:()=>Vy,getDefaultWasmLoader:()=>By,loadWasm:()=>Py,setDefaultWasmLoader:()=>zy}),my=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function hy(){return 2147483648}function gy(){return typeof performance<`u`?performance.now():Date.now()}var _y=(e,t)=>e+(t-e%t)%t;async function vy(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=hy();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,_y(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:gy,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var yy=Object.defineProperty,by=(e,t,n)=>t in e?yy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xy=(e,t,n)=>by(e,typeof t==`symbol`?t:t+``,n),Sy=null;function Cy(e){throw new my(e.UTF8ToString(e.getLastOnigError()))}var wy=class e{constructor(t){xy(this,`utf16Length`),xy(this,`utf8Length`),xy(this,`utf16Value`),xy(this,`utf8Value`),xy(this,`utf16OffsetToUtf8`),xy(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Ty=class e{constructor(t){if(xy(this,`id`,++e.LAST_ID),xy(this,`_onigBinding`),xy(this,`content`),xy(this,`utf16Length`),xy(this,`utf8Length`),xy(this,`utf16OffsetToUtf8`),xy(this,`utf8OffsetToUtf16`),xy(this,`ptr`),!Sy)throw new my(`Must invoke loadWasm first.`);this._onigBinding=Sy,this.content=t;let n=new wy(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=Sy.omalloc(1e4),e._sharedPtrInUse=!0,Sy.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(Sy)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};xy(Ty,`LAST_ID`,0),xy(Ty,`_sharedPtr`,0),xy(Ty,`_sharedPtrInUse`,!1);var Ey=Ty,Dy=class{constructor(e){if(xy(this,`_onigBinding`),xy(this,`_ptr`),!Sy)throw new my(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new wy(e[r]);t[r]=i.createString(Sy),n[r]=i.utf8Length}let r=Sy.omalloc(4*e.length);Sy.HEAPU32.set(t,r/4);let i=Sy.omalloc(4*e.length);Sy.HEAPU32.set(n,i/4);let a=Sy.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)Sy.ofree(t[n]);Sy.ofree(i),Sy.ofree(r),a===0&&Cy(Sy),this._onigBinding=Sy,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Ey(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Oy(e){return typeof e.instantiator==`function`}function ky(e){return typeof e.default==`function`}function Ay(e){return e.data!==void 0}function jy(e){return typeof Response<`u`&&e instanceof Response}function My(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}var Ny;function Py(e){if(Ny)return Ny;async function t(){Sy=await vy(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Oy(n)?n=await n.instantiator(t):ky(n)?n=await n.default(t):(Ay(n)&&(n=n.data),jy(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Iy(n)(t):await Ly(n)(t):My(n)||n instanceof WebAssembly.Module?n=await Fy(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Fy(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Ny=t(),Ny}function Fy(e){return t=>WebAssembly.instantiate(e,t)}function Iy(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Ly(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Ry;function zy(e){Ry=e}function By(){return Ry}async function Vy(e){return e&&await Py(e),{createScanner(e){return new Dy(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Ey(e)}}}var Hy=e({createOnigurumaEngine:()=>Vy,getDefaultWasmLoader:()=>By,loadWasm:()=>Py,setDefaultWasmLoader:()=>zy,t:()=>Uy}),Uy=ay({});sy(Uy,py);var Wy=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Gy(e){return Ky(e)}function Ky(e){return Array.isArray(e)?qy(e):e instanceof RegExp?e:typeof e==`object`?Jy(e):e}function qy(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Ky(e[n]);return t}function Jy(e){let t={};for(let n in e)t[n]=Ky(e[n]);return t}function Yy(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Xy(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Xy(e.substring(0,e.length-1)):e.substr(~t+1)}var Zy=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Qy=class{static hasCaptures(e){return e!==null&&(Zy.lastIndex=0,Zy.test(e))}static replaceCaptures(e,t,n){return e.replace(Zy,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function $y(e,t){return e<t?-1:+(e>t)}function eb(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=$y(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function tb(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 nb(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var rb=class{constructor(e){this.fn=e}fn;cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},ib=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}_colorMap;_defaults;_root;static createFromRawTheme(e,t){return this.createFromParsedTheme(lb(e),t)}static createFromParsedTheme(e,t){return fb(e,t)}_cachedMatchRoot=new rb(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>ob(e.parent,t.parentScopes));return n?new cb(n.fontStyle,n.foreground,n.background):null}},ab=class e{constructor(e,t){this.parent=e,this.scopeName=t}parent;scopeName;static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function ob(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!sb(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function sb(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var cb=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}fontStyle;foregroundId;backgroundId};function lb(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&tb(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&tb(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new ub(l,u,e,o,s,c)}}return n}var ub=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}scope;parentScopes;index;fontStyle;foreground;background},db=(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))(db||{});function fb(e,t){e.sort((e,t)=>{let n=$y(e.scope,t.scope);return n!==0||(n=eb(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new pb(t),o=new cb(n,a.getId(r),a.getId(i)),s=new gb(new hb(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new ib(a,o,s)}var pb=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw 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)}},mb=Object.freeze([]),hb=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||mb,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},gb=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_mainRule;_children;_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),hb.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null)this._mainRule.acceptOverwrite(e,n,r,i);else{for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(eb(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new hb(e,t,n,r,i))}}},_b=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=yb(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function vb(e){return e}function yb(e){return e}function bb(e,t){let n=[],r=Sb(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(xb(i)){let e=[];do e.push(i),i=r.next();while(xb(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function xb(e){return!!e&&!!e.match(/[\w\.:]+/)}function Sb(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Cb(e){typeof e.dispose==`function`&&e.dispose()}var wb=class{constructor(e){this.scopeName=e}scopeName;toKey(){return this.scopeName}},Tb=class{constructor(e,t){this.scopeName=e,this.ruleName=t}scopeName;ruleName;toKey(){return`${this.scopeName}#${this.ruleName}`}},Eb=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Db=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new wb(this.initialScopeName)]}repo;initialScopeName;seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Eb;for(let n of e)Ob(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof wb){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Ob(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof wb?Ab({baseGrammar:a,selfGrammar:i},r):kb(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new wb(e))}function kb(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];jb([r],t,n)}}function Ab(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&jb(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&jb(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function jb(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Yy({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&jb(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Lb(i);switch(a.kind){case 0:Ab({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ab(t,n);break;case 2:kb(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?kb(a.ruleName,i,n):Ab(i,n)}else a.kind===4?n.add(new Tb(a.scopeName,a.ruleName)):n.add(new wb(a.scopeName))}}}var Mb=class{kind=0},Nb=class{kind=1},Pb=class{constructor(e){this.ruleName=e}ruleName;kind=2},Fb=class{constructor(e){this.scopeName=e}scopeName;kind=3},Ib=class{constructor(e,t){this.scopeName=e,this.ruleName=t}scopeName;ruleName;kind=4};function Lb(e){if(e===`$base`)return new Mb;if(e===`$self`)return new Nb;let t=e.indexOf(`#`);return t===-1?new Fb(e):t===0?new Pb(e.substring(1)):new Ib(e.substring(0,t),e.substring(t+1))}var Rb=/\\(\d+)/,zb=/\\(\d+)/g,Bb=-1,Vb=-2;function Hb(e){return e}function Ub(e){return e}var Wb=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Qy.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Qy.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Xy(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:Qy.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Qy.replaceCaptures(this._contentName,e,t)}},Gb=class extends Wb{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Kb=class extends Wb{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Zb(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Qb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qb=class extends Wb{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Qb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Jb=class extends Wb{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Zb(i,this.id),this.beginCaptures=a,this._end=new Zb(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Qb;for(let t of this.patterns)e.getRule(t).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}},Yb=class extends Wb{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Zb(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Zb(o,Vb),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Qb;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Qb,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Xb=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Gb(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Kb(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Yy({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new qb(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Yb(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Jb(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Lb(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof qb||e instanceof Jb||e instanceof Yb)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Zb=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Rb.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return zb.lastIndex=0,this.source.replace(zb,(e,t)=>nb(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Qb=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(),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(e=>e.source);this._cached=new $b(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new $b(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},$b=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}regExps;rules;scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
203
|
-
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},ex=class{constructor(e,t){this.languageId=e,this.tokenType=t}languageId;tokenType},tx=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ex(e,8),this._embeddedLanguagesMatcher=new nx(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ex(0,0);_getBasicScopeAttributes=new rb(e=>new ex(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},nx=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>nb(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var rx=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}stack;stoppedEarly};function ix(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=ax(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new rx(i,!0);f()}return new rx(i,!1);function f(){let o=ox(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Bb){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),dx(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Jb){let r=o;dx(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Yb){let r=o;dx(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(dx(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function ax(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Yb&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=ux(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Vb){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),dx(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function ox(e,t,n,r,i,a){let o=sx(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=cx(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function sx(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=lx(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function cx(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=lx(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function lx(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ux(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function dx(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));ix(e,p,n&&d.start===0,d.start,f,i,!1,0),Cb(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new fx(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var fx=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function px(e,t,n,r,i,a,o,s){return new _x(e,t,n,r,i,a,o,s)}function mx(e,t,n,r,i){let a=bb(t,hx),o=Xb.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function hx(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(gx(t[r],e))return n=r+1,!0;return!1})}function gx(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var _x=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new tx(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=vx(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=bb(e,hx);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootScopeName;balancedBracketSelectors;_onigLib;_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let 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(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)mx(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&mx(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Hb(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Ub(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=vx(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Xb.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===bx.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=_b.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?yx.createRootAndLookUpScopeName(a,r,this):yx.createRoot(`unknown`,r),t=new bx(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
204
|
-
`;let a=this.createOnigString(e),o=a.content.length,s=new Sx(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=ix(this,a,i,0,t,s,!0,r);return Cb(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function vx(e,t){return e=Gy(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 yx=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}parent;scopePath;tokenAttributes;static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=ab.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new ab(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new ab(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),_b.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},bx=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}parent;ruleId;beginRuleCapturedEOL;endRule;nameScopesList;contentNameScopesList;_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?yx.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Ub(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=yx.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Hb(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,yx.fromExtension(r,n.contentNameScopesList))}},xx=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):bb(e,hx).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>bb(e,hx).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Sx=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}balancedBracketSelectors;_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 n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=_b.set(n,0,vb(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=_b.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Cx=class{constructor(e,t){this._onigLib=t,this._theme=e}_onigLib;_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,px(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},wx=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Cx(ib.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(ib.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new xx(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Db(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Tx=bx.NULL;function Ex(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function Dx(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Ox(e){return Array.isArray(e)?e:[e]}async function kx(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Ax(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function jx(e){return e===`ansi`||Ax(e)}function Mx(e){return e===`none`}function Nx(e){return Mx(e)}var Px=/(\r?\n)/g;function Fx(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Px),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Ix={light:`#333333`,dark:`#bbbbbb`},Lx={light:`#fffffe`,dark:`#1e1e1e`},Rx=`__shiki_resolved`;function zx(e){if(e?.[Rx])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Ix.light:Ix.dark,n||=t.type===`light`?Lx.light:Lx.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Rx,{enumerable:!1,writable:!1,value:!0}),t}async function Bx(e){return[...new Set((await Promise.all(e.filter(e=>!jx(e)).map(async e=>await kx(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Vx(e){return(await Promise.all(e.map(async e=>Nx(e)?null:zx(await kx(e))))).filter(e=>!!e)}function Hx(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Wy(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Ux=class extends wx{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=zx(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=ib.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Hx(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new Wy(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Wx=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Gx=0;function Kx(e){Gx+=1,e.warnings!==!1&&Gx>=10&&Gx%10==0&&console.warn(`[Shiki] ${Gx} 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 Wy("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(zx),i=new Ux(new Wx(e.engine,n),r,n,e.langAlias),a;function o(t){return Hx(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Wy(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new Wy(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Bx(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Vx(e))}function g(){if(t)throw new Wy(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Gx)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}var qx=Kx;async function Jx(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Vx(e.themes||[]),Bx(e.langs||[]),e.engine]);return Kx({...e,themes:t,langs:n,engine:r})}var Yx=Jx,Xx=new WeakMap;function Zx(e,t){Xx.set(e,t)}function Qx(e){return Xx.get(e)}var $x=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Ox(n).map(e=>[e,Tx])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return eS(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function eS(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function tS(e,t){if(!(e instanceof $x))throw new Wy(`Invalid grammar state`);return e.getInternalStack(t)}var nS=/,/,rS=/ /;function iS(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Ax(e.resolveLangAlias(n.lang||`text`))||Mx(r))return Fx(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Wy(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Wy(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return oS(t,o,i,a,n)}function aS(...e){if(e.length===2)return Qx(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Ax(i)||Mx(a))throw new Wy(`Plain language does not have grammar state`);if(i===`ansi`)throw new Wy(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new $x(sS(n,c,o,s,r).stateStack,c.name,o.name)}function oS(e,t,n,r,i){let a=sS(e,t,n,r,i),o=new $x(a.stateStack,t.name,n.name);return Zx(a.tokens,o),a.tokens}function sS(e,t,n,r,i){let a=Ex(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Fx(e),u=i.grammarState?tS(i.grammarState,n.name)??Tx:i.grammarContextCode==null?Tx:sS(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=Dx(r[_b.getForeground(s)],a),u=_b.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=_b.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(nS).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(rS))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?cS(t.scopes):lS(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function cS(e){return e.map(e=>({scopeName:e}))}function lS(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:fS(e,i,t.slice(0,r))}}return n}function uS(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function dS(e,t,n){if(!uS(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)uS(e[r],n[i])&&--r,--i;return r===-1}function fS(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(dS(e,t,n)){r.push(a);break}return r}function pS(e,t,n,r=iS){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Qx(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=mS(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new $x(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Zx(s,c),s}function mS(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var hS=/\s+/g;function gS(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(hS)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(hS);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var _S=/:?lang=["']([^"']+)["']/g,vS=/(?:```|~~~)([\w-]+)/g,yS=/\\begin\{([\w-]+)\}/g,bS=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,xS=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function SS(e){let t=Fx(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function CS(e,t,n){let r=new Set;for(let t of e.matchAll(_S)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(vS)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(yS)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(bS)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(xS.test(e)&&r.add(`yaml`),!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var wS=[`color`,`background-color`];function TS(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function ES(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function DS(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=ES(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return TS(e,a)})):e}function OS(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>kS(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&wS.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new Wy('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function kS(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&db.Italic&&(t[`font-style`]=`italic`),e.fontStyle&db.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&db.Underline&&n.push(`underline`),e.fontStyle&db.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function AS(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function jS(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=SS(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new Wy(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new Wy(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new Wy(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));MS(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return DS(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new Wy(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=NS(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new Wy(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new Wy(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&gS(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function MS(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new Wy(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new Wy(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function NS(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(NS).join(``):``}var PS=[jS()];function FS(e){let t=IS(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...PS]}function IS(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var LS=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],RS={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function zS(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function BS(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function VS(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)RS[r]&&t.push({type:`setDecoration`,value:RS[r]});else if(r<=29){let e=RS[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:LS[r-30]}});else if(r===38){let n=BS(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:LS[r-40]}});else if(r===48){let n=BS(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:LS[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:LS[r-100+8]}})}}return t}function HS(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=zS(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=VS(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var US={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 WS(e=US){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<LS.length;e++)r.push(t(LS[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var GS=/#([0-9a-f]{3,8})/i,KS=/var\((--[\w-]+-ansi-[\w-]+)\)/,qS={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 JS(e,t,n){let r=Ex(e,n),i=Fx(t),a=WS(Object.fromEntries(LS.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||qS[t]]}))),o=HS();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Dx(i,r),o=Dx(o,r),n.decorations.has(`dim`)&&(i=YS(i));let s=db.None;return n.decorations.has(`bold`)&&(s|=db.Bold),n.decorations.has(`italic`)&&(s|=db.Italic),n.decorations.has(`underline`)&&(s|=db.Underline),n.decorations.has(`strikethrough`)&&(s|=db.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function YS(e){let t=e.match(GS);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(KS);return n?`var(${n[1]}-dim)`:e}function XS(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!Ax(r)&&!Mx(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return JS(r,t,n)}return iS(e,t,n)}function ZS(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new Wy("`themes` option must not be empty");let p=pS(e,t,n,XS);if(c=Qx(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new Wy(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>OS(e,h,u,l,d))),c&&Zx(a,c);let g=f.map(e=>Ex(e.theme,n));i=QS(f,m,g,u,l,`fg`,d),r=QS(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Ex(n.theme,n);a=XS(e,t,n);let l=e.getTheme(n.theme);r=Dx(l.bg,s),i=Dx(l.fg,s),o=l.name,c=Qx(a)}else throw new Wy("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function QS(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Dx(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new Wy('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Dx(t[r][a],n[r])||`inherit`}, ${Dx(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var $S=/^\s+$/,eC=/^(\s*)(.*?)(\s*)$/;function tC(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>tC(e,t,n),codeToTokens:(t,n)=>ZS(e,t,n)}){let i=t;for(let e of FS(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=ZS(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=rC(a):d===`never`&&(a=iC(a)),f&&(a=aC(a));let p={...r,get source(){return i}};for(let e of FS(n))a=e.tokens?.call(p,a)||a;return nC(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function nC(e,t,n,r=Qx(e)){let i=FS(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:gS,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
205
|
-
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=AS(a.htmlStyle||kS(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&Zx(m,r),m}function rC(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&db.Underline||i.fontStyle&db.Strikethrough));o&&$S.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function iC(e){return e.map(e=>e.flatMap(e=>{if($S.test(e.content))return e;let t=e.content.match(eC);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function aC(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=AS(e.htmlStyle||kS(e)),i=AS(n.htmlStyle||kS(n)),a=e.fontStyle&&(e.fontStyle&db.Underline||e.fontStyle&db.Strikethrough),o=n.fontStyle&&(n.fontStyle&db.Underline||n.fontStyle&db.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var oC=d;function sC(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>tC(e,t,n),codeToTokens:(t,n)=>ZS(e,t,n)},i=oC(tC(e,t,n,r));for(let e of FS(n))i=e.postprocess?.call(r,i,n)||i;return i}async function cC(e){let t=await Jx(e);return{getLastGrammarState:(...e)=>aS(t,...e),codeToTokensBase:(e,n)=>XS(t,e,n),codeToTokensWithThemes:(e,n)=>pS(t,e,n),codeToTokens:(e,n)=>ZS(t,e,n),codeToHast:(e,n)=>tC(t,e,n),codeToHtml:(e,n)=>sC(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function lC(e){let t=Kx(e);return{getLastGrammarState:(...e)=>aS(t,...e),codeToTokensBase:(e,n)=>XS(t,e,n),codeToTokensWithThemes:(e,n)=>pS(t,e,n),codeToTokens:(e,n)=>ZS(t,e,n),codeToHast:(e,n)=>tC(t,e,n),codeToHtml:(e,n)=>sC(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function uC(e){let t;async function n(n){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}return t=e({...n,themes:n.themes||[],langs:n.langs||[]}),t}return n}var dC=uC(cC);function fC(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,jx(n))return[];let r=t[n];if(!r)throw new Wy(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(Nx(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Wy(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await cC({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function pC(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function mC(e,t){let n=pC(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}function hC(e={}){let{name:t=`css-variables`,variablePrefix:n=`--shiki-`,fontStyle:r=!0}=e,i=t=>e.variableDefaults?.[t]?`var(${n}${t}, ${e.variableDefaults[t]})`:`var(${n}${t})`,a={name:t,type:`dark`,colors:{"editor.foreground":i(`foreground`),"editor.background":i(`background`),"terminal.ansiBlack":i(`ansi-black`),"terminal.ansiRed":i(`ansi-red`),"terminal.ansiGreen":i(`ansi-green`),"terminal.ansiYellow":i(`ansi-yellow`),"terminal.ansiBlue":i(`ansi-blue`),"terminal.ansiMagenta":i(`ansi-magenta`),"terminal.ansiCyan":i(`ansi-cyan`),"terminal.ansiWhite":i(`ansi-white`),"terminal.ansiBrightBlack":i(`ansi-bright-black`),"terminal.ansiBrightRed":i(`ansi-bright-red`),"terminal.ansiBrightGreen":i(`ansi-bright-green`),"terminal.ansiBrightYellow":i(`ansi-bright-yellow`),"terminal.ansiBrightBlue":i(`ansi-bright-blue`),"terminal.ansiBrightMagenta":i(`ansi-bright-magenta`),"terminal.ansiBrightCyan":i(`ansi-bright-cyan`),"terminal.ansiBrightWhite":i(`ansi-bright-white`)},tokenColors:[{scope:[`keyword.operator.accessor`,`meta.group.braces.round.function.arguments`,`meta.template.expression`,`markup.fenced_code meta.embedded.block`],settings:{foreground:i(`foreground`)}},{scope:`emphasis`,settings:{fontStyle:`italic`}},{scope:[`strong`,`markup.heading.markdown`,`markup.bold.markdown`],settings:{fontStyle:`bold`}},{scope:[`markup.italic.markdown`],settings:{fontStyle:`italic`}},{scope:`meta.link.inline.markdown`,settings:{fontStyle:`underline`,foreground:i(`token-link`)}},{scope:[`string`,`markup.fenced_code`,`markup.inline`],settings:{foreground:i(`token-string`)}},{scope:[`comment`,`string.quoted.docstring.multi`],settings:{foreground:i(`token-comment`)}},{scope:[`constant.numeric`,`constant.language`,`constant.other.placeholder`,`constant.character.format.placeholder`,`variable.language.this`,`variable.other.object`,`variable.other.class`,`variable.other.constant`,`meta.property-name`,`meta.property-value`,`support`],settings:{foreground:i(`token-constant`)}},{scope:[`keyword`,`storage.modifier`,`storage.type`,`storage.control.clojure`,`entity.name.function.clojure`,`entity.name.tag.yaml`,`support.function.node`,`support.type.property-name.json`,`punctuation.separator.key-value`,`punctuation.definition.template-expression`],settings:{foreground:i(`token-keyword`)}},{scope:`variable.parameter.function`,settings:{foreground:i(`token-parameter`)}},{scope:[`support.function`,`entity.name.type`,`entity.other.inherited-class`,`meta.function-call`,`meta.instance.constructor`,`entity.other.attribute-name`,`entity.name.function`,`constant.keyword.clojure`],settings:{foreground:i(`token-function`)}},{scope:[`entity.name.tag`,`string.quoted`,`string.regexp`,`string.interpolated`,`string.template`,`string.unquoted.plain.out.yaml`,`keyword.other.template`],settings:{foreground:i(`token-string-expression`)}},{scope:[`punctuation.definition.arguments`,`punctuation.definition.dict`,`punctuation.separator`,`meta.function-call.arguments`],settings:{foreground:i(`token-punctuation`)}},{scope:[`markup.underline.link`,`punctuation.definition.metadata.markdown`],settings:{foreground:i(`token-link`)}},{scope:[`beginning.punctuation.definition.list.markdown`],settings:{foreground:i(`token-string`)}},{scope:[`punctuation.definition.string.begin.markdown`,`punctuation.definition.string.end.markdown`,`string.other.link.title.markdown`,`string.other.link.description.markdown`],settings:{foreground:i(`token-keyword`)}},{scope:[`markup.inserted`,`meta.diff.header.to-file`,`punctuation.definition.inserted`],settings:{foreground:i(`token-inserted`)}},{scope:[`markup.deleted`,`meta.diff.header.from-file`,`punctuation.definition.deleted`],settings:{foreground:i(`token-deleted`)}},{scope:[`markup.changed`,`punctuation.definition.changed`],settings:{foreground:i(`token-changed`)}}]};return r||(a.tokenColors=a.tokenColors?.map(e=>(e.settings?.fontStyle&&delete e.settings.fontStyle,e))),a}var{codeToHtml:gC,codeToHast:_C,codeToTokens:vC,codeToTokensBase:yC,codeToTokensWithThemes:bC,getSingletonHighlighter:xC,getLastGrammarState:SC}=mC(fC({langs:dy,themes:fy,engine:()=>(0,Uy.createOnigurumaEngine)(r(()=>import(`./wasm-BnjxR4X6.js`),[],import.meta.url))}),{guessEmbeddedLanguages:CS});function CC({checked:e,label:t,onChange:n}){return(0,A.jsxs)(`label`,{className:`switch`,children:[(0,A.jsx)(`input`,{className:`switch-input`,type:`checkbox`,role:`switch`,checked:e,onChange:e=>n(e.target.checked)}),(0,A.jsx)(`span`,{className:`switch-track`,"aria-hidden":`true`,children:(0,A.jsx)(`span`,{className:`switch-thumb`})}),(0,A.jsx)(`span`,{className:`switch-label`,children:t})]})}var wC=new Map,TC={bash:`Bash`,c:`C`,cpp:`C++`,cs:`C#`,csharp:`C#`,css:`CSS`,diff:`Diff`,dockerfile:`Dockerfile`,go:`Go`,html:`HTML`,java:`Java`,javascript:`JavaScript`,js:`JavaScript`,json:`JSON`,jsonc:`JSON with Comments`,jsx:`JSX`,kotlin:`Kotlin`,markdown:`Markdown`,md:`Markdown`,php:`PHP`,plaintext:`Plain text`,py:`Python`,python:`Python`,rb:`Ruby`,rs:`Rust`,ruby:`Ruby`,rust:`Rust`,scss:`SCSS`,sh:`Shell`,shell:`Shell`,sql:`SQL`,swift:`Swift`,text:`Plain text`,ts:`TypeScript`,tsx:`TSX`,txt:`Plain text`,typescript:`TypeScript`,xml:`XML`,yaml:`YAML`,yml:`YAML`,zsh:`Zsh`};function EC({className:e,children:t}){let[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(!1),o=e?.match(/language-([^\s]+)/)?.[1]??`text`,s=TC[o.toLowerCase()]??o,c=String(t??``).replace(/\n$/,``);return(0,b.useEffect)(()=>{let e=!1;return r(null),DC(c,o).then(t=>{e||r(t)}),()=>{e=!0}},[c,o]),(0,A.jsxs)(`div`,{className:`markdown-code-block${i?` markdown-code-block-wrap`:``}`,children:[(0,A.jsxs)(`div`,{className:`markdown-code-block-header`,children:[(0,A.jsx)(`span`,{className:`markdown-code-block-language`,children:s}),(0,A.jsx)(CC,{checked:i,label:`Wrap`,onChange:a})]}),(0,A.jsx)(`div`,{className:`markdown-code-block-content`,children:n===null?(0,A.jsx)(`pre`,{children:(0,A.jsx)(`code`,{children:t})}):(0,A.jsx)(`div`,{dangerouslySetInnerHTML:{__html:n}})})]})}async function DC(e,t){let n=`${t}\u0000${e}`,r=wC.get(n);if(r)return r;let i=OC(e,t).catch(()=>null);return wC.set(n,i),i}async function OC(e,t){try{return await gC(e,{lang:t,theme:`github-dark-default`})}catch{return gC(e,{lang:`text`,theme:`github-dark-default`})}}function kC({content:e,className:t,variant:n}){let r=[`markdown-content`,n?`markdown-content-${n}`:null,t].filter(Boolean).join(` `);return(0,A.jsx)(`div`,{className:r,children:(0,A.jsx)(Ph,{remarkPlugins:[ey],components:{table({children:e}){return(0,A.jsx)(`div`,{className:`markdown-table-scroll`,children:(0,A.jsx)(`table`,{children:e})})},pre({children:e}){if((0,b.isValidElement)(e)){let{className:t,children:n}=e.props;return(0,A.jsx)(EC,{className:t,children:n})}return(0,A.jsx)(`pre`,{children:e})}},children:e})})}function AC({thread:e,onDeleteMessage:t}){return(0,A.jsxs)(`div`,{className:`thread-message-list`,children:[e.messages.map((e,n)=>(0,A.jsxs)(`div`,{className:`thread-message thread-message-${e.role}`,children:[(0,A.jsxs)(`div`,{className:`thread-message-header`,children:[(0,A.jsx)(`span`,{className:`thread-message-role`,children:e.role===`user`?`you`:`agent`}),(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,onClick:()=>t(n),"aria-label":`Delete ${e.role===`user`?`your`:`agent`} comment`,title:`delete comment`,children:(0,A.jsx)(Ml,{size:13})})]}),(0,A.jsx)(kC,{content:e.text,variant:`thread`})]},`${e.role}:${n}:${e.text}`)),e.loading&&(0,A.jsxs)(`div`,{className:`thread-message thread-message-assistant`,children:[(0,A.jsx)(`span`,{className:`thread-message-role`,children:`agent`}),(0,A.jsx)(`span`,{className:`thread-message-thinking`,children:`thinking…`})]})]})}var jC=(0,b.memo)(function({thread:e,onAddReply:t,onRequestAgent:n,onToggleResolved:r,onToggleCollapsed:i,onDeleteMessage:a}){let[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(!1),u=e.messages[e.messages.length-1]?.role===`user`&&!e.loading&&!e.resolved,d=e.messages.length,f=`${e.resolved?`Resolved thread`:`Thread`} with ${d} comment${d===1?``:`s`}`,p=e.resolved?`Reopen`:`Resolve`,m=(0,b.useCallback)(e=>{s(!1),t(e,c),l(!1)},[t,c]),h=(0,b.useCallback)(()=>{r(!e.resolved)},[r,e.resolved]),g=(0,b.useCallback)(()=>{l(!1),s(!1)},[]);return e.collapsed?(0,A.jsx)(`div`,{className:`thread-card collapsed${e.resolved?` resolved`:``}`,children:(0,A.jsx)(`div`,{className:`thread-collapsed-row`,children:(0,A.jsxs)(W,{variant:`unstyled`,onClick:()=>i(!1),"aria-label":`Expand thread`,"aria-expanded":!1,children:[(0,A.jsx)(ml,{size:14}),(0,A.jsx)(`span`,{className:`thread-summary`,children:f})]})})}):(0,A.jsxs)(`div`,{className:`thread-card${e.resolved?` resolved`:``}`,children:[(0,A.jsx)(`div`,{className:`thread-header-row`,children:(0,A.jsxs)(W,{variant:`unstyled`,onClick:()=>i(!0),"aria-label":`Collapse thread`,"aria-expanded":!0,children:[(0,A.jsx)(fl,{size:14}),(0,A.jsx)(`span`,{className:`thread-summary`,children:f})]})}),(0,A.jsx)(AC,{thread:e,onDeleteMessage:a}),(0,A.jsx)(`div`,{className:`thread-footer`,children:o?(0,A.jsx)(Il,{inputClassName:`thread-reply-input`,actionsClassName:`thread-actions`,placeholder:`Reply…`,submitLabel:`Comment`,autoFocus:!0,onSubmit:m,onCancel:g,children:(0,A.jsx)(Fl,{checked:c,label:`Ask agent`,onChange:l})}):(0,A.jsxs)(`div`,{className:`thread-actions`,children:[(0,A.jsx)(W,{variant:`ghost`,onClick:h,children:p}),(0,A.jsx)(W,{onClick:()=>s(!0),children:`Reply`}),u&&(0,A.jsxs)(W,{onClick:n,children:[(0,A.jsx)(Al,{size:14}),`Ask agent`]})]})})]})}),MC=`github-dark-dimmed`,NC=`highlights`;function PC(e){let[t,n]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(e.length===0){n(!1);return}let t=!0;return n(!1),FC(e).then(()=>{t&&n(!0)}),()=>{t=!1}},[e]),t}async function FC(e){await Promise.all([document.fonts?.ready??Promise.resolve(),ot({preferredHighlighter:NC,themes:[MC],langs:IC(e)}).catch(()=>void 0)])}function IC(e){let t=new Set;for(let n of e)t.add(n.file.lang??dt(n.file.name));return[...t]}var LC={preferredHighlighter:NC,theme:MC,themeType:`dark`,diffStyle:`unified`,diffIndicators:`none`,hunkSeparators:`line-info-basic`,lineDiffType:`word-alt`,disableFileHeader:!0,overflow:`wrap`,unsafeCSS:`:host { --diffs-dark-bg: var(--surface); --diffs-bg: var(--surface); font-weight: var(--font-weight-code); } pre { background-color: var(--surface) !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; }`},RC=(0,b.memo)(function({file:e,diffStyle:t,overflowMode:n,collapsed:r,viewed:i,annotations:a,unresolvedThreadCount:o,renderReady:s,onToggleCollapsed:c,onToggleViewed:l,onLineActivate:u,onSaveDraft:d,onCancelDraft:f,onAddReply:p,onRequestAgent:m,onToggleResolved:h,onToggleThreadCollapsed:g,onDeleteThreadMessage:_}){let v=(0,b.useMemo)(()=>{let r=t===`split`?`split`:`unified`;return{...LC,diffStyle:r,overflow:n,onLineNumberClick:({lineNumber:t,annotationSide:n})=>{u(e.id,t,n)}}},[t,e.id,u,n]),y=(0,b.useCallback)(e=>{if(e.metadata.type===`draft`)return(0,A.jsx)(Ll,{onSave:d,onCancel:f});let{thread:t}=e.metadata;return(0,A.jsx)(jC,{thread:t,onAddReply:(e,n)=>p(t.id,e,n),onRequestAgent:()=>m(t.id),onToggleResolved:e=>h(t.id,e),onToggleCollapsed:e=>g(t.id,e),onDeleteMessage:e=>_(t.id,e)})},[p,f,m,d,_,h,g]);return(0,A.jsxs)(`section`,{className:`file-section${r?` collapsed`:``}`,id:`file-${e.id}`,children:[(0,A.jsxs)(`div`,{className:`file-header`,children:[(0,A.jsxs)(W,{variant:`unstyled`,className:`file-toggle`,onClick:()=>c(e.id),"aria-label":r?`Expand file`:`Collapse file`,children:[r?(0,A.jsx)(ul,{size:14}):(0,A.jsx)(cl,{size:14}),(0,A.jsx)(`span`,{className:`file-path`,children:e.displayPath}),o>0&&(0,A.jsxs)(`span`,{className:`file-thread-count`,"aria-label":`${o} unresolved comment thread${o===1?``:`s`}`,title:`${o} unresolved comment thread${o===1?``:`s`}`,children:[(0,A.jsx)(wl,{size:12}),(0,A.jsx)(`span`,{children:o})]})]}),(0,A.jsxs)(`div`,{className:`file-meta`,children:[(0,A.jsx)(Rl,{additions:e.additions,deletions:e.deletions}),(0,A.jsx)(Fl,{checked:i,label:`Viewed`,className:`viewed-checkbox`,onChange:()=>l(e.id)})]})]}),!r&&(0,A.jsx)(`div`,{className:`file-body`,children:s?(0,A.jsx)(Wc,{className:`diff-view`,fileDiff:e.file,options:v,lineAnnotations:a,renderAnnotation:y}):(0,A.jsx)(`div`,{className:`diff-placeholder`,children:`preparing diff…`})})]})});function zC({directory:e}){let t=(0,b.useRef)(null),[n,r]=(0,b.useState)(()=>VC(e)),i=(0,b.useMemo)(()=>BC(),[]);return(0,b.useLayoutEffect)(()=>{let n=t.current;if(!n)return;let a=()=>{let t=window.getComputedStyle(n);r(HC(e,n.clientWidth,t.font,i))};a();let o=new ResizeObserver(a);return o.observe(n),()=>{o.disconnect()}},[e,i]),(0,A.jsx)(`div`,{ref:t,className:`sidebar-file-directory`,title:e,children:n})}function BC(){let e=document.createElement(`canvas`).getContext(`2d`);return(t,n)=>e?(e.font=n,e.measureText(t).width):t.length*8}function VC(e){let t=WC(e);return t.length<=2?e:`${t[0]}/…/${t[t.length-1]}/`}function HC(e,t,n,r){let i=UC(e);for(let e of i)if(r(e,n)<=t)return e;return i[i.length-1]??e}function UC(e){let t=WC(e),n=[e];return t.length>2&&(n.push(`${t[0]}/…/${t.slice(1).join(`/`)}/`),n.push(`${t[0]}/…/${t.slice(-2).join(`/`)}/`),n.push(`${t[0]}/…/${t[t.length-1]}/`)),t.length>0&&n.push(`…/${t[t.length-1]}/`),[...new Set(n)]}function WC(e){return e===`./`?[]:e.split(`/`).filter(Boolean)}function GC({files:e,viewed:t,onJumpToFile:n}){let r=KC(e);return(0,A.jsx)(`aside`,{className:`sidebar`,children:(0,A.jsx)(`div`,{className:`sidebar-file-list`,children:r.map((e,r)=>(0,A.jsxs)(`div`,{className:`sidebar-file-group`,children:[(0,A.jsx)(zC,{directory:e.directory}),e.files.map(e=>(0,A.jsxs)(`button`,{type:`button`,className:`sidebar-file-item${t[e.id]?` viewed`:``}`,onClick:()=>n(e.id),title:e.displayPath,children:[(0,A.jsx)(`span`,{className:`sidebar-file-status ${e.status}`,"aria-label":e.status,children:XC(e.status)}),(0,A.jsx)(`span`,{className:`sidebar-file-name`,children:JC(e)}),(0,A.jsx)(Rl,{additions:e.additions,deletions:e.deletions,className:`sidebar-stats`})]},e.id))]},`${e.directory}:${r}`))})})}function KC(e){let t=[];for(let n of e){let e=qC(n.newRepoPath),r=t[t.length-1];r?.directory===e?r.files.push(n):t.push({directory:e,files:[n]})}return t}function qC(e){let t=e.lastIndexOf(`/`);return t<0?`./`:`${e.slice(0,t)}/`}function JC(e){return YC(e.newRepoPath)}function YC(e){let t=e.lastIndexOf(`/`);return t<0?e:e.slice(t+1)}function XC(e){switch(e){case`added`:return`A`;case`deleted`:return`D`;case`renamed`:return`R`;case`copied`:return`C`;case`type-changed`:return`T`;case`unmerged`:return`U`;case`modified`:return`M`;case`unknown`:return`?`}}var ZC=[];function QC({contentRef:e,files:t,emptyContent:n,reviewState:r,renderReady:i,fileState:a,threads:o,onJumpToFile:s}){return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(GC,{files:t,viewed:a.viewed,onJumpToFile:s}),(0,A.jsxs)(`main`,{ref:e,className:`content`,children:[t.length===0&&(0,A.jsx)(`div`,{className:`empty`,children:n}),t.map(e=>{let t=E(o.threadsByFileId.get(e.id)??ZC,e.id,o.draft,o.draftAnnotation);return(0,A.jsx)(RC,{file:e,diffStyle:r.diffStyle,overflowMode:r.overflowMode,collapsed:a.collapsed[e.id]??!1,viewed:a.viewed[e.id]??!1,annotations:t,unresolvedThreadCount:a.unresolvedThreadCountsByFileId.get(e.id)??0,renderReady:i,onToggleCollapsed:a.toggleCollapsed,onToggleViewed:a.toggleViewed,onLineActivate:o.activateLine,onSaveDraft:o.saveDraft,onCancelDraft:o.cancelDraft,onAddReply:o.addReply,onRequestAgent:o.requestAgent,onToggleResolved:o.toggleResolved,onToggleThreadCollapsed:o.toggleThreadCollapsed,onDeleteThreadMessage:o.removeThreadMessage},e.id)})]})]})}function $C(e){return Object.fromEntries(e.map(e=>[e,!0]))}function ew(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function tw(e){return[...new Set(e)]}function nw(e,t){return{additions:e.additions+t.additions,deletions:e.deletions+t.deletions}}function rw({files:e,reviewState:t,applyStatePatch:n,scrollToFile:r}){let i=(0,b.useRef)(null),a=(0,b.useMemo)(()=>$C(t.collapsedFileIds),[t.collapsedFileIds]),o=(0,b.useMemo)(()=>$C(t.viewedFileIds),[t.viewedFileIds]),s=(0,b.useMemo)(()=>t.threads.filter(e=>!e.resolved),[t.threads]),c=(0,b.useMemo)(()=>s.filter(S),[s]),l=(0,b.useMemo)(()=>tw(c.map(e=>e.anchor.fileId)),[c]),u=(0,b.useMemo)(()=>T(c),[c]),d=(0,b.useMemo)(()=>e.reduce(nw,{additions:0,deletions:0}),[e]),f=(0,b.useCallback)(e=>{n({collapsedFileIds:ew(t.collapsedFileIds,e)})},[n,t.collapsedFileIds]),p=(0,b.useCallback)(e=>{let r=ew(t.viewedFileIds,e),a=r.includes(e),o=a?tw([...t.collapsedFileIds,e]):t.collapsedFileIds;i.current=a&&!t.collapsedFileIds.includes(e)?e:null,n({viewedFileIds:r,collapsedFileIds:o},{onError:()=>{i.current=null}})},[n,t.collapsedFileIds,t.viewedFileIds]),m=(0,b.useCallback)(()=>{n({collapsedFileIds:[]})},[n]),h=(0,b.useCallback)(()=>{n({collapsedFileIds:e.map(e=>e.id)})},[n,e]),g=(0,b.useCallback)(()=>{if(l.length===0)return;let e=new Set(l);n({collapsedFileIds:t.collapsedFileIds.filter(t=>!e.has(t))})},[n,l,t.collapsedFileIds]),_=(0,b.useCallback)(()=>{n({collapsedFileIds:tw([...t.collapsedFileIds,...t.viewedFileIds])})},[n,t.collapsedFileIds,t.viewedFileIds]);return(0,b.useLayoutEffect)(()=>{let e=i.current;e&&(i.current=null,r(e,`auto`))},[t.collapsedFileIds,r]),{collapsed:a,viewed:o,unresolvedThreadCount:c.length,filesWithUnresolvedThreads:l,unresolvedThreadCountsByFileId:u,totals:d,toggleCollapsed:f,toggleViewed:p,expandAll:m,collapseAll:h,expandUnresolved:g,collapseViewed:_}}function iw(e){switch(e.kind){case`orientation`:return`orientation`;case`topic`:return`topic:${e.topicId}`;case`question`:return`question:${e.questionId}`}}function aw(e){return e.guide.comments.length>0||e.threads.some(e=>!e.resolved)}function ow({value:e,options:t,label:n,onChange:r}){return(0,A.jsx)(`div`,{className:`toggle-group`,role:`radiogroup`,"aria-label":n,children:t.map(t=>(0,A.jsx)(W,{variant:`ghost`,active:e===t.value,role:`radio`,"aria-checked":e===t.value,onClick:()=>r(t.value),children:t.label},t.value))})}function sw({target:e,comments:t,requestChanges:n,onComment:r}){let[i,a]=(0,b.useState)(null),o=iw(e),s=t.find(e=>iw(e.target)===o),c=s?.body.trim()?`Edit your comment`:`Write a comment`,l=[{value:`comment`,label:c},{value:`changes`,label:`Ask for changes`}],[u,d]=(0,b.useState)(s?.body??``);if((0,b.useEffect)(()=>{d(s?.body??``)},[s?.body]),(0,b.useEffect)(()=>{!n&&i===`changes`&&a(null)},[i,n]),i===null)return(0,A.jsxs)(`div`,{className:`guide-feedback-actions`,"aria-label":`Feedback`,children:[(0,A.jsx)(W,{variant:`ghost`,onClick:()=>a(`comment`),children:c}),n&&(0,A.jsx)(W,{variant:`ghost`,onClick:()=>a(`changes`),children:`Ask for changes`})]});let f=n?(0,A.jsx)(ow,{value:i,options:l,label:`Feedback mode`,onChange:a}):void 0;return i===`changes`&&n?(0,A.jsx)(cw,{label:`Feedback`,heading:f,placeholder:n.placeholder,submitLabel:n.submitLabel,onClose:()=>a(null),onSubmit:e=>{n.onSubmit(e),a(null)}}):(0,A.jsx)(cw,{label:`Feedback`,heading:f,placeholder:`Write your review comment…`,submitLabel:`Save comment`,value:u,allowEmptySubmit:!!s,onValueChange:d,onClose:()=>a(null),onSubmit:t=>{r(e,t),a(null)}})}function cw({label:e,heading:t,placeholder:n,submitLabel:r,value:i,allowEmptySubmit:a,onValueChange:o,onClose:s,onSubmit:c}){return(0,A.jsxs)(`aside`,{className:`guide-feedback-card`,"aria-label":e,children:[t&&(0,A.jsx)(`header`,{className:`guide-feedback-card-heading`,children:t}),(0,A.jsx)(Il,{className:`guide-feedback-form`,inputClassName:`guide-feedback-input`,actionsClassName:`guide-feedback-footer`,placeholder:n,submitLabel:r,cancelLabel:`Close`,value:i,autoFocus:!0,allowEmptySubmit:a,onValueChange:o,onCancel:s,onSubmit:c})]})}function lw({content:e,comments:t,loading:n,onComment:r}){return(0,A.jsxs)(`section`,{className:`guide-section`,"aria-labelledby":`guide-title`,children:[(0,A.jsxs)(`header`,{className:`guide-section-heading`,children:[(0,A.jsx)(`h2`,{id:`guide-title`,className:`guide-section-title`,children:`Orientation`}),n&&(0,A.jsx)(`output`,{className:`guide-loading`,children:`Updating…`})]}),(0,A.jsx)(kC,{content:e,variant:`guide`}),(0,A.jsx)(sw,{comments:t,target:{kind:`orientation`},onComment:r})]})}function uw({questions:e,pendingQuestions:t,comments:n,onOperate:r,onComment:i}){let[a,o]=(0,b.useState)(!1);return(0,A.jsxs)(`section`,{className:`guide-section`,"aria-labelledby":`guide-questions-title`,children:[(0,A.jsx)(`header`,{className:`guide-section-heading`,children:(0,A.jsx)(`h2`,{id:`guide-questions-title`,className:`guide-section-title`,children:`Questions`})}),(e.length>0||t.length>0)&&(0,A.jsxs)(`ul`,{className:`guide-question-list`,children:[e.map(e=>(0,A.jsx)(`li`,{className:`guide-question-item`,children:(0,A.jsxs)(`details`,{className:`guide-question`,children:[(0,A.jsxs)(`summary`,{children:[(0,A.jsx)(ul,{className:`guide-question-icon`,size:16}),(0,A.jsx)(`span`,{className:`guide-question-label`,children:(0,A.jsx)(`strong`,{children:e.question})})]}),(0,A.jsxs)(`div`,{className:`guide-question-answer`,children:[(0,A.jsx)(kC,{content:e.answer,variant:`guide`}),(0,A.jsx)(sw,{comments:n,target:{kind:`question`,questionId:e.id},onComment:i})]})]})},e.id)),t.map(e=>(0,A.jsx)(`li`,{className:`guide-question-item`,children:(0,A.jsx)(`div`,{className:`guide-question-pending`,role:`status`,"aria-label":`${e.question}, generating answer`,children:(0,A.jsx)(`span`,{className:`guide-question-label`,children:(0,A.jsx)(`strong`,{children:e.question})})})},e.id))]}),a?(0,A.jsx)(cw,{label:`Ask a question`,placeholder:`Write the question you want answered…`,submitLabel:`Ask`,onClose:()=>o(!1),onSubmit:e=>{r({kind:`question.ask`,question:e}),o(!1)}}):(0,A.jsx)(`div`,{className:`guide-question-actions`,children:(0,A.jsx)(W,{variant:`ghost`,onClick:()=>o(!0),children:`Ask a question`})})]})}function dw({topic:e,comments:t,onOperate:n,onComment:r}){return(0,A.jsxs)(`article`,{className:`guide-topic-content`,children:[(0,A.jsx)(`header`,{className:`guide-topic-heading`,children:(0,A.jsx)(`h3`,{children:e.heading})}),(0,A.jsx)(kC,{content:e.body,variant:`guide`}),(0,A.jsx)(sw,{comments:t,target:{kind:`topic`,topicId:e.id},requestChanges:{placeholder:`Describe the changes you want…`,submitLabel:`Request changes`,onSubmit:t=>{n({kind:`topic.revise`,topicId:e.id,request:t})}},onComment:r})]})}function fw({topics:e,pendingTopics:t,comments:n,onOperate:r,onComment:i}){let[a,o]=(0,b.useState)(!1),[s,c]=(0,b.useState)(()=>e[0]?.id??null),l=(0,b.useRef)(null),u=(0,b.useRef)(null),d=(0,b.useMemo)(()=>t.filter(e=>e.kind===`add`),[t]),f=(0,b.useMemo)(()=>new Set(t.flatMap(e=>e.kind===`revise`?[e.topicId]:[])),[t]),p=d.find(e=>e.id===s),m=p?void 0:e.find(e=>e.id===s)??e[0];return(0,b.useEffect)(()=>{let t=l.current;t===null||e.length<=t||(c(e[e.length-1]?.id??null),l.current=null)},[e]),(0,b.useEffect)(()=>{let e=u.current;e===null||d.length<=e||(c(d[d.length-1]?.id??null),u.current=null)},[d]),(0,A.jsxs)(`section`,{className:`guide-section`,"aria-label":`Topics`,children:[(0,A.jsxs)(`div`,{className:`guide-topic-cloud`,"aria-label":`Guide topics`,children:[e.map(e=>{let t=!a&&e.id===m?.id,n=f.has(e.id);return(0,A.jsxs)(W,{variant:t?`default`:`ghost`,active:t,pill:!0,"aria-label":n?`${e.label}, updating`:void 0,"aria-pressed":t,onClick:()=>{c(e.id),o(!1)},children:[e.label,n&&(0,A.jsx)(`span`,{className:`guide-topic-working-dot`,"aria-hidden":`true`})]},e.id)}),d.map(e=>{let t=!a&&e.id===p?.id;return(0,A.jsxs)(W,{variant:t?`default`:`ghost`,active:t,pill:!0,"aria-label":`New topic, generating`,"aria-pressed":t,onClick:()=>{c(e.id),o(!1)},children:[`New topic`,(0,A.jsx)(`span`,{className:`guide-topic-working-dot`,"aria-hidden":`true`})]},e.id)}),(0,A.jsx)(W,{variant:a?`default`:`ghost`,active:a,muted:!a,pill:!0,"aria-pressed":a,onClick:()=>o(!0),children:`Ask about…`})]}),a?(0,A.jsx)(cw,{label:`Ask about a topic`,placeholder:`Describe the topic you want explained…`,submitLabel:`Ask`,onClose:()=>o(!1),onSubmit:t=>{l.current=e.length,u.current=d.length,r({kind:`topic.add`,request:t}),o(!1)}}):p?(0,A.jsxs)(`article`,{className:`guide-topic-content`,role:`status`,children:[(0,A.jsx)(`header`,{className:`guide-topic-heading`,children:(0,A.jsx)(`h3`,{children:`Generating topic…`})}),(0,A.jsx)(`p`,{className:`guide-topic-generating`,children:`Building a focused explanation for this topic.`})]}):m&&(0,A.jsx)(dw,{topic:m,comments:n,onOperate:r,onComment:i},m.id)]})}function pw({guide:e,pendingTopics:t,pendingQuestions:n,onGenerate:r,onOperate:i,onComment:a}){return e.orientation.trim()?(0,A.jsxs)(`article`,{className:`guide`,"aria-labelledby":`guide-title`,children:[(0,A.jsx)(lw,{content:e.orientation,comments:e.comments,loading:e.loading,onComment:a}),(0,A.jsx)(fw,{topics:e.topics,pendingTopics:t,comments:e.comments,onOperate:i,onComment:a}),(0,A.jsx)(uw,{questions:e.questions,pendingQuestions:n,comments:e.comments,onOperate:i,onComment:a})]}):(0,A.jsxs)(`section`,{className:`guide-empty`,"aria-labelledby":`guide-empty-title`,"aria-busy":e.loading,children:[(0,A.jsx)(`h1`,{id:`guide-empty-title`,className:`guide-section-title`,children:`Understand this change`}),(0,A.jsx)(`p`,{children:`Get oriented before reading the implementation, then explore the parts and questions that matter to you.`}),(0,A.jsx)(W,{variant:`primary`,disabled:e.loading,onClick:r,children:e.loading?`Building guide…`:`Generate guide`})]})}var mw=5;function hw({thread:e,body:t,draftKind:n,disabled:r,onBodyChange:i,onSubmit:a}){let o=(0,b.useRef)(null);if((0,b.useLayoutEffect)(()=>{let e=o.current;if(!e)return;e.style.height=`auto`;let t=getComputedStyle(e),n=Number.parseFloat(t.lineHeight),r=Number.parseFloat(t.paddingTop)+Number.parseFloat(t.paddingBottom)+Number.parseFloat(t.borderTopWidth)+Number.parseFloat(t.borderBottomWidth),i=n*mw+r,a=Math.min(e.scrollHeight,i);e.style.height=`${a}px`,e.style.overflowY=e.scrollHeight>i?`auto`:`hidden`},[t]),e?.resolved)return(0,A.jsx)(`div`,{className:`guide-conversation-excluded-footer`,children:`Excluded from review`});let s=!e&&n===`comment`?`Write a global review comment`:`Ask anything`;return(0,A.jsx)(`div`,{className:`guide-conversation-composer`,children:(0,A.jsx)(`textarea`,{ref:o,className:`guide-conversation-input`,value:t,rows:1,disabled:r,placeholder:`${s}…`,"aria-label":s,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),t.trim()&&a())}})})}function gw({thread:e}){return(0,A.jsxs)(`div`,{className:`guide-conversation-message-list`,children:[e.messages.map((e,t)=>(0,A.jsx)(`article`,{className:`guide-conversation-message ${e.role}`,children:e.role===`user`?(0,A.jsx)(`div`,{className:`guide-conversation-user-text`,children:e.text}):(0,A.jsx)(kC,{content:e.text,className:`guide-conversation-message-content`})},`${e.role}:${t}:${e.text}`)),e.loading&&(0,A.jsx)(`div`,{className:`guide-conversation-message assistant loading`,children:(0,A.jsx)(`span`,{className:`guide-conversation-thinking`,children:`Thinking…`})})]})}function _w({thread:e,body:t,draftKind:n,submitting:r,onBodyChange:i,onSubmit:a}){let o=(0,b.useRef)(null),s=e?.messages.length??0;return(0,b.useLayoutEffect)(()=>{let e=o.current;e&&(e.scrollTop=e.scrollHeight)},[s,e?.id,e?.loading]),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{ref:o,className:`guide-conversation-messages`,"aria-live":`polite`,children:e?(0,A.jsx)(gw,{thread:e}):(0,A.jsx)(`div`,{className:`guide-conversation-empty`,children:n===`comment`?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h2`,{children:`Add a global review comment`}),(0,A.jsx)(`p`,{children:`Leave feedback that does not belong to a specific diff line or guide block.`})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`h2`,{children:`What would you like to know?`}),(0,A.jsx)(`p`,{children:`Ask about the intent, tradeoffs, or any part of the change you want to understand better.`})]})})}),(0,A.jsx)(hw,{thread:e,body:t,draftKind:n,disabled:r||!!e?.loading,onBodyChange:i,onSubmit:a})]})}function vw({conversations:e}){let{items:t,selected:n,view:r}=e;return(0,A.jsxs)(`aside`,{className:`guide-conversation-panel`,"aria-label":`Guide conversations`,children:[(0,A.jsxs)(`header`,{className:`guide-conversation-header`,children:[(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,active:r===`history`,"aria-label":`Conversation history`,"aria-pressed":r===`history`,title:`Conversation history`,onClick:e.showHistory,children:(0,A.jsx)(Ol,{size:16})}),(0,A.jsxs)(`div`,{className:`guide-conversation-header-actions`,children:[n&&(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,"aria-label":n.resolved?`Include conversation in review`:`Exclude conversation from review`,title:n.resolved?`Include in review`:`Exclude from review`,onClick:()=>n.resolved?e.include(n.id):e.exclude(n.id),children:n.resolved?(0,A.jsx)(bl,{size:16}):(0,A.jsx)(vl,{size:16})}),(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,active:r===`new`&&e.draftKind===`comment`,"aria-label":`Add global comment`,"aria-pressed":r===`new`&&e.draftKind===`comment`,title:`Add global comment`,onClick:e.openComment,children:(0,A.jsx)(Sl,{size:16})}),(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,active:r===`new`&&e.draftKind===`conversation`,"aria-label":`New agent conversation`,"aria-pressed":r===`new`&&e.draftKind===`conversation`,title:`New agent conversation`,onClick:e.openConversation,children:(0,A.jsx)(El,{size:16})})]})]}),r===`history`?(0,A.jsx)(`div`,{className:`guide-conversation-history`,children:t.length===0?(0,A.jsx)(`p`,{className:`guide-conversation-history-empty`,children:`No conversations yet`}):t.map(t=>{let n=yw(t);return(0,A.jsxs)(W,{variant:`unstyled`,className:`guide-conversation-item${t.resolved?` excluded`:``}`,onClick:()=>e.open(t.id),title:n,children:[(0,A.jsx)(wl,{size:14,"aria-hidden":`true`}),(0,A.jsx)(`span`,{children:n}),t.resolved?(0,A.jsx)(`span`,{className:`guide-conversation-excluded`,children:`Excluded`}):(0,A.jsx)(`span`,{className:`guide-conversation-status${t.loading?` active`:``}`,"aria-label":t.loading?`Agent responding`:void 0,"aria-hidden":!t.loading||void 0})]},t.id)})}):(0,A.jsx)(_w,{thread:n,body:e.body,draftKind:e.draftKind,submitting:e.submitting,onBodyChange:e.setBody,onSubmit:e.submit},n?.id??`new`)]})}function yw(e){let t=e.messages.find(e=>e.role===`user`)?.text.replace(/\s+/g,` `).trim()??``;return t?t.length<=96?t:`${t.slice(0,93).trimEnd()}…`:`New conversation`}async function bw(e,t={}){let n=await fetch(new URL(e,document.baseURI),{headers:{"content-type":`application/json`,...t.headers},...t}),r=await xw(n);if(!n.ok)throw Error(r.error||n.statusText||`request to ${e} failed`);return r}async function xw(e){let t=await e.text();if(!t)return{};try{return JSON.parse(t)}catch{throw Error(`server returned an invalid JSON response`)}}async function Sw(){return bw(`api/bootstrap`)}async function Cw(e){return bw(`api/diff${e?`?path=${encodeURIComponent(e)}`:``}`)}async function ww(e){return bw(`api/state`,{method:`POST`,body:JSON.stringify(e)})}async function Tw(e){return bw(`api/thread`,{method:`POST`,body:JSON.stringify(e)})}async function Ew(e){return bw(`api/thread/reply`,{method:`POST`,body:JSON.stringify(e)})}async function Dw(e){return bw(`api/thread-message`,{method:`POST`,body:JSON.stringify({id:e})})}async function Ow(e){return bw(`api/thread-message/delete`,{method:`POST`,body:JSON.stringify(e)})}async function kw(e){return bw(`api/thread/resolve`,{method:`POST`,body:JSON.stringify(e)})}async function Aw(e){return bw(`api/thread/collapse`,{method:`POST`,body:JSON.stringify(e)})}async function jw(){return bw(`api/guide/generate`,{method:`POST`})}async function Mw(e){return bw(`api/guide/operate`,{method:`POST`,body:JSON.stringify(e)})}async function Nw(e){return bw(`api/guide/comment`,{method:`POST`,body:JSON.stringify(e)})}async function Pw(){return bw(`api/review`)}async function Fw(e){return bw(`api/review`,{method:`POST`,body:JSON.stringify(e)})}async function Iw(){return bw(`api/cancel`,{method:`POST`})}function Lw({bootstrap:e,reviewState:t,setGuideLoading:n,syncReviewState:r}){let i=(0,b.useRef)(!1),a=(0,b.useRef)(0),[o,s]=(0,b.useState)([]),[c,l]=(0,b.useState)([]),u=(0,b.useCallback)(()=>{n(!0),r(jw(),{onError:()=>{i.current=!1,n(!1)}})},[n,r]),d=(0,b.useCallback)(e=>{let t=`guide-operation-${a.current++}`;e.kind===`topic.add`?s(e=>[...e,{id:t,kind:`add`}]):e.kind===`topic.revise`?s(n=>[...n,{id:t,kind:`revise`,topicId:e.topicId}]):e.kind===`question.ask`&&l(n=>[...n,{id:t,question:e.question}]),n(!0),r(Mw(e),{onError:()=>{n(!1)}}).finally(()=>{e.kind===`topic.add`||e.kind===`topic.revise`?s(e=>e.filter(e=>e.id!==t)):e.kind===`question.ask`&&l(e=>e.filter(e=>e.id!==t))})},[n,r]),f=(0,b.useCallback)((e,t)=>{r(Nw({target:e,body:t}))},[r]);return(0,b.useEffect)(()=>{!e||t.guide.orientation||i.current||(i.current=!0,u())},[e,u,t.guide.orientation]),{pendingTopics:o,pendingQuestions:c,requestGuide:u,runGuideOperation:d,saveComment:f}}function Rw(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var zw=Rw(`https://base-ui.com/production-error`,`Base UI`),Bw=b.createContext(void 0);function Vw(e){let t=b.useContext(Bw);if(!e&&t===void 0)throw Error(zw(27));return t}var Hw={};function Uw(e,t){let n=b.useRef(Hw);return n.current===Hw&&(n.current=e(t)),n}function Ww(e,t,n,r){let i=Uw(Kw).current;return qw(i,e,t,n,r)&&Yw(i,[e,t,n,r]),i.callback}function Gw(e){let t=Uw(Kw).current;return Jw(t,e)&&Yw(t,e),t.callback}function Kw(){return{callback:null,cleanup:null,refs:[]}}function qw(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Jw(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Yw(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var Xw=19;function Zw(e){return Xw>=e}function Qw(e){if(!b.isValidElement(e))return null;let t=e,n=t.props;return(Zw(19)?n?.ref:t.ref)??null}function $w(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function eT(){}var tT=Object.freeze([]),nT=Object.freeze({});function rT(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function iT(e,t){return typeof e==`function`?e(t):e}function aT(e,t){return typeof e==`function`?e(t):e}var oT={};function sT(e,t,n,r,i){if(!n&&!r&&!i&&!e)return lT(t);let a=lT(e);return t&&(a=uT(a,t)),n&&(a=uT(a,n)),r&&(a=uT(a,r)),i&&(a=uT(a,i)),a}function cT(e){if(e.length===0)return oT;if(e.length===1)return lT(e[0]);let t=lT(e[0]);for(let n=1;n<e.length;n+=1)t=uT(t,e[n]);return t}function lT(e){return mT(e)?{...e(oT)}:dT(e)}function uT(e,t){return mT(t)?t(e):fT(e,t)}function dT(e){let t={...e};for(let e in t){let n=t[e];pT(e,n)&&(t[e]=gT(n))}return t}function fT(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=$w(e.style,r);break;case`className`:e[n]=vT(e.className,r);break;default:e[n]=pT(n,r)?hT(e[n],r):r}}return e}function pT(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function mT(e){return typeof e==`function`}function hT(e,t){return t?e?(...n)=>{let r=n[0];if(yT(r)){let i=r;_T(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:gT(t):e}function gT(e){return e&&((...t)=>{let n=t[0];return yT(n)&&_T(n),e(...t)})}function _T(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function vT(e,t){return t?e?t+` `+e:t:e}function yT(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function bT(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=wT(r));let i=xT(t,n,r);if(n.enabled===!1)return null;let a=n.state??nT;return TT(e,r,i,a)}function xT(e,t,n){let{className:r,style:i}=e,{state:a=nT,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?iT(r,a):void 0,d=l?aT(i,a):void 0,f=l?rT(a,c):nT,p=l&&s?ST(s):void 0,m=l?$w(f,p)??{}:nT;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Gw([m.ref,Qw(n),...o]):Ww(m.ref,Qw(n),o):Ww(null,null)),l?(u!==void 0&&(m.className=vT(m.className,u)),d!==void 0&&(m.style=$w(m.style,d)),m):nT}function ST(e){return Array.isArray(e)?cT(e):sT(void 0,e)}var CT=Symbol.for(`react.lazy`);function wT(e){if(e?.$$typeof!==CT)return e;let t=b.Children.toArray(e)[0];return b.isValidElement(t)?t:e}function TT(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=sT(n,t.props);return e.ref=n.ref,b.cloneElement(t,e)}return ET(e,n)}function ET(e,t){return e===`button`?(0,b.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,b.createElement)(`img`,{alt:``,...t,key:t.key}):b.createElement(e,t)}var DT=`data-starting-style`,OT=`data-ending-style`,kT={[DT]:``},AT={[OT]:``},jT={transitionStatus(e){return e===`starting`?kT:e===`ending`?AT:null}},MT=`data-open`,NT=`data-closed`,PT=`data-anchor-hidden`,FT={[MT]:``},IT={[NT]:``},LT={[PT]:``},RT={open(e){return e?FT:IT},anchorHidden(e){return e?LT:null}},zT={...RT,...jT},BT=b.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Vw(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return bT(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:zT,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})});function VT(){return typeof window<`u`}function HT(e){return GT(e)?(e.nodeName||``).toLowerCase():`#document`}function UT(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function WT(e){return((GT(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function GT(e){return VT()?e instanceof Node||e instanceof UT(e).Node:!1}function KT(e){return VT()?e instanceof Element||e instanceof UT(e).Element:!1}function qT(e){return VT()?e instanceof HTMLElement||e instanceof UT(e).HTMLElement:!1}function JT(e){return!VT()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof UT(e).ShadowRoot}function YT(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ZT(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function XT(e){return/^(html|body|#document)$/.test(HT(e))}function ZT(e){return UT(e).getComputedStyle(e)}function QT(e){if(HT(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||JT(e)&&e.host||WT(e);return JT(t)?t.host:t}var $T={...b},eE=$T.useInsertionEffect,tE=eE&&eE!==$T.useLayoutEffect?eE:e=>e();function nE(e){let t=Uw(rE).current;return t.next=e,tE(t.effect),t.trampoline}function rE(){let e={next:void 0,callback:iE,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function iE(){}var aE=typeof document<`u`?b.useLayoutEffect:()=>{};function oE(e){return e?.ownerDocument||document}function sE(e,t,n,r){let i=!1,a=!1,o=r??nT;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var cE=`none`,lE=`trigger-press`,uE=`outside-press`,dE=`focus-out`,fE=`escape-key`,pE=`imperative-action`;function mE(){let[,e]=b.useState({});return b.useCallback(()=>{e({})},[])}var hE=0;function gE(e,t=`mui`){let n=b.useRef(void 0),r=mE(),i=e??n.current;return b.useEffect(()=>{n.current??(hE+=1,n.current=`${t}-${hE}`,e??r())},[e,t,r]),i}var _E=$T.useId;function vE(e,t){if(_E!==void 0){let n=_E();return e??(t?`${t}-${n}`:n)}return gE(e,t)}function yE(e){return vE(e,`base-ui`)}var bE=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Vw(),c=yE(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),bT(`p`,e,{ref:t,props:[{id:c},o]})});function xE(e){b.useEffect(e,tT)}var SE=0,CE=class e{static create(){return new e}currentId=SE;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=SE,t()},e)}isStarted(){return this.currentId!==SE}clear=()=>{this.currentId!==SE&&(clearTimeout(this.currentId),this.currentId=SE)};disposeEffect=()=>this.clear};function wE(){let e=Uw(CE.create).current;return xE(e.disposeEffect),e}function TE(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:EE,platform:DE,maxTouchPoints:OE}=TE(),kE=EE.toLowerCase(),AE=DE.toLowerCase(),jE=/^i(os$|p)/.test(AE)||AE===`macintel`&&OE>1,ME=`android`,NE=AE===ME||kE.includes(ME),PE=!jE&&AE.startsWith(`mac`);AE.startsWith(`win`),!NE&&/^(linux|chrome os)/.test(AE);var FE=PE||jE,IE=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!IE&&kE.includes(`firefox`),!IE&&kE.includes(`chrom`);var LE=FE,RE=/jsdom|happydom/.test(kE);function zE(e){e.preventDefault(),e.stopPropagation()}function BE(e){return`nativeEvent`in e}function VE(e){return e.pointerType===``&&e.isTrusted?!0:NE&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function HE(e){return RE?!1:!NE&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(NE||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function UE(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function WE(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function GE(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&JT(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function KE(e,t){let n=e;for(;n;){if(KT(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(JT(n)?n.host:null)}return null}function qE(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var JE=`data-base-ui-focusable`;function YE(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function XE(e){return e.matches(`html,body`)}function ZE(e){return qT(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function QE(e){return e?e.getAttribute(`role`)===`combobox`&&ZE(e):!1}function $E(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function eD(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function tD(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function nD(e){let t=Uw(rD,e).current;return t.next=e,aE(t.effect),t}function rD(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var iD=null;globalThis.requestAnimationFrame;var aD=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},oD=class e{static create(){return new e}static request(e){return aD.request(e)}static cancel(e){return aD.cancel(e)}currentId=iD;request(e){this.cancel(),this.currentId=aD.request(()=>{this.currentId=iD,e()})}cancel=()=>{this.currentId!==iD&&(aD.cancel(this.currentId),this.currentId=iD)};disposeEffect=()=>this.cancel};function sD(){let e=Uw(oD.create).current;return xE(e.disposeEffect),e}var cD={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},lD={...cD,position:`fixed`,margin:0,top:0,left:0};({...cD});var uD=b.forwardRef(function(e,t){let[n,r]=b.useState();aE(()=>{LE&&IE&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,A.jsx)(`span`,{...e,ref:t,style:lD,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function dD(e){return e.visibility===`hidden`||e.visibility===`collapse`}function fD(e,t=e?ZT(e):null){return!e||!e.isConnected||!t||dD(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var pD=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function mD(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return JT(n)?n.host:null}function hD(e){for(let t of Array.from(e.children))if(HT(t)===`summary`)return t;return null}function gD(e,t){let n=hD(t);return!!n&&(e===n||GE(n,e))}function _D(e){let t=e?HT(e):``;return e!=null&&e.matches(pD)&&(t!==`summary`||e.parentElement!=null&&HT(e.parentElement)===`details`&&hD(e.parentElement)===e)&&(t!==`details`||hD(e)==null)&&(t!==`input`||e.type!==`hidden`)}function vD(e){if(!_D(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=mD(t)){let n=t!==e,r=HT(t)===`slot`;if(t.hasAttribute(`inert`)||n&&HT(t)===`details`&&!t.open&&!gD(e,t)||t.hasAttribute(`hidden`)||!r&&!yD(t,n))return!1}return!0}function yD(e,t){let n=ZT(e);return t?n.display!==`none`:fD(e,n)}function bD(e){let t=e.tabIndex;if(t<0){let t=HT(e);if(t===`details`||t===`audio`||t===`video`||qT(e)&&e.isContentEditable)return 0}return t}function xD(e){if(HT(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function SD(e,t){let n=xD(e);if(!n)return!0;let r=t.find(e=>{let t=xD(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=xD(e);return t?.name===n.name&&t.form===n.form})===n}function CD(e){if(qT(e)&&HT(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return qT(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function wD(e,t){CD(e).forEach(e=>{_D(e)&&t.push(e),wD(e,t)})}function TD(e,t,n){CD(e).forEach(e=>{qT(e)&&e.matches(t)&&n.push(e),TD(e,t,n)})}function ED(e){return vD(e)&&bD(e)>=0}function DD(e){let t=[];return wD(e,t),t.filter(vD)}function OD(e){let t=DD(e);return t.filter(e=>bD(e)>=0&&SD(e,t))}function kD(e,t){let n=OD(e),r=n.length;if(r===0)return;let i=WE(oE(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function AD(e){return kD(oE(e).body,1)||e}function jD(e){return kD(oE(e).body,-1)||e}function MD(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!GE(n,r)}function ND(e){OD(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function PD(e){let t=[];TD(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function FD(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...FD(e,t.id,n)])}function ID(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function LD(e){return`data-base-ui-${e}`}var RD=0;function zD(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(RD);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),eT;let o=requestAnimationFrame(a);return RD=o,()=>{RD===o&&(cancelAnimationFrame(o),RD=0)}}var BD=`data-base-ui-inert`,VD=new WeakMap,HD=new WeakSet,UD=new WeakMap,WD=0;function GD(e){return e?JT(e)?e.host:GD(e.parentNode):null}var KD=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=GD(t);return e.contains(n)?n:null}).filter(e=>e!=null),qD=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},JD=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{HT(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function YD(e,t,n,{mark:r=!0}){let i=KD(t,e),a=r?JD(t,qD(i),new Set(i)):[],o=[],s=[];if(n){let e=KD(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);JD(t,qD(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(VD.get(e)||0)+1;VD.set(e,r),o.push(e),r===1&&n&&HD.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(UD.get(e)||0)+1;UD.set(e,t),s.push(e),t===1&&e.setAttribute(BD,``)}),WD+=1,()=>{o.forEach(e=>{let t=(VD.get(e)||0)-1;VD.set(e,t),t||(HD.has(e)||e.removeAttribute(`aria-hidden`),HD.delete(e))}),r&&s.forEach(e=>{let t=(UD.get(e)||0)-1;UD.set(e,t),t||e.removeAttribute(BD)}),--WD,WD||(VD=new WeakMap,HD=new WeakSet,UD=new WeakMap)}}function XD(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=oE(e[0]).body;return YD(e,i,n,{mark:r})}var ZD={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},QD=t(_(),1),$D=b.createContext(null),eO=()=>b.useContext($D),tO=LD(`portal`);function nO(e={}){let{ref:t,container:n,componentProps:r=nT,elementProps:i}=e,a=vE(),o=eO()?.portalNode,[s,c]=b.useState(null),[l,u]=b.useState(null),d=nE(e=>{e!==null&&u(e)}),f=b.useRef(null);aE(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(GT(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=bT(`div`,r,{ref:[t,d],props:[{id:a,[tO]:``},i]}),m=s&&p?QD.createPortal(p,s):null;return{node:l,nodeId:b.isValidElement(p)?p.props.id:void 0,subtree:m}}var rO=b.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=nO({container:o,ref:t,componentProps:e,elementProps:c}),f=b.useRef(null),p=b.useRef(null),m=b.useRef(null),h=b.useRef(null),[g,_]=b.useState(null),v=b.useRef(!1),y=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!l;b.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&MD(e)&&(e.type===`focusin`?v.current&&=(PD(l),!1):(ND(l),v.current=!0))}return tD(eD(l,`focusin`,e,!0),eD(l,`focusout`,e,!0))},[l,y]),aE(()=>{l&&x===!0&&v.current&&(PD(l),v.current=!1)},[x,l]);let C=b.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,A.jsxs)(b.Fragment,{children:[d,(0,A.jsxs)($D.Provider,{value:C,children:[S&&l&&(0,A.jsx)(uD,{"data-type":`outside`,ref:f,onFocus:e=>{MD(e,l)?m.current?.focus():jD(g?g.domReference:null)?.focus()}}),S&&l&&(0,A.jsx)(`span`,{role:s,"aria-owns":u,style:ZD}),l&&QD.createPortal(a,l),S&&l&&(0,A.jsx)(uD,{"data-type":`outside`,ref:p,onFocus:e=>{MD(e,l)?h.current?.focus():(AD(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,sE(`focus-out`,e.nativeEvent)))}})]})]})});function iO(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var aO=b.createContext(null),oO=b.createContext(null),sO=()=>b.useContext(aO)?.id||null,cO=e=>{let t=b.useContext(oO);return e??t};function lO(e){return e==null?e:`current`in e?e.current:e}function uO(e,t){let n=UT(qE(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(VE(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var dO=20,fO=[];function pO(){fO=fO.filter(e=>e.deref()?.isConnected)}function mO(e){pO(),e&&HT(e)!==`body`&&(fO.push(new WeakRef(e)),fO.length>dO&&(fO=fO.slice(-20)))}function hO(){return pO(),fO[fO.length-1]?.deref()}function gO(e){return e?ED(e)?e:OD(e)[0]||e:null}function _O(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=DD(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return ED(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function vO(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:x}=t.context,S=nE(()=>x.current.floatingContext?.nodeId),C=i===!1,w=QE(_)&&C,T=nD(i),E=nD(a),D=nD(o),O=nD(u),k=nD(g),j=cO(m),M=eO(),N=b.useRef(!1),P=b.useRef(!1),F=b.useRef(!1),ee=b.useRef(null),te=b.useRef(``),ne=b.useRef(``),re=b.useRef(null),ie=b.useRef(null),ae=Ww(re,p,M?.beforeInsideRef),oe=Ww(ie,M?.afterInsideRef),se=wE(),ce=wE(),le=sD(),ue=M!=null,I=$E(v),de=nE((e=I)=>e?OD(e):[]),fe=nE(()=>h?.().filter(e=>e!=null)??[]);b.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&GE(I,WE(oE(I)))&&de().length===0&&!w&&zE(e)}return eD(oE(I),`keydown`,e)},[r,I,c,w,de]),b.useEffect(()=>{if(r||!g)return;let e=oE(I);function t(){F.current=!1}function n(e){let t=qE(e),n=fe(),r=GE(v,t)||GE(_,t)||GE(M?.portalNode,t)||n.some(e=>e===t||GE(e,t));F.current=!r,ne.current=e.pointerType||`keyboard`,KE(t,`[data-base-ui-click-trigger]`)&&(P.current=!0,ce.start(0,()=>{P.current=!1}))}function i(){ne.current=`keyboard`}return tD(eD(e,`pointerdown`,n,!0),eD(e,`pointerup`,t,!0),eD(e,`pointercancel`,t,!0),eD(e,`keydown`,i,!0),t)},[r,v,_,I,g,M,ce,fe]),b.useEffect(()=>{if(r||!l)return;let e=oE(I);function n(){P.current=!0,ce.start(0,()=>{P.current=!1})}function i(e){let t=qE(e);ED(t)&&(ee.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=qE(n);c&&r==null&&a!=null&&GE(v,a)&&mO(a),queueMicrotask(()=>{let o=S(),l=t.context.triggerElements,u=fe(),p=r?.hasAttribute(LD(`focus-guard`))&&[re.current,ie.current,M?.beforeInsideRef.current,M?.afterInsideRef.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,lO(f),lO(d)].includes(r),m=!(GE(_,r)||GE(v,r)||GE(r,v)||GE(M?.portalNode,r)||u.some(e=>e===r||GE(e,r))||l.hasMatchingElement(e=>GE(e,r))||p||j&&(FD(j.nodesRef.current,o).find(e=>GE(e.context?.elements.floating,r)||GE(e.context?.elements.domReference,r))||ID(j.nodesRef.current,o).find(e=>[e.context?.elements.floating,$E(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&I&&_O(I),s&&i!==_&&!fD(a)&&WE(e)===e.body){if(qT(I)&&(I.focus(),s===`popup`)){le.request(()=>{I.focus()});return}let e=de(),t=ee.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||I;qT(n)&&n.focus()}x.current.insideReactTree?x.current.insideReactTree=!1:(w||!c)&&r&&m&&!P.current&&(w||r!==hO())&&(N.current=!0,t.setOpen(!1,sE(dE,n)))})}function o(){F.current||(x.current.insideReactTree=!0,se.start(0,()=>{x.current.insideReactTree=!1}))}let u=qT(_)?_:null;if(v||u)return tD(u&&eD(u,`focusout`,a),u&&eD(u,`pointerdown`,n),v&&eD(v,`focusin`,i),v&&eD(v,`focusout`,a),v&&M&&eD(v,`focusout`,o,!0))},[r,_,v,I,c,j,M,t,l,s,de,w,S,x,se,ce,le,d,f,fe]),b.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(M?.portalNode?.querySelectorAll(`[${LD(`portal`)}]`)||[]),t=(j?ID(j.nodesRef.current,S()):[]).find(e=>QE(e.context?.elements.domReference||null))?.context?.elements.domReference,n=XD([v,...e,re.current,ie.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,...fe(),t,lO(f),lO(d),w?_:null].filter(e=>e!=null),{ariaHidden:c||w,mark:!1}),i=XD([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,M,w,j,S,d,f,fe]),aE(()=>{if(!g||r||!qT(I))return;te.current=``,ne.current=``;let e=oE(I),t=WE(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1||GE(I,t))return;let i=null,a=()=>(i??=de(I),i[0]||I),o;o=r===!0||r===null?a():lO(r),o||=a();let s=GE(I,WE(e)),c=x.current.openEvent,l=c?.type===`mousedown`&&VE(c);zD(o,{sync:l,preventScroll:o===I,shouldFocus(){if(!k.current)return!1;if(s)return!0;let t=WE(e);return!(t!==o&&GE(I,t))}})})},[r,g,I,de,T,O,k,x]);let pe=b.useRef(null);aE(()=>{if(r||!I){pe.current=null;return}pe.current&&=(pe.current.cancelled=!0,null);let e=oE(I),t=WE(e),n=O.current==null;mO(t);function i(e){if(e.open||(te.current=uO(e.nativeEvent,ne.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(LD(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(N.current=!0),e.reason===`outside-press`){if(e.nested)N.current=!1;else if(VE(e.nativeEvent)||HE(e.nativeEvent))N.current=!1;else{let e=!1;oE(I).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?N.current=!1:N.current=!0}}}y.on(`openchange`,i);function a(e){let r=E.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&HT(t)!==`body`?t:null,s=n?o||a:a||o;return s||=hO()||null,typeof i==`boolean`?s:lO(i)||s||null}return()=>{y.off(`openchange`,i);let t=WE(e),n=fe(),r=GE(v,t)||n.some(e=>e===t||GE(e,t))||j&&FD(j.nodesRef.current,S(),!1).some(e=>GE(e.context?.elements.floating,t)),o=E.current,s=te.current,c=a(s),l={cancelled:!1};pe.current=l,queueMicrotask(()=>{pe.current===l&&(pe.current=null);let n=gO(c),i=D.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!N.current&&qT(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}N.current=!1})}},[r,v,I,E,D,O,y,j,_,S,fe]),aE(()=>{if(!IE||g||!v)return;let e=WE(oE(v));qT(e)&&ZE(e)&&GE(v,e)&&e.blur()},[g,v]),aE(()=>{if(!r&&M)return M.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{M.setFocusManagerState(null)}},[r,M,c,g,t,l,_]),aE(()=>{if(!r&&I)return _O(I),()=>{queueMicrotask(pO)}},[r,I]);let L=!r&&(!c||!w)&&(ue||c);return(0,A.jsxs)(b.Fragment,{children:[L&&(0,A.jsx)(uD,{"data-type":`inside`,ref:ae,onFocus:e=>{if(c){let e=de();zD(e[e.length-1])}else M?.portalNode&&(N.current=!1,MD(e,M.portalNode)?AD(_)?.focus():lO(f??M.beforeOutsideRef)?.focus())}}),n,L&&(0,A.jsx)(uD,{"data-type":`inside`,ref:oe,onFocus:e=>{c?zD(de()[0]):M?.portalNode&&(l&&(N.current=!0),MD(e,M.portalNode)?jD(_)?.focus():lO(d??M.afterOutsideRef)?.focus())}})]})}function yO(){return!1}function bO(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function xO(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=yO,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=cO(c),m=nE(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=nE(()=>a),{escapeKey:v,outsidePress:y}=bO(s),x=b.useRef(!1),S=b.useRef(!1),C=b.useRef(!1),w=b.useRef(!1),T=b.useRef(!1),E=b.useRef(``),D=b.useRef(null),O=wE(),k=wE(),A=wE(),j=nE(()=>{k.clear(),d.current.insideReactTree=!1}),M=nE(e=>{let t=d.current.floatingContext?.nodeId;return(p?FD(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=nE(t=>YE(t,e.select(`floatingElement`))||YE(t,e.select(`domReferenceElement`))),P=nE(t=>{o()&&e.setOpen(!1,sE(lE,t.nativeEvent))}),F=nE(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=BE(t)?t.nativeEvent:t;if(T.current||i.isComposing||!v&&M(`__escapeKeyBubbles`))return;let a=sE(fE,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),ee=nE(()=>{d.current.insideReactTree=!0,k.start(0,j)}),te=nE(t=>{if(!l||!n||t.button!==0)return;let r=qE(t.nativeEvent);GE(e.select(`floatingElement`),r)&&(x.current||(x.current=!0,S.current=!1))}),ne=nE(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});b.useEffect(()=>{function e(e){e.open||(w.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),b.useEffect(()=>j,[j]),b.useEffect(()=>{if(!l||!n)return l||(w.current=!1,T.current=!1,E.current=``,D.current=null),j;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new CE,i=oE(u);function a(){A.clear(),T.current=!0}function o(){T.current=!0,A.start(IE?5:0,()=>{T.current=!1})}function s(){C.current=!0,t.start(0,()=>{C.current=!1})}function c(){x.current=!1,S.current=!1}function f(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function b(e){let t=d.current.floatingContext?.nodeId,n=p&&FD(p.nodesRef.current,t).some(t=>YE(e,t.context?.elements.floating));return N(e)||n}function k(n){if(m(n)){n.type!==`click`&&!N(n)&&(t.clear(),C.current=!1),j();return}if(d.current.insideReactTree){j();return}let r=qE(n),i=`[${LD(`inert`)}]`,a=KT(r)?r.getRootNode():null,o=Array.from((JT(a)?a:oE(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>GE(e,r))))return;let c=KT(r)?r:null;for(;c&&!XT(c);){let e=QT(c);if(XT(e)||!KT(e))break;c=e}if(!(o.length&&KT(r)&&!XE(r)&&!GE(r,e.select(`floatingElement`))&&o.every(e=>!GE(c,e)))){if(qT(r)&&!(`touches`in n)){let e=XT(r),t=ZT(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!b(n)){if(f()===`intentional`){if(n.detail!==0&&!VE(n)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}typeof h==`function`&&!h(n)||M(`__outsidePressBubbles`)||(e.setOpen(!1,sE(uE,n)),j())}}}function P(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!N(t)&&k(t)}function ee(t){if(f()!==`sloppy`||!e.select(`open`)||!n||N(t))return;let r=t.touches[0];r&&(D.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function te(e,t){let n=qE(e);if(!n)return;let r=eD(n,e.type,()=>{t(e),r()})}function ne(e){E.current=`touch`,te(e,ee)}function re(e){O.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),(e.type!==`mousedown`||!D.current||D.current.dismissOnMouseDown)&&te(e,e=>{e.type===`pointerdown`?P(e):k(e)})}function ie(e){if(e.type===`pointercancel`&&(w.current=!1),!x.current)return;let n=S.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():b(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),C.current=!0,j())))}function ae(e){if(f()!==`sloppy`||!D.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(k(e),O.clear(),D.current=null)}function oe(e){te(e,ae)}function se(e){f()===`sloppy`&&D.current&&!N(e)&&(D.current.dismissOnTouchEnd&&k(e),O.clear(),D.current=null)}function ce(e){te(e,se)}let le=tD(r&&tD(eD(i,`keydown`,F),eD(i,`compositionstart`,a),eD(i,`compositionend`,o)),g&&tD(eD(i,`click`,re,!0),eD(i,`pointerdown`,re,!0),eD(i,`pointerup`,ie,!0),eD(i,`pointercancel`,ie,!0),eD(i,`mousedown`,re,!0),eD(i,`mouseup`,ie,!0),eD(i,`touchstart`,ne,{capture:!0,passive:!0}),eD(i,`touchmove`,oe,{capture:!0,passive:!0}),eD(i,`touchend`,ce,{capture:!0,passive:!0})));return()=>{le(),t.clear(),c(),C.current=!1}},[d,u,r,g,h,l,n,v,y,F,j,_,M,N,p,e,O,A]);let re=b.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),ie=b.useMemo(()=>({onKeyDown:F,onPointerDown:ne,onMouseDown:ne,onClickCapture:ee,onMouseDownCapture(e){ee(),te(e)},onPointerDownCapture(e){ee(),te(e)},onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[F,ee,te,ne]);return b.useMemo(()=>n?{reference:re,floating:ie,trigger:re}:{},[n,re,ie])}function SO(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),aE(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};KT(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function CO(e,t=!1,n=!1,r=!1){let[i,a]=b.useState(e&&t?`idle`:void 0),[o,s]=b.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),aE(()=>{if(!e&&o&&i!==`ending`&&n){let e=oD.request(()=>{a(`ending`)});return()=>{oD.cancel(e)}}},[e,o,i,n]),aE(()=>{if(!e||t||i===void 0)return;let n=oD.request(()=>{a(void 0)});return()=>{oD.cancel(n)}},[t,e,i]),aE(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=oD.request(()=>{a(`idle`)});return()=>{oD.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function wO(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var TO=null;function EO(e){if(!TO){let e=[];TO=e,queueMicrotask(()=>{TO=null,QD.flushSync(()=>{for(let t of e)t()})})}TO.push(e)}function DO(e,t=!1,n=!1){let r=sD();return nE((i,a=null)=>{r.cancel();let o=lO(e);if(o==null)return;let s=o,c=()=>{n?EO(()=>{a?.aborted||i()}):QD.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(wO(s).map(e=>e.finished.then(eT))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(wO(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=DT;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function OO(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=nE(a),s=DO(r,n,i);b.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function kO(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=nE(i),{mounted:c,setMounted:l,transitionStatus:u}=CO(t,!1,!1,o),d=!t&&r;aE(()=>{t&&s(!1)},[t,s]);let f=b.useRef(c),p=b.useRef(!1),m=mE(),h=()=>{f.current=!1,l(!1),a()};aE(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=nE(()=>{f.current&&(t?(p.current=!0,m()):h())});return OO({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var AO={tabIndex:-1,[JE]:``};function jO(e){return t=>t!==`touch`||e.current}function MO(e,t=!1){let n=vE(),r=sO()!=null,i=Uw(()=>e(n,r)).current;return SO({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function NO({handle:e,store:t}){return aE(()=>e.attachStore(t),[e,t]),null}function PO(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function FO(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=b.useRef(null),i=e.useState(`open`);aE(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=sE(cE);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function IO(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=kO({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return Uw(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function LO(e,t){e.useSyncedValues(t),aE(()=>()=>{e.update({activeTriggerProps:nT,inactiveTriggerProps:nT,popupProps:nT})},[e])}function RO(e,t){aE(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),aE(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var zO=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},BO=n((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),VO=n(((e,t)=>{t.exports=BO()})),HO=n((e=>{var t=p(),n=VO();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),UO=n(((e,t)=>{t.exports=HO()})),WO=[],GO=void 0;function KO(){return GO}function qO(e){WO.push(e)}function JO(e){let t=(t,n)=>{let r=Uw(YO).current,i;try{GO=r;for(let e of WO)e.before(r);i=e(t,n);for(let e of WO)e.after(r);r.didInitialize=!0}finally{GO=void 0}return i};return t.displayName=e.displayName||e.name,t}function YO(){return{didInitialize:!1}}var XO=VO(),ZO=UO(),QO=Zw(19)?tk:nk;function $O(e,t,n,r,i){return QO(e,t,n,r,i)}function ek(e,t,n,r,i){let a=b.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,XO.useSyncExternalStore)(e.subscribe,a,a)}qO({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,XO.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function tk(e,t,n,r,i){let a=KO();if(!a)return ek(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function nk(e,t,n,r,i){return(0,ZO.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var rk=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return $O(this,e,t,n,r)}},ik=class extends rk{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e);let n=this;aE(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;aE(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;aE(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=this,r=t!==void 0;aE(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return b.useDebugValue(e),$O(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=nE(t??eT);this.context[e]=n}useStateSetter(e){let t=b.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},ak={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},ok=class extends ik{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:iO(),nested:n,triggerElements:i},ak),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&UE(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function sk(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new ok({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:nT,inactiveTriggerProps:nT,popupProps:nT}}var ck=e=>e.triggerIdProp??e.activeTriggerId,lk=e=>e.openProp??e.open,uk=e=>(e.popupElement?.id??e.floatingId)||void 0;function dk(e,t){return t!==void 0&&lk(e)&&ck(e)===t}function fk(e,t){return dk(e,t)?!0:t!==void 0&&lk(e)&&ck(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var pk={open:lk,mounted:e=>e.mounted,transitionStatus:e=>lk(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:ck,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:uk,isTriggerActive:(e,t)=>t!==void 0&&ck(e)===t,isOpenedByTrigger:(e,t)=>dk(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&ck(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>fk(e,t)?uk(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement},mk=b.createContext(void 0);function hk(){let e=b.useContext(mk);if(e===void 0)throw Error(zw(26));return e}var gk=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),_k=`--nested-dialogs`,vk=`data-nested-dialog-open`,yk={...RT,...jT,nestedDialogOpen(e){return e?{[vk]:``}:null}},bk=b.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Vw(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);hk(),OO({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?jO(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=bT(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...AO,hidden:!m,onKeyDown(e){gk.has(e.key)&&e.stopPropagation()},style:{[_k]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:yk});return(0,A.jsx)(vO,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})});function xk(e){return Zw(19)?e:e?`true`:void 0}var Sk=b.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,A.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Ck=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Vw(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,A.jsx)(mk.Provider,{value:n,children:(0,A.jsxs)(rO,{ref:t,...r,children:[a&&o===!0&&(0,A.jsx)(Sk,{ref:i.context.internalBackdropRef,inert:xk(!s)}),e.children]})}):null}),wk={},Tk={},Ek=``;function Dk(e,t){return YT(e)?e:t}function Ok(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Dk(t,n)).overflowY)}function kk(e){if(typeof document>`u`)return!1;let t=oE(e);return UT(t).innerWidth-t.documentElement.clientWidth>0}function Ak(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=oE(e),n=t.documentElement,r=t.body,i=Dk(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function jk(e){let t=oE(e),n=t.documentElement,r=t.body,i=Dk(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Mk(e){let t=oE(e),n=t.documentElement,r=t.body,i=UT(n),a=0,o=0,s=!1,c=oD.create();if(IE&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,wk={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Ek=n.style.scrollBehavior,Tk={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Dk(n,r);s=Ak(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,wk),Object.assign(r.style,Tk),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Ek)}function d(){u(),c.request(l)}l();let f=eD(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Nk=new class{lockCount=0;restore=null;timeoutLock=CE.create();timeoutUnlock=CE.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=oE(e),n=t.documentElement,r=t.body,i=UT(n);if(Ok(i,n,r)){let t=new i.MutationObserver(()=>{Ok(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=jE||!kk(e);this.restore=a?jk(e):Mk(e)}};function Pk(e=!0,t=null){aE(()=>{if(e)return Nk.acquire(t)},[e,t])}function Fk({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=b.useState(0),[d,f]=b.useState(0),p=l===0,m=xO(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=qE(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||GE(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return Pk(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),aE(()=>{!r&&!i&&(u(0),f(0))},[r,i]),aE(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),LO(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Ik={...pk,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Lk=class extends ik{constructor(e,t,n){let r=new zO,i=Rk(e,r,t,n);super(i,zk(r),Ik)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(PO(this.state,e,t.trigger)))}};function Rk(e,t,n,r=!1){return{...sk(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function zk(e){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Bk(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Vw(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},x=MO((e,t)=>new Lk({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);x.useControlledProp(`openProp`,r),x.useControlledProp(`triggerIdProp`,d),x.useSyncedValues(y),x.useContextCallback(`onOpenChange`,a),x.useContextCallback(`onOpenChangeComplete`,o);let S=x.useState(`open`),C=x.useState(`mounted`),w=x.useState(`payload`);RO(x,S),FO(x);let{forceUnmount:T}=IO(S,x);b.useImperativeHandle(l,()=>({unmount:T,close:()=>x.setOpen(!1,sE(pE))}),[T,x]);let E=S||C||u!=null;return(0,A.jsxs)(Bw.Provider,{value:x,children:[u&&(0,A.jsx)(NO,{handle:u,store:x}),E&&(0,A.jsx)(Fk,{store:x,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:w}):n]})}var Vk=JO(function(e){return Bk(`dialog`,e)}),Hk=b.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=hk(),c=Vw(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`),m=c.useStateSetter(`viewportElement`);return bT(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,m],stateAttributesMapping:yk,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:a},o]})}),Uk=b.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Vw(),c=yE(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),bT(`h2`,e,{ref:t,props:[{id:c},o]})});function Wk({previewOpen:e,preview:t,loadingPreview:n,excludingItem:r,copied:i,error:a,finished:o,closePreview:s,exclude:c,copy:l,submit:u}){let d=t?.submission.outcome===`commented`?t.submission.review:null,f=o||r!==null;return(0,A.jsx)(Vk,{open:e,onOpenChange:e=>{e||s()},children:(0,A.jsxs)(Ck,{children:[(0,A.jsx)(BT,{className:`review-submission-backdrop`}),(0,A.jsx)(Hk,{className:`review-submission-viewport`,children:(0,A.jsxs)(bk,{className:`review-submission-dialog`,children:[(0,A.jsxs)(`header`,{className:`review-submission-header`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(Uk,{className:`review-submission-title`,children:`Submission preview`}),(0,A.jsx)(bE,{className:`review-submission-description`,children:`This is the exact Markdown that will be returned to Tau.`})]}),(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,"aria-label":`Close submission preview`,onClick:s,disabled:o,children:(0,A.jsx)(Pl,{size:16})})]}),(0,A.jsxs)(`div`,{className:`review-submission-body`,children:[n?(0,A.jsx)(`p`,{className:`review-submission-empty`,children:`Loading preview…`}):d===null?t?(0,A.jsxs)(`div`,{className:`review-submission-empty`,children:[(0,A.jsx)(`strong`,{children:`No comments to submit`}),(0,A.jsx)(`span`,{children:`Submitting will approve the reviewed changes.`})]}):null:(0,A.jsx)(`div`,{className:`review-submission-content`,children:(0,A.jsx)(kC,{content:d})}),t&&t.items.length>0?(0,A.jsxs)(`aside`,{className:`review-submission-items`,children:[(0,A.jsx)(`h3`,{children:`Included feedback`}),(0,A.jsx)(`div`,{className:`review-submission-item-list`,children:t.items.map(e=>(0,A.jsxs)(`div`,{className:`review-submission-item`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`span`,{className:`review-submission-item-kind`,children:e.kind===`thread`?`Review thread`:`Guide comment`}),(0,A.jsx)(`span`,{className:`review-submission-item-label`,children:e.label})]}),(0,A.jsx)(W,{variant:`ghost`,onClick:()=>void c(e),disabled:f,children:r===e?`Excluding…`:`Exclude`})]},e.kind===`thread`?`thread:${e.id}`:`guide-comment:${iw(e.target)}`))})]}):null]}),a?(0,A.jsx)(`p`,{className:`review-submission-error`,role:`alert`,children:a}):null,(0,A.jsxs)(`footer`,{className:`review-submission-footer`,children:[(0,A.jsx)(W,{onClick:s,disabled:o,children:`Back`}),(0,A.jsxs)(`div`,{className:`review-submission-footer-actions`,children:[(0,A.jsxs)(W,{onClick:()=>void l(),disabled:d===null||f,children:[i?(0,A.jsx)(ol,{size:14}):(0,A.jsx)(gl,{size:14}),i?`Copied`:`Copy`]}),(0,A.jsx)(W,{variant:`primary`,onClick:()=>void u(),disabled:!t||n||f,children:d===null?`Approve`:`Submit`})]})]})]})})]})})}var Gk=[{value:`guide`,label:`Guide`},{value:`diff`,label:`Diff`}],Kk=[{value:`split`,label:`Split`},{value:`stacked`,label:`Stacked`}],qk=14;function Jk({mode:e,fileCount:t,viewedCount:n,additions:r,deletions:i,commentCount:a,diffStyle:o,overflowMode:s,finished:c,hasReviewComments:l,hasUnresolvedFileThreads:u,onModeChange:d,onExpandAll:f,onExpandUnresolved:p,onCollapseViewed:m,onCollapseAll:h,onDiffStyleChange:g,onOverflowModeChange:_,onSubmit:v,onCancel:y}){let b=o===`split`?`split`:`stacked`,x=s===`scroll`?`scroll`:`wrap`,S=t>0?Math.round(n/t*100):0;return(0,A.jsxs)(`header`,{className:`top-bar`,children:[(0,A.jsx)(`div`,{className:`top-bar-left`,children:(0,A.jsx)(ow,{value:e,options:Gk,label:`Review mode`,onChange:d})}),(0,A.jsxs)(`div`,{className:`top-bar-right`,children:[e===`diff`&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{"aria-label":`${r} additions and ${i} deletions`,children:(0,A.jsx)(Rl,{additions:r,deletions:i})}),(0,A.jsxs)(`div`,{className:`top-bar-viewed`,"aria-label":`${n} of ${t} viewed, ${a} unresolved comments`,children:[(0,A.jsx)(`span`,{className:`top-bar-viewed-ring`,style:{background:`conic-gradient(var(--accent-interactive) ${S}%, var(--border) ${S}% 100%)`},"aria-hidden":`true`,children:(0,A.jsx)(`span`,{className:`top-bar-viewed-ring-inner`})}),(0,A.jsxs)(`span`,{className:`top-bar-viewed-text`,children:[n,` of `,t,` viewed`]})]}),(0,A.jsxs)(`div`,{className:`button-group`,children:[(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,"aria-label":`Expand all files`,onClick:f,children:(0,A.jsx)(ml,{size:qk})}),(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,"aria-label":`Expand files with unresolved threads`,onClick:p,disabled:!u,children:(0,A.jsx)(wl,{size:qk})}),(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,"aria-label":`Collapse viewed files`,onClick:m,children:(0,A.jsx)(vl,{size:qk})}),(0,A.jsx)(W,{variant:`ghost`,iconOnly:!0,"aria-label":`Collapse all files`,onClick:h,children:(0,A.jsx)(fl,{size:qk})})]}),(0,A.jsx)(CC,{checked:x===`wrap`,label:`Wrap`,onChange:e=>_(e?`wrap`:`scroll`)}),(0,A.jsx)(ow,{value:b,options:Kk,label:`Diff style`,onChange:g})]}),(0,A.jsxs)(`div`,{className:`top-bar-actions`,children:[(0,A.jsx)(W,{variant:`primary`,onClick:v,disabled:c,children:l?`Submit`:`Approve`}),(0,A.jsx)(W,{variant:`danger`,iconOnly:!0,onClick:y,disabled:c,"aria-label":`cancel`,children:(0,A.jsx)(Pl,{size:qk,strokeWidth:2.25})})]})]})]})}function Yk(){let[e,t]=(0,b.useState)(`guide`),n=(0,b.useRef)(null),r=(0,b.useRef)({guide:0,diff:0});return{mode:e,contentRef:n,changeMode:(0,b.useCallback)(i=>{if(i===e)return;let a=n.current;a&&(r.current[e]=a.scrollTop),t(i),requestAnimationFrame(()=>{n.current?.scrollTo({top:r.current[i],behavior:`auto`})})},[e]),scrollToFile:(0,b.useCallback)((e,t=`smooth`)=>{let r=n.current,i=document.getElementById(`file-${e}`);if(!r||!i)return;let a=r.getBoundingClientRect(),o=i.getBoundingClientRect(),s=Number.parseFloat(getComputedStyle(r).paddingTop);r.scrollTo({top:r.scrollTop+o.top-a.top-s,behavior:t})},[])}}function Xk(e,t,n){if(!e.trim())return[];let r=so(e,n),i=$k(t),a=0;return r.flatMap(e=>e.files.map(e=>{let t=eA(e,i);return{id:e.cacheKey??`${e.name}::${a++}`,file:e,displayPath:t.displayPath,status:t.status,oldRepoPath:t.oldRepoPath,newRepoPath:t.newRepoPath,additions:Qk(e,`additions`),deletions:Qk(e,`deletions`)}}))}function Zk(e){return e.prevName&&e.prevName!==e.name?`renamed`:`modified`}function Qk(e,t){return e.hunks.reduce((e,n)=>e+n.hunkContent.reduce((e,n)=>e+(n.type===`change`?n[t]:0),0),0)}function $k(e){let t=new Map;for(let n of e??[]){let e={displayPath:n.oldPath&&n.newPath&&n.oldPath!==n.newPath?`${n.oldPath} → ${n.newPath}`:n.path,status:n.status,oldRepoPath:n.oldPath,newRepoPath:n.newPath??n.path};t.set(n.path,e),n.newPath&&t.set(n.newPath,e),n.oldPath&&t.set(n.oldPath,e)}return t}function eA(e,t){return t.get(e.name)||(e.prevName?t.get(e.prevName):void 0)||{displayPath:e.prevName&&e.prevName!==e.name?`${e.prevName} → ${e.name}`:e.name,status:Zk(e),oldRepoPath:e.prevName,newRepoPath:e.name}}var tA={diffStyle:`stacked`,overflowMode:`wrap`,collapsedFileIds:[],viewedFileIds:[],threads:[],guide:{orientation:``,topics:[],questions:[],comments:[],loading:!1}};function nA(e,t,n){return{...e,threads:e.threads.map(e=>e.id===t?{...e,loading:n}:e)}}function rA(e,t){return{...e,guide:{...e.guide,loading:t}}}function iA(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(tA),o=(0,b.useCallback)(e=>{a(e)},[]),s=(0,b.useCallback)(async(e,t={})=>{try{let t=await e;o(t.state)}catch{t.onError?.()}},[o]),c=(0,b.useCallback)((e,t)=>{s(ww(e),t)},[s]),l=(0,b.useCallback)((e,t)=>{a(n=>nA(n,e,t))},[]),u=(0,b.useCallback)(e=>{a(t=>rA(t,e))},[]);(0,b.useEffect)(()=>{let e=!0;return(async()=>{try{let n=await Sw();if(!n.state)throw Error(`diff tool bootstrap response did not include review state`);if(!e)return;t(n),o(n.state);let i=await Cw();e&&r(i)}catch{}})(),()=>{e=!1}},[o]);let d=n&&`patch`in n?n.patch:``;return{bootstrap:e,reviewState:i,files:(0,b.useMemo)(()=>Xk(d,e?.files,e?.context.sessionId),[e,d]),emptyContent:n?`no changes to review`:`loading…`,applyReviewState:o,syncReviewState:s,applyStatePatch:c,setThreadLoading:l,setGuideLoading:u}}function aA(e){return e instanceof Error?e.message:String(e)}async function oA(e){if(window.isSecureContext&&navigator.clipboard)try{await navigator.clipboard.writeText(e);return}catch{if(sA(e))return;throw Error(`copy is unavailable in this browser`)}if(!sA(e))throw Error(`copy is unavailable in this browser`)}function sA(e){let t=document.createElement(`textarea`),n=document.activeElement;t.value=e,t.readOnly=!0,t.style.opacity=`0`,t.style.position=`fixed`,document.body.append(t);try{return t.select(),document.execCommand(`copy`)}finally{t.remove(),n instanceof HTMLElement&&n.focus()}}function cA({applyReviewState:e}){let[t,n]=(0,b.useState)(!1),[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(null),[d,f]=(0,b.useState)(!1),[p,m]=(0,b.useState)(null),h=(0,b.useCallback)(async()=>{c(!0),m(null);try{o(await Pw())}catch(e){m(aA(e))}finally{c(!1)}},[]);return{finished:t,previewOpen:r,preview:a,loadingPreview:s,excludingItem:l,copied:d,error:p,openPreview:(0,b.useCallback)(()=>{i(!0),o(null),f(!1),h()},[h]),closePreview:(0,b.useCallback)(()=>{t||i(!1)},[t]),approve:(0,b.useCallback)(async()=>{n(!0),o(null),f(!1),m(null);try{let e=await Pw();if(o(e),e.submission.outcome===`commented`){n(!1),i(!0);return}await Fw({previewId:e.previewId})}catch(e){n(!1),i(!0),m(aA(e))}},[]),exclude:(0,b.useCallback)(async t=>{u(t),f(!1),m(null);try{e((t.kind===`thread`?await kw({id:t.id,resolved:!0}):await Nw({target:t.target,body:``})).state),o(await Pw())}catch(e){m(aA(e))}finally{u(null)}},[e]),copy:(0,b.useCallback)(async()=>{if(a?.submission.outcome===`commented`){m(null);try{await oA(a.submission.review),f(!0)}catch(e){m(aA(e))}}},[a]),submit:(0,b.useCallback)(async()=>{if(a){n(!0),m(null);try{await Fw({previewId:a.previewId})}catch(e){n(!1),m(aA(e))}}},[a]),cancel:(0,b.useCallback)(async()=>{n(!0);try{await Iw()}catch{n(!1)}},[])}}function lA({reviewState:e,requestThreadAgentReply:t,applyReviewState:n}){let[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(!1),[s,c]=(0,b.useState)({mode:`new`,kind:`conversation`}),l=(0,b.useRef)(0),u=(0,b.useRef)(!1),d=(0,b.useMemo)(()=>e.threads.filter(C).reverse(),[e.threads]),f=(0,b.useMemo)(()=>s.mode===`thread`?d.find(e=>e.id===s.threadId)??null:null,[d,s]),p=(0,b.useCallback)(e=>{l.current+=1,i(``),c({mode:`new`,kind:e})},[]),m=(0,b.useCallback)(e=>{l.current+=1,i(``),c({mode:`thread`,threadId:e})},[]),h=(0,b.useCallback)(()=>{l.current+=1,i(``),c({mode:`history`})},[]);(0,b.useEffect)(()=>{s.mode===`thread`&&!f&&h()},[f,h,s]);let g=(0,b.useCallback)(e=>l.current===e&&(i(``),!0),[]),_=(0,b.useCallback)(async()=>{let e=r.trim();if(!e||u.current||s.mode===`history`||s.mode===`thread`&&(!f||f.loading||f.resolved))return;let i=l.current,a=s.mode===`thread`||s.kind===`conversation`,d;u.current=!0,o(!0);try{if(s.mode===`thread`)d=s.threadId,n((await Ew({id:d,text:e})).state),g(i);else{let t=await Tw({body:e,anchor:{kind:`detached`}});d=t.threadId,n(t.state),g(i)&&c({mode:`thread`,threadId:d})}}catch{return}finally{u.current=!1,o(!1)}a&&await t(d)},[n,r,t,g,f,s]);return{body:r,setBody:i,submitting:a,threads:d,selectedThread:f,view:s.mode,draftKind:s.mode===`new`?s.kind:`conversation`,openDraft:p,openThread:m,showHistory:h,submit:_}}function uA({files:e,reviewState:t,requestThreadAgentReply:n,applyReviewState:r}){let[i,a]=(0,b.useState)(null),o=(0,b.useMemo)(()=>w(t.threads),[t.threads]);return{draft:i,draftAnnotation:(0,b.useMemo)(()=>i?{lineNumber:i.lineNumber,side:i.side,metadata:{type:`draft`,draft:i}}:null,[i]),threadsByFileId:o,activateLine:(0,b.useCallback)((e,t,n)=>{a(r=>r?.fileId===e&&r.lineNumber===t&&r.side===n?r:{fileId:e,lineNumber:t,side:n})},[]),saveDraft:(0,b.useCallback)((t,o)=>{if(!i)return;let s=t.trim();if(!s){a(null);return}let c={kind:`line`,fileId:i.fileId,filePath:D(i,e),lineNumber:i.lineNumber,side:i.side};(async()=>{try{let e=await Tw({body:s,anchor:c});r(e.state),a(null),o&&await n(e.threadId)}catch{}})()},[r,i,e,n]),cancelDraft:(0,b.useCallback)(()=>a(null),[])}}function dA({applyReviewState:e,syncReviewState:t,setThreadLoading:n}){let r=(0,b.useCallback)(async t=>{n(t,!0);try{e((await Dw(t)).state)}catch{n(t,!1)}},[e,n]);return{requestThreadAgentReply:r,addReply:(0,b.useCallback)((n,i,a)=>{a?(async()=>{try{e((await Ew({id:n,text:i})).state),await r(n)}catch{}})():t(Ew({id:n,text:i}))},[e,r,t]),requestAgent:(0,b.useCallback)(e=>{r(e)},[r]),toggleResolved:(0,b.useCallback)((e,n)=>{t(kw({id:e,resolved:n}))},[t]),toggleThreadCollapsed:(0,b.useCallback)((e,n)=>{t(Aw({id:e,collapsed:n}))},[t]),removeThreadMessage:(0,b.useCallback)((e,n)=>{t(Ow({id:e,messageIndex:n}))},[t])}}function fA({files:e,reviewState:t,applyReviewState:n,syncReviewState:r,setThreadLoading:i}){let a=dA({applyReviewState:n,syncReviewState:r,setThreadLoading:i}),o=uA({files:e,reviewState:t,requestThreadAgentReply:a.requestThreadAgentReply,applyReviewState:n}),s=lA({reviewState:t,requestThreadAgentReply:a.requestThreadAgentReply,applyReviewState:n});return{...o,addReply:a.addReply,requestAgent:a.requestAgent,toggleResolved:a.toggleResolved,toggleThreadCollapsed:a.toggleThreadCollapsed,removeThreadMessage:a.removeThreadMessage,guideConversations:{items:s.threads,selected:s.selectedThread,view:s.view,draftKind:s.draftKind,body:s.body,submitting:s.submitting,setBody:s.setBody,openComment:()=>s.openDraft(`comment`),openConversation:()=>s.openDraft(`conversation`),open:s.openThread,showHistory:s.showHistory,submit:s.submit,exclude:e=>a.toggleResolved(e,!0),include:e=>a.toggleResolved(e,!1)}}}function pA(){let e=iA(),t=Yk(),n=rw({files:e.files,reviewState:e.reviewState,applyStatePatch:e.applyStatePatch,scrollToFile:t.scrollToFile}),r=fA({files:e.files,reviewState:e.reviewState,applyReviewState:e.applyReviewState,syncReviewState:e.syncReviewState,setThreadLoading:e.setThreadLoading}),i=Lw({bootstrap:e.bootstrap,reviewState:e.reviewState,setGuideLoading:e.setGuideLoading,syncReviewState:e.syncReviewState}),a=cA({applyReviewState:e.applyReviewState}),o=PC(e.files),s=aw(e.reviewState);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{className:`app ${t.mode}-mode`,children:[(0,A.jsx)(Jk,{mode:t.mode,fileCount:e.files.length,viewedCount:e.reviewState.viewedFileIds.length,additions:n.totals.additions,deletions:n.totals.deletions,commentCount:n.unresolvedThreadCount,diffStyle:e.reviewState.diffStyle,overflowMode:e.reviewState.overflowMode,finished:a.finished,hasReviewComments:s,hasUnresolvedFileThreads:n.filesWithUnresolvedThreads.length>0,onModeChange:t.changeMode,onExpandAll:n.expandAll,onExpandUnresolved:n.expandUnresolved,onCollapseViewed:n.collapseViewed,onCollapseAll:n.collapseAll,onDiffStyleChange:t=>{e.applyStatePatch({diffStyle:t})},onOverflowModeChange:t=>{e.applyStatePatch({overflowMode:t})},onSubmit:s?a.openPreview:a.approve,onCancel:a.cancel}),t.mode===`guide`?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`main`,{ref:t.contentRef,className:`content guide-content`,children:(0,A.jsx)(pw,{guide:e.reviewState.guide,pendingTopics:i.pendingTopics,pendingQuestions:i.pendingQuestions,onGenerate:i.requestGuide,onOperate:i.runGuideOperation,onComment:i.saveComment})}),(0,A.jsx)(vw,{conversations:r.guideConversations})]}):(0,A.jsx)(QC,{contentRef:t.contentRef,files:e.files,emptyContent:e.emptyContent,reviewState:e.reviewState,renderReady:o,fileState:n,threads:r,onJumpToFile:t.scrollToFile})]}),(0,A.jsx)(Wk,{...a}),null]})}(0,x.createRoot)(document.getElementById(`root`)).render((0,A.jsx)(b.StrictMode,{children:(0,A.jsx)(pA,{})}));export{pt as $,Jx as A,Ox as B,nC as C,Yx as D,pS as E,Nx as F,Hy as G,_b as H,kx as I,ly as J,dy as K,zx as L,Mx as M,Ax as N,qx as O,jx as P,mt as Q,Ex as R,JS as S,Dx as T,Tx as U,oS as V,Wy as W,Kr as X,cy as Y,Gt as Z,pC as _,XS as a,Fe as at,DS as b,cC as c,Me as ct,mC as d,$e as et,OS as f,oC as g,CS as h,ZS as i,Le as it,aS as j,Kx as k,lC as l,Ne as lt,kS as m,tC as n,ze as nt,fC as o,Ie as ot,dC as p,uy as q,sC as r,Re as rt,hC as s,Oe as st,gS as t,Ve as tt,SS as u,uC as v,jS as w,AS as x,TS as y,Fx as z};
|