self-bench 0.3.2 → 0.3.4
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/.dockerignore +0 -1
- package/Dockerfile +2 -1
- package/Dockerfile.sandbox +1 -1
- package/README.md +114 -170
- package/bun.lock +60 -12
- package/compose.yaml +11 -5
- package/dist/agent-smoke-main.js +3 -2
- package/dist/agent-smoke-main.js.map +1 -1
- package/dist/agent-smoke.d.ts +2 -1
- package/dist/agent-smoke.d.ts.map +1 -1
- package/dist/agent-smoke.js +6 -1
- package/dist/agent-smoke.js.map +1 -1
- package/dist/api.d.ts +24 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +65 -20
- package/dist/api.js.map +1 -1
- package/dist/artifacts.d.ts +0 -1
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +0 -3
- package/dist/artifacts.js.map +1 -1
- package/dist/build-metadata.js +1 -1
- package/dist/cli.js +75 -11
- package/dist/cli.js.map +1 -1
- package/dist/codex-review.d.ts +2 -1
- package/dist/codex-review.d.ts.map +1 -1
- package/dist/codex-review.js +26 -22
- package/dist/codex-review.js.map +1 -1
- package/dist/config.d.ts +36 -11
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +89 -17
- package/dist/config.js.map +1 -1
- package/dist/contracts.d.ts +23 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +31 -6
- package/dist/contracts.js.map +1 -1
- package/dist/eval-main.js +5 -4
- package/dist/eval-main.js.map +1 -1
- package/dist/evaluate.d.ts +2 -1
- package/dist/evaluate.d.ts.map +1 -1
- package/dist/evaluate.js +14 -8
- package/dist/evaluate.js.map +1 -1
- package/dist/harbor-environment.d.ts +2 -0
- package/dist/harbor-environment.d.ts.map +1 -0
- package/dist/harbor-environment.js +15 -0
- package/dist/harbor-environment.js.map +1 -0
- package/dist/harbor-results.d.ts.map +1 -1
- package/dist/harbor-results.js +2 -0
- package/dist/harbor-results.js.map +1 -1
- package/dist/process.d.ts +2 -1
- package/dist/process.d.ts.map +1 -1
- package/dist/process.js.map +1 -1
- package/dist/provenance.d.ts +0 -1
- package/dist/provenance.d.ts.map +1 -1
- package/dist/provenance.js.map +1 -1
- package/dist/providers.d.ts +8 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +14 -0
- package/dist/providers.js.map +1 -0
- package/dist/reaudit-main.js +14 -11
- package/dist/reaudit-main.js.map +1 -1
- package/dist/repair-main.js +12 -9
- package/dist/repair-main.js.map +1 -1
- package/dist/review/assets/index-CZ3G759O.js +1568 -0
- package/dist/review/assets/index-DgSLzX8l.css +1 -0
- package/dist/review/assets/{mojo-Blby8dQK.js → mojo-DJz3ZmWd.js} +1 -1
- package/dist/review/assets/typst-BUadGCkm.js +1 -0
- package/dist/review/index.html +2 -2
- package/dist/sandbox-author.bundle.js +40 -6
- package/dist/sandbox-repair.bundle.js +8 -7
- package/dist/sandbox-repair.js +7 -7
- package/dist/sandbox-repair.js.map +1 -1
- package/dist/sandbox-review.bundle.js +29 -25
- package/dist/sandbox-review.js +5 -3
- package/dist/sandbox-review.js.map +1 -1
- package/dist/sandbox-timeout.d.ts +11 -0
- package/dist/sandbox-timeout.d.ts.map +1 -0
- package/dist/sandbox-timeout.js +41 -0
- package/dist/sandbox-timeout.js.map +1 -0
- package/dist/sandbox-validation-repair.bundle.js +49 -15
- package/dist/sandbox-validation-repair.js +11 -9
- package/dist/sandbox-validation-repair.js.map +1 -1
- package/dist/sandbox.d.ts +2 -2
- package/dist/sandbox.d.ts.map +1 -1
- package/dist/sandbox.js +10 -3
- package/dist/sandbox.js.map +1 -1
- package/dist/subscription-auth.d.ts +12 -1
- package/dist/subscription-auth.d.ts.map +1 -1
- package/dist/subscription-auth.js +16 -16
- package/dist/subscription-auth.js.map +1 -1
- package/dist/{activities.d.ts → temporal/activities.d.ts} +3 -4
- package/dist/temporal/activities.d.ts.map +1 -0
- package/dist/{activities.js → temporal/activities.js} +51 -34
- package/dist/temporal/activities.js.map +1 -0
- package/dist/{temporal.d.ts → temporal/connection.d.ts} +2 -2
- package/dist/temporal/connection.d.ts.map +1 -0
- package/dist/{temporal.js → temporal/connection.js} +1 -1
- package/dist/temporal/connection.js.map +1 -0
- package/dist/{worker-main.d.ts.map → temporal/worker-main.d.ts.map} +1 -1
- package/dist/{worker-main.js → temporal/worker-main.js} +6 -10
- package/dist/temporal/worker-main.js.map +1 -0
- package/dist/{workflow.d.ts → temporal/workflow.d.ts} +1 -1
- package/dist/temporal/workflow.d.ts.map +1 -0
- package/dist/temporal/workflow.js.map +1 -0
- package/dist/terminal-prompts.d.ts +26 -0
- package/dist/terminal-prompts.d.ts.map +1 -0
- package/dist/terminal-prompts.js +137 -0
- package/dist/terminal-prompts.js.map +1 -0
- package/dist/terminal-reporter.d.ts +30 -0
- package/dist/terminal-reporter.d.ts.map +1 -0
- package/dist/terminal-reporter.js +90 -0
- package/dist/terminal-reporter.js.map +1 -0
- package/dist/validate-main.js +8 -2
- package/dist/validate-main.js.map +1 -1
- package/dist/vercel-cli.d.ts +64 -0
- package/dist/vercel-cli.d.ts.map +1 -0
- package/dist/vercel-cli.js +303 -0
- package/dist/vercel-cli.js.map +1 -0
- package/dist/vercel-command.d.ts +14 -0
- package/dist/vercel-command.d.ts.map +1 -0
- package/dist/vercel-command.js +93 -0
- package/dist/vercel-command.js.map +1 -0
- package/dist/vercel-executor.d.ts +14 -0
- package/dist/vercel-executor.d.ts.map +1 -0
- package/dist/vercel-executor.js +356 -0
- package/dist/vercel-executor.js.map +1 -0
- package/dist/vercel-fetch.d.ts +6 -0
- package/dist/vercel-fetch.d.ts.map +1 -0
- package/dist/vercel-fetch.js +39 -0
- package/dist/vercel-fetch.js.map +1 -0
- package/dist/vercel-profile.d.ts +34 -0
- package/dist/vercel-profile.d.ts.map +1 -0
- package/dist/vercel-profile.js +244 -0
- package/dist/vercel-profile.js.map +1 -0
- package/dist/vercel-runtime-image.d.ts +51 -0
- package/dist/vercel-runtime-image.d.ts.map +1 -0
- package/dist/vercel-runtime-image.js +123 -0
- package/dist/vercel-runtime-image.js.map +1 -0
- package/dist/vercel-setup-probe.d.ts +49 -0
- package/dist/vercel-setup-probe.d.ts.map +1 -0
- package/dist/vercel-setup-probe.js +151 -0
- package/dist/vercel-setup-probe.js.map +1 -0
- package/dist/vercel-setup.d.ts +42 -0
- package/dist/vercel-setup.d.ts.map +1 -0
- package/dist/vercel-setup.js +280 -0
- package/dist/vercel-setup.js.map +1 -0
- package/docs/evaluations.md +15 -12
- package/docs/operations.md +134 -21
- package/package.json +8 -6
- package/src/agent-smoke-main.ts +3 -2
- package/src/agent-smoke.ts +8 -2
- package/src/api.ts +71 -20
- package/src/artifacts.ts +0 -4
- package/src/cli.ts +81 -11
- package/src/codex-review.ts +63 -54
- package/src/config.ts +150 -28
- package/src/contracts.ts +33 -11
- package/src/eval-main.ts +5 -4
- package/src/evaluate.ts +18 -11
- package/src/harbor-environment.ts +17 -0
- package/src/harbor-results.ts +2 -0
- package/src/process.ts +3 -1
- package/src/provenance.ts +0 -1
- package/src/providers.ts +22 -0
- package/src/reaudit-main.ts +17 -11
- package/src/repair-main.ts +15 -9
- package/src/sandbox-repair.ts +7 -11
- package/src/sandbox-review.ts +5 -3
- package/src/sandbox-timeout.ts +56 -0
- package/src/sandbox-validation-repair.ts +13 -10
- package/src/sandbox.ts +15 -5
- package/src/subscription-auth.ts +30 -17
- package/src/{activities.ts → temporal/activities.ts} +53 -42
- package/src/{temporal.ts → temporal/connection.ts} +1 -1
- package/src/{worker-main.ts → temporal/worker-main.ts} +6 -10
- package/src/{workflow.ts → temporal/workflow.ts} +10 -10
- package/src/terminal-prompts.ts +197 -0
- package/src/terminal-reporter.ts +126 -0
- package/src/validate-main.ts +9 -3
- package/src/vercel-cli.ts +403 -0
- package/src/vercel-command.ts +127 -0
- package/src/vercel-executor.ts +448 -0
- package/src/vercel-fetch.ts +45 -0
- package/src/vercel-profile.ts +319 -0
- package/src/vercel-runtime-image.ts +204 -0
- package/src/vercel-setup-probe.ts +229 -0
- package/src/vercel-setup.ts +419 -0
- package/dist/activities.d.ts.map +0 -1
- package/dist/activities.js.map +0 -1
- package/dist/extensions/review.d.ts +0 -3
- package/dist/extensions/review.d.ts.map +0 -1
- package/dist/extensions/review.js +0 -44
- package/dist/extensions/review.js.map +0 -1
- package/dist/review/assets/index-Dq-6DFzI.css +0 -1
- package/dist/review/assets/index-DurW_RD7.js +0 -1567
- package/dist/review/assets/typst-DHCkPAjA.js +0 -1
- package/dist/temporal.d.ts.map +0 -1
- package/dist/temporal.js.map +0 -1
- package/dist/worker-main.js.map +0 -1
- package/dist/workflow.d.ts.map +0 -1
- package/dist/workflow.js.map +0 -1
- package/src/extensions/review.ts +0 -54
- /package/dist/{worker-main.d.ts → temporal/worker-main.d.ts} +0 -0
- /package/dist/{workflow.js → temporal/workflow.js} +0 -0
|
@@ -1,1567 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-DlhNcFeZ.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/chapel-DTp_pixX.js","assets/c-BIGW1oBm.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-BMRokrvK.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-DXfck5VN.js","assets/ruby-C0TQ7zu5.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-TyuKm33G.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DqcFQ5yU.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-BWmVpMyf.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-2-FPmUDs.js","assets/haxe-CfZj7gIn.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-5Bft2YPA.js","assets/r-Cf5RLm7j.js","assets/just-Cwhn7H3k.js","assets/perl-B9cMNwum.js","assets/latex-D5pSuvFb.js","assets/tex-D96PA37w.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-D1_yUvq7.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/org-DM6o9KBp.js","assets/ini-BEwlwnbL.js","assets/make-CHLpvVh8.js","assets/php-Csjmro_R.js","assets/vb-Cu-pLBUe.js","assets/clojure-P80f7IUj.js","assets/objective-c-DXmwc3jG.js","assets/docker-BcOcwvcX.js","assets/go-C27-OAKa.js","assets/groovy-gcz8RCvz.js","assets/raku-DXvB9xmW.js","assets/rust-B1yitclQ.js","assets/scala-CqE71os6.js","assets/csharp-DSvCPggb.js","assets/dart-bE4Kk8sk.js","assets/ocaml-C0hk2d4L.js","assets/zig-VOosw3JB.js","assets/xsl-CtQFsRM5.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/rst-bs7f0vWN.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Cjom0U5J.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/ts-tags-D351s5mN.js","assets/twig-27uCiNez.js","assets/vue-BqiEGhQt.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function a(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(s){if(s.ep)return;s.ep=!0;const u=a(s);fetch(s.href,u)}})();function US(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xc={exports:{}},$r={};var Rg;function jS(){if(Rg)return $r;Rg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:t,type:l,key:f,ref:s!==void 0?s:null,props:u}}return $r.Fragment=n,$r.jsx=a,$r.jsxs=a,$r}var kg;function PS(){return kg||(kg=1,Xc.exports=jS()),Xc.exports}var x=PS(),Qc={exports:{}},he={};var Dg;function VS(){if(Dg)return he;Dg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=y&&D[y]||D["@@iterator"],typeof D=="function"?D:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,N={};function L(D,$,J){this.props=D,this.context=$,this.refs=N,this.updater=J||E}L.prototype.isReactComponent={},L.prototype.setState=function(D,$){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,$,"setState")},L.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function A(){}A.prototype=L.prototype;function R(D,$,J){this.props=D,this.context=$,this.refs=N,this.updater=J||E}var z=R.prototype=new A;z.constructor=R,T(z,L.prototype),z.isPureReactComponent=!0;var V=Array.isArray;function j(){}var F={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function K(D,$,J){var ie=J.ref;return{$$typeof:t,type:D,key:$,ref:ie!==void 0?ie:null,props:J}}function ee(D,$){return K(D.type,$,D.props)}function Q(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function X(D){var $={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(J){return $[J]})}var W=/\/+/g;function oe(D,$){return typeof D=="object"&&D!==null&&D.key!=null?X(""+D.key):$.toString(36)}function ce(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(j,j):(D.status="pending",D.then(function($){D.status==="pending"&&(D.status="fulfilled",D.value=$)},function($){D.status==="pending"&&(D.status="rejected",D.reason=$)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function M(D,$,J,ie,de){var ve=typeof D;(ve==="undefined"||ve==="boolean")&&(D=null);var xe=!1;if(D===null)xe=!0;else switch(ve){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(D.$$typeof){case t:case n:xe=!0;break;case v:return xe=D._init,M(xe(D._payload),$,J,ie,de)}}if(xe)return de=de(D),xe=ie===""?"."+oe(D,0):ie,V(de)?(J="",xe!=null&&(J=xe.replace(W,"$&/")+"/"),M(de,$,J,"",function(Fe){return Fe})):de!=null&&(Q(de)&&(de=ee(de,J+(de.key==null||D&&D.key===de.key?"":(""+de.key).replace(W,"$&/")+"/")+xe)),$.push(de)),1;xe=0;var qe=ie===""?".":ie+":";if(V(D))for(var pe=0;pe<D.length;pe++)ie=D[pe],ve=qe+oe(ie,pe),xe+=M(ie,$,J,ve,de);else if(pe=b(D),typeof pe=="function")for(D=pe.call(D),pe=0;!(ie=D.next()).done;)ie=ie.value,ve=qe+oe(ie,pe++),xe+=M(ie,$,J,ve,de);else if(ve==="object"){if(typeof D.then=="function")return M(ce(D),$,J,ie,de);throw $=String(D),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Y(D,$,J){if(D==null)return D;var ie=[],de=0;return M(D,ie,"","",function(ve){return $.call(J,ve,de++)}),ie}function ne(D){if(D._status===-1){var $=D._result;$=$(),$.then(function(J){(D._status===0||D._status===-1)&&(D._status=1,D._result=J)},function(J){(D._status===0||D._status===-1)&&(D._status=2,D._result=J)}),D._status===-1&&(D._status=0,D._result=$)}if(D._status===1)return D._result.default;throw D._result}var ue=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},be={map:Y,forEach:function(D,$,J){Y(D,function(){$.apply(this,arguments)},J)},count:function(D){var $=0;return Y(D,function(){$++}),$},toArray:function(D){return Y(D,function($){return $})||[]},only:function(D){if(!Q(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return he.Activity=g,he.Children=be,he.Component=L,he.Fragment=a,he.Profiler=s,he.PureComponent=R,he.StrictMode=l,he.Suspense=c,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,he.__COMPILER_RUNTIME={__proto__:null,c:function(D){return F.H.useMemoCache(D)}},he.cache=function(D){return function(){return D.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(D,$,J){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ie=T({},D.props),de=D.key;if($!=null)for(ve in $.key!==void 0&&(de=""+$.key),$)!te.call($,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&$.ref===void 0||(ie[ve]=$[ve]);var ve=arguments.length-2;if(ve===1)ie.children=J;else if(1<ve){for(var xe=Array(ve),qe=0;qe<ve;qe++)xe[qe]=arguments[qe+2];ie.children=xe}return K(D.type,de,ie)},he.createContext=function(D){return D={$$typeof:f,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:u,_context:D},D},he.createElement=function(D,$,J){var ie,de={},ve=null;if($!=null)for(ie in $.key!==void 0&&(ve=""+$.key),$)te.call($,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(de[ie]=$[ie]);var xe=arguments.length-2;if(xe===1)de.children=J;else if(1<xe){for(var qe=Array(xe),pe=0;pe<xe;pe++)qe[pe]=arguments[pe+2];de.children=qe}if(D&&D.defaultProps)for(ie in xe=D.defaultProps,xe)de[ie]===void 0&&(de[ie]=xe[ie]);return K(D,ve,de)},he.createRef=function(){return{current:null}},he.forwardRef=function(D){return{$$typeof:h,render:D}},he.isValidElement=Q,he.lazy=function(D){return{$$typeof:v,_payload:{_status:-1,_result:D},_init:ne}},he.memo=function(D,$){return{$$typeof:m,type:D,compare:$===void 0?null:$}},he.startTransition=function(D){var $=F.T,J={};F.T=J;try{var ie=D(),de=F.S;de!==null&&de(J,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(j,ue)}catch(ve){ue(ve)}finally{$!==null&&J.types!==null&&($.types=J.types),F.T=$}},he.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},he.use=function(D){return F.H.use(D)},he.useActionState=function(D,$,J){return F.H.useActionState(D,$,J)},he.useCallback=function(D,$){return F.H.useCallback(D,$)},he.useContext=function(D){return F.H.useContext(D)},he.useDebugValue=function(){},he.useDeferredValue=function(D,$){return F.H.useDeferredValue(D,$)},he.useEffect=function(D,$){return F.H.useEffect(D,$)},he.useEffectEvent=function(D){return F.H.useEffectEvent(D)},he.useId=function(){return F.H.useId()},he.useImperativeHandle=function(D,$,J){return F.H.useImperativeHandle(D,$,J)},he.useInsertionEffect=function(D,$){return F.H.useInsertionEffect(D,$)},he.useLayoutEffect=function(D,$){return F.H.useLayoutEffect(D,$)},he.useMemo=function(D,$){return F.H.useMemo(D,$)},he.useOptimistic=function(D,$){return F.H.useOptimistic(D,$)},he.useReducer=function(D,$,J){return F.H.useReducer(D,$,J)},he.useRef=function(D){return F.H.useRef(D)},he.useState=function(D){return F.H.useState(D)},he.useSyncExternalStore=function(D,$,J){return F.H.useSyncExternalStore(D,$,J)},he.useTransition=function(){return F.H.useTransition()},he.version="19.2.7",he}var Og;function hf(){return Og||(Og=1,Qc.exports=VS()),Qc.exports}var tn=hf();const Ce=US(tn);var Zc={exports:{}},qr={},Kc={exports:{}},Wc={};var Ng;function BS(){return Ng||(Ng=1,(function(t){function n(M,Y){var ne=M.length;M.push(Y);e:for(;0<ne;){var ue=ne-1>>>1,be=M[ue];if(0<s(be,Y))M[ue]=Y,M[ne]=be,ne=ue;else break e}}function a(M){return M.length===0?null:M[0]}function l(M){if(M.length===0)return null;var Y=M[0],ne=M.pop();if(ne!==Y){M[0]=ne;e:for(var ue=0,be=M.length,D=be>>>1;ue<D;){var $=2*(ue+1)-1,J=M[$],ie=$+1,de=M[ie];if(0>s(J,ne))ie<be&&0>s(de,J)?(M[ue]=de,M[ie]=ne,ue=ie):(M[ue]=J,M[$]=ne,ue=$);else if(ie<be&&0>s(de,ne))M[ue]=de,M[ie]=ne,ue=ie;else break e}}return Y}function s(M,Y){var ne=M.sortIndex-Y.sortIndex;return ne!==0?ne:M.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var c=[],m=[],v=1,g=null,y=3,b=!1,E=!1,T=!1,N=!1,L=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function z(M){for(var Y=a(m);Y!==null;){if(Y.callback===null)l(m);else if(Y.startTime<=M)l(m),Y.sortIndex=Y.expirationTime,n(c,Y);else break;Y=a(m)}}function V(M){if(T=!1,z(M),!E)if(a(c)!==null)E=!0,j||(j=!0,X());else{var Y=a(m);Y!==null&&ce(V,Y.startTime-M)}}var j=!1,F=-1,te=5,K=-1;function ee(){return N?!0:!(t.unstable_now()-K<te)}function Q(){if(N=!1,j){var M=t.unstable_now();K=M;var Y=!0;try{e:{E=!1,T&&(T=!1,A(F),F=-1),b=!0;var ne=y;try{t:{for(z(M),g=a(c);g!==null&&!(g.expirationTime>M&&ee());){var ue=g.callback;if(typeof ue=="function"){g.callback=null,y=g.priorityLevel;var be=ue(g.expirationTime<=M);if(M=t.unstable_now(),typeof be=="function"){g.callback=be,z(M),Y=!0;break t}g===a(c)&&l(c),z(M)}else l(c);g=a(c)}if(g!==null)Y=!0;else{var D=a(m);D!==null&&ce(V,D.startTime-M),Y=!1}}break e}finally{g=null,y=ne,b=!1}Y=void 0}}finally{Y?X():j=!1}}}var X;if(typeof R=="function")X=function(){R(Q)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,oe=W.port2;W.port1.onmessage=Q,X=function(){oe.postMessage(null)}}else X=function(){L(Q,0)};function ce(M,Y){F=L(function(){M(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(M){switch(y){case 1:case 2:case 3:var Y=3;break;default:Y=y}var ne=y;y=Y;try{return M()}finally{y=ne}},t.unstable_requestPaint=function(){N=!0},t.unstable_runWithPriority=function(M,Y){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var ne=y;y=M;try{return Y()}finally{y=ne}},t.unstable_scheduleCallback=function(M,Y,ne){var ue=t.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ue+ne:ue):ne=ue,M){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=ne+be,M={id:v++,callback:Y,priorityLevel:M,startTime:ne,expirationTime:be,sortIndex:-1},ne>ue?(M.sortIndex=ne,n(m,M),a(c)===null&&M===a(m)&&(T?(A(F),F=-1):T=!0,ce(V,ne-ue))):(M.sortIndex=be,n(c,M),E||b||(E=!0,j||(j=!0,X()))),M},t.unstable_shouldYield=ee,t.unstable_wrapCallback=function(M){var Y=y;return function(){var ne=y;y=Y;try{return M.apply(this,arguments)}finally{y=ne}}}})(Wc)),Wc}var Mg;function GS(){return Mg||(Mg=1,Kc.exports=BS()),Kc.exports}var Jc={exports:{}},vt={};var Ig;function $S(){if(Ig)return vt;Ig=1;var t=hf();function n(c){var m="https://react.dev/errors/"+c;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+c+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(c,m,v){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:c,containerInfo:m,implementation:v}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(c,m){if(c==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,vt.createPortal=function(c,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(n(299));return u(c,m,null,v)},vt.flushSync=function(c){var m=f.T,v=l.p;try{if(f.T=null,l.p=2,c)return c()}finally{f.T=m,l.p=v,l.d.f()}},vt.preconnect=function(c,m){typeof c=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,l.d.C(c,m))},vt.prefetchDNS=function(c){typeof c=="string"&&l.d.D(c)},vt.preinit=function(c,m){if(typeof c=="string"&&m&&typeof m.as=="string"){var v=m.as,g=h(v,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?l.d.S(c,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:b}):v==="script"&&l.d.X(c,{crossOrigin:g,integrity:y,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},vt.preinitModule=function(c,m){if(typeof c=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=h(m.as,m.crossOrigin);l.d.M(c,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&l.d.M(c)},vt.preload=function(c,m){if(typeof c=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,g=h(v,m.crossOrigin);l.d.L(c,v,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},vt.preloadModule=function(c,m){if(typeof c=="string")if(m){var v=h(m.as,m.crossOrigin);l.d.m(c,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else l.d.m(c)},vt.requestFormReset=function(c){l.d.r(c)},vt.unstable_batchedUpdates=function(c,m){return c(m)},vt.useFormState=function(c,m,v){return f.H.useFormState(c,m,v)},vt.useFormStatus=function(){return f.H.useHostTransitionStatus()},vt.version="19.2.7",vt}var Hg;function qS(){if(Hg)return Jc.exports;Hg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Jc.exports=$S(),Jc.exports}var zg;function FS(){if(zg)return qr;zg=1;var t=GS(),n=hf(),a=qS();function l(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)i+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var i=e,r=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(r=i.return),e=i.return;while(e)}return i.tag===3?r:null}function f(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function h(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function c(e){if(u(e)!==e)throw Error(l(188))}function m(e){var i=e.alternate;if(!i){if(i=u(e),i===null)throw Error(l(188));return i!==e?null:e}for(var r=e,o=i;;){var d=r.return;if(d===null)break;var p=d.alternate;if(p===null){if(o=d.return,o!==null){r=o;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===r)return c(d),e;if(p===o)return c(d),i;p=p.sibling}throw Error(l(188))}if(r.return!==o.return)r=d,o=p;else{for(var _=!1,C=d.child;C;){if(C===r){_=!0,r=d,o=p;break}if(C===o){_=!0,o=d,r=p;break}C=C.sibling}if(!_){for(C=p.child;C;){if(C===r){_=!0,r=p,o=d;break}if(C===o){_=!0,o=p,r=d;break}C=C.sibling}if(!_)throw Error(l(189))}}if(r.alternate!==o)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?e:i}function v(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=v(e),i!==null)return i;e=e.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),R=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var W=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===W?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case L:return"Profiler";case N:return"StrictMode";case V:return"Suspense";case j:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case R:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case z:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return i=e.displayName||null,i!==null?i:oe(e.type)||"Memo";case te:i=e._payload,e=e._init;try{return oe(e(i))}catch{}}return null}var ce=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ue=[],be=-1;function D(e){return{current:e}}function $(e){0>be||(e.current=ue[be],ue[be]=null,be--)}function J(e,i){be++,ue[be]=e.current,e.current=i}var ie=D(null),de=D(null),ve=D(null),xe=D(null);function qe(e,i){switch(J(ve,i),J(de,e),J(ie,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?Wm(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=Wm(i),e=Jm(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(ie),J(ie,e)}function pe(){$(ie),$(de),$(ve)}function Fe(e){e.memoizedState!==null&&J(xe,e);var i=ie.current,r=Jm(i,e.type);i!==r&&(J(de,e),J(ie,r))}function Be(e){de.current===e&&($(ie),$(de)),xe.current===e&&($(xe),Pr._currentValue=ne)}var nn,Rt;function lt(e){if(nn===void 0)try{throw Error()}catch(r){var i=r.stack.trim().match(/\n( *(at )?)/);nn=i&&i[1]||"",Rt=-1<r.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+nn+e+Rt}var Sn=!1;function dt(e,i){if(!e||Sn)return"";Sn=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(i){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(P){var U=P}Reflect.construct(e,[],q)}else{try{q.call()}catch(P){U=P}e.call(q.prototype)}}else{try{throw Error()}catch(P){U=P}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(P){if(P&&U&&typeof P.stack=="string")return[P.stack,U.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=o.DetermineComponentFrameRoot(),_=p[0],C=p[1];if(_&&C){var w=_.split(`
|
|
5
|
-
`),H=C.split(`
|
|
6
|
-
`);for(d=o=0;o<w.length&&!w[o].includes("DetermineComponentFrameRoot");)o++;for(;d<H.length&&!H[d].includes("DetermineComponentFrameRoot");)d++;if(o===w.length||d===H.length)for(o=w.length-1,d=H.length-1;1<=o&&0<=d&&w[o]!==H[d];)d--;for(;1<=o&&0<=d;o--,d--)if(w[o]!==H[d]){if(o!==1||d!==1)do if(o--,d--,0>d||w[o]!==H[d]){var B=`
|
|
7
|
-
`+w[o].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=o&&0<=d);break}}}finally{Sn=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?lt(r):""}function Ka(e,i){switch(e.tag){case 26:case 27:case 5:return lt(e.type);case 16:return lt("Lazy");case 13:return e.child!==i&&i!==null?lt("Suspense Fallback"):lt("Suspense");case 19:return lt("SuspenseList");case 0:case 15:return dt(e.type,!1);case 11:return dt(e.type.render,!1);case 1:return dt(e.type,!0);case 31:return lt("Activity");default:return""}}function Zi(e){try{var i="",r=null;do i+=Ka(e,r),r=e,e=e.return;while(e);return i}catch(o){return`
|
|
8
|
-
Error generating stack: `+o.message+`
|
|
9
|
-
`+o.stack}}var Ns=Object.prototype.hasOwnProperty,Ms=t.unstable_scheduleCallback,Is=t.unstable_cancelCallback,gy=t.unstable_shouldYield,vy=t.unstable_requestPaint,kt=t.unstable_now,_y=t.unstable_getCurrentPriorityLevel,kf=t.unstable_ImmediatePriority,Df=t.unstable_UserBlockingPriority,gl=t.unstable_NormalPriority,yy=t.unstable_LowPriority,Of=t.unstable_IdlePriority,by=t.log,Sy=t.unstable_setDisableYieldValue,Wa=null,Dt=null;function qn(e){if(typeof by=="function"&&Sy(e),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(Wa,e)}catch{}}var Ot=Math.clz32?Math.clz32:xy,Ey=Math.log,Cy=Math.LN2;function xy(e){return e>>>=0,e===0?32:31-(Ey(e)/Cy|0)|0}var vl=256,_l=262144,yl=4194304;function Si(e){var i=e&42;if(i!==0)return i;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function bl(e,i,r){var o=e.pendingLanes;if(o===0)return 0;var d=0,p=e.suspendedLanes,_=e.pingedLanes;e=e.warmLanes;var C=o&134217727;return C!==0?(o=C&~p,o!==0?d=Si(o):(_&=C,_!==0?d=Si(_):r||(r=C&~e,r!==0&&(d=Si(r))))):(C=o&~p,C!==0?d=Si(C):_!==0?d=Si(_):r||(r=o&~e,r!==0&&(d=Si(r)))),d===0?0:i!==0&&i!==d&&(i&p)===0&&(p=d&-d,r=i&-i,p>=r||p===32&&(r&4194048)!==0)?i:d}function Ja(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function Ay(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Nf(){var e=yl;return yl<<=1,(yl&62914560)===0&&(yl=4194304),e}function Hs(e){for(var i=[],r=0;31>r;r++)i.push(e);return i}function er(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ty(e,i,r,o,d,p){var _=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var C=e.entanglements,w=e.expirationTimes,H=e.hiddenUpdates;for(r=_&~r;0<r;){var B=31-Ot(r),q=1<<B;C[B]=0,w[B]=-1;var U=H[B];if(U!==null)for(H[B]=null,B=0;B<U.length;B++){var P=U[B];P!==null&&(P.lane&=-536870913)}r&=~q}o!==0&&Mf(e,o,0),p!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=p&~(_&~i))}function Mf(e,i,r){e.pendingLanes|=i,e.suspendedLanes&=~i;var o=31-Ot(i);e.entangledLanes|=i,e.entanglements[o]=e.entanglements[o]|1073741824|r&261930}function If(e,i){var r=e.entangledLanes|=i;for(e=e.entanglements;r;){var o=31-Ot(r),d=1<<o;d&i|e[o]&i&&(e[o]|=i),r&=~d}}function Hf(e,i){var r=i&-i;return r=(r&42)!==0?1:zs(r),(r&(e.suspendedLanes|i))!==0?0:r}function zs(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 Us(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function zf(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Eg(e.type))}function Uf(e,i){var r=Y.p;try{return Y.p=e,i()}finally{Y.p=r}}var Fn=Math.random().toString(36).slice(2),ft="__reactFiber$"+Fn,St="__reactProps$"+Fn,Ki="__reactContainer$"+Fn,js="__reactEvents$"+Fn,wy="__reactListeners$"+Fn,Ly="__reactHandles$"+Fn,jf="__reactResources$"+Fn,tr="__reactMarker$"+Fn;function Ps(e){delete e[ft],delete e[St],delete e[js],delete e[wy],delete e[Ly]}function Wi(e){var i=e[ft];if(i)return i;for(var r=e.parentNode;r;){if(i=r[Ki]||r[ft]){if(r=i.alternate,i.child!==null||r!==null&&r.child!==null)for(e=lg(e);e!==null;){if(r=e[ft])return r;e=lg(e)}return i}e=r,r=e.parentNode}return null}function Ji(e){if(e=e[ft]||e[Ki]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function nr(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function ea(e){var i=e[jf];return i||(i=e[jf]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function ot(e){e[tr]=!0}var Pf=new Set,Vf={};function Ei(e,i){ta(e,i),ta(e+"Capture",i)}function ta(e,i){for(Vf[e]=i,e=0;e<i.length;e++)Pf.add(i[e])}var Ry=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]*$"),Bf={},Gf={};function ky(e){return Ns.call(Gf,e)?!0:Ns.call(Bf,e)?!1:Ry.test(e)?Gf[e]=!0:(Bf[e]=!0,!1)}function Sl(e,i,r){if(ky(i))if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var o=i.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+r)}}function El(e,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+r)}}function En(e,i,r,o){if(o===null)e.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(i,r,""+o)}}function Vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $f(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Dy(e,i,r){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,p=o.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return d.call(this)},set:function(_){r=""+_,p.call(this,_)}}),Object.defineProperty(e,i,{enumerable:o.enumerable}),{getValue:function(){return r},setValue:function(_){r=""+_},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function Vs(e){if(!e._valueTracker){var i=$f(e)?"checked":"value";e._valueTracker=Dy(e,i,""+e[i])}}function qf(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var r=i.getValue(),o="";return e&&(o=$f(e)?e.checked?"true":"false":e.value),e=o,e!==r?(i.setValue(e),!0):!1}function Cl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Oy=/[\n"\\]/g;function Bt(e){return e.replace(Oy,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Bs(e,i,r,o,d,p,_,C){e.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.type=_:e.removeAttribute("type"),i!=null?_==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+Vt(i)):e.value!==""+Vt(i)&&(e.value=""+Vt(i)):_!=="submit"&&_!=="reset"||e.removeAttribute("value"),i!=null?Gs(e,_,Vt(i)):r!=null?Gs(e,_,Vt(r)):o!=null&&e.removeAttribute("value"),d==null&&p!=null&&(e.defaultChecked=!!p),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.name=""+Vt(C):e.removeAttribute("name")}function Ff(e,i,r,o,d,p,_,C){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),i!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||i!=null)){Vs(e);return}r=r!=null?""+Vt(r):"",i=i!=null?""+Vt(i):r,C||i===e.value||(e.value=i),e.defaultValue=i}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=C?e.checked:!!o,e.defaultChecked=!!o,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(e.name=_),Vs(e)}function Gs(e,i,r){i==="number"&&Cl(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function na(e,i,r,o){if(e=e.options,i){i={};for(var d=0;d<r.length;d++)i["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=i.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&o&&(e[r].defaultSelected=!0)}else{for(r=""+Vt(r),i=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,o&&(e[d].defaultSelected=!0);return}i!==null||e[d].disabled||(i=e[d])}i!==null&&(i.selected=!0)}}function Yf(e,i,r){if(i!=null&&(i=""+Vt(i),i!==e.value&&(e.value=i),r==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=r!=null?""+Vt(r):""}function Xf(e,i,r,o){if(i==null){if(o!=null){if(r!=null)throw Error(l(92));if(ce(o)){if(1<o.length)throw Error(l(93));o=o[0]}r=o}r==null&&(r=""),i=r}r=Vt(i),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o),Vs(e)}function ia(e,i){if(i){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=i;return}}e.textContent=i}var Ny=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 Qf(e,i,r){var o=i.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?o?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":o?e.setProperty(i,r):typeof r!="number"||r===0||Ny.has(i)?i==="float"?e.cssFloat=r:e[i]=(""+r).trim():e[i]=r+"px"}function Zf(e,i,r){if(i!=null&&typeof i!="object")throw Error(l(62));if(e=e.style,r!=null){for(var o in r)!r.hasOwnProperty(o)||i!=null&&i.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var d in i)o=i[d],i.hasOwnProperty(d)&&r[d]!==o&&Qf(e,d,o)}else for(var p in i)i.hasOwnProperty(p)&&Qf(e,p,i[p])}function $s(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 My=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Iy=/^[\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 xl(e){return Iy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Cn(){}var qs=null;function Fs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var aa=null,ra=null;function Kf(e){var i=Ji(e);if(i&&(e=i.stateNode)){var r=e[St]||null;e:switch(e=i.stateNode,i.type){case"input":if(Bs(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),i=r.name,r.type==="radio"&&i!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Bt(""+i)+'"][type="radio"]'),i=0;i<r.length;i++){var o=r[i];if(o!==e&&o.form===e.form){var d=o[St]||null;if(!d)throw Error(l(90));Bs(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(i=0;i<r.length;i++)o=r[i],o.form===e.form&&qf(o)}break e;case"textarea":Yf(e,r.value,r.defaultValue);break e;case"select":i=r.value,i!=null&&na(e,!!r.multiple,i,!1)}}}var Ys=!1;function Wf(e,i,r){if(Ys)return e(i,r);Ys=!0;try{var o=e(i);return o}finally{if(Ys=!1,(aa!==null||ra!==null)&&(fo(),aa&&(i=aa,e=ra,ra=aa=null,Kf(i),e)))for(i=0;i<e.length;i++)Kf(e[i])}}function ir(e,i){var r=e.stateNode;if(r===null)return null;var o=r[St]||null;if(o===null)return null;r=o[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(l(231,i,typeof r));return r}var xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xs=!1;if(xn)try{var ar={};Object.defineProperty(ar,"passive",{get:function(){Xs=!0}}),window.addEventListener("test",ar,ar),window.removeEventListener("test",ar,ar)}catch{Xs=!1}var Yn=null,Qs=null,Al=null;function Jf(){if(Al)return Al;var e,i=Qs,r=i.length,o,d="value"in Yn?Yn.value:Yn.textContent,p=d.length;for(e=0;e<r&&i[e]===d[e];e++);var _=r-e;for(o=1;o<=_&&i[r-o]===d[p-o];o++);return Al=d.slice(e,1<o?1-o:void 0)}function Tl(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function wl(){return!0}function eh(){return!1}function Et(e){function i(r,o,d,p,_){this._reactName=r,this._targetInst=d,this.type=o,this.nativeEvent=p,this.target=_,this.currentTarget=null;for(var C in e)e.hasOwnProperty(C)&&(r=e[C],this[C]=r?r(p):p[C]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?wl:eh,this.isPropagationStopped=eh,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=wl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),i}var Ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ll=Et(Ci),rr=g({},Ci,{view:0,detail:0}),Hy=Et(rr),Zs,Ks,lr,Rl=g({},rr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Js,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!==lr&&(lr&&e.type==="mousemove"?(Zs=e.screenX-lr.screenX,Ks=e.screenY-lr.screenY):Ks=Zs=0,lr=e),Zs)},movementY:function(e){return"movementY"in e?e.movementY:Ks}}),th=Et(Rl),zy=g({},Rl,{dataTransfer:0}),Uy=Et(zy),jy=g({},rr,{relatedTarget:0}),Ws=Et(jy),Py=g({},Ci,{animationName:0,elapsedTime:0,pseudoElement:0}),Vy=Et(Py),By=g({},Ci,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gy=Et(By),$y=g({},Ci,{data:0}),nh=Et($y),qy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fy={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"},Yy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xy(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=Yy[e])?!!i[e]:!1}function Js(){return Xy}var Qy=g({},rr,{key:function(e){if(e.key){var i=qy[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=Tl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Fy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Js,charCode:function(e){return e.type==="keypress"?Tl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Zy=Et(Qy),Ky=g({},Rl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ih=Et(Ky),Wy=g({},rr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Js}),Jy=Et(Wy),eb=g({},Ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),tb=Et(eb),nb=g({},Rl,{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}),ib=Et(nb),ab=g({},Ci,{newState:0,oldState:0}),rb=Et(ab),lb=[9,13,27,32],eu=xn&&"CompositionEvent"in window,or=null;xn&&"documentMode"in document&&(or=document.documentMode);var ob=xn&&"TextEvent"in window&&!or,ah=xn&&(!eu||or&&8<or&&11>=or),rh=" ",lh=!1;function oh(e,i){switch(e){case"keyup":return lb.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var la=!1;function sb(e,i){switch(e){case"compositionend":return sh(i);case"keypress":return i.which!==32?null:(lh=!0,rh);case"textInput":return e=i.data,e===rh&&lh?null:e;default:return null}}function ub(e,i){if(la)return e==="compositionend"||!eu&&oh(e,i)?(e=Jf(),Al=Qs=Yn=null,la=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return ah&&i.locale!=="ko"?null:i.data;default:return null}}var cb={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 uh(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!cb[e.type]:i==="textarea"}function ch(e,i,r,o){aa?ra?ra.push(o):ra=[o]:aa=o,i=yo(i,"onChange"),0<i.length&&(r=new Ll("onChange","change",null,r,o),e.push({event:r,listeners:i}))}var sr=null,ur=null;function db(e){Fm(e,0)}function kl(e){var i=nr(e);if(qf(i))return e}function dh(e,i){if(e==="change")return i}var fh=!1;if(xn){var tu;if(xn){var nu="oninput"in document;if(!nu){var hh=document.createElement("div");hh.setAttribute("oninput","return;"),nu=typeof hh.oninput=="function"}tu=nu}else tu=!1;fh=tu&&(!document.documentMode||9<document.documentMode)}function ph(){sr&&(sr.detachEvent("onpropertychange",mh),ur=sr=null)}function mh(e){if(e.propertyName==="value"&&kl(ur)){var i=[];ch(i,ur,e,Fs(e)),Wf(db,i)}}function fb(e,i,r){e==="focusin"?(ph(),sr=i,ur=r,sr.attachEvent("onpropertychange",mh)):e==="focusout"&&ph()}function hb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return kl(ur)}function pb(e,i){if(e==="click")return kl(i)}function mb(e,i){if(e==="input"||e==="change")return kl(i)}function gb(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Nt=typeof Object.is=="function"?Object.is:gb;function cr(e,i){if(Nt(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var r=Object.keys(e),o=Object.keys(i);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var d=r[o];if(!Ns.call(i,d)||!Nt(e[d],i[d]))return!1}return!0}function gh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vh(e,i){var r=gh(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=i&&o>=i)return{node:r,offset:i-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=gh(r)}}function _h(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?_h(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function yh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=Cl(e.document);i instanceof e.HTMLIFrameElement;){try{var r=typeof i.contentWindow.location.href=="string"}catch{r=!1}if(r)e=i.contentWindow;else break;i=Cl(e.document)}return i}function iu(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var vb=xn&&"documentMode"in document&&11>=document.documentMode,oa=null,au=null,dr=null,ru=!1;function bh(e,i,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ru||oa==null||oa!==Cl(o)||(o=oa,"selectionStart"in o&&iu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),dr&&cr(dr,o)||(dr=o,o=yo(au,"onSelect"),0<o.length&&(i=new Ll("onSelect","select",null,i,r),e.push({event:i,listeners:o}),i.target=oa)))}function xi(e,i){var r={};return r[e.toLowerCase()]=i.toLowerCase(),r["Webkit"+e]="webkit"+i,r["Moz"+e]="moz"+i,r}var sa={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionrun:xi("Transition","TransitionRun"),transitionstart:xi("Transition","TransitionStart"),transitioncancel:xi("Transition","TransitionCancel"),transitionend:xi("Transition","TransitionEnd")},lu={},Sh={};xn&&(Sh=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function Ai(e){if(lu[e])return lu[e];if(!sa[e])return e;var i=sa[e],r;for(r in i)if(i.hasOwnProperty(r)&&r in Sh)return lu[e]=i[r];return e}var Eh=Ai("animationend"),Ch=Ai("animationiteration"),xh=Ai("animationstart"),_b=Ai("transitionrun"),yb=Ai("transitionstart"),bb=Ai("transitioncancel"),Ah=Ai("transitionend"),Th=new Map,ou="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ou.push("scrollEnd");function an(e,i){Th.set(e,i),Ei(i,[e])}var Dl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Gt=[],ua=0,su=0;function Ol(){for(var e=ua,i=su=ua=0;i<e;){var r=Gt[i];Gt[i++]=null;var o=Gt[i];Gt[i++]=null;var d=Gt[i];Gt[i++]=null;var p=Gt[i];if(Gt[i++]=null,o!==null&&d!==null){var _=o.pending;_===null?d.next=d:(d.next=_.next,_.next=d),o.pending=d}p!==0&&wh(r,d,p)}}function Nl(e,i,r,o){Gt[ua++]=e,Gt[ua++]=i,Gt[ua++]=r,Gt[ua++]=o,su|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function uu(e,i,r,o){return Nl(e,i,r,o),Ml(e)}function Ti(e,i){return Nl(e,null,null,i),Ml(e)}function wh(e,i,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var d=!1,p=e.return;p!==null;)p.childLanes|=r,o=p.alternate,o!==null&&(o.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(d=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,d&&i!==null&&(d=31-Ot(r),e=p.hiddenUpdates,o=e[d],o===null?e[d]=[i]:o.push(i),i.lane=r|536870912),p):null}function Ml(e){if(50<Nr)throw Nr=0,_c=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var ca={};function Sb(e,i,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mt(e,i,r,o){return new Sb(e,i,r,o)}function cu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function An(e,i){var r=e.alternate;return r===null?(r=Mt(e.tag,i,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=i,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,i=e.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Lh(e,i){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,i=r.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function Il(e,i,r,o,d,p){var _=0;if(o=e,typeof e=="function")cu(e)&&(_=1);else if(typeof e=="string")_=TS(e,r,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=Mt(31,r,i,d),e.elementType=K,e.lanes=p,e;case T:return wi(r.children,d,p,i);case N:_=8,d|=24;break;case L:return e=Mt(12,r,i,d|2),e.elementType=L,e.lanes=p,e;case V:return e=Mt(13,r,i,d),e.elementType=V,e.lanes=p,e;case j:return e=Mt(19,r,i,d),e.elementType=j,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:_=10;break e;case A:_=9;break e;case z:_=11;break e;case F:_=14;break e;case te:_=16,o=null;break e}_=29,r=Error(l(130,e===null?"null":typeof e,"")),o=null}return i=Mt(_,r,i,d),i.elementType=e,i.type=o,i.lanes=p,i}function wi(e,i,r,o){return e=Mt(7,e,o,i),e.lanes=r,e}function du(e,i,r){return e=Mt(6,e,null,i),e.lanes=r,e}function Rh(e){var i=Mt(18,null,null,0);return i.stateNode=e,i}function fu(e,i,r){return i=Mt(4,e.children!==null?e.children:[],e.key,i),i.lanes=r,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var kh=new WeakMap;function $t(e,i){if(typeof e=="object"&&e!==null){var r=kh.get(e);return r!==void 0?r:(i={value:e,source:i,stack:Zi(i)},kh.set(e,i),i)}return{value:e,source:i,stack:Zi(i)}}var da=[],fa=0,Hl=null,fr=0,qt=[],Ft=0,Xn=null,dn=1,fn="";function Tn(e,i){da[fa++]=fr,da[fa++]=Hl,Hl=e,fr=i}function Dh(e,i,r){qt[Ft++]=dn,qt[Ft++]=fn,qt[Ft++]=Xn,Xn=e;var o=dn;e=fn;var d=32-Ot(o)-1;o&=~(1<<d),r+=1;var p=32-Ot(i)+d;if(30<p){var _=d-d%5;p=(o&(1<<_)-1).toString(32),o>>=_,d-=_,dn=1<<32-Ot(i)+d|r<<d|o,fn=p+e}else dn=1<<p|r<<d|o,fn=e}function hu(e){e.return!==null&&(Tn(e,1),Dh(e,1,0))}function pu(e){for(;e===Hl;)Hl=da[--fa],da[fa]=null,fr=da[--fa],da[fa]=null;for(;e===Xn;)Xn=qt[--Ft],qt[Ft]=null,fn=qt[--Ft],qt[Ft]=null,dn=qt[--Ft],qt[Ft]=null}function Oh(e,i){qt[Ft++]=dn,qt[Ft++]=fn,qt[Ft++]=Xn,dn=i.id,fn=i.overflow,Xn=e}var ht=null,je=null,we=!1,Qn=null,Yt=!1,mu=Error(l(519));function Zn(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hr($t(i,e)),mu}function Nh(e){var i=e.stateNode,r=e.type,o=e.memoizedProps;switch(i[ft]=e,i[St]=o,r){case"dialog":Ee("cancel",i),Ee("close",i);break;case"iframe":case"object":case"embed":Ee("load",i);break;case"video":case"audio":for(r=0;r<Ir.length;r++)Ee(Ir[r],i);break;case"source":Ee("error",i);break;case"img":case"image":case"link":Ee("error",i),Ee("load",i);break;case"details":Ee("toggle",i);break;case"input":Ee("invalid",i),Ff(i,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Ee("invalid",i);break;case"textarea":Ee("invalid",i),Xf(i,o.value,o.defaultValue,o.children)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||i.textContent===""+r||o.suppressHydrationWarning===!0||Zm(i.textContent,r)?(o.popover!=null&&(Ee("beforetoggle",i),Ee("toggle",i)),o.onScroll!=null&&Ee("scroll",i),o.onScrollEnd!=null&&Ee("scrollend",i),o.onClick!=null&&(i.onclick=Cn),i=!0):i=!1,i||Zn(e,!0)}function Mh(e){for(ht=e.return;ht;)switch(ht.tag){case 5:case 31:case 13:Yt=!1;return;case 27:case 3:Yt=!0;return;default:ht=ht.return}}function ha(e){if(e!==ht)return!1;if(!we)return Mh(e),we=!0,!1;var i=e.tag,r;if((r=i!==3&&i!==27)&&((r=i===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Nc(e.type,e.memoizedProps)),r=!r),r&&je&&Zn(e),Mh(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));je=rg(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));je=rg(e)}else i===27?(i=je,ci(e.type)?(e=Uc,Uc=null,je=e):je=i):je=ht?Qt(e.stateNode.nextSibling):null;return!0}function Li(){je=ht=null,we=!1}function gu(){var e=Qn;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Qn=null),e}function hr(e){Qn===null?Qn=[e]:Qn.push(e)}var vu=D(null),Ri=null,wn=null;function Kn(e,i,r){J(vu,i._currentValue),i._currentValue=r}function Ln(e){e._currentValue=vu.current,$(vu)}function _u(e,i,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,o!==null&&(o.childLanes|=i)):o!==null&&(o.childLanes&i)!==i&&(o.childLanes|=i),e===r)break;e=e.return}}function yu(e,i,r,o){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var p=d.dependencies;if(p!==null){var _=d.child;p=p.firstContext;e:for(;p!==null;){var C=p;p=d;for(var w=0;w<i.length;w++)if(C.context===i[w]){p.lanes|=r,C=p.alternate,C!==null&&(C.lanes|=r),_u(p.return,r,e),o||(_=null);break e}p=C.next}}else if(d.tag===18){if(_=d.return,_===null)throw Error(l(341));_.lanes|=r,p=_.alternate,p!==null&&(p.lanes|=r),_u(_,r,e),_=null}else _=d.child;if(_!==null)_.return=d;else for(_=d;_!==null;){if(_===e){_=null;break}if(d=_.sibling,d!==null){d.return=_.return,_=d;break}_=_.return}d=_}}function pa(e,i,r,o){e=null;for(var d=i,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var _=d.alternate;if(_===null)throw Error(l(387));if(_=_.memoizedProps,_!==null){var C=d.type;Nt(d.pendingProps.value,_.value)||(e!==null?e.push(C):e=[C])}}else if(d===xe.current){if(_=d.alternate,_===null)throw Error(l(387));_.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Pr):e=[Pr])}d=d.return}e!==null&&yu(i,e,r,o),i.flags|=262144}function zl(e){for(e=e.firstContext;e!==null;){if(!Nt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ki(e){Ri=e,wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function pt(e){return Ih(Ri,e)}function Ul(e,i){return Ri===null&&ki(e),Ih(e,i)}function Ih(e,i){var r=i._currentValue;if(i={context:i,memoizedValue:r,next:null},wn===null){if(e===null)throw Error(l(308));wn=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else wn=wn.next=i;return r}var Eb=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(r,o){e.push(o)}};this.abort=function(){i.aborted=!0,e.forEach(function(r){return r()})}},Cb=t.unstable_scheduleCallback,xb=t.unstable_NormalPriority,Ze={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bu(){return{controller:new Eb,data:new Map,refCount:0}}function pr(e){e.refCount--,e.refCount===0&&Cb(xb,function(){e.controller.abort()})}var mr=null,Su=0,ma=0,ga=null;function Ab(e,i){if(mr===null){var r=mr=[];Su=0,ma=xc(),ga={status:"pending",value:void 0,then:function(o){r.push(o)}}}return Su++,i.then(Hh,Hh),i}function Hh(){if(--Su===0&&mr!==null){ga!==null&&(ga.status="fulfilled");var e=mr;mr=null,ma=0,ga=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function Tb(e,i){var r=[],o={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){o.status="fulfilled",o.value=i;for(var d=0;d<r.length;d++)(0,r[d])(i)},function(d){for(o.status="rejected",o.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),o}var zh=M.S;M.S=function(e,i){bm=kt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Ab(e,i),zh!==null&&zh(e,i)};var Di=D(null);function Eu(){var e=Di.current;return e!==null?e:He.pooledCache}function jl(e,i){i===null?J(Di,Di.current):J(Di,i.pool)}function Uh(){var e=Eu();return e===null?null:{parent:Ze._currentValue,pool:e}}var va=Error(l(460)),Cu=Error(l(474)),Pl=Error(l(542)),Vl={then:function(){}};function jh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ph(e,i,r){switch(r=e[r],r===void 0?e.push(i):r!==i&&(i.then(Cn,Cn),i=r),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Bh(e),e;default:if(typeof i.status=="string")i.then(Cn,Cn);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=i,e.status="pending",e.then(function(o){if(i.status==="pending"){var d=i;d.status="fulfilled",d.value=o}},function(o){if(i.status==="pending"){var d=i;d.status="rejected",d.reason=o}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Bh(e),e}throw Ni=i,va}}function Oi(e){try{var i=e._init;return i(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Ni=r,va):r}}var Ni=null;function Vh(){if(Ni===null)throw Error(l(459));var e=Ni;return Ni=null,e}function Bh(e){if(e===va||e===Pl)throw Error(l(483))}var _a=null,gr=0;function Bl(e){var i=gr;return gr+=1,_a===null&&(_a=[]),Ph(_a,e,i)}function vr(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function Gl(e,i){throw i.$$typeof===y?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function Gh(e){function i(O,k){if(e){var I=O.deletions;I===null?(O.deletions=[k],O.flags|=16):I.push(k)}}function r(O,k){if(!e)return null;for(;k!==null;)i(O,k),k=k.sibling;return null}function o(O){for(var k=new Map;O!==null;)O.key!==null?k.set(O.key,O):k.set(O.index,O),O=O.sibling;return k}function d(O,k){return O=An(O,k),O.index=0,O.sibling=null,O}function p(O,k,I){return O.index=I,e?(I=O.alternate,I!==null?(I=I.index,I<k?(O.flags|=67108866,k):I):(O.flags|=67108866,k)):(O.flags|=1048576,k)}function _(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function C(O,k,I,G){return k===null||k.tag!==6?(k=du(I,O.mode,G),k.return=O,k):(k=d(k,I),k.return=O,k)}function w(O,k,I,G){var le=I.type;return le===T?B(O,k,I.props.children,G,I.key):k!==null&&(k.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===te&&Oi(le)===k.type)?(k=d(k,I.props),vr(k,I),k.return=O,k):(k=Il(I.type,I.key,I.props,null,O.mode,G),vr(k,I),k.return=O,k)}function H(O,k,I,G){return k===null||k.tag!==4||k.stateNode.containerInfo!==I.containerInfo||k.stateNode.implementation!==I.implementation?(k=fu(I,O.mode,G),k.return=O,k):(k=d(k,I.children||[]),k.return=O,k)}function B(O,k,I,G,le){return k===null||k.tag!==7?(k=wi(I,O.mode,G,le),k.return=O,k):(k=d(k,I),k.return=O,k)}function q(O,k,I){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=du(""+k,O.mode,I),k.return=O,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case b:return I=Il(k.type,k.key,k.props,null,O.mode,I),vr(I,k),I.return=O,I;case E:return k=fu(k,O.mode,I),k.return=O,k;case te:return k=Oi(k),q(O,k,I)}if(ce(k)||X(k))return k=wi(k,O.mode,I,null),k.return=O,k;if(typeof k.then=="function")return q(O,Bl(k),I);if(k.$$typeof===R)return q(O,Ul(O,k),I);Gl(O,k)}return null}function U(O,k,I,G){var le=k!==null?k.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return le!==null?null:C(O,k,""+I,G);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case b:return I.key===le?w(O,k,I,G):null;case E:return I.key===le?H(O,k,I,G):null;case te:return I=Oi(I),U(O,k,I,G)}if(ce(I)||X(I))return le!==null?null:B(O,k,I,G,null);if(typeof I.then=="function")return U(O,k,Bl(I),G);if(I.$$typeof===R)return U(O,k,Ul(O,I),G);Gl(O,I)}return null}function P(O,k,I,G,le){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return O=O.get(I)||null,C(k,O,""+G,le);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case b:return O=O.get(G.key===null?I:G.key)||null,w(k,O,G,le);case E:return O=O.get(G.key===null?I:G.key)||null,H(k,O,G,le);case te:return G=Oi(G),P(O,k,I,G,le)}if(ce(G)||X(G))return O=O.get(I)||null,B(k,O,G,le,null);if(typeof G.then=="function")return P(O,k,I,Bl(G),le);if(G.$$typeof===R)return P(O,k,I,Ul(k,G),le);Gl(k,G)}return null}function ae(O,k,I,G){for(var le=null,Le=null,re=k,_e=k=0,Te=null;re!==null&&_e<I.length;_e++){re.index>_e?(Te=re,re=null):Te=re.sibling;var Re=U(O,re,I[_e],G);if(Re===null){re===null&&(re=Te);break}e&&re&&Re.alternate===null&&i(O,re),k=p(Re,k,_e),Le===null?le=Re:Le.sibling=Re,Le=Re,re=Te}if(_e===I.length)return r(O,re),we&&Tn(O,_e),le;if(re===null){for(;_e<I.length;_e++)re=q(O,I[_e],G),re!==null&&(k=p(re,k,_e),Le===null?le=re:Le.sibling=re,Le=re);return we&&Tn(O,_e),le}for(re=o(re);_e<I.length;_e++)Te=P(re,O,_e,I[_e],G),Te!==null&&(e&&Te.alternate!==null&&re.delete(Te.key===null?_e:Te.key),k=p(Te,k,_e),Le===null?le=Te:Le.sibling=Te,Le=Te);return e&&re.forEach(function(mi){return i(O,mi)}),we&&Tn(O,_e),le}function se(O,k,I,G){if(I==null)throw Error(l(151));for(var le=null,Le=null,re=k,_e=k=0,Te=null,Re=I.next();re!==null&&!Re.done;_e++,Re=I.next()){re.index>_e?(Te=re,re=null):Te=re.sibling;var mi=U(O,re,Re.value,G);if(mi===null){re===null&&(re=Te);break}e&&re&&mi.alternate===null&&i(O,re),k=p(mi,k,_e),Le===null?le=mi:Le.sibling=mi,Le=mi,re=Te}if(Re.done)return r(O,re),we&&Tn(O,_e),le;if(re===null){for(;!Re.done;_e++,Re=I.next())Re=q(O,Re.value,G),Re!==null&&(k=p(Re,k,_e),Le===null?le=Re:Le.sibling=Re,Le=Re);return we&&Tn(O,_e),le}for(re=o(re);!Re.done;_e++,Re=I.next())Re=P(re,O,_e,Re.value,G),Re!==null&&(e&&Re.alternate!==null&&re.delete(Re.key===null?_e:Re.key),k=p(Re,k,_e),Le===null?le=Re:Le.sibling=Re,Le=Re);return e&&re.forEach(function(zS){return i(O,zS)}),we&&Tn(O,_e),le}function Ie(O,k,I,G){if(typeof I=="object"&&I!==null&&I.type===T&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case b:e:{for(var le=I.key;k!==null;){if(k.key===le){if(le=I.type,le===T){if(k.tag===7){r(O,k.sibling),G=d(k,I.props.children),G.return=O,O=G;break e}}else if(k.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===te&&Oi(le)===k.type){r(O,k.sibling),G=d(k,I.props),vr(G,I),G.return=O,O=G;break e}r(O,k);break}else i(O,k);k=k.sibling}I.type===T?(G=wi(I.props.children,O.mode,G,I.key),G.return=O,O=G):(G=Il(I.type,I.key,I.props,null,O.mode,G),vr(G,I),G.return=O,O=G)}return _(O);case E:e:{for(le=I.key;k!==null;){if(k.key===le)if(k.tag===4&&k.stateNode.containerInfo===I.containerInfo&&k.stateNode.implementation===I.implementation){r(O,k.sibling),G=d(k,I.children||[]),G.return=O,O=G;break e}else{r(O,k);break}else i(O,k);k=k.sibling}G=fu(I,O.mode,G),G.return=O,O=G}return _(O);case te:return I=Oi(I),Ie(O,k,I,G)}if(ce(I))return ae(O,k,I,G);if(X(I)){if(le=X(I),typeof le!="function")throw Error(l(150));return I=le.call(I),se(O,k,I,G)}if(typeof I.then=="function")return Ie(O,k,Bl(I),G);if(I.$$typeof===R)return Ie(O,k,Ul(O,I),G);Gl(O,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,k!==null&&k.tag===6?(r(O,k.sibling),G=d(k,I),G.return=O,O=G):(r(O,k),G=du(I,O.mode,G),G.return=O,O=G),_(O)):r(O,k)}return function(O,k,I,G){try{gr=0;var le=Ie(O,k,I,G);return _a=null,le}catch(re){if(re===va||re===Pl)throw re;var Le=Mt(29,re,null,O.mode);return Le.lanes=G,Le.return=O,Le}}}var Mi=Gh(!0),$h=Gh(!1),Wn=!1;function xu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Au(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Jn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ei(e,i,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(ke&2)!==0){var d=o.pending;return d===null?i.next=i:(i.next=d.next,d.next=i),o.pending=i,i=Ml(e),wh(e,null,r),i}return Nl(e,o,i,r),Ml(e)}function _r(e,i,r){if(i=i.updateQueue,i!==null&&(i=i.shared,(r&4194048)!==0)){var o=i.lanes;o&=e.pendingLanes,r|=o,i.lanes=r,If(e,r)}}function Tu(e,i){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var d=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var _={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?d=p=_:p=p.next=_,r=r.next}while(r!==null);p===null?d=p=i:p=p.next=i}else d=p=i;r={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:o.shared,callbacks:o.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=i:e.next=i,r.lastBaseUpdate=i}var wu=!1;function yr(){if(wu){var e=ga;if(e!==null)throw e}}function br(e,i,r,o){wu=!1;var d=e.updateQueue;Wn=!1;var p=d.firstBaseUpdate,_=d.lastBaseUpdate,C=d.shared.pending;if(C!==null){d.shared.pending=null;var w=C,H=w.next;w.next=null,_===null?p=H:_.next=H,_=w;var B=e.alternate;B!==null&&(B=B.updateQueue,C=B.lastBaseUpdate,C!==_&&(C===null?B.firstBaseUpdate=H:C.next=H,B.lastBaseUpdate=w))}if(p!==null){var q=d.baseState;_=0,B=H=w=null,C=p;do{var U=C.lane&-536870913,P=U!==C.lane;if(P?(Ae&U)===U:(o&U)===U){U!==0&&U===ma&&(wu=!0),B!==null&&(B=B.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var ae=e,se=C;U=i;var Ie=r;switch(se.tag){case 1:if(ae=se.payload,typeof ae=="function"){q=ae.call(Ie,q,U);break e}q=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=se.payload,U=typeof ae=="function"?ae.call(Ie,q,U):ae,U==null)break e;q=g({},q,U);break e;case 2:Wn=!0}}U=C.callback,U!==null&&(e.flags|=64,P&&(e.flags|=8192),P=d.callbacks,P===null?d.callbacks=[U]:P.push(U))}else P={lane:U,tag:C.tag,payload:C.payload,callback:C.callback,next:null},B===null?(H=B=P,w=q):B=B.next=P,_|=U;if(C=C.next,C===null){if(C=d.shared.pending,C===null)break;P=C,C=P.next,P.next=null,d.lastBaseUpdate=P,d.shared.pending=null}}while(!0);B===null&&(w=q),d.baseState=w,d.firstBaseUpdate=H,d.lastBaseUpdate=B,p===null&&(d.shared.lanes=0),ri|=_,e.lanes=_,e.memoizedState=q}}function qh(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function Fh(e,i){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)qh(r[e],i)}var ya=D(null),$l=D(0);function Yh(e,i){e=zn,J($l,e),J(ya,i),zn=e|i.baseLanes}function Lu(){J($l,zn),J(ya,ya.current)}function Ru(){zn=$l.current,$(ya),$($l)}var It=D(null),Xt=null;function ti(e){var i=e.alternate;J(Ye,Ye.current&1),J(It,e),Xt===null&&(i===null||ya.current!==null||i.memoizedState!==null)&&(Xt=e)}function ku(e){J(Ye,Ye.current),J(It,e),Xt===null&&(Xt=e)}function Xh(e){e.tag===22?(J(Ye,Ye.current),J(It,e),Xt===null&&(Xt=e)):ni()}function ni(){J(Ye,Ye.current),J(It,It.current)}function Ht(e){$(It),Xt===e&&(Xt=null),$(Ye)}var Ye=D(0);function ql(e){for(var i=e;i!==null;){if(i.tag===13){var r=i.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Hc(r)||zc(r)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Rn=0,ge=null,Ne=null,Ke=null,Fl=!1,ba=!1,Ii=!1,Yl=0,Sr=0,Sa=null,wb=0;function Ge(){throw Error(l(321))}function Du(e,i){if(i===null)return!1;for(var r=0;r<i.length&&r<e.length;r++)if(!Nt(e[r],i[r]))return!1;return!0}function Ou(e,i,r,o,d,p){return Rn=p,ge=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,M.H=e===null||e.memoizedState===null?Dp:Yu,Ii=!1,p=r(o,d),Ii=!1,ba&&(p=Zh(i,r,o,d)),Qh(e),p}function Qh(e){M.H=xr;var i=Ne!==null&&Ne.next!==null;if(Rn=0,Ke=Ne=ge=null,Fl=!1,Sr=0,Sa=null,i)throw Error(l(300));e===null||We||(e=e.dependencies,e!==null&&zl(e)&&(We=!0))}function Zh(e,i,r,o){ge=e;var d=0;do{if(ba&&(Sa=null),Sr=0,ba=!1,25<=d)throw Error(l(301));if(d+=1,Ke=Ne=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}M.H=Op,p=i(r,o)}while(ba);return p}function Lb(){var e=M.H,i=e.useState()[0];return i=typeof i.then=="function"?Er(i):i,e=e.useState()[0],(Ne!==null?Ne.memoizedState:null)!==e&&(ge.flags|=1024),i}function Nu(){var e=Yl!==0;return Yl=0,e}function Mu(e,i,r){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~r}function Iu(e){if(Fl){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}Fl=!1}Rn=0,Ke=Ne=ge=null,ba=!1,Sr=Yl=0,Sa=null}function bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?ge.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function Xe(){if(Ne===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var i=Ke===null?ge.memoizedState:Ke.next;if(i!==null)Ke=i,Ne=e;else{if(e===null)throw ge.alternate===null?Error(l(467)):Error(l(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Ke===null?ge.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Xl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Er(e){var i=Sr;return Sr+=1,Sa===null&&(Sa=[]),e=Ph(Sa,e,i),i=ge,(Ke===null?i.memoizedState:Ke.next)===null&&(i=i.alternate,M.H=i===null||i.memoizedState===null?Dp:Yu),e}function Ql(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Er(e);if(e.$$typeof===R)return pt(e)}throw Error(l(438,String(e)))}function Hu(e){var i=null,r=ge.updateQueue;if(r!==null&&(i=r.memoCache),i==null){var o=ge.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(i={data:o.data.map(function(d){return d.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),r===null&&(r=Xl(),ge.updateQueue=r),r.memoCache=i,r=i.data[i.index],r===void 0)for(r=i.data[i.index]=Array(e),o=0;o<e;o++)r[o]=ee;return i.index++,r}function kn(e,i){return typeof i=="function"?i(e):i}function Zl(e){var i=Xe();return zu(i,Ne,e)}function zu(e,i,r){var o=e.queue;if(o===null)throw Error(l(311));o.lastRenderedReducer=r;var d=e.baseQueue,p=o.pending;if(p!==null){if(d!==null){var _=d.next;d.next=p.next,p.next=_}i.baseQueue=d=p,o.pending=null}if(p=e.baseState,d===null)e.memoizedState=p;else{i=d.next;var C=_=null,w=null,H=i,B=!1;do{var q=H.lane&-536870913;if(q!==H.lane?(Ae&q)===q:(Rn&q)===q){var U=H.revertLane;if(U===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),q===ma&&(B=!0);else if((Rn&U)===U){H=H.next,U===ma&&(B=!0);continue}else q={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},w===null?(C=w=q,_=p):w=w.next=q,ge.lanes|=U,ri|=U;q=H.action,Ii&&r(p,q),p=H.hasEagerState?H.eagerState:r(p,q)}else U={lane:q,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},w===null?(C=w=U,_=p):w=w.next=U,ge.lanes|=q,ri|=q;H=H.next}while(H!==null&&H!==i);if(w===null?_=p:w.next=C,!Nt(p,e.memoizedState)&&(We=!0,B&&(r=ga,r!==null)))throw r;e.memoizedState=p,e.baseState=_,e.baseQueue=w,o.lastRenderedState=p}return d===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Uu(e){var i=Xe(),r=i.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=e;var o=r.dispatch,d=r.pending,p=i.memoizedState;if(d!==null){r.pending=null;var _=d=d.next;do p=e(p,_.action),_=_.next;while(_!==d);Nt(p,i.memoizedState)||(We=!0),i.memoizedState=p,i.baseQueue===null&&(i.baseState=p),r.lastRenderedState=p}return[p,o]}function Kh(e,i,r){var o=ge,d=Xe(),p=we;if(p){if(r===void 0)throw Error(l(407));r=r()}else r=i();var _=!Nt((Ne||d).memoizedState,r);if(_&&(d.memoizedState=r,We=!0),d=d.queue,Vu(ep.bind(null,o,d,e),[e]),d.getSnapshot!==i||_||Ke!==null&&Ke.memoizedState.tag&1){if(o.flags|=2048,Ea(9,{destroy:void 0},Jh.bind(null,o,d,r,i),null),He===null)throw Error(l(349));p||(Rn&127)!==0||Wh(o,i,r)}return r}function Wh(e,i,r){e.flags|=16384,e={getSnapshot:i,value:r},i=ge.updateQueue,i===null?(i=Xl(),ge.updateQueue=i,i.stores=[e]):(r=i.stores,r===null?i.stores=[e]:r.push(e))}function Jh(e,i,r,o){i.value=r,i.getSnapshot=o,tp(i)&&np(e)}function ep(e,i,r){return r(function(){tp(i)&&np(e)})}function tp(e){var i=e.getSnapshot;e=e.value;try{var r=i();return!Nt(e,r)}catch{return!0}}function np(e){var i=Ti(e,2);i!==null&&wt(i,e,2)}function ju(e){var i=bt();if(typeof e=="function"){var r=e;if(e=r(),Ii){qn(!0);try{r()}finally{qn(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kn,lastRenderedState:e},i}function ip(e,i,r,o){return e.baseState=r,zu(e,Ne,typeof o=="function"?o:kn)}function Rb(e,i,r,o,d){if(Jl(e))throw Error(l(485));if(e=i.action,e!==null){var p={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){p.listeners.push(_)}};M.T!==null?r(!0):p.isTransition=!1,o(p),r=i.pending,r===null?(p.next=i.pending=p,ap(i,p)):(p.next=r.next,i.pending=r.next=p)}}function ap(e,i){var r=i.action,o=i.payload,d=e.state;if(i.isTransition){var p=M.T,_={};M.T=_;try{var C=r(d,o),w=M.S;w!==null&&w(_,C),rp(e,i,C)}catch(H){Pu(e,i,H)}finally{p!==null&&_.types!==null&&(p.types=_.types),M.T=p}}else try{p=r(d,o),rp(e,i,p)}catch(H){Pu(e,i,H)}}function rp(e,i,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){lp(e,i,o)},function(o){return Pu(e,i,o)}):lp(e,i,r)}function lp(e,i,r){i.status="fulfilled",i.value=r,op(i),e.state=r,i=e.pending,i!==null&&(r=i.next,r===i?e.pending=null:(r=r.next,i.next=r,ap(e,r)))}function Pu(e,i,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do i.status="rejected",i.reason=r,op(i),i=i.next;while(i!==o)}e.action=null}function op(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function sp(e,i){return i}function up(e,i){if(we){var r=He.formState;if(r!==null){e:{var o=ge;if(we){if(je){t:{for(var d=je,p=Yt;d.nodeType!==8;){if(!p){d=null;break t}if(d=Qt(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){je=Qt(d.nextSibling),o=d.data==="F!";break e}}Zn(o)}o=!1}o&&(i=r[0])}}return r=bt(),r.memoizedState=r.baseState=i,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sp,lastRenderedState:i},r.queue=o,r=Lp.bind(null,ge,o),o.dispatch=r,o=ju(!1),p=Fu.bind(null,ge,!1,o.queue),o=bt(),d={state:i,dispatch:null,action:e,pending:null},o.queue=d,r=Rb.bind(null,ge,d,p,r),d.dispatch=r,o.memoizedState=e,[i,r,!1]}function cp(e){var i=Xe();return dp(i,Ne,e)}function dp(e,i,r){if(i=zu(e,i,sp)[0],e=Zl(kn)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var o=Er(i)}catch(_){throw _===va?Pl:_}else o=i;i=Xe();var d=i.queue,p=d.dispatch;return r!==i.memoizedState&&(ge.flags|=2048,Ea(9,{destroy:void 0},kb.bind(null,d,r),null)),[o,p,e]}function kb(e,i){e.action=i}function fp(e){var i=Xe(),r=Ne;if(r!==null)return dp(i,r,e);Xe(),i=i.memoizedState,r=Xe();var o=r.queue.dispatch;return r.memoizedState=e,[i,o,!1]}function Ea(e,i,r,o){return e={tag:e,create:r,deps:o,inst:i,next:null},i=ge.updateQueue,i===null&&(i=Xl(),ge.updateQueue=i),r=i.lastEffect,r===null?i.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,i.lastEffect=e),e}function hp(){return Xe().memoizedState}function Kl(e,i,r,o){var d=bt();ge.flags|=e,d.memoizedState=Ea(1|i,{destroy:void 0},r,o===void 0?null:o)}function Wl(e,i,r,o){var d=Xe();o=o===void 0?null:o;var p=d.memoizedState.inst;Ne!==null&&o!==null&&Du(o,Ne.memoizedState.deps)?d.memoizedState=Ea(i,p,r,o):(ge.flags|=e,d.memoizedState=Ea(1|i,p,r,o))}function pp(e,i){Kl(8390656,8,e,i)}function Vu(e,i){Wl(2048,8,e,i)}function Db(e){ge.flags|=4;var i=ge.updateQueue;if(i===null)i=Xl(),ge.updateQueue=i,i.events=[e];else{var r=i.events;r===null?i.events=[e]:r.push(e)}}function mp(e){var i=Xe().memoizedState;return Db({ref:i,nextImpl:e}),function(){if((ke&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function gp(e,i){return Wl(4,2,e,i)}function vp(e,i){return Wl(4,4,e,i)}function _p(e,i){if(typeof i=="function"){e=e();var r=i(e);return function(){typeof r=="function"?r():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function yp(e,i,r){r=r!=null?r.concat([e]):null,Wl(4,4,_p.bind(null,i,e),r)}function Bu(){}function bp(e,i){var r=Xe();i=i===void 0?null:i;var o=r.memoizedState;return i!==null&&Du(i,o[1])?o[0]:(r.memoizedState=[e,i],e)}function Sp(e,i){var r=Xe();i=i===void 0?null:i;var o=r.memoizedState;if(i!==null&&Du(i,o[1]))return o[0];if(o=e(),Ii){qn(!0);try{e()}finally{qn(!1)}}return r.memoizedState=[o,i],o}function Gu(e,i,r){return r===void 0||(Rn&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=i:(e.memoizedState=r,e=Em(),ge.lanes|=e,ri|=e,r)}function Ep(e,i,r,o){return Nt(r,i)?r:ya.current!==null?(e=Gu(e,r,o),Nt(e,i)||(We=!0),e):(Rn&42)===0||(Rn&1073741824)!==0&&(Ae&261930)===0?(We=!0,e.memoizedState=r):(e=Em(),ge.lanes|=e,ri|=e,i)}function Cp(e,i,r,o,d){var p=Y.p;Y.p=p!==0&&8>p?p:8;var _=M.T,C={};M.T=C,Fu(e,!1,i,r);try{var w=d(),H=M.S;if(H!==null&&H(C,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var B=Tb(w,o);Cr(e,i,B,jt(e))}else Cr(e,i,o,jt(e))}catch(q){Cr(e,i,{then:function(){},status:"rejected",reason:q},jt())}finally{Y.p=p,_!==null&&C.types!==null&&(_.types=C.types),M.T=_}}function Ob(){}function $u(e,i,r,o){if(e.tag!==5)throw Error(l(476));var d=xp(e).queue;Cp(e,d,i,ne,r===null?Ob:function(){return Ap(e),r(o)})}function xp(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:kn,lastRenderedState:ne},next:null};var r={};return i.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:kn,lastRenderedState:r},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function Ap(e){var i=xp(e);i.next===null&&(i=e.alternate.memoizedState),Cr(e,i.next.queue,{},jt())}function qu(){return pt(Pr)}function Tp(){return Xe().memoizedState}function wp(){return Xe().memoizedState}function Nb(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var r=jt();e=Jn(r);var o=ei(i,e,r);o!==null&&(wt(o,i,r),_r(o,i,r)),i={cache:bu()},e.payload=i;return}i=i.return}}function Mb(e,i,r){var o=jt();r={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Jl(e)?Rp(i,r):(r=uu(e,i,r,o),r!==null&&(wt(r,e,o),kp(r,i,o)))}function Lp(e,i,r){var o=jt();Cr(e,i,r,o)}function Cr(e,i,r,o){var d={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Jl(e))Rp(i,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=i.lastRenderedReducer,p!==null))try{var _=i.lastRenderedState,C=p(_,r);if(d.hasEagerState=!0,d.eagerState=C,Nt(C,_))return Nl(e,i,d,0),He===null&&Ol(),!1}catch{}if(r=uu(e,i,d,o),r!==null)return wt(r,e,o),kp(r,i,o),!0}return!1}function Fu(e,i,r,o){if(o={lane:2,revertLane:xc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Jl(e)){if(i)throw Error(l(479))}else i=uu(e,r,o,2),i!==null&&wt(i,e,2)}function Jl(e){var i=e.alternate;return e===ge||i!==null&&i===ge}function Rp(e,i){ba=Fl=!0;var r=e.pending;r===null?i.next=i:(i.next=r.next,r.next=i),e.pending=i}function kp(e,i,r){if((r&4194048)!==0){var o=i.lanes;o&=e.pendingLanes,r|=o,i.lanes=r,If(e,r)}}var xr={readContext:pt,use:Ql,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};xr.useEffectEvent=Ge;var Dp={readContext:pt,use:Ql,useCallback:function(e,i){return bt().memoizedState=[e,i===void 0?null:i],e},useContext:pt,useEffect:pp,useImperativeHandle:function(e,i,r){r=r!=null?r.concat([e]):null,Kl(4194308,4,_p.bind(null,i,e),r)},useLayoutEffect:function(e,i){return Kl(4194308,4,e,i)},useInsertionEffect:function(e,i){Kl(4,2,e,i)},useMemo:function(e,i){var r=bt();i=i===void 0?null:i;var o=e();if(Ii){qn(!0);try{e()}finally{qn(!1)}}return r.memoizedState=[o,i],o},useReducer:function(e,i,r){var o=bt();if(r!==void 0){var d=r(i);if(Ii){qn(!0);try{r(i)}finally{qn(!1)}}}else d=i;return o.memoizedState=o.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},o.queue=e,e=e.dispatch=Mb.bind(null,ge,e),[o.memoizedState,e]},useRef:function(e){var i=bt();return e={current:e},i.memoizedState=e},useState:function(e){e=ju(e);var i=e.queue,r=Lp.bind(null,ge,i);return i.dispatch=r,[e.memoizedState,r]},useDebugValue:Bu,useDeferredValue:function(e,i){var r=bt();return Gu(r,e,i)},useTransition:function(){var e=ju(!1);return e=Cp.bind(null,ge,e.queue,!0,!1),bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,r){var o=ge,d=bt();if(we){if(r===void 0)throw Error(l(407));r=r()}else{if(r=i(),He===null)throw Error(l(349));(Ae&127)!==0||Wh(o,i,r)}d.memoizedState=r;var p={value:r,getSnapshot:i};return d.queue=p,pp(ep.bind(null,o,p,e),[e]),o.flags|=2048,Ea(9,{destroy:void 0},Jh.bind(null,o,p,r,i),null),r},useId:function(){var e=bt(),i=He.identifierPrefix;if(we){var r=fn,o=dn;r=(o&~(1<<32-Ot(o)-1)).toString(32)+r,i="_"+i+"R_"+r,r=Yl++,0<r&&(i+="H"+r.toString(32)),i+="_"}else r=wb++,i="_"+i+"r_"+r.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:qu,useFormState:up,useActionState:up,useOptimistic:function(e){var i=bt();i.memoizedState=i.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=r,i=Fu.bind(null,ge,!0,r),r.dispatch=i,[e,i]},useMemoCache:Hu,useCacheRefresh:function(){return bt().memoizedState=Nb.bind(null,ge)},useEffectEvent:function(e){var i=bt(),r={impl:e};return i.memoizedState=r,function(){if((ke&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}},Yu={readContext:pt,use:Ql,useCallback:bp,useContext:pt,useEffect:Vu,useImperativeHandle:yp,useInsertionEffect:gp,useLayoutEffect:vp,useMemo:Sp,useReducer:Zl,useRef:hp,useState:function(){return Zl(kn)},useDebugValue:Bu,useDeferredValue:function(e,i){var r=Xe();return Ep(r,Ne.memoizedState,e,i)},useTransition:function(){var e=Zl(kn)[0],i=Xe().memoizedState;return[typeof e=="boolean"?e:Er(e),i]},useSyncExternalStore:Kh,useId:Tp,useHostTransitionStatus:qu,useFormState:cp,useActionState:cp,useOptimistic:function(e,i){var r=Xe();return ip(r,Ne,e,i)},useMemoCache:Hu,useCacheRefresh:wp};Yu.useEffectEvent=mp;var Op={readContext:pt,use:Ql,useCallback:bp,useContext:pt,useEffect:Vu,useImperativeHandle:yp,useInsertionEffect:gp,useLayoutEffect:vp,useMemo:Sp,useReducer:Uu,useRef:hp,useState:function(){return Uu(kn)},useDebugValue:Bu,useDeferredValue:function(e,i){var r=Xe();return Ne===null?Gu(r,e,i):Ep(r,Ne.memoizedState,e,i)},useTransition:function(){var e=Uu(kn)[0],i=Xe().memoizedState;return[typeof e=="boolean"?e:Er(e),i]},useSyncExternalStore:Kh,useId:Tp,useHostTransitionStatus:qu,useFormState:fp,useActionState:fp,useOptimistic:function(e,i){var r=Xe();return Ne!==null?ip(r,Ne,e,i):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Hu,useCacheRefresh:wp};Op.useEffectEvent=mp;function Xu(e,i,r,o){i=e.memoizedState,r=r(o,i),r=r==null?i:g({},i,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Qu={enqueueSetState:function(e,i,r){e=e._reactInternals;var o=jt(),d=Jn(o);d.payload=i,r!=null&&(d.callback=r),i=ei(e,d,o),i!==null&&(wt(i,e,o),_r(i,e,o))},enqueueReplaceState:function(e,i,r){e=e._reactInternals;var o=jt(),d=Jn(o);d.tag=1,d.payload=i,r!=null&&(d.callback=r),i=ei(e,d,o),i!==null&&(wt(i,e,o),_r(i,e,o))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var r=jt(),o=Jn(r);o.tag=2,i!=null&&(o.callback=i),i=ei(e,o,r),i!==null&&(wt(i,e,r),_r(i,e,r))}};function Np(e,i,r,o,d,p,_){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,p,_):i.prototype&&i.prototype.isPureReactComponent?!cr(r,o)||!cr(d,p):!0}function Mp(e,i,r,o){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(r,o),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(r,o),i.state!==e&&Qu.enqueueReplaceState(i,i.state,null)}function Hi(e,i){var r=i;if("ref"in i){r={};for(var o in i)o!=="ref"&&(r[o]=i[o])}if(e=e.defaultProps){r===i&&(r=g({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function Ip(e){Dl(e)}function Hp(e){console.error(e)}function zp(e){Dl(e)}function eo(e,i){try{var r=e.onUncaughtError;r(i.value,{componentStack:i.stack})}catch(o){setTimeout(function(){throw o})}}function Up(e,i,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Zu(e,i,r){return r=Jn(r),r.tag=3,r.payload={element:null},r.callback=function(){eo(e,i)},r}function jp(e){return e=Jn(e),e.tag=3,e}function Pp(e,i,r,o){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=o.value;e.payload=function(){return d(p)},e.callback=function(){Up(i,r,o)}}var _=r.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(e.callback=function(){Up(i,r,o),typeof d!="function"&&(li===null?li=new Set([this]):li.add(this));var C=o.stack;this.componentDidCatch(o.value,{componentStack:C!==null?C:""})})}function Ib(e,i,r,o,d){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(i=r.alternate,i!==null&&pa(i,r,d,!0),r=It.current,r!==null){switch(r.tag){case 31:case 13:return Xt===null?ho():r.alternate===null&&$e===0&&($e=3),r.flags&=-257,r.flags|=65536,r.lanes=d,o===Vl?r.flags|=16384:(i=r.updateQueue,i===null?r.updateQueue=new Set([o]):i.add(o),Sc(e,o,d)),!1;case 22:return r.flags|=65536,o===Vl?r.flags|=16384:(i=r.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([o])},r.updateQueue=i):(r=i.retryQueue,r===null?i.retryQueue=new Set([o]):r.add(o)),Sc(e,o,d)),!1}throw Error(l(435,r.tag))}return Sc(e,o,d),ho(),!1}if(we)return i=It.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=d,o!==mu&&(e=Error(l(422),{cause:o}),hr($t(e,r)))):(o!==mu&&(i=Error(l(423),{cause:o}),hr($t(i,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,o=$t(o,r),d=Zu(e.stateNode,o,d),Tu(e,d),$e!==4&&($e=2)),!1;var p=Error(l(520),{cause:o});if(p=$t(p,r),Or===null?Or=[p]:Or.push(p),$e!==4&&($e=2),i===null)return!0;o=$t(o,r),r=i;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=Zu(r.stateNode,o,e),Tu(r,e),!1;case 1:if(i=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(li===null||!li.has(p))))return r.flags|=65536,d&=-d,r.lanes|=d,d=jp(d),Pp(d,e,r,o),Tu(r,d),!1}r=r.return}while(r!==null);return!1}var Ku=Error(l(461)),We=!1;function mt(e,i,r,o){i.child=e===null?$h(i,null,r,o):Mi(i,e.child,r,o)}function Vp(e,i,r,o,d){r=r.render;var p=i.ref;if("ref"in o){var _={};for(var C in o)C!=="ref"&&(_[C]=o[C])}else _=o;return ki(i),o=Ou(e,i,r,_,p,d),C=Nu(),e!==null&&!We?(Mu(e,i,d),Dn(e,i,d)):(we&&C&&hu(i),i.flags|=1,mt(e,i,o,d),i.child)}function Bp(e,i,r,o,d){if(e===null){var p=r.type;return typeof p=="function"&&!cu(p)&&p.defaultProps===void 0&&r.compare===null?(i.tag=15,i.type=p,Gp(e,i,p,o,d)):(e=Il(r.type,null,o,i,i.mode,d),e.ref=i.ref,e.return=i,i.child=e)}if(p=e.child,!rc(e,d)){var _=p.memoizedProps;if(r=r.compare,r=r!==null?r:cr,r(_,o)&&e.ref===i.ref)return Dn(e,i,d)}return i.flags|=1,e=An(p,o),e.ref=i.ref,e.return=i,i.child=e}function Gp(e,i,r,o,d){if(e!==null){var p=e.memoizedProps;if(cr(p,o)&&e.ref===i.ref)if(We=!1,i.pendingProps=o=p,rc(e,d))(e.flags&131072)!==0&&(We=!0);else return i.lanes=e.lanes,Dn(e,i,d)}return Wu(e,i,r,o,d)}function $p(e,i,r,o){var d=o.children,p=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((i.flags&128)!==0){if(p=p!==null?p.baseLanes|r:r,e!==null){for(o=i.child=e.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~p}else o=0,i.child=null;return qp(e,i,p,r,o)}if((r&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&jl(i,p!==null?p.cachePool:null),p!==null?Yh(i,p):Lu(),Xh(i);else return o=i.lanes=536870912,qp(e,i,p!==null?p.baseLanes|r:r,r,o)}else p!==null?(jl(i,p.cachePool),Yh(i,p),ni(),i.memoizedState=null):(e!==null&&jl(i,null),Lu(),ni());return mt(e,i,d,r),i.child}function Ar(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function qp(e,i,r,o,d){var p=Eu();return p=p===null?null:{parent:Ze._currentValue,pool:p},i.memoizedState={baseLanes:r,cachePool:p},e!==null&&jl(i,null),Lu(),Xh(i),e!==null&&pa(e,i,o,!0),i.childLanes=d,null}function to(e,i){return i=io({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function Fp(e,i,r){return Mi(i,e.child,null,r),e=to(i,i.pendingProps),e.flags|=2,Ht(i),i.memoizedState=null,e}function Hb(e,i,r){var o=i.pendingProps,d=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(we){if(o.mode==="hidden")return e=to(i,o),i.lanes=536870912,Ar(null,e);if(ku(i),(e=je)?(e=ag(e,Yt),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:dn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},r=Rh(e),r.return=i,i.child=r,ht=i,je=null)):e=null,e===null)throw Zn(i);return i.lanes=536870912,null}return to(i,o)}var p=e.memoizedState;if(p!==null){var _=p.dehydrated;if(ku(i),d)if(i.flags&256)i.flags&=-257,i=Fp(e,i,r);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(We||pa(e,i,r,!1),d=(r&e.childLanes)!==0,We||d){if(o=He,o!==null&&(_=Hf(o,r),_!==0&&_!==p.retryLane))throw p.retryLane=_,Ti(e,_),wt(o,e,_),Ku;ho(),i=Fp(e,i,r)}else e=p.treeContext,je=Qt(_.nextSibling),ht=i,we=!0,Qn=null,Yt=!1,e!==null&&Oh(i,e),i=to(i,o),i.flags|=4096;return i}return e=An(e.child,{mode:o.mode,children:o.children}),e.ref=i.ref,i.child=e,e.return=i,e}function no(e,i){var r=i.ref;if(r===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(l(284));(e===null||e.ref!==r)&&(i.flags|=4194816)}}function Wu(e,i,r,o,d){return ki(i),r=Ou(e,i,r,o,void 0,d),o=Nu(),e!==null&&!We?(Mu(e,i,d),Dn(e,i,d)):(we&&o&&hu(i),i.flags|=1,mt(e,i,r,d),i.child)}function Yp(e,i,r,o,d,p){return ki(i),i.updateQueue=null,r=Zh(i,o,r,d),Qh(e),o=Nu(),e!==null&&!We?(Mu(e,i,p),Dn(e,i,p)):(we&&o&&hu(i),i.flags|=1,mt(e,i,r,p),i.child)}function Xp(e,i,r,o,d){if(ki(i),i.stateNode===null){var p=ca,_=r.contextType;typeof _=="object"&&_!==null&&(p=pt(_)),p=new r(o,p),i.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Qu,i.stateNode=p,p._reactInternals=i,p=i.stateNode,p.props=o,p.state=i.memoizedState,p.refs={},xu(i),_=r.contextType,p.context=typeof _=="object"&&_!==null?pt(_):ca,p.state=i.memoizedState,_=r.getDerivedStateFromProps,typeof _=="function"&&(Xu(i,r,_,o),p.state=i.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(_=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),_!==p.state&&Qu.enqueueReplaceState(p,p.state,null),br(i,o,p,d),yr(),p.state=i.memoizedState),typeof p.componentDidMount=="function"&&(i.flags|=4194308),o=!0}else if(e===null){p=i.stateNode;var C=i.memoizedProps,w=Hi(r,C);p.props=w;var H=p.context,B=r.contextType;_=ca,typeof B=="object"&&B!==null&&(_=pt(B));var q=r.getDerivedStateFromProps;B=typeof q=="function"||typeof p.getSnapshotBeforeUpdate=="function",C=i.pendingProps!==C,B||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(C||H!==_)&&Mp(i,p,o,_),Wn=!1;var U=i.memoizedState;p.state=U,br(i,o,p,d),yr(),H=i.memoizedState,C||U!==H||Wn?(typeof q=="function"&&(Xu(i,r,q,o),H=i.memoizedState),(w=Wn||Np(i,r,w,o,U,H,_))?(B||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(i.flags|=4194308)):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=o,i.memoizedState=H),p.props=o,p.state=H,p.context=_,o=w):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),o=!1)}else{p=i.stateNode,Au(e,i),_=i.memoizedProps,B=Hi(r,_),p.props=B,q=i.pendingProps,U=p.context,H=r.contextType,w=ca,typeof H=="object"&&H!==null&&(w=pt(H)),C=r.getDerivedStateFromProps,(H=typeof C=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(_!==q||U!==w)&&Mp(i,p,o,w),Wn=!1,U=i.memoizedState,p.state=U,br(i,o,p,d),yr();var P=i.memoizedState;_!==q||U!==P||Wn||e!==null&&e.dependencies!==null&&zl(e.dependencies)?(typeof C=="function"&&(Xu(i,r,C,o),P=i.memoizedState),(B=Wn||Np(i,r,B,o,U,P,w)||e!==null&&e.dependencies!==null&&zl(e.dependencies))?(H||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,P,w),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,P,w)),typeof p.componentDidUpdate=="function"&&(i.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof p.componentDidUpdate!="function"||_===e.memoizedProps&&U===e.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&U===e.memoizedState||(i.flags|=1024),i.memoizedProps=o,i.memoizedState=P),p.props=o,p.state=P,p.context=w,o=B):(typeof p.componentDidUpdate!="function"||_===e.memoizedProps&&U===e.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&U===e.memoizedState||(i.flags|=1024),o=!1)}return p=o,no(e,i),o=(i.flags&128)!==0,p||o?(p=i.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:p.render(),i.flags|=1,e!==null&&o?(i.child=Mi(i,e.child,null,d),i.child=Mi(i,null,r,d)):mt(e,i,r,d),i.memoizedState=p.state,e=i.child):e=Dn(e,i,d),e}function Qp(e,i,r,o){return Li(),i.flags|=256,mt(e,i,r,o),i.child}var Ju={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ec(e){return{baseLanes:e,cachePool:Uh()}}function tc(e,i,r){return e=e!==null?e.childLanes&~r:0,i&&(e|=Ut),e}function Zp(e,i,r){var o=i.pendingProps,d=!1,p=(i.flags&128)!==0,_;if((_=p)||(_=e!==null&&e.memoizedState===null?!1:(Ye.current&2)!==0),_&&(d=!0,i.flags&=-129),_=(i.flags&32)!==0,i.flags&=-33,e===null){if(we){if(d?ti(i):ni(),(e=je)?(e=ag(e,Yt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:dn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},r=Rh(e),r.return=i,i.child=r,ht=i,je=null)):e=null,e===null)throw Zn(i);return zc(e)?i.lanes=32:i.lanes=536870912,null}var C=o.children;return o=o.fallback,d?(ni(),d=i.mode,C=io({mode:"hidden",children:C},d),o=wi(o,d,r,null),C.return=i,o.return=i,C.sibling=o,i.child=C,o=i.child,o.memoizedState=ec(r),o.childLanes=tc(e,_,r),i.memoizedState=Ju,Ar(null,o)):(ti(i),nc(i,C))}var w=e.memoizedState;if(w!==null&&(C=w.dehydrated,C!==null)){if(p)i.flags&256?(ti(i),i.flags&=-257,i=ic(e,i,r)):i.memoizedState!==null?(ni(),i.child=e.child,i.flags|=128,i=null):(ni(),C=o.fallback,d=i.mode,o=io({mode:"visible",children:o.children},d),C=wi(C,d,r,null),C.flags|=2,o.return=i,C.return=i,o.sibling=C,i.child=o,Mi(i,e.child,null,r),o=i.child,o.memoizedState=ec(r),o.childLanes=tc(e,_,r),i.memoizedState=Ju,i=Ar(null,o));else if(ti(i),zc(C)){if(_=C.nextSibling&&C.nextSibling.dataset,_)var H=_.dgst;_=H,o=Error(l(419)),o.stack="",o.digest=_,hr({value:o,source:null,stack:null}),i=ic(e,i,r)}else if(We||pa(e,i,r,!1),_=(r&e.childLanes)!==0,We||_){if(_=He,_!==null&&(o=Hf(_,r),o!==0&&o!==w.retryLane))throw w.retryLane=o,Ti(e,o),wt(_,e,o),Ku;Hc(C)||ho(),i=ic(e,i,r)}else Hc(C)?(i.flags|=192,i.child=e.child,i=null):(e=w.treeContext,je=Qt(C.nextSibling),ht=i,we=!0,Qn=null,Yt=!1,e!==null&&Oh(i,e),i=nc(i,o.children),i.flags|=4096);return i}return d?(ni(),C=o.fallback,d=i.mode,w=e.child,H=w.sibling,o=An(w,{mode:"hidden",children:o.children}),o.subtreeFlags=w.subtreeFlags&65011712,H!==null?C=An(H,C):(C=wi(C,d,r,null),C.flags|=2),C.return=i,o.return=i,o.sibling=C,i.child=o,Ar(null,o),o=i.child,C=e.child.memoizedState,C===null?C=ec(r):(d=C.cachePool,d!==null?(w=Ze._currentValue,d=d.parent!==w?{parent:w,pool:w}:d):d=Uh(),C={baseLanes:C.baseLanes|r,cachePool:d}),o.memoizedState=C,o.childLanes=tc(e,_,r),i.memoizedState=Ju,Ar(e.child,o)):(ti(i),r=e.child,e=r.sibling,r=An(r,{mode:"visible",children:o.children}),r.return=i,r.sibling=null,e!==null&&(_=i.deletions,_===null?(i.deletions=[e],i.flags|=16):_.push(e)),i.child=r,i.memoizedState=null,r)}function nc(e,i){return i=io({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function io(e,i){return e=Mt(22,e,null,i),e.lanes=0,e}function ic(e,i,r){return Mi(i,e.child,null,r),e=nc(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function Kp(e,i,r){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i),_u(e.return,i,r)}function ac(e,i,r,o,d,p){var _=e.memoizedState;_===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:d,treeForkCount:p}:(_.isBackwards=i,_.rendering=null,_.renderingStartTime=0,_.last=o,_.tail=r,_.tailMode=d,_.treeForkCount=p)}function Wp(e,i,r){var o=i.pendingProps,d=o.revealOrder,p=o.tail;o=o.children;var _=Ye.current,C=(_&2)!==0;if(C?(_=_&1|2,i.flags|=128):_&=1,J(Ye,_),mt(e,i,o,r),o=we?fr:0,!C&&e!==null&&(e.flags&128)!==0)e:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kp(e,r,i);else if(e.tag===19)Kp(e,r,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break e;for(;e.sibling===null;){if(e.return===null||e.return===i)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(r=i.child,d=null;r!==null;)e=r.alternate,e!==null&&ql(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=i.child,i.child=null):(d=r.sibling,r.sibling=null),ac(i,!1,d,r,p,o);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=i.child,i.child=null;d!==null;){if(e=d.alternate,e!==null&&ql(e)===null){i.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}ac(i,!0,r,null,p,o);break;case"together":ac(i,!1,null,null,void 0,o);break;default:i.memoizedState=null}return i.child}function Dn(e,i,r){if(e!==null&&(i.dependencies=e.dependencies),ri|=i.lanes,(r&i.childLanes)===0)if(e!==null){if(pa(e,i,r,!1),(r&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(l(153));if(i.child!==null){for(e=i.child,r=An(e,e.pendingProps),i.child=r,r.return=i;e.sibling!==null;)e=e.sibling,r=r.sibling=An(e,e.pendingProps),r.return=i;r.sibling=null}return i.child}function rc(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&zl(e)))}function zb(e,i,r){switch(i.tag){case 3:qe(i,i.stateNode.containerInfo),Kn(i,Ze,e.memoizedState.cache),Li();break;case 27:case 5:Fe(i);break;case 4:qe(i,i.stateNode.containerInfo);break;case 10:Kn(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,ku(i),null;break;case 13:var o=i.memoizedState;if(o!==null)return o.dehydrated!==null?(ti(i),i.flags|=128,null):(r&i.child.childLanes)!==0?Zp(e,i,r):(ti(i),e=Dn(e,i,r),e!==null?e.sibling:null);ti(i);break;case 19:var d=(e.flags&128)!==0;if(o=(r&i.childLanes)!==0,o||(pa(e,i,r,!1),o=(r&i.childLanes)!==0),d){if(o)return Wp(e,i,r);i.flags|=128}if(d=i.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),J(Ye,Ye.current),o)break;return null;case 22:return i.lanes=0,$p(e,i,r,i.pendingProps);case 24:Kn(i,Ze,e.memoizedState.cache)}return Dn(e,i,r)}function Jp(e,i,r){if(e!==null)if(e.memoizedProps!==i.pendingProps)We=!0;else{if(!rc(e,r)&&(i.flags&128)===0)return We=!1,zb(e,i,r);We=(e.flags&131072)!==0}else We=!1,we&&(i.flags&1048576)!==0&&Dh(i,fr,i.index);switch(i.lanes=0,i.tag){case 16:e:{var o=i.pendingProps;if(e=Oi(i.elementType),i.type=e,typeof e=="function")cu(e)?(o=Hi(e,o),i.tag=1,i=Xp(null,i,e,o,r)):(i.tag=0,i=Wu(null,i,e,o,r));else{if(e!=null){var d=e.$$typeof;if(d===z){i.tag=11,i=Vp(null,i,e,o,r);break e}else if(d===F){i.tag=14,i=Bp(null,i,e,o,r);break e}}throw i=oe(e)||e,Error(l(306,i,""))}}return i;case 0:return Wu(e,i,i.type,i.pendingProps,r);case 1:return o=i.type,d=Hi(o,i.pendingProps),Xp(e,i,o,d,r);case 3:e:{if(qe(i,i.stateNode.containerInfo),e===null)throw Error(l(387));o=i.pendingProps;var p=i.memoizedState;d=p.element,Au(e,i),br(i,o,null,r);var _=i.memoizedState;if(o=_.cache,Kn(i,Ze,o),o!==p.cache&&yu(i,[Ze],r,!0),yr(),o=_.element,p.isDehydrated)if(p={element:o,isDehydrated:!1,cache:_.cache},i.updateQueue.baseState=p,i.memoizedState=p,i.flags&256){i=Qp(e,i,o,r);break e}else if(o!==d){d=$t(Error(l(424)),i),hr(d),i=Qp(e,i,o,r);break e}else for(e=i.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,je=Qt(e.firstChild),ht=i,we=!0,Qn=null,Yt=!0,r=$h(i,null,o,r),i.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Li(),o===d){i=Dn(e,i,r);break e}mt(e,i,o,r)}i=i.child}return i;case 26:return no(e,i),e===null?(r=cg(i.type,null,i.pendingProps,null))?i.memoizedState=r:we||(r=i.type,e=i.pendingProps,o=bo(ve.current).createElement(r),o[ft]=i,o[St]=e,gt(o,r,e),ot(o),i.stateNode=o):i.memoizedState=cg(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return Fe(i),e===null&&we&&(o=i.stateNode=og(i.type,i.pendingProps,ve.current),ht=i,Yt=!0,d=je,ci(i.type)?(Uc=d,je=Qt(o.firstChild)):je=d),mt(e,i,i.pendingProps.children,r),no(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&we&&((d=o=je)&&(o=hS(o,i.type,i.pendingProps,Yt),o!==null?(i.stateNode=o,ht=i,je=Qt(o.firstChild),Yt=!1,d=!0):d=!1),d||Zn(i)),Fe(i),d=i.type,p=i.pendingProps,_=e!==null?e.memoizedProps:null,o=p.children,Nc(d,p)?o=null:_!==null&&Nc(d,_)&&(i.flags|=32),i.memoizedState!==null&&(d=Ou(e,i,Lb,null,null,r),Pr._currentValue=d),no(e,i),mt(e,i,o,r),i.child;case 6:return e===null&&we&&((e=r=je)&&(r=pS(r,i.pendingProps,Yt),r!==null?(i.stateNode=r,ht=i,je=null,e=!0):e=!1),e||Zn(i)),null;case 13:return Zp(e,i,r);case 4:return qe(i,i.stateNode.containerInfo),o=i.pendingProps,e===null?i.child=Mi(i,null,o,r):mt(e,i,o,r),i.child;case 11:return Vp(e,i,i.type,i.pendingProps,r);case 7:return mt(e,i,i.pendingProps,r),i.child;case 8:return mt(e,i,i.pendingProps.children,r),i.child;case 12:return mt(e,i,i.pendingProps.children,r),i.child;case 10:return o=i.pendingProps,Kn(i,i.type,o.value),mt(e,i,o.children,r),i.child;case 9:return d=i.type._context,o=i.pendingProps.children,ki(i),d=pt(d),o=o(d),i.flags|=1,mt(e,i,o,r),i.child;case 14:return Bp(e,i,i.type,i.pendingProps,r);case 15:return Gp(e,i,i.type,i.pendingProps,r);case 19:return Wp(e,i,r);case 31:return Hb(e,i,r);case 22:return $p(e,i,r,i.pendingProps);case 24:return ki(i),o=pt(Ze),e===null?(d=Eu(),d===null&&(d=He,p=bu(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=r),d=p),i.memoizedState={parent:o,cache:d},xu(i),Kn(i,Ze,d)):((e.lanes&r)!==0&&(Au(e,i),br(i,null,null,r),yr()),d=e.memoizedState,p=i.memoizedState,d.parent!==o?(d={parent:o,cache:o},i.memoizedState=d,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=d),Kn(i,Ze,o)):(o=p.cache,Kn(i,Ze,o),o!==d.cache&&yu(i,[Ze],r,!0))),mt(e,i,i.pendingProps.children,r),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function On(e){e.flags|=4}function lc(e,i,r,o,d){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(Tm())e.flags|=8192;else throw Ni=Vl,Cu}else e.flags&=-16777217}function em(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!mg(i))if(Tm())e.flags|=8192;else throw Ni=Vl,Cu}function ao(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Nf():536870912,e.lanes|=i,Ta|=i)}function Tr(e,i){if(!we)switch(e.tailMode){case"hidden":i=e.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Pe(e){var i=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(i)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=o,e.childLanes=r,i}function Ub(e,i,r){var o=i.pendingProps;switch(pu(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(i),null;case 1:return Pe(i),null;case 3:return r=i.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Ln(Ze),pe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ha(i)?On(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,gu())),Pe(i),null;case 26:var d=i.type,p=i.memoizedState;return e===null?(On(i),p!==null?(Pe(i),em(i,p)):(Pe(i),lc(i,d,null,o,r))):p?p!==e.memoizedState?(On(i),Pe(i),em(i,p)):(Pe(i),i.flags&=-16777217):(e=e.memoizedProps,e!==o&&On(i),Pe(i),lc(i,d,e,o,r)),null;case 27:if(Be(i),r=ve.current,d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==o&&On(i);else{if(!o){if(i.stateNode===null)throw Error(l(166));return Pe(i),null}e=ie.current,ha(i)?Nh(i):(e=og(d,o,r),i.stateNode=e,On(i))}return Pe(i),null;case 5:if(Be(i),d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==o&&On(i);else{if(!o){if(i.stateNode===null)throw Error(l(166));return Pe(i),null}if(p=ie.current,ha(i))Nh(i);else{var _=bo(ve.current);switch(p){case 1:p=_.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=_.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=_.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof o.is=="string"?_.createElement("select",{is:o.is}):_.createElement("select"),o.multiple?p.multiple=!0:o.size&&(p.size=o.size);break;default:p=typeof o.is=="string"?_.createElement(d,{is:o.is}):_.createElement(d)}}p[ft]=i,p[St]=o;e:for(_=i.child;_!==null;){if(_.tag===5||_.tag===6)p.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===i)break e;for(;_.sibling===null;){if(_.return===null||_.return===i)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}i.stateNode=p;e:switch(gt(p,d,o),d){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&On(i)}}return Pe(i),lc(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,r),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==o&&On(i);else{if(typeof o!="string"&&i.stateNode===null)throw Error(l(166));if(e=ve.current,ha(i)){if(e=i.stateNode,r=i.memoizedProps,o=null,d=ht,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}e[ft]=i,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||Zm(e.nodeValue,r)),e||Zn(i,!0)}else e=bo(e).createTextNode(o),e[ft]=i,i.stateNode=e}return Pe(i),null;case 31:if(r=i.memoizedState,e===null||e.memoizedState!==null){if(o=ha(i),r!==null){if(e===null){if(!o)throw Error(l(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[ft]=i}else Li(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Pe(i),e=!1}else r=gu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return i.flags&256?(Ht(i),i):(Ht(i),null);if((i.flags&128)!==0)throw Error(l(558))}return Pe(i),null;case 13:if(o=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=ha(i),o!==null&&o.dehydrated!==null){if(e===null){if(!d)throw Error(l(318));if(d=i.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[ft]=i}else Li(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Pe(i),d=!1}else d=gu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return i.flags&256?(Ht(i),i):(Ht(i),null)}return Ht(i),(i.flags&128)!==0?(i.lanes=r,i):(r=o!==null,e=e!==null&&e.memoizedState!==null,r&&(o=i.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==d&&(o.flags|=2048)),r!==e&&r&&(i.child.flags|=8192),ao(i,i.updateQueue),Pe(i),null);case 4:return pe(),e===null&&Lc(i.stateNode.containerInfo),Pe(i),null;case 10:return Ln(i.type),Pe(i),null;case 19:if($(Ye),o=i.memoizedState,o===null)return Pe(i),null;if(d=(i.flags&128)!==0,p=o.rendering,p===null)if(d)Tr(o,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(p=ql(e),p!==null){for(i.flags|=128,Tr(o,!1),e=p.updateQueue,i.updateQueue=e,ao(i,e),i.subtreeFlags=0,e=r,r=i.child;r!==null;)Lh(r,e),r=r.sibling;return J(Ye,Ye.current&1|2),we&&Tn(i,o.treeForkCount),i.child}e=e.sibling}o.tail!==null&&kt()>uo&&(i.flags|=128,d=!0,Tr(o,!1),i.lanes=4194304)}else{if(!d)if(e=ql(p),e!==null){if(i.flags|=128,d=!0,e=e.updateQueue,i.updateQueue=e,ao(i,e),Tr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!p.alternate&&!we)return Pe(i),null}else 2*kt()-o.renderingStartTime>uo&&r!==536870912&&(i.flags|=128,d=!0,Tr(o,!1),i.lanes=4194304);o.isBackwards?(p.sibling=i.child,i.child=p):(e=o.last,e!==null?e.sibling=p:i.child=p,o.last=p)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=kt(),e.sibling=null,r=Ye.current,J(Ye,d?r&1|2:r&1),we&&Tn(i,o.treeForkCount),e):(Pe(i),null);case 22:case 23:return Ht(i),Ru(),o=i.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(i.flags|=8192):o&&(i.flags|=8192),o?(r&536870912)!==0&&(i.flags&128)===0&&(Pe(i),i.subtreeFlags&6&&(i.flags|=8192)):Pe(i),r=i.updateQueue,r!==null&&ao(i,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==r&&(i.flags|=2048),e!==null&&$(Di),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),Ln(Ze),Pe(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function jb(e,i){switch(pu(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return Ln(Ze),pe(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return Be(i),null;case 31:if(i.memoizedState!==null){if(Ht(i),i.alternate===null)throw Error(l(340));Li()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(Ht(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));Li()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return $(Ye),null;case 4:return pe(),null;case 10:return Ln(i.type),null;case 22:case 23:return Ht(i),Ru(),e!==null&&$(Di),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return Ln(Ze),null;case 25:return null;default:return null}}function tm(e,i){switch(pu(i),i.tag){case 3:Ln(Ze),pe();break;case 26:case 27:case 5:Be(i);break;case 4:pe();break;case 31:i.memoizedState!==null&&Ht(i);break;case 13:Ht(i);break;case 19:$(Ye);break;case 10:Ln(i.type);break;case 22:case 23:Ht(i),Ru(),e!==null&&$(Di);break;case 24:Ln(Ze)}}function wr(e,i){try{var r=i.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var d=o.next;r=d;do{if((r.tag&e)===e){o=void 0;var p=r.create,_=r.inst;o=p(),_.destroy=o}r=r.next}while(r!==d)}}catch(C){Oe(i,i.return,C)}}function ii(e,i,r){try{var o=i.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var p=d.next;o=p;do{if((o.tag&e)===e){var _=o.inst,C=_.destroy;if(C!==void 0){_.destroy=void 0,d=i;var w=r,H=C;try{H()}catch(B){Oe(d,w,B)}}}o=o.next}while(o!==p)}}catch(B){Oe(i,i.return,B)}}function nm(e){var i=e.updateQueue;if(i!==null){var r=e.stateNode;try{Fh(i,r)}catch(o){Oe(e,e.return,o)}}}function im(e,i,r){r.props=Hi(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){Oe(e,i,o)}}function Lr(e,i){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof r=="function"?e.refCleanup=r(o):r.current=o}}catch(d){Oe(e,i,d)}}function hn(e,i){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(d){Oe(e,i,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){Oe(e,i,d)}else r.current=null}function am(e){var i=e.type,r=e.memoizedProps,o=e.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(d){Oe(e,e.return,d)}}function oc(e,i,r){try{var o=e.stateNode;oS(o,e.type,r,i),o[St]=i}catch(d){Oe(e,e.return,d)}}function rm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ci(e.type)||e.tag===4}function sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rm(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&&ci(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uc(e,i,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,i?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,i):(i=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,i.appendChild(e),r=r._reactRootContainer,r!=null||i.onclick!==null||(i.onclick=Cn));else if(o!==4&&(o===27&&ci(e.type)&&(r=e.stateNode,i=null),e=e.child,e!==null))for(uc(e,i,r),e=e.sibling;e!==null;)uc(e,i,r),e=e.sibling}function ro(e,i,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,i?r.insertBefore(e,i):r.appendChild(e);else if(o!==4&&(o===27&&ci(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(ro(e,i,r),e=e.sibling;e!==null;)ro(e,i,r),e=e.sibling}function lm(e){var i=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,d=i.attributes;d.length;)i.removeAttributeNode(d[0]);gt(i,o,r),i[ft]=e,i[St]=r}catch(p){Oe(e,e.return,p)}}var Nn=!1,Je=!1,cc=!1,om=typeof WeakSet=="function"?WeakSet:Set,st=null;function Pb(e,i){if(e=e.containerInfo,Dc=wo,e=yh(e),iu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var d=o.anchorOffset,p=o.focusNode;o=o.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var _=0,C=-1,w=-1,H=0,B=0,q=e,U=null;t:for(;;){for(var P;q!==r||d!==0&&q.nodeType!==3||(C=_+d),q!==p||o!==0&&q.nodeType!==3||(w=_+o),q.nodeType===3&&(_+=q.nodeValue.length),(P=q.firstChild)!==null;)U=q,q=P;for(;;){if(q===e)break t;if(U===r&&++H===d&&(C=_),U===p&&++B===o&&(w=_),(P=q.nextSibling)!==null)break;q=U,U=q.parentNode}q=P}r=C===-1||w===-1?null:{start:C,end:w}}else r=null}r=r||{start:0,end:0}}else r=null;for(Oc={focusedElem:e,selectionRange:r},wo=!1,st=i;st!==null;)if(i=st,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,st=e;else for(;st!==null;){switch(i=st,p=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,r=i,d=p.memoizedProps,p=p.memoizedState,o=r.stateNode;try{var ae=Hi(r.type,d);e=o.getSnapshotBeforeUpdate(ae,p),o.__reactInternalSnapshotBeforeUpdate=e}catch(se){Oe(r,r.return,se)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,r=e.nodeType,r===9)Ic(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ic(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=i.sibling,e!==null){e.return=i.return,st=e;break}st=i.return}}function sm(e,i,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:In(e,r),o&4&&wr(5,r);break;case 1:if(In(e,r),o&4)if(e=r.stateNode,i===null)try{e.componentDidMount()}catch(_){Oe(r,r.return,_)}else{var d=Hi(r.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(d,i,e.__reactInternalSnapshotBeforeUpdate)}catch(_){Oe(r,r.return,_)}}o&64&&nm(r),o&512&&Lr(r,r.return);break;case 3:if(In(e,r),o&64&&(e=r.updateQueue,e!==null)){if(i=null,r.child!==null)switch(r.child.tag){case 27:case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}try{Fh(e,i)}catch(_){Oe(r,r.return,_)}}break;case 27:i===null&&o&4&&lm(r);case 26:case 5:In(e,r),i===null&&o&4&&am(r),o&512&&Lr(r,r.return);break;case 12:In(e,r);break;case 31:In(e,r),o&4&&dm(e,r);break;case 13:In(e,r),o&4&&fm(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=Qb.bind(null,r),mS(e,r))));break;case 22:if(o=r.memoizedState!==null||Nn,!o){i=i!==null&&i.memoizedState!==null||Je,d=Nn;var p=Je;Nn=o,(Je=i)&&!p?Hn(e,r,(r.subtreeFlags&8772)!==0):In(e,r),Nn=d,Je=p}break;case 30:break;default:In(e,r)}}function um(e){var i=e.alternate;i!==null&&(e.alternate=null,um(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&Ps(i)),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 Ve=null,Ct=!1;function Mn(e,i,r){for(r=r.child;r!==null;)cm(e,i,r),r=r.sibling}function cm(e,i,r){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(Wa,r)}catch{}switch(r.tag){case 26:Je||hn(r,i),Mn(e,i,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Je||hn(r,i);var o=Ve,d=Ct;ci(r.type)&&(Ve=r.stateNode,Ct=!1),Mn(e,i,r),zr(r.stateNode),Ve=o,Ct=d;break;case 5:Je||hn(r,i);case 6:if(o=Ve,d=Ct,Ve=null,Mn(e,i,r),Ve=o,Ct=d,Ve!==null)if(Ct)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(r.stateNode)}catch(p){Oe(r,i,p)}else try{Ve.removeChild(r.stateNode)}catch(p){Oe(r,i,p)}break;case 18:Ve!==null&&(Ct?(e=Ve,ng(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Ma(e)):ng(Ve,r.stateNode));break;case 4:o=Ve,d=Ct,Ve=r.stateNode.containerInfo,Ct=!0,Mn(e,i,r),Ve=o,Ct=d;break;case 0:case 11:case 14:case 15:ii(2,r,i),Je||ii(4,r,i),Mn(e,i,r);break;case 1:Je||(hn(r,i),o=r.stateNode,typeof o.componentWillUnmount=="function"&&im(r,i,o)),Mn(e,i,r);break;case 21:Mn(e,i,r);break;case 22:Je=(o=Je)||r.memoizedState!==null,Mn(e,i,r),Je=o;break;default:Mn(e,i,r)}}function dm(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ma(e)}catch(r){Oe(i,i.return,r)}}}function fm(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ma(e)}catch(r){Oe(i,i.return,r)}}function Vb(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new om),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new om),i;default:throw Error(l(435,e.tag))}}function lo(e,i){var r=Vb(e);i.forEach(function(o){if(!r.has(o)){r.add(o);var d=Zb.bind(null,e,o);o.then(d,d)}})}function xt(e,i){var r=i.deletions;if(r!==null)for(var o=0;o<r.length;o++){var d=r[o],p=e,_=i,C=_;e:for(;C!==null;){switch(C.tag){case 27:if(ci(C.type)){Ve=C.stateNode,Ct=!1;break e}break;case 5:Ve=C.stateNode,Ct=!1;break e;case 3:case 4:Ve=C.stateNode.containerInfo,Ct=!0;break e}C=C.return}if(Ve===null)throw Error(l(160));cm(p,_,d),Ve=null,Ct=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)hm(i,e),i=i.sibling}var rn=null;function hm(e,i){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xt(i,e),At(e),o&4&&(ii(3,e,e.return),wr(3,e),ii(5,e,e.return));break;case 1:xt(i,e),At(e),o&512&&(Je||r===null||hn(r,r.return)),o&64&&Nn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?o:r.concat(o))));break;case 26:var d=rn;if(xt(i,e),At(e),o&512&&(Je||r===null||hn(r,r.return)),o&4){var p=r!==null?r.memoizedState:null;if(o=e.memoizedState,r===null)if(o===null)if(e.stateNode===null){e:{o=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(o){case"title":p=d.getElementsByTagName("title")[0],(!p||p[tr]||p[ft]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(o),d.head.insertBefore(p,d.querySelector("head > title"))),gt(p,o,r),p[ft]=e,ot(p),o=p;break e;case"link":var _=hg("link","href",d).get(o+(r.href||""));if(_){for(var C=0;C<_.length;C++)if(p=_[C],p.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&p.getAttribute("rel")===(r.rel==null?null:r.rel)&&p.getAttribute("title")===(r.title==null?null:r.title)&&p.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){_.splice(C,1);break t}}p=d.createElement(o),gt(p,o,r),d.head.appendChild(p);break;case"meta":if(_=hg("meta","content",d).get(o+(r.content||""))){for(C=0;C<_.length;C++)if(p=_[C],p.getAttribute("content")===(r.content==null?null:""+r.content)&&p.getAttribute("name")===(r.name==null?null:r.name)&&p.getAttribute("property")===(r.property==null?null:r.property)&&p.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&p.getAttribute("charset")===(r.charSet==null?null:r.charSet)){_.splice(C,1);break t}}p=d.createElement(o),gt(p,o,r),d.head.appendChild(p);break;default:throw Error(l(468,o))}p[ft]=e,ot(p),o=p}e.stateNode=o}else pg(d,e.type,e.stateNode);else e.stateNode=fg(d,o,e.memoizedProps);else p!==o?(p===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):p.count--,o===null?pg(d,e.type,e.stateNode):fg(d,o,e.memoizedProps)):o===null&&e.stateNode!==null&&oc(e,e.memoizedProps,r.memoizedProps)}break;case 27:xt(i,e),At(e),o&512&&(Je||r===null||hn(r,r.return)),r!==null&&o&4&&oc(e,e.memoizedProps,r.memoizedProps);break;case 5:if(xt(i,e),At(e),o&512&&(Je||r===null||hn(r,r.return)),e.flags&32){d=e.stateNode;try{ia(d,"")}catch(ae){Oe(e,e.return,ae)}}o&4&&e.stateNode!=null&&(d=e.memoizedProps,oc(e,d,r!==null?r.memoizedProps:d)),o&1024&&(cc=!0);break;case 6:if(xt(i,e),At(e),o&4){if(e.stateNode===null)throw Error(l(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(ae){Oe(e,e.return,ae)}}break;case 3:if(Co=null,d=rn,rn=So(i.containerInfo),xt(i,e),rn=d,At(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{Ma(i.containerInfo)}catch(ae){Oe(e,e.return,ae)}cc&&(cc=!1,pm(e));break;case 4:o=rn,rn=So(e.stateNode.containerInfo),xt(i,e),At(e),rn=o;break;case 12:xt(i,e),At(e);break;case 31:xt(i,e),At(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,lo(e,o)));break;case 13:xt(i,e),At(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(so=kt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,lo(e,o)));break;case 22:d=e.memoizedState!==null;var w=r!==null&&r.memoizedState!==null,H=Nn,B=Je;if(Nn=H||d,Je=B||w,xt(i,e),Je=B,Nn=H,At(e),o&8192)e:for(i=e.stateNode,i._visibility=d?i._visibility&-2:i._visibility|1,d&&(r===null||w||Nn||Je||zi(e)),r=null,i=e;;){if(i.tag===5||i.tag===26){if(r===null){w=r=i;try{if(p=w.stateNode,d)_=p.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{C=w.stateNode;var q=w.memoizedProps.style,U=q!=null&&q.hasOwnProperty("display")?q.display:null;C.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ae){Oe(w,w.return,ae)}}}else if(i.tag===6){if(r===null){w=i;try{w.stateNode.nodeValue=d?"":w.memoizedProps}catch(ae){Oe(w,w.return,ae)}}}else if(i.tag===18){if(r===null){w=i;try{var P=w.stateNode;d?ig(P,!0):ig(w.stateNode,!1)}catch(ae){Oe(w,w.return,ae)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;r===i&&(r=null),i=i.return}r===i&&(r=null),i.sibling.return=i.return,i=i.sibling}o&4&&(o=e.updateQueue,o!==null&&(r=o.retryQueue,r!==null&&(o.retryQueue=null,lo(e,r))));break;case 19:xt(i,e),At(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,lo(e,o)));break;case 30:break;case 21:break;default:xt(i,e),At(e)}}function At(e){var i=e.flags;if(i&2){try{for(var r,o=e.return;o!==null;){if(rm(o)){r=o;break}o=o.return}if(r==null)throw Error(l(160));switch(r.tag){case 27:var d=r.stateNode,p=sc(e);ro(e,p,d);break;case 5:var _=r.stateNode;r.flags&32&&(ia(_,""),r.flags&=-33);var C=sc(e);ro(e,C,_);break;case 3:case 4:var w=r.stateNode.containerInfo,H=sc(e);uc(e,H,w);break;default:throw Error(l(161))}}catch(B){Oe(e,e.return,B)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function pm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;pm(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function In(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)sm(e,i.alternate,i),i=i.sibling}function zi(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:ii(4,i,i.return),zi(i);break;case 1:hn(i,i.return);var r=i.stateNode;typeof r.componentWillUnmount=="function"&&im(i,i.return,r),zi(i);break;case 27:zr(i.stateNode);case 26:case 5:hn(i,i.return),zi(i);break;case 22:i.memoizedState===null&&zi(i);break;case 30:zi(i);break;default:zi(i)}e=e.sibling}}function Hn(e,i,r){for(r=r&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var o=i.alternate,d=e,p=i,_=p.flags;switch(p.tag){case 0:case 11:case 15:Hn(d,p,r),wr(4,p);break;case 1:if(Hn(d,p,r),o=p,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(H){Oe(o,o.return,H)}if(o=p,d=o.updateQueue,d!==null){var C=o.stateNode;try{var w=d.shared.hiddenCallbacks;if(w!==null)for(d.shared.hiddenCallbacks=null,d=0;d<w.length;d++)qh(w[d],C)}catch(H){Oe(o,o.return,H)}}r&&_&64&&nm(p),Lr(p,p.return);break;case 27:lm(p);case 26:case 5:Hn(d,p,r),r&&o===null&&_&4&&am(p),Lr(p,p.return);break;case 12:Hn(d,p,r);break;case 31:Hn(d,p,r),r&&_&4&&dm(d,p);break;case 13:Hn(d,p,r),r&&_&4&&fm(d,p);break;case 22:p.memoizedState===null&&Hn(d,p,r),Lr(p,p.return);break;case 30:break;default:Hn(d,p,r)}i=i.sibling}}function dc(e,i){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&pr(r))}function fc(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&pr(e))}function ln(e,i,r,o){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)mm(e,i,r,o),i=i.sibling}function mm(e,i,r,o){var d=i.flags;switch(i.tag){case 0:case 11:case 15:ln(e,i,r,o),d&2048&&wr(9,i);break;case 1:ln(e,i,r,o);break;case 3:ln(e,i,r,o),d&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&pr(e)));break;case 12:if(d&2048){ln(e,i,r,o),e=i.stateNode;try{var p=i.memoizedProps,_=p.id,C=p.onPostCommit;typeof C=="function"&&C(_,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){Oe(i,i.return,w)}}else ln(e,i,r,o);break;case 31:ln(e,i,r,o);break;case 13:ln(e,i,r,o);break;case 23:break;case 22:p=i.stateNode,_=i.alternate,i.memoizedState!==null?p._visibility&2?ln(e,i,r,o):Rr(e,i):p._visibility&2?ln(e,i,r,o):(p._visibility|=2,Ca(e,i,r,o,(i.subtreeFlags&10256)!==0||!1)),d&2048&&dc(_,i);break;case 24:ln(e,i,r,o),d&2048&&fc(i.alternate,i);break;default:ln(e,i,r,o)}}function Ca(e,i,r,o,d){for(d=d&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var p=e,_=i,C=r,w=o,H=_.flags;switch(_.tag){case 0:case 11:case 15:Ca(p,_,C,w,d),wr(8,_);break;case 23:break;case 22:var B=_.stateNode;_.memoizedState!==null?B._visibility&2?Ca(p,_,C,w,d):Rr(p,_):(B._visibility|=2,Ca(p,_,C,w,d)),d&&H&2048&&dc(_.alternate,_);break;case 24:Ca(p,_,C,w,d),d&&H&2048&&fc(_.alternate,_);break;default:Ca(p,_,C,w,d)}i=i.sibling}}function Rr(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var r=e,o=i,d=o.flags;switch(o.tag){case 22:Rr(r,o),d&2048&&dc(o.alternate,o);break;case 24:Rr(r,o),d&2048&&fc(o.alternate,o);break;default:Rr(r,o)}i=i.sibling}}var kr=8192;function xa(e,i,r){if(e.subtreeFlags&kr)for(e=e.child;e!==null;)gm(e,i,r),e=e.sibling}function gm(e,i,r){switch(e.tag){case 26:xa(e,i,r),e.flags&kr&&e.memoizedState!==null&&wS(r,rn,e.memoizedState,e.memoizedProps);break;case 5:xa(e,i,r);break;case 3:case 4:var o=rn;rn=So(e.stateNode.containerInfo),xa(e,i,r),rn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=kr,kr=16777216,xa(e,i,r),kr=o):xa(e,i,r));break;default:xa(e,i,r)}}function vm(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function Dr(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var o=i[r];st=o,ym(o,e)}vm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_m(e),e=e.sibling}function _m(e){switch(e.tag){case 0:case 11:case 15:Dr(e),e.flags&2048&&ii(9,e,e.return);break;case 3:Dr(e);break;case 12:Dr(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,oo(e)):Dr(e);break;default:Dr(e)}}function oo(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var o=i[r];st=o,ym(o,e)}vm(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:ii(8,i,i.return),oo(i);break;case 22:r=i.stateNode,r._visibility&2&&(r._visibility&=-3,oo(i));break;default:oo(i)}e=e.sibling}}function ym(e,i){for(;st!==null;){var r=st;switch(r.tag){case 0:case 11:case 15:ii(8,r,i);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var o=r.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:pr(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,st=o;else e:for(r=e;st!==null;){o=st;var d=o.sibling,p=o.return;if(um(o),o===r){st=null;break e}if(d!==null){d.return=p,st=d;break e}st=p}}}var Bb={getCacheForType:function(e){var i=pt(Ze),r=i.data.get(e);return r===void 0&&(r=e(),i.data.set(e,r)),r},cacheSignal:function(){return pt(Ze).controller.signal}},Gb=typeof WeakMap=="function"?WeakMap:Map,ke=0,He=null,Se=null,Ae=0,De=0,zt=null,ai=!1,Aa=!1,hc=!1,zn=0,$e=0,ri=0,Ui=0,pc=0,Ut=0,Ta=0,Or=null,Tt=null,mc=!1,so=0,bm=0,uo=1/0,co=null,li=null,tt=0,oi=null,wa=null,Un=0,gc=0,vc=null,Sm=null,Nr=0,_c=null;function jt(){return(ke&2)!==0&&Ae!==0?Ae&-Ae:M.T!==null?xc():zf()}function Em(){if(Ut===0)if((Ae&536870912)===0||we){var e=_l;_l<<=1,(_l&3932160)===0&&(_l=262144),Ut=e}else Ut=536870912;return e=It.current,e!==null&&(e.flags|=32),Ut}function wt(e,i,r){(e===He&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(La(e,0),si(e,Ae,Ut,!1)),er(e,r),((ke&2)===0||e!==He)&&(e===He&&((ke&2)===0&&(Ui|=r),$e===4&&si(e,Ae,Ut,!1)),pn(e))}function Cm(e,i,r){if((ke&6)!==0)throw Error(l(327));var o=!r&&(i&127)===0&&(i&e.expiredLanes)===0||Ja(e,i),d=o?Fb(e,i):bc(e,i,!0),p=o;do{if(d===0){Aa&&!o&&si(e,i,0,!1);break}else{if(r=e.current.alternate,p&&!$b(r)){d=bc(e,i,!1),p=!1;continue}if(d===2){if(p=i,e.errorRecoveryDisabledLanes&p)var _=0;else _=e.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){i=_;e:{var C=e;d=Or;var w=C.current.memoizedState.isDehydrated;if(w&&(La(C,_).flags|=256),_=bc(C,_,!1),_!==2){if(hc&&!w){C.errorRecoveryDisabledLanes|=p,Ui|=p,d=4;break e}p=Tt,Tt=d,p!==null&&(Tt===null?Tt=p:Tt.push.apply(Tt,p))}d=_}if(p=!1,d!==2)continue}}if(d===1){La(e,0),si(e,i,0,!0);break}e:{switch(o=e,p=d,p){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:si(o,i,Ut,!ai);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(d=so+300-kt(),10<d)){if(si(o,i,Ut,!ai),bl(o,0,!0)!==0)break e;Un=i,o.timeoutHandle=eg(xm.bind(null,o,r,Tt,co,mc,i,Ut,Ui,Ta,ai,p,"Throttled",-0,0),d);break e}xm(o,r,Tt,co,mc,i,Ut,Ui,Ta,ai,p,null,-0,0)}}break}while(!0);pn(e)}function xm(e,i,r,o,d,p,_,C,w,H,B,q,U,P){if(e.timeoutHandle=-1,q=i.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cn},gm(i,p,q);var ae=(p&62914560)===p?so-kt():(p&4194048)===p?bm-kt():0;if(ae=LS(q,ae),ae!==null){Un=p,e.cancelPendingCommit=ae(Om.bind(null,e,i,p,r,o,d,_,C,w,B,q,null,U,P)),si(e,p,_,!H);return}}Om(e,i,p,r,o,d,_,C,w)}function $b(e){for(var i=e;;){var r=i.tag;if((r===0||r===11||r===15)&&i.flags&16384&&(r=i.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var o=0;o<r.length;o++){var d=r[o],p=d.getSnapshot;d=d.value;try{if(!Nt(p(),d))return!1}catch{return!1}}if(r=i.child,i.subtreeFlags&16384&&r!==null)r.return=i,i=r;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function si(e,i,r,o){i&=~pc,i&=~Ui,e.suspendedLanes|=i,e.pingedLanes&=~i,o&&(e.warmLanes|=i),o=e.expirationTimes;for(var d=i;0<d;){var p=31-Ot(d),_=1<<p;o[p]=-1,d&=~_}r!==0&&Mf(e,r,i)}function fo(){return(ke&6)===0?(Mr(0),!1):!0}function yc(){if(Se!==null){if(De===0)var e=Se.return;else e=Se,wn=Ri=null,Iu(e),_a=null,gr=0,e=Se;for(;e!==null;)tm(e.alternate,e),e=e.return;Se=null}}function La(e,i){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,cS(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Un=0,yc(),He=e,Se=r=An(e.current,null),Ae=i,De=0,zt=null,ai=!1,Aa=Ja(e,i),hc=!1,Ta=Ut=pc=Ui=ri=$e=0,Tt=Or=null,mc=!1,(i&8)!==0&&(i|=i&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=i;0<o;){var d=31-Ot(o),p=1<<d;i|=e[d],o&=~p}return zn=i,Ol(),r}function Am(e,i){ge=null,M.H=xr,i===va||i===Pl?(i=Vh(),De=3):i===Cu?(i=Vh(),De=4):De=i===Ku?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,zt=i,Se===null&&($e=1,eo(e,$t(i,e.current)))}function Tm(){var e=It.current;return e===null?!0:(Ae&4194048)===Ae?Xt===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===Xt:!1}function wm(){var e=M.H;return M.H=xr,e===null?xr:e}function Lm(){var e=M.A;return M.A=Bb,e}function ho(){$e=4,ai||(Ae&4194048)!==Ae&&It.current!==null||(Aa=!0),(ri&134217727)===0&&(Ui&134217727)===0||He===null||si(He,Ae,Ut,!1)}function bc(e,i,r){var o=ke;ke|=2;var d=wm(),p=Lm();(He!==e||Ae!==i)&&(co=null,La(e,i)),i=!1;var _=$e;e:do try{if(De!==0&&Se!==null){var C=Se,w=zt;switch(De){case 8:yc(),_=6;break e;case 3:case 2:case 9:case 6:It.current===null&&(i=!0);var H=De;if(De=0,zt=null,Ra(e,C,w,H),r&&Aa){_=0;break e}break;default:H=De,De=0,zt=null,Ra(e,C,w,H)}}qb(),_=$e;break}catch(B){Am(e,B)}while(!0);return i&&e.shellSuspendCounter++,wn=Ri=null,ke=o,M.H=d,M.A=p,Se===null&&(He=null,Ae=0,Ol()),_}function qb(){for(;Se!==null;)Rm(Se)}function Fb(e,i){var r=ke;ke|=2;var o=wm(),d=Lm();He!==e||Ae!==i?(co=null,uo=kt()+500,La(e,i)):Aa=Ja(e,i);e:do try{if(De!==0&&Se!==null){i=Se;var p=zt;t:switch(De){case 1:De=0,zt=null,Ra(e,i,p,1);break;case 2:case 9:if(jh(p)){De=0,zt=null,km(i);break}i=function(){De!==2&&De!==9||He!==e||(De=7),pn(e)},p.then(i,i);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:jh(p)?(De=0,zt=null,km(i)):(De=0,zt=null,Ra(e,i,p,7));break;case 5:var _=null;switch(Se.tag){case 26:_=Se.memoizedState;case 5:case 27:var C=Se;if(_?mg(_):C.stateNode.complete){De=0,zt=null;var w=C.sibling;if(w!==null)Se=w;else{var H=C.return;H!==null?(Se=H,po(H)):Se=null}break t}}De=0,zt=null,Ra(e,i,p,5);break;case 6:De=0,zt=null,Ra(e,i,p,6);break;case 8:yc(),$e=6;break e;default:throw Error(l(462))}}Yb();break}catch(B){Am(e,B)}while(!0);return wn=Ri=null,M.H=o,M.A=d,ke=r,Se!==null?0:(He=null,Ae=0,Ol(),$e)}function Yb(){for(;Se!==null&&!gy();)Rm(Se)}function Rm(e){var i=Jp(e.alternate,e,zn);e.memoizedProps=e.pendingProps,i===null?po(e):Se=i}function km(e){var i=e,r=i.alternate;switch(i.tag){case 15:case 0:i=Yp(r,i,i.pendingProps,i.type,void 0,Ae);break;case 11:i=Yp(r,i,i.pendingProps,i.type.render,i.ref,Ae);break;case 5:Iu(i);default:tm(r,i),i=Se=Lh(i,zn),i=Jp(r,i,zn)}e.memoizedProps=e.pendingProps,i===null?po(e):Se=i}function Ra(e,i,r,o){wn=Ri=null,Iu(i),_a=null,gr=0;var d=i.return;try{if(Ib(e,d,i,r,Ae)){$e=1,eo(e,$t(r,e.current)),Se=null;return}}catch(p){if(d!==null)throw Se=d,p;$e=1,eo(e,$t(r,e.current)),Se=null;return}i.flags&32768?(we||o===1?e=!0:Aa||(Ae&536870912)!==0?e=!1:(ai=e=!0,(o===2||o===9||o===3||o===6)&&(o=It.current,o!==null&&o.tag===13&&(o.flags|=16384))),Dm(i,e)):po(i)}function po(e){var i=e;do{if((i.flags&32768)!==0){Dm(i,ai);return}e=i.return;var r=Ub(i.alternate,i,zn);if(r!==null){Se=r;return}if(i=i.sibling,i!==null){Se=i;return}Se=i=e}while(i!==null);$e===0&&($e=5)}function Dm(e,i){do{var r=jb(e.alternate,e);if(r!==null){r.flags&=32767,Se=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!i&&(e=e.sibling,e!==null)){Se=e;return}Se=e=r}while(e!==null);$e=6,Se=null}function Om(e,i,r,o,d,p,_,C,w){e.cancelPendingCommit=null;do mo();while(tt!==0);if((ke&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));if(p=i.lanes|i.childLanes,p|=su,Ty(e,r,p,_,C,w),e===He&&(Se=He=null,Ae=0),wa=i,oi=e,Un=r,gc=p,vc=d,Sm=o,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Kb(gl,function(){return zm(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||o){o=M.T,M.T=null,d=Y.p,Y.p=2,_=ke,ke|=4;try{Pb(e,i,r)}finally{ke=_,Y.p=d,M.T=o}}tt=1,Nm(),Mm(),Im()}}function Nm(){if(tt===1){tt=0;var e=oi,i=wa,r=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||r){r=M.T,M.T=null;var o=Y.p;Y.p=2;var d=ke;ke|=4;try{hm(i,e);var p=Oc,_=yh(e.containerInfo),C=p.focusedElem,w=p.selectionRange;if(_!==C&&C&&C.ownerDocument&&_h(C.ownerDocument.documentElement,C)){if(w!==null&&iu(C)){var H=w.start,B=w.end;if(B===void 0&&(B=H),"selectionStart"in C)C.selectionStart=H,C.selectionEnd=Math.min(B,C.value.length);else{var q=C.ownerDocument||document,U=q&&q.defaultView||window;if(U.getSelection){var P=U.getSelection(),ae=C.textContent.length,se=Math.min(w.start,ae),Ie=w.end===void 0?se:Math.min(w.end,ae);!P.extend&&se>Ie&&(_=Ie,Ie=se,se=_);var O=vh(C,se),k=vh(C,Ie);if(O&&k&&(P.rangeCount!==1||P.anchorNode!==O.node||P.anchorOffset!==O.offset||P.focusNode!==k.node||P.focusOffset!==k.offset)){var I=q.createRange();I.setStart(O.node,O.offset),P.removeAllRanges(),se>Ie?(P.addRange(I),P.extend(k.node,k.offset)):(I.setEnd(k.node,k.offset),P.addRange(I))}}}}for(q=[],P=C;P=P.parentNode;)P.nodeType===1&&q.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<q.length;C++){var G=q[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}wo=!!Dc,Oc=Dc=null}finally{ke=d,Y.p=o,M.T=r}}e.current=i,tt=2}}function Mm(){if(tt===2){tt=0;var e=oi,i=wa,r=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||r){r=M.T,M.T=null;var o=Y.p;Y.p=2;var d=ke;ke|=4;try{sm(e,i.alternate,i)}finally{ke=d,Y.p=o,M.T=r}}tt=3}}function Im(){if(tt===4||tt===3){tt=0,vy();var e=oi,i=wa,r=Un,o=Sm;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?tt=5:(tt=0,wa=oi=null,Hm(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(li=null),Us(r),i=i.stateNode,Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(Wa,i,void 0,(i.current.flags&128)===128)}catch{}if(o!==null){i=M.T,d=Y.p,Y.p=2,M.T=null;try{for(var p=e.onRecoverableError,_=0;_<o.length;_++){var C=o[_];p(C.value,{componentStack:C.stack})}}finally{M.T=i,Y.p=d}}(Un&3)!==0&&mo(),pn(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===_c?Nr++:(Nr=0,_c=e):Nr=0,Mr(0)}}function Hm(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,pr(i)))}function mo(){return Nm(),Mm(),Im(),zm()}function zm(){if(tt!==5)return!1;var e=oi,i=gc;gc=0;var r=Us(Un),o=M.T,d=Y.p;try{Y.p=32>r?32:r,M.T=null,r=vc,vc=null;var p=oi,_=Un;if(tt=0,wa=oi=null,Un=0,(ke&6)!==0)throw Error(l(331));var C=ke;if(ke|=4,_m(p.current),mm(p,p.current,_,r),ke=C,Mr(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(Wa,p)}catch{}return!0}finally{Y.p=d,M.T=o,Hm(e,i)}}function Um(e,i,r){i=$t(r,i),i=Zu(e.stateNode,i,2),e=ei(e,i,2),e!==null&&(er(e,2),pn(e))}function Oe(e,i,r){if(e.tag===3)Um(e,e,r);else for(;i!==null;){if(i.tag===3){Um(i,e,r);break}else if(i.tag===1){var o=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(li===null||!li.has(o))){e=$t(r,e),r=jp(2),o=ei(i,r,2),o!==null&&(Pp(r,o,i,e),er(o,2),pn(o));break}}i=i.return}}function Sc(e,i,r){var o=e.pingCache;if(o===null){o=e.pingCache=new Gb;var d=new Set;o.set(i,d)}else d=o.get(i),d===void 0&&(d=new Set,o.set(i,d));d.has(r)||(hc=!0,d.add(r),e=Xb.bind(null,e,i,r),i.then(e,e))}function Xb(e,i,r){var o=e.pingCache;o!==null&&o.delete(i),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,He===e&&(Ae&r)===r&&($e===4||$e===3&&(Ae&62914560)===Ae&&300>kt()-so?(ke&2)===0&&La(e,0):pc|=r,Ta===Ae&&(Ta=0)),pn(e)}function jm(e,i){i===0&&(i=Nf()),e=Ti(e,i),e!==null&&(er(e,i),pn(e))}function Qb(e){var i=e.memoizedState,r=0;i!==null&&(r=i.retryLane),jm(e,r)}function Zb(e,i){var r=0;switch(e.tag){case 31:case 13:var o=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(l(314))}o!==null&&o.delete(i),jm(e,r)}function Kb(e,i){return Ms(e,i)}var go=null,ka=null,Ec=!1,vo=!1,Cc=!1,ui=0;function pn(e){e!==ka&&e.next===null&&(ka===null?go=ka=e:ka=ka.next=e),vo=!0,Ec||(Ec=!0,Jb())}function Mr(e,i){if(!Cc&&vo){Cc=!0;do for(var r=!1,o=go;o!==null;){if(e!==0){var d=o.pendingLanes;if(d===0)var p=0;else{var _=o.suspendedLanes,C=o.pingedLanes;p=(1<<31-Ot(42|e)+1)-1,p&=d&~(_&~C),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,Gm(o,p))}else p=Ae,p=bl(o,o===He?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(p&3)===0||Ja(o,p)||(r=!0,Gm(o,p));o=o.next}while(r);Cc=!1}}function Wb(){Pm()}function Pm(){vo=Ec=!1;var e=0;ui!==0&&uS()&&(e=ui);for(var i=kt(),r=null,o=go;o!==null;){var d=o.next,p=Vm(o,i);p===0?(o.next=null,r===null?go=d:r.next=d,d===null&&(ka=r)):(r=o,(e!==0||(p&3)!==0)&&(vo=!0)),o=d}tt!==0&&tt!==5||Mr(e),ui!==0&&(ui=0)}function Vm(e,i){for(var r=e.suspendedLanes,o=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var _=31-Ot(p),C=1<<_,w=d[_];w===-1?((C&r)===0||(C&o)!==0)&&(d[_]=Ay(C,i)):w<=i&&(e.expiredLanes|=C),p&=~C}if(i=He,r=Ae,r=bl(e,e===i?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===i&&(De===2||De===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Is(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Ja(e,r)){if(i=r&-r,i===e.callbackPriority)return i;switch(o!==null&&Is(o),Us(r)){case 2:case 8:r=Df;break;case 32:r=gl;break;case 268435456:r=Of;break;default:r=gl}return o=Bm.bind(null,e),r=Ms(r,o),e.callbackPriority=i,e.callbackNode=r,i}return o!==null&&o!==null&&Is(o),e.callbackPriority=2,e.callbackNode=null,2}function Bm(e,i){if(tt!==0&&tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(mo()&&e.callbackNode!==r)return null;var o=Ae;return o=bl(e,e===He?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Cm(e,o,i),Vm(e,kt()),e.callbackNode!=null&&e.callbackNode===r?Bm.bind(null,e):null)}function Gm(e,i){if(mo())return null;Cm(e,i,!0)}function Jb(){dS(function(){(ke&6)!==0?Ms(kf,Wb):Pm()})}function xc(){if(ui===0){var e=ma;e===0&&(e=vl,vl<<=1,(vl&261888)===0&&(vl=256)),ui=e}return ui}function $m(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xl(""+e)}function qm(e,i){var r=i.ownerDocument.createElement("input");return r.name=i.name,r.value=i.value,e.id&&r.setAttribute("form",e.id),i.parentNode.insertBefore(r,i),e=new FormData(e),r.parentNode.removeChild(r),e}function eS(e,i,r,o,d){if(i==="submit"&&r&&r.stateNode===d){var p=$m((d[St]||null).action),_=o.submitter;_&&(i=(i=_[St]||null)?$m(i.formAction):_.getAttribute("formAction"),i!==null&&(p=i,_=null));var C=new Ll("action","action",null,o,d);e.push({event:C,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(ui!==0){var w=_?qm(d,_):new FormData(d);$u(r,{pending:!0,data:w,method:d.method,action:p},null,w)}}else typeof p=="function"&&(C.preventDefault(),w=_?qm(d,_):new FormData(d),$u(r,{pending:!0,data:w,method:d.method,action:p},p,w))},currentTarget:d}]})}}for(var Ac=0;Ac<ou.length;Ac++){var Tc=ou[Ac],tS=Tc.toLowerCase(),nS=Tc[0].toUpperCase()+Tc.slice(1);an(tS,"on"+nS)}an(Eh,"onAnimationEnd"),an(Ch,"onAnimationIteration"),an(xh,"onAnimationStart"),an("dblclick","onDoubleClick"),an("focusin","onFocus"),an("focusout","onBlur"),an(_b,"onTransitionRun"),an(yb,"onTransitionStart"),an(bb,"onTransitionCancel"),an(Ah,"onTransitionEnd"),ta("onMouseEnter",["mouseout","mouseover"]),ta("onMouseLeave",["mouseout","mouseover"]),ta("onPointerEnter",["pointerout","pointerover"]),ta("onPointerLeave",["pointerout","pointerover"]),Ei("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ei("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ei("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ei("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ei("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ei("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="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(" "),iS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ir));function Fm(e,i){i=(i&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],d=o.event;o=o.listeners;e:{var p=void 0;if(i)for(var _=o.length-1;0<=_;_--){var C=o[_],w=C.instance,H=C.currentTarget;if(C=C.listener,w!==p&&d.isPropagationStopped())break e;p=C,d.currentTarget=H;try{p(d)}catch(B){Dl(B)}d.currentTarget=null,p=w}else for(_=0;_<o.length;_++){if(C=o[_],w=C.instance,H=C.currentTarget,C=C.listener,w!==p&&d.isPropagationStopped())break e;p=C,d.currentTarget=H;try{p(d)}catch(B){Dl(B)}d.currentTarget=null,p=w}}}}function Ee(e,i){var r=i[js];r===void 0&&(r=i[js]=new Set);var o=e+"__bubble";r.has(o)||(Ym(i,e,2,!1),r.add(o))}function wc(e,i,r){var o=0;i&&(o|=4),Ym(r,e,o,i)}var _o="_reactListening"+Math.random().toString(36).slice(2);function Lc(e){if(!e[_o]){e[_o]=!0,Pf.forEach(function(r){r!=="selectionchange"&&(iS.has(r)||wc(r,!1,e),wc(r,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[_o]||(i[_o]=!0,wc("selectionchange",!1,i))}}function Ym(e,i,r,o){switch(Eg(i)){case 2:var d=DS;break;case 8:d=OS;break;default:d=Gc}r=d.bind(null,i,r,e),d=void 0,!Xs||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(d=!0),o?d!==void 0?e.addEventListener(i,r,{capture:!0,passive:d}):e.addEventListener(i,r,!0):d!==void 0?e.addEventListener(i,r,{passive:d}):e.addEventListener(i,r,!1)}function Rc(e,i,r,o,d){var p=o;if((i&1)===0&&(i&2)===0&&o!==null)e:for(;;){if(o===null)return;var _=o.tag;if(_===3||_===4){var C=o.stateNode.containerInfo;if(C===d)break;if(_===4)for(_=o.return;_!==null;){var w=_.tag;if((w===3||w===4)&&_.stateNode.containerInfo===d)return;_=_.return}for(;C!==null;){if(_=Wi(C),_===null)return;if(w=_.tag,w===5||w===6||w===26||w===27){o=p=_;continue e}C=C.parentNode}}o=o.return}Wf(function(){var H=p,B=Fs(r),q=[];e:{var U=Th.get(e);if(U!==void 0){var P=Ll,ae=e;switch(e){case"keypress":if(Tl(r)===0)break e;case"keydown":case"keyup":P=Zy;break;case"focusin":ae="focus",P=Ws;break;case"focusout":ae="blur",P=Ws;break;case"beforeblur":case"afterblur":P=Ws;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=th;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Uy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=Jy;break;case Eh:case Ch:case xh:P=Vy;break;case Ah:P=tb;break;case"scroll":case"scrollend":P=Hy;break;case"wheel":P=ib;break;case"copy":case"cut":case"paste":P=Gy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=ih;break;case"toggle":case"beforetoggle":P=rb}var se=(i&4)!==0,Ie=!se&&(e==="scroll"||e==="scrollend"),O=se?U!==null?U+"Capture":null:U;se=[];for(var k=H,I;k!==null;){var G=k;if(I=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||I===null||O===null||(G=ir(k,O),G!=null&&se.push(Hr(k,G,I))),Ie)break;k=k.return}0<se.length&&(U=new P(U,ae,null,r,B),q.push({event:U,listeners:se}))}}if((i&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",U&&r!==qs&&(ae=r.relatedTarget||r.fromElement)&&(Wi(ae)||ae[Ki]))break e;if((P||U)&&(U=B.window===B?B:(U=B.ownerDocument)?U.defaultView||U.parentWindow:window,P?(ae=r.relatedTarget||r.toElement,P=H,ae=ae?Wi(ae):null,ae!==null&&(Ie=u(ae),se=ae.tag,ae!==Ie||se!==5&&se!==27&&se!==6)&&(ae=null)):(P=null,ae=H),P!==ae)){if(se=th,G="onMouseLeave",O="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(se=ih,G="onPointerLeave",O="onPointerEnter",k="pointer"),Ie=P==null?U:nr(P),I=ae==null?U:nr(ae),U=new se(G,k+"leave",P,r,B),U.target=Ie,U.relatedTarget=I,G=null,Wi(B)===H&&(se=new se(O,k+"enter",ae,r,B),se.target=I,se.relatedTarget=Ie,G=se),Ie=G,P&&ae)t:{for(se=aS,O=P,k=ae,I=0,G=O;G;G=se(G))I++;G=0;for(var le=k;le;le=se(le))G++;for(;0<I-G;)O=se(O),I--;for(;0<G-I;)k=se(k),G--;for(;I--;){if(O===k||k!==null&&O===k.alternate){se=O;break t}O=se(O),k=se(k)}se=null}else se=null;P!==null&&Xm(q,U,P,se,!1),ae!==null&&Ie!==null&&Xm(q,Ie,ae,se,!0)}}e:{if(U=H?nr(H):window,P=U.nodeName&&U.nodeName.toLowerCase(),P==="select"||P==="input"&&U.type==="file")var Le=dh;else if(uh(U))if(fh)Le=mb;else{Le=hb;var re=fb}else P=U.nodeName,!P||P.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?H&&$s(H.elementType)&&(Le=dh):Le=pb;if(Le&&(Le=Le(e,H))){ch(q,Le,r,B);break e}re&&re(e,U,H),e==="focusout"&&H&&U.type==="number"&&H.memoizedProps.value!=null&&Gs(U,"number",U.value)}switch(re=H?nr(H):window,e){case"focusin":(uh(re)||re.contentEditable==="true")&&(oa=re,au=H,dr=null);break;case"focusout":dr=au=oa=null;break;case"mousedown":ru=!0;break;case"contextmenu":case"mouseup":case"dragend":ru=!1,bh(q,r,B);break;case"selectionchange":if(vb)break;case"keydown":case"keyup":bh(q,r,B)}var _e;if(eu)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else la?oh(e,r)&&(Te="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Te="onCompositionStart");Te&&(ah&&r.locale!=="ko"&&(la||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&la&&(_e=Jf()):(Yn=B,Qs="value"in Yn?Yn.value:Yn.textContent,la=!0)),re=yo(H,Te),0<re.length&&(Te=new nh(Te,e,null,r,B),q.push({event:Te,listeners:re}),_e?Te.data=_e:(_e=sh(r),_e!==null&&(Te.data=_e)))),(_e=ob?sb(e,r):ub(e,r))&&(Te=yo(H,"onBeforeInput"),0<Te.length&&(re=new nh("onBeforeInput","beforeinput",null,r,B),q.push({event:re,listeners:Te}),re.data=_e)),eS(q,e,H,r,B)}Fm(q,i)})}function Hr(e,i,r){return{instance:e,listener:i,currentTarget:r}}function yo(e,i){for(var r=i+"Capture",o=[];e!==null;){var d=e,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=ir(e,r),d!=null&&o.unshift(Hr(e,d,p)),d=ir(e,i),d!=null&&o.push(Hr(e,d,p))),e.tag===3)return o;e=e.return}return[]}function aS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xm(e,i,r,o,d){for(var p=i._reactName,_=[];r!==null&&r!==o;){var C=r,w=C.alternate,H=C.stateNode;if(C=C.tag,w!==null&&w===o)break;C!==5&&C!==26&&C!==27||H===null||(w=H,d?(H=ir(r,p),H!=null&&_.unshift(Hr(r,H,w))):d||(H=ir(r,p),H!=null&&_.push(Hr(r,H,w)))),r=r.return}_.length!==0&&e.push({event:i,listeners:_})}var rS=/\r\n?/g,lS=/\u0000|\uFFFD/g;function Qm(e){return(typeof e=="string"?e:""+e).replace(rS,`
|
|
10
|
-
`).replace(lS,"")}function Zm(e,i){return i=Qm(i),Qm(e)===i}function Me(e,i,r,o,d,p){switch(r){case"children":typeof o=="string"?i==="body"||i==="textarea"&&o===""||ia(e,o):(typeof o=="number"||typeof o=="bigint")&&i!=="body"&&ia(e,""+o);break;case"className":El(e,"class",o);break;case"tabIndex":El(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":El(e,r,o);break;case"style":Zf(e,o,p);break;case"data":if(i!=="object"){El(e,"data",o);break}case"src":case"href":if(o===""&&(i!=="a"||r!=="href")){e.removeAttribute(r);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=xl(""+o),e.setAttribute(r,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(r==="formAction"?(i!=="input"&&Me(e,i,"name",d.name,d,null),Me(e,i,"formEncType",d.formEncType,d,null),Me(e,i,"formMethod",d.formMethod,d,null),Me(e,i,"formTarget",d.formTarget,d,null)):(Me(e,i,"encType",d.encType,d,null),Me(e,i,"method",d.method,d,null),Me(e,i,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=xl(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=Cn);break;case"onScroll":o!=null&&Ee("scroll",e);break;case"onScrollEnd":o!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(r=o.__html,r!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=r}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}r=xl(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""+o):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":o===!0?e.setAttribute(r,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,o):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(r,o):e.removeAttribute(r);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(r):e.setAttribute(r,o);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),Sl(e,"popover",o);break;case"xlinkActuate":En(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":En(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":En(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":En(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":En(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":En(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":En(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":En(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":En(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Sl(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=My.get(r)||r,Sl(e,r,o))}}function kc(e,i,r,o,d,p){switch(r){case"style":Zf(e,o,p);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(r=o.__html,r!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=r}}break;case"children":typeof o=="string"?ia(e,o):(typeof o=="number"||typeof o=="bigint")&&ia(e,""+o);break;case"onScroll":o!=null&&Ee("scroll",e);break;case"onScrollEnd":o!=null&&Ee("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Cn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vf.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),i=r.slice(2,d?r.length-7:void 0),p=e[St]||null,p=p!=null?p[r]:null,typeof p=="function"&&e.removeEventListener(i,p,d),typeof o=="function")){typeof p!="function"&&p!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(i,o,d);break e}r in e?e[r]=o:o===!0?e.setAttribute(r,""):Sl(e,r,o)}}}function gt(e,i,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var o=!1,d=!1,p;for(p in r)if(r.hasOwnProperty(p)){var _=r[p];if(_!=null)switch(p){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Me(e,i,p,_,r,null)}}d&&Me(e,i,"srcSet",r.srcSet,r,null),o&&Me(e,i,"src",r.src,r,null);return;case"input":Ee("invalid",e);var C=p=_=d=null,w=null,H=null;for(o in r)if(r.hasOwnProperty(o)){var B=r[o];if(B!=null)switch(o){case"name":d=B;break;case"type":_=B;break;case"checked":w=B;break;case"defaultChecked":H=B;break;case"value":p=B;break;case"defaultValue":C=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(l(137,i));break;default:Me(e,i,o,B,r,null)}}Ff(e,p,C,w,H,_,d,!1);return;case"select":Ee("invalid",e),o=_=p=null;for(d in r)if(r.hasOwnProperty(d)&&(C=r[d],C!=null))switch(d){case"value":p=C;break;case"defaultValue":_=C;break;case"multiple":o=C;default:Me(e,i,d,C,r,null)}i=p,r=_,e.multiple=!!o,i!=null?na(e,!!o,i,!1):r!=null&&na(e,!!o,r,!0);return;case"textarea":Ee("invalid",e),p=d=o=null;for(_ in r)if(r.hasOwnProperty(_)&&(C=r[_],C!=null))switch(_){case"value":o=C;break;case"defaultValue":d=C;break;case"children":p=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(l(91));break;default:Me(e,i,_,C,r,null)}Xf(e,o,d,p);return;case"option":for(w in r)r.hasOwnProperty(w)&&(o=r[w],o!=null)&&(w==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Me(e,i,w,o,r,null));return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(o=0;o<Ir.length;o++)Ee(Ir[o],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("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(H in r)if(r.hasOwnProperty(H)&&(o=r[H],o!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Me(e,i,H,o,r,null)}return;default:if($s(i)){for(B in r)r.hasOwnProperty(B)&&(o=r[B],o!==void 0&&kc(e,i,B,o,r,void 0));return}}for(C in r)r.hasOwnProperty(C)&&(o=r[C],o!=null&&Me(e,i,C,o,r,null))}function oS(e,i,r,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,_=null,C=null,w=null,H=null,B=null;for(P in r){var q=r[P];if(r.hasOwnProperty(P)&&q!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":w=q;default:o.hasOwnProperty(P)||Me(e,i,P,null,o,q)}}for(var U in o){var P=o[U];if(q=r[U],o.hasOwnProperty(U)&&(P!=null||q!=null))switch(U){case"type":p=P;break;case"name":d=P;break;case"checked":H=P;break;case"defaultChecked":B=P;break;case"value":_=P;break;case"defaultValue":C=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(l(137,i));break;default:P!==q&&Me(e,i,U,P,o,q)}}Bs(e,_,C,w,H,B,p,d);return;case"select":P=_=C=U=null;for(p in r)if(w=r[p],r.hasOwnProperty(p)&&w!=null)switch(p){case"value":break;case"multiple":P=w;default:o.hasOwnProperty(p)||Me(e,i,p,null,o,w)}for(d in o)if(p=o[d],w=r[d],o.hasOwnProperty(d)&&(p!=null||w!=null))switch(d){case"value":U=p;break;case"defaultValue":C=p;break;case"multiple":_=p;default:p!==w&&Me(e,i,d,p,o,w)}i=C,r=_,o=P,U!=null?na(e,!!r,U,!1):!!o!=!!r&&(i!=null?na(e,!!r,i,!0):na(e,!!r,r?[]:"",!1));return;case"textarea":P=U=null;for(C in r)if(d=r[C],r.hasOwnProperty(C)&&d!=null&&!o.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:Me(e,i,C,null,o,d)}for(_ in o)if(d=o[_],p=r[_],o.hasOwnProperty(_)&&(d!=null||p!=null))switch(_){case"value":U=d;break;case"defaultValue":P=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==p&&Me(e,i,_,d,o,p)}Yf(e,U,P);return;case"option":for(var ae in r)U=r[ae],r.hasOwnProperty(ae)&&U!=null&&!o.hasOwnProperty(ae)&&(ae==="selected"?e.selected=!1:Me(e,i,ae,null,o,U));for(w in o)U=o[w],P=r[w],o.hasOwnProperty(w)&&U!==P&&(U!=null||P!=null)&&(w==="selected"?e.selected=U&&typeof U!="function"&&typeof U!="symbol":Me(e,i,w,U,o,P));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 se in r)U=r[se],r.hasOwnProperty(se)&&U!=null&&!o.hasOwnProperty(se)&&Me(e,i,se,null,o,U);for(H in o)if(U=o[H],P=r[H],o.hasOwnProperty(H)&&U!==P&&(U!=null||P!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(l(137,i));break;default:Me(e,i,H,U,o,P)}return;default:if($s(i)){for(var Ie in r)U=r[Ie],r.hasOwnProperty(Ie)&&U!==void 0&&!o.hasOwnProperty(Ie)&&kc(e,i,Ie,void 0,o,U);for(B in o)U=o[B],P=r[B],!o.hasOwnProperty(B)||U===P||U===void 0&&P===void 0||kc(e,i,B,U,o,P);return}}for(var O in r)U=r[O],r.hasOwnProperty(O)&&U!=null&&!o.hasOwnProperty(O)&&Me(e,i,O,null,o,U);for(q in o)U=o[q],P=r[q],!o.hasOwnProperty(q)||U===P||U==null&&P==null||Me(e,i,q,U,o,P)}function Km(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,r=performance.getEntriesByType("resource"),o=0;o<r.length;o++){var d=r[o],p=d.transferSize,_=d.initiatorType,C=d.duration;if(p&&C&&Km(_)){for(_=0,C=d.responseEnd,o+=1;o<r.length;o++){var w=r[o],H=w.startTime;if(H>C)break;var B=w.transferSize,q=w.initiatorType;B&&Km(q)&&(w=w.responseEnd,_+=B*(w<C?1:(C-H)/(w-H)))}if(--o,i+=8*(p+_)/(d.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Dc=null,Oc=null;function bo(e){return e.nodeType===9?e:e.ownerDocument}function Wm(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 Jm(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function Nc(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Mc=null;function uS(){var e=window.event;return e&&e.type==="popstate"?e===Mc?!1:(Mc=e,!0):(Mc=null,!1)}var eg=typeof setTimeout=="function"?setTimeout:void 0,cS=typeof clearTimeout=="function"?clearTimeout:void 0,tg=typeof Promise=="function"?Promise:void 0,dS=typeof queueMicrotask=="function"?queueMicrotask:typeof tg<"u"?function(e){return tg.resolve(null).then(e).catch(fS)}:eg;function fS(e){setTimeout(function(){throw e})}function ci(e){return e==="head"}function ng(e,i){var r=i,o=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(o===0){e.removeChild(d),Ma(i);return}o--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")o++;else if(r==="html")zr(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,zr(r);for(var p=r.firstChild;p;){var _=p.nextSibling,C=p.nodeName;p[tr]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&p.rel.toLowerCase()==="stylesheet"||r.removeChild(p),p=_}}else r==="body"&&zr(e.ownerDocument.body);r=d}while(r);Ma(i)}function ig(e,i){var r=e;e=0;do{var o=r.nextSibling;if(r.nodeType===1?i?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(i?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=o}while(r)}function Ic(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var r=i;switch(i=i.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Ic(r),Ps(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function hS(e,i,r,o){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[tr])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=Qt(e.nextSibling),e===null)break}return null}function pS(e,i,r){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Qt(e.nextSibling),e===null))return null;return e}function ag(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Qt(e.nextSibling),e===null))return null;return e}function Hc(e){return e.data==="$?"||e.data==="$~"}function zc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function mS(e,i){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||r.readyState!=="loading")i();else{var o=function(){i(),r.removeEventListener("DOMContentLoaded",o)};r.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Qt(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var Uc=null;function rg(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(i===0)return Qt(e.nextSibling);i--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||i++}e=e.nextSibling}return null}function lg(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(i===0)return e;i--}else r!=="/$"&&r!=="/&"||i++}e=e.previousSibling}return null}function og(e,i,r){switch(i=bo(r),e){case"html":if(e=i.documentElement,!e)throw Error(l(452));return e;case"head":if(e=i.head,!e)throw Error(l(453));return e;case"body":if(e=i.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function zr(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);Ps(e)}var Zt=new Map,sg=new Set;function So(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jn=Y.d;Y.d={f:gS,r:vS,D:_S,C:yS,L:bS,m:SS,X:CS,S:ES,M:xS};function gS(){var e=jn.f(),i=fo();return e||i}function vS(e){var i=Ji(e);i!==null&&i.tag===5&&i.type==="form"?Ap(i):jn.r(e)}var Da=typeof document>"u"?null:document;function ug(e,i,r){var o=Da;if(o&&typeof i=="string"&&i){var d=Bt(i);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),sg.has(d)||(sg.add(d),e={rel:e,crossOrigin:r,href:i},o.querySelector(d)===null&&(i=o.createElement("link"),gt(i,"link",e),ot(i),o.head.appendChild(i)))}}function _S(e){jn.D(e),ug("dns-prefetch",e,null)}function yS(e,i){jn.C(e,i),ug("preconnect",e,i)}function bS(e,i,r){jn.L(e,i,r);var o=Da;if(o&&e&&i){var d='link[rel="preload"][as="'+Bt(i)+'"]';i==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+Bt(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+Bt(r.imageSizes)+'"]')):d+='[href="'+Bt(e)+'"]';var p=d;switch(i){case"style":p=Oa(e);break;case"script":p=Na(e)}Zt.has(p)||(e=g({rel:"preload",href:i==="image"&&r&&r.imageSrcSet?void 0:e,as:i},r),Zt.set(p,e),o.querySelector(d)!==null||i==="style"&&o.querySelector(Ur(p))||i==="script"&&o.querySelector(jr(p))||(i=o.createElement("link"),gt(i,"link",e),ot(i),o.head.appendChild(i)))}}function SS(e,i){jn.m(e,i);var r=Da;if(r&&e){var o=i&&typeof i.as=="string"?i.as:"script",d='link[rel="modulepreload"][as="'+Bt(o)+'"][href="'+Bt(e)+'"]',p=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Na(e)}if(!Zt.has(p)&&(e=g({rel:"modulepreload",href:e},i),Zt.set(p,e),r.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(jr(p)))return}o=r.createElement("link"),gt(o,"link",e),ot(o),r.head.appendChild(o)}}}function ES(e,i,r){jn.S(e,i,r);var o=Da;if(o&&e){var d=ea(o).hoistableStyles,p=Oa(e);i=i||"default";var _=d.get(p);if(!_){var C={loading:0,preload:null};if(_=o.querySelector(Ur(p)))C.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":i},r),(r=Zt.get(p))&&jc(e,r);var w=_=o.createElement("link");ot(w),gt(w,"link",e),w._p=new Promise(function(H,B){w.onload=H,w.onerror=B}),w.addEventListener("load",function(){C.loading|=1}),w.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Eo(_,i,o)}_={type:"stylesheet",instance:_,count:1,state:C},d.set(p,_)}}}function CS(e,i){jn.X(e,i);var r=Da;if(r&&e){var o=ea(r).hoistableScripts,d=Na(e),p=o.get(d);p||(p=r.querySelector(jr(d)),p||(e=g({src:e,async:!0},i),(i=Zt.get(d))&&Pc(e,i),p=r.createElement("script"),ot(p),gt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(d,p))}}function xS(e,i){jn.M(e,i);var r=Da;if(r&&e){var o=ea(r).hoistableScripts,d=Na(e),p=o.get(d);p||(p=r.querySelector(jr(d)),p||(e=g({src:e,async:!0,type:"module"},i),(i=Zt.get(d))&&Pc(e,i),p=r.createElement("script"),ot(p),gt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(d,p))}}function cg(e,i,r,o){var d=(d=ve.current)?So(d):null;if(!d)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(i=Oa(r.href),r=ea(d).hoistableStyles,o=r.get(i),o||(o={type:"style",instance:null,count:0,state:null},r.set(i,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Oa(r.href);var p=ea(d).hoistableStyles,_=p.get(e);if(_||(d=d.ownerDocument||d,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,_),(p=d.querySelector(Ur(e)))&&!p._p&&(_.instance=p,_.state.loading=5),Zt.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Zt.set(e,r),p||AS(d,e,r,_.state))),i&&o===null)throw Error(l(528,""));return _}if(i&&o!==null)throw Error(l(529,""));return null;case"script":return i=r.async,r=r.src,typeof r=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Na(r),r=ea(d).hoistableScripts,o=r.get(i),o||(o={type:"script",instance:null,count:0,state:null},r.set(i,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Oa(e){return'href="'+Bt(e)+'"'}function Ur(e){return'link[rel="stylesheet"]['+e+"]"}function dg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function AS(e,i,r,o){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?o.loading=1:(i=e.createElement("link"),o.preload=i,i.addEventListener("load",function(){return o.loading|=1}),i.addEventListener("error",function(){return o.loading|=2}),gt(i,"link",r),ot(i),e.head.appendChild(i))}function Na(e){return'[src="'+Bt(e)+'"]'}function jr(e){return"script[async]"+e}function fg(e,i,r){if(i.count++,i.instance===null)switch(i.type){case"style":var o=e.querySelector('style[data-href~="'+Bt(r.href)+'"]');if(o)return i.instance=o,ot(o),o;var d=g({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),ot(o),gt(o,"style",d),Eo(o,r.precedence,e),i.instance=o;case"stylesheet":d=Oa(r.href);var p=e.querySelector(Ur(d));if(p)return i.state.loading|=4,i.instance=p,ot(p),p;o=dg(r),(d=Zt.get(d))&&jc(o,d),p=(e.ownerDocument||e).createElement("link"),ot(p);var _=p;return _._p=new Promise(function(C,w){_.onload=C,_.onerror=w}),gt(p,"link",o),i.state.loading|=4,Eo(p,r.precedence,e),i.instance=p;case"script":return p=Na(r.src),(d=e.querySelector(jr(p)))?(i.instance=d,ot(d),d):(o=r,(d=Zt.get(p))&&(o=g({},r),Pc(o,d)),e=e.ownerDocument||e,d=e.createElement("script"),ot(d),gt(d,"link",o),e.head.appendChild(d),i.instance=d);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(o=i.instance,i.state.loading|=4,Eo(o,r.precedence,e));return i.instance}function Eo(e,i,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,p=d,_=0;_<o.length;_++){var C=o[_];if(C.dataset.precedence===i)p=C;else if(p!==d)break}p?p.parentNode.insertBefore(e,p.nextSibling):(i=r.nodeType===9?r.head:r,i.insertBefore(e,i.firstChild))}function jc(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function Pc(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var Co=null;function hg(e,i,r){if(Co===null){var o=new Map,d=Co=new Map;d.set(r,o)}else d=Co,o=d.get(r),o||(o=new Map,d.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var p=r[d];if(!(p[tr]||p[ft]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var _=p.getAttribute(i)||"";_=e+_;var C=o.get(_);C?C.push(p):o.set(_,[p])}}return o}function pg(e,i,r){e=e.ownerDocument||e,e.head.insertBefore(r,i==="title"?e.querySelector("head > title"):null)}function TS(e,i,r){if(r===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(e=i.disabled,typeof i.precedence=="string"&&e==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function mg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function wS(e,i,r,o){if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=Oa(o.href),p=i.querySelector(Ur(d));if(p){i=p._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=xo.bind(e),i.then(e,e)),r.state.loading|=4,r.instance=p,ot(p);return}p=i.ownerDocument||i,o=dg(o),(d=Zt.get(d))&&jc(o,d),p=p.createElement("link"),ot(p);var _=p;_._p=new Promise(function(C,w){_.onload=C,_.onerror=w}),gt(p,"link",o),r.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,i),(i=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=xo.bind(e),i.addEventListener("load",r),i.addEventListener("error",r))}}var Vc=0;function LS(e,i){return e.stylesheets&&e.count===0&&To(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var o=setTimeout(function(){if(e.stylesheets&&To(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+i);0<e.imgBytes&&Vc===0&&(Vc=62500*sS());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&To(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Vc?50:800)+i);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function xo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)To(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ao=null;function To(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ao=new Map,i.forEach(RS,e),Ao=null,xo.call(e))}function RS(e,i){if(!(i.state.loading&4)){var r=Ao.get(e);if(r)var o=r.get(null);else{r=new Map,Ao.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var _=d[p];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(r.set(_.dataset.precedence,_),o=_)}o&&r.set(null,o)}d=i.instance,_=d.getAttribute("data-precedence"),p=r.get(_)||o,p===o&&r.set(null,d),r.set(_,d),this.count++,o=xo.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),p?p.parentNode.insertBefore(d,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),i.state.loading|=4}}var Pr={$$typeof:R,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function kS(e,i,r,o,d,p,_,C,w){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=Hs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hs(0),this.hiddenUpdates=Hs(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function gg(e,i,r,o,d,p,_,C,w,H,B,q){return e=new kS(e,i,r,_,w,H,B,q,C),i=1,p===!0&&(i|=24),p=Mt(3,null,null,i),e.current=p,p.stateNode=e,i=bu(),i.refCount++,e.pooledCache=i,i.refCount++,p.memoizedState={element:o,isDehydrated:r,cache:i},xu(p),e}function vg(e){return e?(e=ca,e):ca}function _g(e,i,r,o,d,p){d=vg(d),o.context===null?o.context=d:o.pendingContext=d,o=Jn(i),o.payload={element:r},p=p===void 0?null:p,p!==null&&(o.callback=p),r=ei(e,o,i),r!==null&&(wt(r,e,i),_r(r,e,i))}function yg(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<i?r:i}}function Bc(e,i){yg(e,i),(e=e.alternate)&&yg(e,i)}function bg(e){if(e.tag===13||e.tag===31){var i=Ti(e,67108864);i!==null&&wt(i,e,67108864),Bc(e,67108864)}}function Sg(e){if(e.tag===13||e.tag===31){var i=jt();i=zs(i);var r=Ti(e,i);r!==null&&wt(r,e,i),Bc(e,i)}}var wo=!0;function DS(e,i,r,o){var d=M.T;M.T=null;var p=Y.p;try{Y.p=2,Gc(e,i,r,o)}finally{Y.p=p,M.T=d}}function OS(e,i,r,o){var d=M.T;M.T=null;var p=Y.p;try{Y.p=8,Gc(e,i,r,o)}finally{Y.p=p,M.T=d}}function Gc(e,i,r,o){if(wo){var d=$c(o);if(d===null)Rc(e,i,o,Lo,r),Cg(e,o);else if(MS(d,e,i,r,o))o.stopPropagation();else if(Cg(e,o),i&4&&-1<NS.indexOf(e)){for(;d!==null;){var p=Ji(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var _=Si(p.pendingLanes);if(_!==0){var C=p;for(C.pendingLanes|=2,C.entangledLanes|=2;_;){var w=1<<31-Ot(_);C.entanglements[1]|=w,_&=~w}pn(p),(ke&6)===0&&(uo=kt()+500,Mr(0))}}break;case 31:case 13:C=Ti(p,2),C!==null&&wt(C,p,2),fo(),Bc(p,2)}if(p=$c(o),p===null&&Rc(e,i,o,Lo,r),p===d)break;d=p}d!==null&&o.stopPropagation()}else Rc(e,i,o,null,r)}}function $c(e){return e=Fs(e),qc(e)}var Lo=null;function qc(e){if(Lo=null,e=Wi(e),e!==null){var i=u(e);if(i===null)e=null;else{var r=i.tag;if(r===13){if(e=f(i),e!==null)return e;e=null}else if(r===31){if(e=h(i),e!==null)return e;e=null}else if(r===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Lo=e,null}function Eg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(_y()){case kf:return 2;case Df:return 8;case gl:case yy:return 32;case Of:return 268435456;default:return 32}default:return 32}}var Fc=!1,di=null,fi=null,hi=null,Vr=new Map,Br=new Map,pi=[],NS="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 Cg(e,i){switch(e){case"focusin":case"focusout":di=null;break;case"dragenter":case"dragleave":fi=null;break;case"mouseover":case"mouseout":hi=null;break;case"pointerover":case"pointerout":Vr.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Br.delete(i.pointerId)}}function Gr(e,i,r,o,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:i,domEventName:r,eventSystemFlags:o,nativeEvent:p,targetContainers:[d]},i!==null&&(i=Ji(i),i!==null&&bg(i)),e):(e.eventSystemFlags|=o,i=e.targetContainers,d!==null&&i.indexOf(d)===-1&&i.push(d),e)}function MS(e,i,r,o,d){switch(i){case"focusin":return di=Gr(di,e,i,r,o,d),!0;case"dragenter":return fi=Gr(fi,e,i,r,o,d),!0;case"mouseover":return hi=Gr(hi,e,i,r,o,d),!0;case"pointerover":var p=d.pointerId;return Vr.set(p,Gr(Vr.get(p)||null,e,i,r,o,d)),!0;case"gotpointercapture":return p=d.pointerId,Br.set(p,Gr(Br.get(p)||null,e,i,r,o,d)),!0}return!1}function xg(e){var i=Wi(e.target);if(i!==null){var r=u(i);if(r!==null){if(i=r.tag,i===13){if(i=f(r),i!==null){e.blockedOn=i,Uf(e.priority,function(){Sg(r)});return}}else if(i===31){if(i=h(r),i!==null){e.blockedOn=i,Uf(e.priority,function(){Sg(r)});return}}else if(i===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ro(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var r=$c(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);qs=o,r.target.dispatchEvent(o),qs=null}else return i=Ji(r),i!==null&&bg(i),e.blockedOn=r,!1;i.shift()}return!0}function Ag(e,i,r){Ro(e)&&r.delete(i)}function IS(){Fc=!1,di!==null&&Ro(di)&&(di=null),fi!==null&&Ro(fi)&&(fi=null),hi!==null&&Ro(hi)&&(hi=null),Vr.forEach(Ag),Br.forEach(Ag)}function ko(e,i){e.blockedOn===i&&(e.blockedOn=null,Fc||(Fc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,IS)))}var Do=null;function Tg(e){Do!==e&&(Do=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Do===e&&(Do=null);for(var i=0;i<e.length;i+=3){var r=e[i],o=e[i+1],d=e[i+2];if(typeof o!="function"){if(qc(o||r)===null)continue;break}var p=Ji(r);p!==null&&(e.splice(i,3),i-=3,$u(p,{pending:!0,data:d,method:r.method,action:o},o,d))}}))}function Ma(e){function i(w){return ko(w,e)}di!==null&&ko(di,e),fi!==null&&ko(fi,e),hi!==null&&ko(hi,e),Vr.forEach(i),Br.forEach(i);for(var r=0;r<pi.length;r++){var o=pi[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<pi.length&&(r=pi[0],r.blockedOn===null);)xg(r),r.blockedOn===null&&pi.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var d=r[o],p=r[o+1],_=d[St]||null;if(typeof p=="function")_||Tg(r);else if(_){var C=null;if(p&&p.hasAttribute("formAction")){if(d=p,_=p[St]||null)C=_.formAction;else if(qc(d)!==null)continue}else C=_.action;typeof C=="function"?r[o+1]=C:(r.splice(o,3),o-=3),Tg(r)}}}function wg(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(_){return d=_})},focusReset:"manual",scroll:"manual"})}function i(){d!==null&&(d(),d=null),o||setTimeout(r,20)}function r(){if(!o&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(r,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),d!==null&&(d(),d=null)}}}function Yc(e){this._internalRoot=e}Oo.prototype.render=Yc.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var r=i.current,o=jt();_g(r,o,e,i,null,null)},Oo.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;_g(e.current,2,null,e,null,null),fo(),i[Ki]=null}};function Oo(e){this._internalRoot=e}Oo.prototype.unstable_scheduleHydration=function(e){if(e){var i=zf();e={blockedOn:null,target:e,priority:i};for(var r=0;r<pi.length&&i!==0&&i<pi[r].priority;r++);pi.splice(r,0,e),r===0&&xg(e)}};var Lg=n.version;if(Lg!=="19.2.7")throw Error(l(527,Lg,"19.2.7"));Y.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=m(i),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var HS={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var No=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!No.isDisabled&&No.supportsFiber)try{Wa=No.inject(HS),Dt=No}catch{}}return qr.createRoot=function(e,i){if(!s(e))throw Error(l(299));var r=!1,o="",d=Ip,p=Hp,_=zp;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(p=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError)),i=gg(e,1,!1,null,null,r,o,null,d,p,_,wg),e[Ki]=i.current,Lc(e),new Yc(i)},qr.hydrateRoot=function(e,i,r){if(!s(e))throw Error(l(299));var o=!1,d="",p=Ip,_=Hp,C=zp,w=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(_=r.onCaughtError),r.onRecoverableError!==void 0&&(C=r.onRecoverableError),r.formState!==void 0&&(w=r.formState)),i=gg(e,1,!0,i,r??null,o,d,w,p,_,C,wg),i.context=vg(null),r=i.current,o=jt(),o=zs(o),d=Jn(o),d.callback=null,ei(r,d,o),r=o,i.current.lanes=r,er(i,r),pn(i),e[Ki]=i.current,Lc(e),new Oo(i)},qr.version="19.2.7",qr}var Ug;function YS(){if(Ug)return Zc.exports;Ug=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Zc.exports=FS(),Zc.exports}var XS=YS();const pv="diffs-container";(()=>{try{return!1}catch{return!1}})();const QS=/(?=^From [a-f0-9]+ .+$)/m,mv=/(?=^diff --git)/gm,ZS=/^(---|\+\+\+)\s+([^\t\r\n]+)/,KS=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,WS=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,JS=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,gv="header-prefix",vv="header-metadata",pf="header-custom",Jt={dark:"pierre-dark",light:"pierre-light"},e1="data-theme-css",t1="data-unsafe-css",n1="data-diffs-scrollbar-measure",_v="--diffs-scrollbar-gutter-measured",i1=1e5,a1={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},r1=Object.freeze({fromStart:0,fromEnd:0}),jg={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},l1={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Nd(t,n,a){if(t===n||t==null||n==null)return t===n;const l=new Set(a),s=Object.keys(t),u=new Set(Object.keys(n));for(const f of s)if(u.delete(f),!l.has(f)&&(!(f in n)||t[f]!==n[f]))return!1;for(const f of Array.from(u))if(!l.has(f))return!1;return!0}function mf(t,n){return t==null||n==null||typeof t=="string"||typeof n=="string"?t===n:t.dark===n.dark&&t.light===n.light}function yv(t,n){const a=t?.theme??Jt,l=n?.theme??Jt,s=Pg(t),u=Pg(n);return mf(a,l)&&Nd(t,n,["theme","parseDiffOptions"])&&Nd(s,u)}function Pg(t){if(t!=null&&"parseDiffOptions"in t)return t.parseDiffOptions}function Vg(t,n){return t?.start===n?.start&&t?.end===n?.end&&t?.side===n?.side&&t?.endSide===n?.endSide}function yn(t){return{type:"text",value:t}}function ye({tagName:t,children:n=[],properties:a={}}){return{type:"element",tagName:t,properties:a,children:n}}function ls({name:t,width:n=16,height:a=16,properties:l}){return ye({tagName:"svg",properties:{width:n,height:a,viewBox:"0 0 16 16",...l},children:[ye({tagName:"use",properties:{href:`#${t.replace(/^#/,"")}`}})]})}function o1(t){let n=t.children[0];for(;n!=null;){if(n.type==="element"&&n.tagName==="code")return n;"children"in n?n=n.children[0]:n=null}}function Mo(t){return ye({tagName:"div",properties:{"data-gutter":""},children:t})}function s1(t,n,a,l={}){return ye({tagName:"div",properties:{"data-line-type":t,"data-column-number":n,"data-line-index":a,...l},children:n!=null?[ye({tagName:"span",properties:{"data-line-number-content":""},children:[yn(`${n}`)]})]:void 0})}function on(t,n,a){return ye({tagName:"div",properties:{"data-gutter-buffer":n,"data-buffer-size":a,"data-line-type":n==="annotation"?void 0:t,style:n==="annotation"?`grid-row: span ${a};`:`grid-row: span ${a};min-height:calc(${a} * 1lh);`}})}function u1(){return ye({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[ls({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function c1(t,n){return t.lineNumber===n.lineNumber&&t.side===n.side}const d1=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class hl{constructor(n,a,l){this.normal=a,this.property=n,l&&(this.space=l)}}hl.prototype.normal={};hl.prototype.property={};hl.prototype.space=void 0;function bv(t,n){const a={},l={};for(const s of t)Object.assign(a,s.property),Object.assign(l,s.normal);return new hl(a,l,n)}function Md(t){return t.toLowerCase()}class Lt{constructor(n,a){this.attribute=a,this.property=n}}Lt.prototype.attribute="";Lt.prototype.booleanish=!1;Lt.prototype.boolean=!1;Lt.prototype.commaOrSpaceSeparated=!1;Lt.prototype.commaSeparated=!1;Lt.prototype.defined=!1;Lt.prototype.mustUseProperty=!1;Lt.prototype.number=!1;Lt.prototype.overloadedBoolean=!1;Lt.prototype.property="";Lt.prototype.spaceSeparated=!1;Lt.prototype.space=void 0;let f1=0;const fe=Qi(),et=Qi(),Id=Qi(),Z=Qi(),ze=Qi(),$i=Qi(),Pt=Qi();function Qi(){return 2**++f1}const Hd=Object.freeze(Object.defineProperty({__proto__:null,boolean:fe,booleanish:et,commaOrSpaceSeparated:Pt,commaSeparated:$i,number:Z,overloadedBoolean:Id,spaceSeparated:ze},Symbol.toStringTag,{value:"Module"})),ed=Object.keys(Hd);class gf extends Lt{constructor(n,a,l,s){let u=-1;if(super(n,a),Bg(this,"space",s),typeof l=="number")for(;++u<ed.length;){const f=ed[u];Bg(this,ed[u],(l&Hd[f])===Hd[f])}}}gf.prototype.defined=!0;function Bg(t,n,a){a&&(t[n]=a)}function Xa(t){const n={},a={};for(const[l,s]of Object.entries(t.properties)){const u=new gf(l,t.transform(t.attributes||{},l),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(l)&&(u.mustUseProperty=!0),n[l]=u,a[Md(l)]=l,a[Md(u.attribute)]=l}return new hl(n,a,t.space)}const Sv=Xa({properties:{ariaActiveDescendant:null,ariaAtomic:et,ariaAutoComplete:null,ariaBusy:et,ariaChecked:et,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:ze,ariaCurrent:null,ariaDescribedBy:ze,ariaDetails:null,ariaDisabled:et,ariaDropEffect:ze,ariaErrorMessage:null,ariaExpanded:et,ariaFlowTo:ze,ariaGrabbed:et,ariaHasPopup:null,ariaHidden:et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ze,ariaLevel:Z,ariaLive:null,ariaModal:et,ariaMultiLine:et,ariaMultiSelectable:et,ariaOrientation:null,ariaOwns:ze,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:et,ariaReadOnly:et,ariaRelevant:null,ariaRequired:et,ariaRoleDescription:ze,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:et,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(t,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Ev(t,n){return n in t?t[n]:n}function Cv(t,n){return Ev(t,n.toLowerCase())}const h1=Xa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$i,acceptCharset:ze,accessKey:ze,action:null,allow:null,allowFullScreen:fe,allowPaymentRequest:fe,allowUserMedia:fe,alpha:fe,alt:null,as:null,async:fe,autoCapitalize:null,autoComplete:ze,autoFocus:fe,autoPlay:fe,blocking:ze,capture:null,charSet:null,checked:fe,cite:null,className:ze,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:et,controls:fe,controlsList:ze,coords:Z|$i,crossOrigin:null,data:null,dateTime:null,decoding:null,default:fe,defer:fe,dir:null,dirName:null,disabled:fe,download:Id,draggable:et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:fe,formTarget:null,headers:ze,height:Z,hidden:Id,high:Z,href:null,hrefLang:null,htmlFor:ze,httpEquiv:ze,id:null,imageSizes:null,imageSrcSet:null,inert:fe,inputMode:null,integrity:null,is:null,isMap:fe,itemId:null,itemProp:ze,itemRef:ze,itemScope:fe,itemType:ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:fe,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:fe,muted:fe,name:null,nonce:null,noModule:fe,noValidate:fe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:fe,optimum:Z,pattern:null,ping:ze,placeholder:null,playsInline:fe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:fe,referrerPolicy:null,rel:ze,required:fe,reversed:fe,rows:Z,rowSpan:Z,sandbox:ze,scope:null,scoped:fe,seamless:fe,selected:fe,shadowRootClonable:fe,shadowRootCustomElementRegistry:fe,shadowRootDelegatesFocus:fe,shadowRootMode:null,shadowRootSerializable:fe,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:fe,useMap:null,value:et,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ze,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:fe,declare:fe,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:fe,noHref:fe,noShade:fe,noWrap:fe,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:et,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:fe,disablePictureInPicture:fe,disableRemotePlayback:fe,exportParts:$i,part:ze,prefix:null,property:null,results:Z,security:null,unselectable:null},space:"html",transform:Cv}),p1=Xa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pt,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:ze,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:fe,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$i,g2:$i,glyphName:$i,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:Pt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pt,rev:Pt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pt,requiredFeatures:Pt,requiredFonts:Pt,requiredFormats:Pt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:Pt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pt,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ev}),xv=Xa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,n){return"xlink:"+n.slice(5).toLowerCase()}}),Av=Xa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Cv}),Tv=Xa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,n){return"xml:"+n.slice(3).toLowerCase()}}),m1=/[A-Z]/g,Gg=/-[a-z]/g,g1=/^data[-\w.:]+$/i;function v1(t,n){const a=Md(n);let l=n,s=Lt;if(a in t.normal)return t.property[t.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&g1.test(n)){if(n.charAt(4)==="-"){const u=n.slice(5).replace(Gg,y1);l="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=n.slice(4);if(!Gg.test(u)){let f=u.replace(m1,_1);f.charAt(0)!=="-"&&(f="-"+f),n="data"+f}}s=gf}return new s(l,n)}function _1(t){return"-"+t.toLowerCase()}function y1(t){return t.charAt(1).toUpperCase()}const b1=bv([Sv,h1,xv,Av,Tv],"html"),wv=bv([Sv,p1,xv,Av,Tv],"svg"),$g={}.hasOwnProperty;function S1(t,n){const a=n||{};function l(s,...u){let f=l.invalid;const h=l.handlers;if(s&&$g.call(s,t)){const c=String(s[t]);f=$g.call(h,c)?h[c]:l.unknown}if(f)return f.call(this,s,...u)}return l.handlers=a.handlers||{},l.invalid=a.invalid,l.unknown=a.unknown,l}const E1=/["&'<>`]/g,C1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,x1=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,A1=/[|\\{}()[\]^$+*?.]/g,qg=new WeakMap;function T1(t,n){if(t=t.replace(n.subset?w1(n.subset):E1,l),n.subset||n.escapeOnly)return t;return t.replace(C1,a).replace(x1,l);function a(s,u,f){return n.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,f.charCodeAt(u+2),n)}function l(s,u,f){return n.format(s.charCodeAt(0),f.charCodeAt(u+1),n)}}function w1(t){let n=qg.get(t);return n||(n=L1(t),qg.set(t,n)),n}function L1(t){const n=[];let a=-1;for(;++a<t.length;)n.push(t[a].replace(A1,"\\$&"));return new RegExp("(?:"+n.join("|")+")","g")}const R1=/[\dA-Fa-f]/;function k1(t,n,a){const l="&#x"+t.toString(16).toUpperCase();return a&&n&&!R1.test(String.fromCharCode(n))?l:l+";"}const D1=/\d/;function O1(t,n,a){const l="&#"+String(t);return a&&n&&!D1.test(String.fromCharCode(n))?l:l+";"}const N1=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],td={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},M1=["cent","copy","divide","gt","lt","not","para","times"],Lv={}.hasOwnProperty,zd={};let Io;for(Io in td)Lv.call(td,Io)&&(zd[td[Io]]=Io);const I1=/[^\dA-Za-z]/;function H1(t,n,a,l){const s=String.fromCharCode(t);if(Lv.call(zd,s)){const u=zd[s],f="&"+u;return a&&N1.includes(u)&&!M1.includes(u)&&(!l||n&&n!==61&&I1.test(String.fromCharCode(n)))?f:f+";"}return""}function z1(t,n,a){let l=k1(t,n,a.omitOptionalSemicolons),s;if((a.useNamedReferences||a.useShortestReferences)&&(s=H1(t,n,a.omitOptionalSemicolons,a.attribute)),(a.useShortestReferences||!s)&&a.useShortestReferences){const u=O1(t,n,a.omitOptionalSemicolons);u.length<l.length&&(l=u)}return s&&(!a.useShortestReferences||s.length<l.length)?s:l}function Ga(t,n){return T1(t,Object.assign({format:z1},n))}const U1=/^>|^->|<!--|-->|--!>|<!-$/g,j1=[">"],P1=["<",">"];function V1(t,n,a,l){return l.settings.bogusComments?"<?"+Ga(t.value,Object.assign({},l.settings.characterReferences,{subset:j1}))+">":"<!--"+t.value.replace(U1,s)+"-->";function s(u){return Ga(u,Object.assign({},l.settings.characterReferences,{subset:P1}))}}function B1(t,n,a,l){return"<!"+(l.settings.upperDoctype?"DOCTYPE":"doctype")+(l.settings.tightDoctype?"":" ")+"html>"}function Fg(t,n){const a=String(t);if(typeof n!="string")throw new TypeError("Expected character");let l=0,s=a.indexOf(n);for(;s!==-1;)l++,s=a.indexOf(n,s+n.length);return l}function G1(t,n){const a=n||{};return(t[t.length-1]===""?[...t,""]:t).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}function $1(t){return t.join(" ").trim()}const q1=/[ \t\n\f\r]/g;function vf(t){return typeof t=="object"?t.type==="text"?Yg(t.value):!1:Yg(t)}function Yg(t){return t.replace(q1,"")===""}const rt=kv(1),Rv=kv(-1),F1=[];function kv(t){return n;function n(a,l,s){const u=a?a.children:F1;let f=(l||0)+t,h=u[f];if(!s)for(;h&&vf(h);)f+=t,h=u[f];return h}}const Y1={}.hasOwnProperty;function Dv(t){return n;function n(a,l,s){return Y1.call(t,a.tagName)&&t[a.tagName](a,l,s)}}const _f=Dv({body:Q1,caption:nd,colgroup:nd,dd:J1,dt:W1,head:nd,html:X1,li:K1,optgroup:eE,option:tE,p:Z1,rp:Xg,rt:Xg,tbody:iE,td:Qg,tfoot:aE,th:Qg,thead:nE,tr:rE});function nd(t,n,a){const l=rt(a,n,!0);return!l||l.type!=="comment"&&!(l.type==="text"&&vf(l.value.charAt(0)))}function X1(t,n,a){const l=rt(a,n);return!l||l.type!=="comment"}function Q1(t,n,a){const l=rt(a,n);return!l||l.type!=="comment"}function Z1(t,n,a){const l=rt(a,n);return l?l.type==="element"&&(l.tagName==="address"||l.tagName==="article"||l.tagName==="aside"||l.tagName==="blockquote"||l.tagName==="details"||l.tagName==="div"||l.tagName==="dl"||l.tagName==="fieldset"||l.tagName==="figcaption"||l.tagName==="figure"||l.tagName==="footer"||l.tagName==="form"||l.tagName==="h1"||l.tagName==="h2"||l.tagName==="h3"||l.tagName==="h4"||l.tagName==="h5"||l.tagName==="h6"||l.tagName==="header"||l.tagName==="hgroup"||l.tagName==="hr"||l.tagName==="main"||l.tagName==="menu"||l.tagName==="nav"||l.tagName==="ol"||l.tagName==="p"||l.tagName==="pre"||l.tagName==="section"||l.tagName==="table"||l.tagName==="ul"):!a||!(a.type==="element"&&(a.tagName==="a"||a.tagName==="audio"||a.tagName==="del"||a.tagName==="ins"||a.tagName==="map"||a.tagName==="noscript"||a.tagName==="video"))}function K1(t,n,a){const l=rt(a,n);return!l||l.type==="element"&&l.tagName==="li"}function W1(t,n,a){const l=rt(a,n);return!!(l&&l.type==="element"&&(l.tagName==="dt"||l.tagName==="dd"))}function J1(t,n,a){const l=rt(a,n);return!l||l.type==="element"&&(l.tagName==="dt"||l.tagName==="dd")}function Xg(t,n,a){const l=rt(a,n);return!l||l.type==="element"&&(l.tagName==="rp"||l.tagName==="rt")}function eE(t,n,a){const l=rt(a,n);return!l||l.type==="element"&&l.tagName==="optgroup"}function tE(t,n,a){const l=rt(a,n);return!l||l.type==="element"&&(l.tagName==="option"||l.tagName==="optgroup")}function nE(t,n,a){const l=rt(a,n);return!!(l&&l.type==="element"&&(l.tagName==="tbody"||l.tagName==="tfoot"))}function iE(t,n,a){const l=rt(a,n);return!l||l.type==="element"&&(l.tagName==="tbody"||l.tagName==="tfoot")}function aE(t,n,a){return!rt(a,n)}function rE(t,n,a){const l=rt(a,n);return!l||l.type==="element"&&l.tagName==="tr"}function Qg(t,n,a){const l=rt(a,n);return!l||l.type==="element"&&(l.tagName==="td"||l.tagName==="th")}const lE=Dv({body:uE,colgroup:cE,head:sE,html:oE,tbody:dE});function oE(t){const n=rt(t,-1);return!n||n.type!=="comment"}function sE(t){const n=new Set;for(const l of t.children)if(l.type==="element"&&(l.tagName==="base"||l.tagName==="title")){if(n.has(l.tagName))return!1;n.add(l.tagName)}const a=t.children[0];return!a||a.type==="element"}function uE(t){const n=rt(t,-1,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&vf(n.value.charAt(0)))&&!(n.type==="element"&&(n.tagName==="meta"||n.tagName==="link"||n.tagName==="script"||n.tagName==="style"||n.tagName==="template"))}function cE(t,n,a){const l=Rv(a,n),s=rt(t,-1,!0);return a&&l&&l.type==="element"&&l.tagName==="colgroup"&&_f(l,a.children.indexOf(l),a)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function dE(t,n,a){const l=Rv(a,n),s=rt(t,-1);return a&&l&&l.type==="element"&&(l.tagName==="thead"||l.tagName==="tbody")&&_f(l,a.children.indexOf(l),a)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const Ho={name:[[`
|
|
11
|
-
\f\r &/=>`.split(""),`
|
|
12
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
13
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
14
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
15
|
-
\f\r &>`.split(""),`\0
|
|
16
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
17
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
18
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function fE(t,n,a,l){const s=l.schema,u=s.space==="svg"?!1:l.settings.omitOptionalTags;let f=s.space==="svg"?l.settings.closeEmptyElements:l.settings.voids.includes(t.tagName.toLowerCase());const h=[];let c;s.space==="html"&&t.tagName==="svg"&&(l.schema=wv);const m=hE(l,t.properties),v=l.all(s.space==="html"&&t.tagName==="template"?t.content:t);return l.schema=s,v&&(f=!1),(m||!u||!lE(t,n,a))&&(h.push("<",t.tagName,m?" "+m:""),f&&(s.space==="svg"||l.settings.closeSelfClosing)&&(c=m.charAt(m.length-1),(!l.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&h.push(" "),h.push("/")),h.push(">")),h.push(v),!f&&(!u||!_f(t,n,a))&&h.push("</"+t.tagName+">"),h.join("")}function hE(t,n){const a=[];let l=-1,s;if(n){for(s in n)if(n[s]!==null&&n[s]!==void 0){const u=pE(t,s,n[s]);u&&a.push(u)}}for(;++l<a.length;){const u=t.settings.tightAttributes?a[l].charAt(a[l].length-1):void 0;l!==a.length-1&&u!=='"'&&u!=="'"&&(a[l]+=" ")}return a.join("")}function pE(t,n,a){const l=v1(t.schema,n),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,u=t.settings.allowDangerousCharacters?0:1;let f=t.quote,h;if(l.overloadedBoolean&&(a===l.attribute||a==="")?a=!0:(l.boolean||l.overloadedBoolean)&&(typeof a!="string"||a===l.attribute||a==="")&&(a=!!a),a==null||a===!1||typeof a=="number"&&Number.isNaN(a))return"";const c=Ga(l.attribute,Object.assign({},t.settings.characterReferences,{subset:Ho.name[s][u]}));return a===!0||(a=Array.isArray(a)?(l.commaSeparated?G1:$1)(a,{padLeft:!t.settings.tightCommaSeparatedLists}):String(a),t.settings.collapseEmptyAttributes&&!a)?c:(t.settings.preferUnquoted&&(h=Ga(a,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Ho.unquoted[s][u]}))),h!==a&&(t.settings.quoteSmart&&Fg(a,f)>Fg(a,t.alternative)&&(f=t.alternative),h=f+Ga(a,Object.assign({},t.settings.characterReferences,{subset:(f==="'"?Ho.single:Ho.double)[s][u],attribute:!0}))+f),c+(h&&"="+h))}const mE=["<","&"];function Ov(t,n,a,l){return a&&a.type==="element"&&(a.tagName==="script"||a.tagName==="style")?t.value:Ga(t.value,Object.assign({},l.settings.characterReferences,{subset:mE}))}function gE(t,n,a,l){return l.settings.allowDangerousHtml?t.value:Ov(t,n,a,l)}function vE(t,n,a,l){return l.all(t)}const _E=S1("type",{invalid:yE,unknown:bE,handlers:{comment:V1,doctype:B1,element:fE,raw:gE,root:vE,text:Ov}});function yE(t){throw new Error("Expected node, not `"+t+"`")}function bE(t){const n=t;throw new Error("Cannot compile unknown node `"+n.type+"`")}const SE={},EE={},CE=[];function $a(t,n){const a=n||SE,l=a.quote||'"',s=l==='"'?"'":'"';if(l!=='"'&&l!=="'")throw new Error("Invalid quote `"+l+"`, expected `'` or `\"`");return{one:xE,all:AE,settings:{omitOptionalTags:a.omitOptionalTags||!1,allowParseErrors:a.allowParseErrors||!1,allowDangerousCharacters:a.allowDangerousCharacters||!1,quoteSmart:a.quoteSmart||!1,preferUnquoted:a.preferUnquoted||!1,tightAttributes:a.tightAttributes||!1,upperDoctype:a.upperDoctype||!1,tightDoctype:a.tightDoctype||!1,bogusComments:a.bogusComments||!1,tightCommaSeparatedLists:a.tightCommaSeparatedLists||!1,tightSelfClosing:a.tightSelfClosing||!1,collapseEmptyAttributes:a.collapseEmptyAttributes||!1,allowDangerousHtml:a.allowDangerousHtml||!1,voids:a.voids||d1,characterReferences:a.characterReferences||EE,closeSelfClosing:a.closeSelfClosing||!1,closeEmptyElements:a.closeEmptyElements||!1},schema:a.space==="svg"?wv:b1,quote:l,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function xE(t,n,a){return _E(t,n,a,this)}function AE(t){const n=[],a=t&&t.children||CE;let l=-1;for(;++l<a.length;)n[l]=this.one(a[l],l,t);return n.join("")}var TE=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(t,n){this.mode=t,this.options=n}setOptions(t){this.options=t}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(t){this.setSelectionDirty();const{usesCustomGutterUtility:n=!1,enableGutterUtility:a=!1}=this.options;this.pre!==t&&(this.cleanUp(),this.pre=t),a?this.ensureGutterUtilityNode(n):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(t),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(t,n){const a=!(t===this.selectedRange||Vg(t??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!a||(this.proposedSelectedRange=void 0,this.selectedRange=t,this.renderSelection(),this.placeUtility(),a&&n?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const t=this.gutterUtilityLine??this.hoveredLine;if(t!=null){if(this.mode==="diff"&&t.type==="diff-line")return{lineNumber:t.lineNumber,side:t.annotationSide};if(this.mode==="file"&&t.type==="line")return{lineNumber:t.lineNumber}}};handlePointerClick=t=>{const{onHunkExpand:n,onLineClick:a,onLineNumberClick:l,onTokenClick:s,onMergeConflictActionClick:u}=this.options;n==null&&a==null&&l==null&&u==null&&s==null||this.options.onGutterUtilityClick!=null&&Uo(t.composedPath())||(Pn(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",t),this.handlePointerEvent({eventType:"click",event:t}))};handlePointerMove=t=>{if(t.pointerType!=="mouse")return;const{lineHoverHighlight:n="disabled",onLineEnter:a,onLineLeave:l,onTokenEnter:s,onTokenLeave:u,enableGutterUtility:f=!1}=this.options;n==="disabled"&&!f&&a==null&&l==null&&s==null&&u==null||(Pn(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",t),this.handlePointerEvent({eventType:"move",event:t}))};handlePointerLeave=t=>{const{__debugPointerEvents:n}=this.options;if(Pn(n,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){Pn(n,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,t),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:t,event:n}){const{__debugPointerEvents:a}=this.options,l=n.composedPath();Pn(a,t,"FileDiff.DEBUG.handlePointerEvent:",{eventType:t,composedPath:l});const s=this.resolvePointerTarget(l);Pn(a,t,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",s);const{onLineClick:u,onLineNumberClick:f,onLineEnter:h,onLineLeave:c,onTokenClick:m,onTokenEnter:v,onTokenLeave:g,onHunkExpand:y,onMergeConflictActionClick:b}=this.options;switch(t){case"move":{const E=id(s)&&this.hoveredLine?.lineElement===s.lineElement;es(s)&&this.hoveredToken?.tokenElement===s.tokenElement||(this.hoveredToken!=null&&(g?.(this.hoveredToken,n),this.clearHoveredToken()),es(s)&&(this.setHoveredToken(this.toTokenEventBaseProps(s)),v?.(this.hoveredToken,n))),E||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:n}),this.clearHoveredLine()),id(s)?(this.setHoveredLine(this.toEventBaseProps(s)),this.placeUtility(),h?.({...this.hoveredLine,event:n})):this.placeUtility());break}case"click":{if(s==null)break;if(RE(s)&&b!=null){b(s);break}if(LE(s)&&y!=null){y(s.hunkIndex,s.all||n.shiftKey?"both":s.direction,s.all||n.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!id(s))break;es(s)&&m!=null&&m(this.toTokenEventBaseProps(s),n);const E=this.toEventBaseProps(s);f!=null&&s.numberColumn?f({...E,event:n}):u?.({...E,event:n});break}}}syncPointerListeners(t){const{__debugPointerEvents:n,lineHoverHighlight:a="disabled",onLineClick:l,onLineNumberClick:s,onLineEnter:u,onLineLeave:f,onTokenClick:h,onTokenEnter:c,onTokenLeave:m,onHunkExpand:v,onMergeConflictActionClick:g,enableGutterUtility:y=!1,enableLineSelection:b=!1,onGutterUtilityClick:E}=this.options,T=E!=null,N=a!=="disabled"||l!=null||s!=null||u!=null||f!=null||h!=null||c!=null||m!=null||v!=null||g!=null||y||b||T;N&&!this.hasPointerListeners?(t.addEventListener("click",this.handlePointerClick),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointermove",this.handlePointerMove),t.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,Pn(n,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const R=[];return(n==="both"||n==="click")&&(l!=null&&R.push("onLineClick"),s!=null&&R.push("onLineNumberClick"),v!=null&&R.push("expandable hunk separators"),g!=null&&R.push("merge conflict actions")),R})()),Pn(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),Pn(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!N&&this.hasPointerListeners&&(t.removeEventListener("click",this.handlePointerClick),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointermove",this.handlePointerMove),t.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const L=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",A=this.pointerSession.mode==="gutterSelecting";(!b&&L||!T&&A)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:t,onLineNumberClick:n,enableLineSelection:a=!1}=this.options,l=t!=null,s=n!=null||a;l&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!l&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),s&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!s&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=t=>{if(t.pointerType==="mouse"&&t.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const n=t.composedPath();Uo(n)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(t):(t.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(n),this.startLineSelectionFromPointerDown(t))};startLineSelectionFromPointerDown(t){const{enableLineSelection:n=!1}=this.options;if(!n)return;const a=this.resolveSelectionInfo(t,{source:"event-path",requireNumberColumn:!0});if(a==null)return;const{pre:l}=this;if(l==null)return;const{lineNumber:s,eventSide:u,lineIndex:f}=a;if(t.shiftKey&&this.selectedRange!=null){const h=this.getIndexesFromSelection(this.selectedRange,l.getAttribute("data-diff-type")==="split");if(h==null)return;const c=h.start<=h.end?f>=h.start:f<=h.end;this.selectionAnchor={lineNumber:c?this.selectedRange.start:this.selectedRange.end,side:c?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(s,u,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:t.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===s&&this.selectedRange?.end===s){const h={lineNumber:s,side:u};this.selectionAnchor=h,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:t.pointerId,anchor:h,pending:h},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:s,side:u},this.updateSelection(s,u,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:t.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(t){const{enableLineSelection:n=!1,onGutterUtilityClick:a}=this.options;if(a==null)return;const l=this.currentSelectionEnds(),s=l?.bottom??this.resolveSelectionPoint(t,{source:"event-path",excludeUtility:!1}),u=l?.top??s;s==null||u==null||(t.preventDefault(),t.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:t.pointerId,anchor:u,current:s},n&&(this.selectionAnchor={lineNumber:u.lineNumber,side:u.side},this.updateSelection(s.lineNumber,s.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=t=>{const{enableLineSelection:n=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const a=this.resolveSelectionPoint(t,{source:"coordinates-first"});if(a==null)return;this.pointerSession.current=a,n===!0&&this.updateSelection(a.lineNumber,a.side);return}case"selecting":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const a=this.resolveSelectionInfo(t,{source:"coordinates-first",requireNumberColumn:!1});if(a==null||this.selectionAnchor==null)return;this.updateSelection(a.lineNumber,a.eventSide);return}case"pendingSingleLineUnselect":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const a=this.resolveSelectionInfo(t,{source:"coordinates-first",requireNumberColumn:!1});if(a==null||this.selectionAnchor==null)return;const l={lineNumber:a.lineNumber,side:a.eventSide};if(c1(this.pointerSession.pending,l))return;this.updateSelection(a.lineNumber,a.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:t.pointerId};return}}};handleDocumentPointerUp=t=>{const{enableLineSelection:n=!1,onGutterUtilityClick:a}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const l=this.resolveSelectionPoint(t,{source:"coordinates-first"});l!=null&&(this.pointerSession.current=l,n&&this.updateSelection(l.lineNumber,l.side)),a?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,n&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=t=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&t.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(t){const{lineHoverHighlight:n="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=t,n!=="disabled"&&((n==="both"||n==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(n==="both"||n==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(t){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=t}ensureGutterUtilityNode(t){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),t)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const n=document.createElement("div");n.innerHTML=$a(u1());const a=n.firstElementChild;if(!(a instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");a.remove(),this.gutterUtilityButton=a}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(t){if(this.placeUtilityFromSelection())return;const n=this.resolvePointerTarget(t);Qr(n)&&n.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(n))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const t=this.currentSelectionEnds();if(t==null)return!1;const n=this.targetForSelectionPoint(t.bottom);return n==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(n)),!0}showUtilityOnLine(t){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=t,t.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const t=this.getCurrentSelectionRange();return t==null?void 0:this.selectionEnds(t)}selectionEnds(t){const n={lineNumber:t.start,side:t.side},a={lineNumber:t.end,side:t.endSide??t.side},l=this.selectionPointRowIndex(n),s=this.selectionPointRowIndex(a);if(!(l==null||s==null))return l>s?{top:a,bottom:n}:{top:n,bottom:a}}selectionPointRowIndex(t){const n=this.getLineIndex(t.lineNumber,t.side);if(n!=null)return this.isSplitDiff()?n[1]:n[0]}targetForSelectionPoint(t){if(this.pre==null)return;const n=this.getLineIndex(t.lineNumber,t.side);if(n==null)return;const a=this.mode==="diff"?`${n[0]},${n[1]}`:`${n[0]}`,l=this.pre.querySelectorAll(`[data-column-number="${t.lineNumber}"][data-line-index="${a}"]`);for(const s of l){if(!(s instanceof HTMLElement))continue;const u=this.resolvePointerTarget(zo(s));if(Qr(u)&&!(this.mode==="diff"&&t.side!=null&&u.side!==t.side))return u}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(t,n){const a=this.resolvePointerTarget(t);if(Qr(a)&&!(n&&!a.numberColumn)&&a.splitLineIndex!=null)return{lineIndex:a.splitLineIndex,lineNumber:a.lineNumber,eventSide:this.mode==="diff"?a.side:void 0}}resolveSelectionInfo(t,n){const a=this.resolveSelectionPath(t,n);return a!=null?this.selectionInfoFromPath(a,n.requireNumberColumn):void 0}selectionPointFromPath(t){const n=this.resolvePointerTarget(t);if(Qr(n))return{lineNumber:n.lineNumber,side:this.mode==="diff"?n.side:void 0}}resolveSelectionPoint(t,n){const a=this.resolveSelectionPath(t,n);return a!=null?this.selectionPointFromPath(a):void 0}resolveSelectionPath(t,n){const a=n.excludeUtility!==!1;switch(n.source){case"event-path":return this.pathFromEventPath(t.composedPath(),a);case"coordinates-first":{const l=this.pathFromCoordinates(t,a);return l!==void 0?l??void 0:this.pathFromEventPath(t.composedPath(),a)}}}pathFromCoordinates(t,n){const a=this.hitTest(t);if(a!==void 0)return a===null?null:this.pathFromElement(a,n)??null}pathFromEventPath(t,n){if(!(n&&Uo(t))){for(const a of t)if(a instanceof Element)return this.pathFromElement(a,n)}}pathFromElement(t,n){const a=zo(t);if(n&&Uo(a))return;const l=DE(t);return l!=null?zo(l):this.pathFromAnnotationSlot(t)}pathFromAnnotationSlot(t){const n=NE(OE(t));if(n==null)return;const a=this.targetForSelectionPoint(n);return a!=null?zo(a.lineElement):void 0}hitTest(t){if(!Number.isFinite(t.clientX)||!Number.isFinite(t.clientY))return;const n=this.pre?.getRootNode(),a=Wg(n)?n:Wg(document)?document:void 0;if(a!=null)return a.elementFromPoint(t.clientX,t.clientY)}getLineIndex(t,n){const{getLineIndex:a}=this.options;return a!=null?a(t,n):[t-1,t-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(t,n,a=!0){const l=this.getCurrentSelectionRange();let s;if(t==null)s=null;else{const u=this.selectionAnchor?.side??n,f=this.selectionAnchor?.lineNumber??t;s=this.buildSelectionRange(f,t,u,n)}Vg(l??void 0,s??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=s:(this.selectedRange=s,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),a&&this.notifySelectionChangeDelta())}getIndexesFromSelection(t,n){if(this.pre==null)return;const a=this.getLineIndex(t.start,t.side),l=this.getLineIndex(t.end,t.endSide??t.side);return a!=null&&l!=null?{start:n?a[1]:a[0],end:n?l[1]:l[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const t=this.pre.querySelectorAll("[data-selected-line]");for(const h of t)h.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:n}=this.pre;if(n.length===0)return;if(n.length>2)throw console.error(n),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const a=this.pre.getAttribute("data-diff-type")==="split",l=this.getIndexesFromSelection(this.selectedRange,a);if(l==null)throw console.error({rowRange:l,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const s=l.start===l.end,u=Math.min(l.start,l.end),f=Math.max(l.start,l.end);for(const h of n){const[c,m]=h.children,v=m.children.length;if(v!==c.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let g=0;g<v;g++){const y=m.children[g],b=c.children[g];if(!(y instanceof HTMLElement)||!(b instanceof HTMLElement))continue;const E=this.parseLineIndex(y,a);if((E??0)>f)break;if(E==null||E<u)continue;let T=s?"single":E===u?"first":E===f?"last":"";y.setAttribute("data-selected-line",T),b.setAttribute("data-selected-line",T),b.nextSibling instanceof HTMLElement&&y.nextSibling instanceof HTMLElement&&(y.nextSibling.hasAttribute("data-line-annotation")||y.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(s?(T="last",y.setAttribute("data-selected-line","first")):E===u?T="":E===f&&y.setAttribute("data-selected-line",""),y.nextSibling.setAttribute("data-selected-line",T),b.nextSibling.setAttribute("data-selected-line",T))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(t){this.options.onLineSelectionStart?.(t)}notifySelectionEnd(t){this.options.onLineSelectionEnd?.(t)}toEventBaseProps(t){return this.mode==="file"?{type:"line",lineElement:t.lineElement,lineNumber:t.lineNumber,numberColumn:t.numberColumn,numberElement:t.numberElement}:{type:"diff-line",annotationSide:t.side,lineType:t.lineType,lineElement:t.lineElement,numberElement:t.numberElement,lineNumber:t.lineNumber,numberColumn:t.numberColumn}}toTokenEventBaseProps({lineCharEnd:t,lineCharStart:n,lineNumber:a,side:l,tokenElement:s,tokenText:u}){return this.mode==="file"?{type:"token",lineCharEnd:t,lineCharStart:n,lineNumber:a,tokenElement:s,tokenText:u}:{type:"token",lineCharEnd:t,lineCharStart:n,lineNumber:a,side:l,tokenElement:s,tokenText:u}}buildSelectedLineRange(t,n){return this.buildSelectionRange(t.lineNumber,n.lineNumber,t.side,n.side)}buildSelectionRange(t,n,a,l){return{start:t,end:n,...a!=null?{side:a}:{},...a!==l&&l!=null?{endSide:l}:{}}}resolvePointerTarget(t){let n=!1,a,l,s,u,f,h,c,m,v,g;for(const b of t){if(!(b instanceof HTMLElement))continue;if(g==null&&b.hasAttribute("data-merge-conflict-action")){const L=b.getAttribute("data-merge-conflict-action")??void 0,A=b.getAttribute("data-merge-conflict-conflict-index")??void 0,R=A!=null?Number.parseInt(A,10):NaN;kE(L)&&Number.isFinite(R)&&(g={kind:"merge-conflict-action",resolution:L,conflictIndex:R})}if(h==null&&b.hasAttribute("data-char")){h=b;const L=b.getAttribute("data-char");if(L!=null){const A=Number.parseInt(L,10);if(!Number.isNaN(A)){const R=b.textContent??"",z=A+R.length;(R.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:h,lineCharStart:A,lineCharEnd:z,tokenText:R});continue}}}const E=f==null?b.getAttribute("data-column-number")??void 0:void 0;if(E!=null){f=b,v=Number.parseInt(E,10),n=!0,a=e0(b),u=b.getAttribute("data-line-index")??void 0;continue}const T=s==null?b.getAttribute("data-line")??void 0:void 0;if(T!=null){s=b,v=Number.parseInt(T,10),a=e0(b),u=b.getAttribute("data-line-index")??void 0;continue}if(m==null&&(b.hasAttribute("data-expand-button")||b.hasAttribute("data-unmodified-lines"))){m={hunkIndex:void 0,direction:b.hasAttribute("data-expand-up")?"up":b.hasAttribute("data-expand-down")?"down":"both",all:b.hasAttribute("data-expand-all-button")};continue}const N=m!=null?b.getAttribute("data-expand-index")??void 0:void 0;if(m!=null&&N!=null){const L=Number.parseInt(N,10);Number.isNaN(L)||(m.hunkIndex=L);continue}if(l==null&&b.hasAttribute("data-code")){l=b;break}}if(g!=null)return g;if(m?.hunkIndex!=null)return{type:"line-info",hunkIndex:m.hunkIndex,direction:m.direction,all:m.all};if(s??=u!=null?Kg(l,`[data-line][data-line-index="${u}"]`):void 0,f??=u!=null?Kg(l,`[data-column-number][data-line-index="${u}"]`):void 0,l==null||s==null||f==null||a==null||v==null||Number.isNaN(v))return;const y=this.parseLineIndex(s,this.isSplitDiff());return c!=null?this.mode==="file"?{kind:"token",lineType:a,lineElement:s,lineNumber:v,numberColumn:n,numberElement:f,side:void 0,splitLineIndex:y,...c}:{kind:"token",lineType:a,lineElement:s,lineNumber:v,numberColumn:n,numberElement:f,side:Jg(a,l),splitLineIndex:y,...c}:this.mode==="file"?{kind:"line",lineType:a,lineElement:s,lineNumber:v,numberColumn:n,numberElement:f,side:void 0,splitLineIndex:y}:{kind:"line",lineType:a,lineElement:s,lineNumber:v,numberColumn:n,numberElement:f,side:Jg(a,l),splitLineIndex:y}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(t,n){const a=(t.getAttribute("data-line-index")??"").split(",").map(l=>Number.parseInt(l,10)).filter(l=>!Number.isNaN(l));if(n&&a.length===2)return a[1];if(!n)return a[0]}};function Zg({enableTokenInteractionsOnWhitespace:t,enableGutterUtility:n,lineHoverHighlight:a,onGutterUtilityClick:l,onLineClick:s,onLineEnter:u,onLineLeave:f,onLineNumberClick:h,onTokenClick:c,onTokenEnter:m,onTokenLeave:v,renderGutterUtility:g,__debugPointerEvents:y,enableLineSelection:b,controlledSelection:E,onLineSelected:T,onLineSelectionStart:N,onLineSelectionChange:L,onLineSelectionEnd:A},R,z,V){return{enableTokenInteractionsOnWhitespace:t,enableGutterUtility:wE({enableGutterUtility:n,renderGutterUtility:g,onGutterUtilityClick:l}),usesCustomGutterUtility:g!=null,lineHoverHighlight:a,onGutterUtilityClick:l,onHunkExpand:R,onMergeConflictActionClick:V,onLineClick:s,onLineEnter:u,onLineLeave:f,onLineNumberClick:h,onTokenClick:c,onTokenEnter:m,onTokenLeave:v,__debugPointerEvents:y,enableLineSelection:b,controlledSelection:E,onLineSelected:T,onLineSelectionStart:N,onLineSelectionChange:L,onLineSelectionEnd:A,getLineIndex:z}}function wE({enableGutterUtility:t,renderGutterUtility:n,onGutterUtilityClick:a}){if(a!=null&&n!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return t??!1}function Qr(t){return t!=null&&"kind"in t&&t.kind==="line"}function es(t){return t!=null&&"kind"in t&&t.kind==="token"}function id(t){return Qr(t)||es(t)}function LE(t){return"type"in t&&t.type==="line-info"}function RE(t){return"kind"in t&&t.kind==="merge-conflict-action"}function kE(t){return t==="current"||t==="incoming"||t==="both"}function Kg(t,n){const a=t?.querySelector(n);return a instanceof HTMLElement?a:void 0}function zo(t){const n=[];let a=t;for(;a!=null;)n.push(a),a=a.parentNode;return n}function DE(t){const n=t.closest("[data-line], [data-column-number]");if(n instanceof HTMLElement)return n;const a=t.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(a instanceof HTMLElement))return;const l=a.previousElementSibling;return l instanceof HTMLElement&&(l.hasAttribute("data-line")||l.hasAttribute("data-column-number"))?l:void 0}function OE(t){const n=t.closest('[slot^="annotation-"]');if(n instanceof HTMLElement)return n.getAttribute("slot")??void 0;if(t instanceof HTMLElement){const a=t.getAttribute("name")??void 0;return a!=null&&a.startsWith("annotation-")?a:void 0}}function NE(t){if(t==null)return;const n=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(t);if(n==null)return;const a=Number.parseInt(n[2],10);if(!(!Number.isFinite(a)||a<=0))return{lineNumber:a,side:n[1]}}function Wg(t){return t!=null&&typeof t.elementFromPoint=="function"}function Jg(t,n){switch(t){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return n.hasAttribute("data-deletions")?"deletions":"additions"}}function e0(t){const n=t.getAttribute("data-line-type");if(n!=null)switch(n){case"change-deletion":case"change-addition":case"context":case"context-expanded":return n;default:return}}function Uo(t){for(const n of t)if(n instanceof HTMLElement&&(n.hasAttribute("data-utility-button")||n.hasAttribute("data-gutter-utility-slot")||n.getAttribute("slot")==="gutter-utility-slot"||n.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function Pn(t="none",n,...a){switch(t){case"none":return;case"both":break;case"click":if(n!=="click")return;break;case"move":if(n!=="move")return;break}console.log(...a)}var ME=class Gn{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const n=Gn.resizeObserver??new ResizeObserver(Gn.handleSharedResizeEntries);return Gn.resizeObserver=n,n}static handleSharedResizeEntries(n){const a=new Map;for(const l of n){const s=Gn.managersByElement.get(l.target);if(s==null)continue;const u=a.get(s);u==null?a.set(s,[l]):u.push(l)}for(const[l,s]of a)l.handleResizeEntries(s)}observedNodes=new Map;setup(n,a){const l=new Set;let s=0;const u=new Map(this.observedNodes);this.observedNodes.clear();for(const f of n.children){if(s===2)break;const h=(()=>{if(f instanceof HTMLElement&&f.tagName==="CODE")return f})();if(h==null)continue;s++;let c=u.get(h);if(c!=null&&c.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let m=h.firstElementChild;m instanceof HTMLElement||(m=null),c!=null?(this.observedNodes.set(h,c),u.delete(h),c.numberElement!==m?(c.numberElement!=null&&(this.unobserve(c.numberElement),u.delete(c.numberElement)),m!=null&&(this.observe(m),u.delete(m),this.observedNodes.set(m,c)),c.numberElement=m,c.numberWidth=0):c.numberElement!=null?(u.delete(c.numberElement),this.observedNodes.set(c.numberElement,c)):c.numberWidth=0):(c={type:"code",codeElement:h,numberElement:m,codeWidth:"auto",numberWidth:0},this.observedNodes.set(h,c),this.observe(h),m!=null&&(this.observedNodes.set(m,c),this.observe(m)))}if(s>1&&!a){const f=n.querySelectorAll('[data-line-annotation*=","]'),h=new Map;for(const c of f){if(!(c instanceof HTMLElement))continue;const m=c.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(m)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:m,element:c});continue}let v=h.get(m);v==null&&(v=[],h.set(m,v)),v.push(c)}for(const[c,m]of h){if(m.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",c,m);continue}const[v,g]=m,y=v.firstElementChild,b=g.firstElementChild;if(!(v instanceof HTMLElement)||!(g instanceof HTMLElement)||!(y instanceof HTMLElement)||!(b instanceof HTMLElement))continue;let E=u.get(y);if(E!=null){this.observedNodes.set(y,E),this.observedNodes.set(b,E),u.delete(y),u.delete(b);continue}const T=y.getBoundingClientRect().height,N=b.getBoundingClientRect().height;E={type:"annotations",column1:{container:v,child:y,childHeight:T},column2:{container:g,child:b,childHeight:N},currentHeight:"auto"},l.add({child1:y,child2:b,item:E,newHeight:Math.max(T,N)})}for(const c of l)this.applyNewHeight(c.item,c.newHeight),this.observedNodes.set(c.child1,c.item),this.observedNodes.set(c.child2,c.item),this.observe(c.child1),this.observe(c.child2);l.clear()}for(const[f,h]of u)this.unobserve(f),h.type==="code"?zE(h):UE(h);u.clear()}cleanUp(){for(const n of this.observedNodes.keys())this.unobserve(n);this.observedNodes.clear()}observe(n){const{managersByElement:a}=Gn,l=a.get(n);if(l!==this){if(l!=null&&l!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");a.set(n,this),Gn.getResizeObserver().observe(n)}}unobserve(n){const{managersByElement:a,resizeObserver:l}=Gn,s=a.get(n);if(s!=null){if(s!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");a.delete(n),l?.unobserve(n),l!=null&&a.size===0&&(l.disconnect(),Gn.resizeObserver=void 0)}}handleResizeEntries(n){const a=new Map,l=new Set;for(const s of n){const{target:u,borderBoxSize:f,contentBoxSize:h}=s;if(!(u instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",s);continue}const c=this.observedNodes.get(u);if(c==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",s);continue}if(c.type==="annotations"){const m=(()=>{if(u===c.column1.child)return c.column1;if(u===c.column2.child)return c.column2})();if(m==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:c,target:u});continue}m.childHeight=f[0].blockSize,l.add(c)}else if(c.type==="code"){const m=a.get(c)??{},v=h[0].inlineSize;u===c.codeElement?m.codeInlineSize=v:u===c.numberElement&&(m.numberInlineSize=v),a.set(c,m)}}this.applyAnnotationUpdates(l),l.clear(),this.applyColumnUpdates(a),a.clear()}applyAnnotationUpdates(n){for(const a of n)this.applyNewHeight(a,Math.max(a.column1.childHeight,a.column2.childHeight))}applyColumnUpdates=n=>{for(const[a,l]of n){const s=l.codeInlineSize!=null?IE(l.codeInlineSize):a.codeWidth,u=l.numberInlineSize!=null?HE(l.numberInlineSize):a.numberWidth,f=s!==a.codeWidth,h=u!==a.numberWidth;if(!(!f&&!h)&&(a.codeWidth=s,a.numberWidth=u,f&&a.codeElement.style.setProperty("--diffs-column-width",`${typeof s=="number"?`${s}px`:"auto"}`),h&&a.codeElement.style.setProperty("--diffs-column-number-width",`${u===0?"auto":`${u}px`}`),f||h&&s!=="auto")){const c=typeof s=="number"?Math.max(s-u,0):0;a.codeElement.style.setProperty("--diffs-column-content-width",`${c>0?`${c}px`:"auto"}`)}}};applyNewHeight(n,a){a!==n.currentHeight&&(n.currentHeight=Math.max(a,0),n.column1.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`),n.column2.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`))}};function IE(t){const n=Math.max(Math.floor(t),0);return n===0?"auto":n}function HE(t){return Math.max(Math.ceil(t),0)}function zE(t){t.codeElement.isConnected&&(t.codeElement.style.removeProperty("--diffs-column-content-width"),t.codeElement.style.removeProperty("--diffs-column-number-width"),t.codeElement.style.removeProperty("--diffs-column-width"))}function UE(t){t.column1.container.isConnected&&t.column1.container.style.removeProperty("--diffs-annotation-min-height"),t.column2.container.isConnected&&t.column2.container.style.removeProperty("--diffs-annotation-min-height")}const al=new Map,ad=new Map,jE=new Map,Ud=new Set;function t0(t){for(const n of Array.isArray(t)?t:[t])if(!(n==="text"||n==="ansi")&&!Ud.has(n))return!1;return!0}function n0(t,n){t=Array.isArray(t)?t:[t];for(const a of t){if(Ud.has(a.name))continue;let l=al.get(a.name);l==null&&(l=a,al.set(a.name,l)),Ud.add(l.name),n.loadLanguageSync(l.data)}}function Nv(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}var jd=Object.defineProperty,PE=Object.getOwnPropertyDescriptor,VE=Object.getOwnPropertyNames,BE=Object.prototype.hasOwnProperty,GE=(t,n)=>{let a={};for(var l in t)jd(a,l,{get:t[l],enumerable:!0});return jd(a,Symbol.toStringTag,{value:"Module"}),a},$E=(t,n,a,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(var s=VE(n),u=0,f=s.length,h;u<f;u++)h=s[u],!BE.call(t,h)&&h!==a&&jd(t,h,{get:(c=>n[c]).bind(null,h),enumerable:!(l=PE(n,h))||l.enumerable});return t},qE=(t,n,a)=>($E(t,n,"default"),a);const FE="modulepreload",YE=function(t){return"/"+t},i0={},S=function(n,a,l){let s=Promise.resolve();if(a&&a.length>0){let m=function(v){return Promise.all(v.map(g=>Promise.resolve(g).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};var f=m;document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),c=h?.nonce||h?.getAttribute("nonce");s=m(a.map(v=>{if(v=YE(v),v in i0)return;i0[v]=!0;const g=v.endsWith(".css"),y=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${y}`))return;const b=document.createElement("link");if(b.rel=g?"stylesheet":FE,g||(b.as="script"),b.crossOrigin="",b.href=v,c&&b.setAttribute("nonce",c),document.head.appendChild(b),g)return new Promise((E,T)=>{b.addEventListener("load",E),b.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${v}`)))})}))}function u(h){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=h,window.dispatchEvent(c),!c.defaultPrevented)throw h}return s.then(h=>{for(const c of h||[])c.status==="rejected"&&u(c.reason);return n().catch(u)})},Mv=[{id:"abap",name:"ABAP",import:(()=>S(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>S(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>S(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>S(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>S(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>S(()=>import("./angular-html-DA-rfuFy.js").then(t=>t.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>S(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>S(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>S(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>S(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>S(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>S(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>S(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>S(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>S(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>S(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>S(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>S(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>S(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>S(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>S(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>S(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>S(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>S(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>S(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>S(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>S(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>S(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>S(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>S(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>S(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>S(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>S(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>S(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>S(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>S(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>S(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>S(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>S(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>S(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>S(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>S(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>S(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>S(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>S(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>S(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>S(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>S(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>S(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>S(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>S(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>S(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>S(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>S(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>S(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>S(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>S(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>S(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>S(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>S(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>S(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>S(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>S(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>S(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>S(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>S(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>S(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>S(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>S(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>S(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>S(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>S(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>S(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>S(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>S(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>S(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>S(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>S(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>S(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>S(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>S(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>S(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>S(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>S(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>S(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>S(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>S(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>S(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>S(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>S(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>S(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>S(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>S(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>S(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>S(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>S(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>S(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>S(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>S(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>S(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>S(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>S(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>S(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>S(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>S(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>S(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>S(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>S(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>S(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>S(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>S(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>S(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>S(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>S(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>S(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>S(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>S(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>S(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>S(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>S(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>S(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>S(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>S(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>S(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>S(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>S(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>S(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>S(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>S(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>S(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>S(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>S(()=>import("./mojo-Blby8dQK.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>S(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>S(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>S(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>S(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>S(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>S(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>S(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>S(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>S(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>S(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>S(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>S(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>S(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>S(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>S(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>S(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>S(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>S(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>S(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>S(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>S(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>S(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>S(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>S(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>S(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>S(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>S(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>S(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>S(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>S(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>S(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>S(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>S(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>S(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>S(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>S(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>S(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>S(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>S(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>S(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>S(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>S(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>S(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>S(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>S(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>S(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>S(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>S(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>S(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>S(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>S(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>S(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>S(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>S(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>S(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>S(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>S(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>S(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>S(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>S(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>S(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>S(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>S(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>S(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>S(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>S(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>S(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>S(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>S(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>S(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>S(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>S(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>S(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>S(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>S(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>S(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>S(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>S(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>S(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>S(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>S(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>S(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>S(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>S(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>S(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>S(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>S(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>S(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>S(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>S(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>S(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>S(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>S(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>S(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>S(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>S(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([112,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>S(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([113,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>S(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([114,3,5,70,115,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>S(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>S(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>S(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>S(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>S(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>S(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>S(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>S(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>S(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>S(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>S(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>S(()=>import("./zig-VOosw3JB.js"),[]))}],XE=Object.fromEntries(Mv.map(t=>[t.id,t.import])),QE=Object.fromEntries(Mv.flatMap(t=>t.aliases?.map(n=>[n,t.import])||[])),Pd={...XE,...QE},ZE=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>S(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>S(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>S(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>S(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>S(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>S(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>S(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>S(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>S(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>S(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>S(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>S(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>S(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>S(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>S(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>S(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>S(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>S(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>S(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>S(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>S(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>S(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>S(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>S(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>S(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>S(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>S(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>S(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>S(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>S(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>S(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>S(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>S(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>S(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>S(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>S(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>S(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>S(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>S(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>S(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>S(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>S(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>S(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>S(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>S(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>S(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>S(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>S(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>S(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>S(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>S(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>S(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>S(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>S(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>S(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>S(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>S(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>S(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>S(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>S(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>S(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>S(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>S(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>S(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>S(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],KE=Object.fromEntries(ZE.map(t=>[t.id,t.import]));var yf=class extends Error{constructor(n){super(n),this.name="ShikiError"}};function WE(){return 2147483648}function JE(){return typeof performance<"u"?performance.now():Date.now()}const eC=(t,n)=>t+(n-t%n)%n;async function tC(t){let n,a;const l={};function s(b){a=b,l.HEAPU8=new Uint8Array(b),l.HEAPU32=new Uint32Array(b)}function u(b,E,T){l.HEAPU8.copyWithin(b,E,E+T)}function f(b){try{return n.grow(b-a.byteLength+65535>>>16),s(n.buffer),1}catch{}}function h(b){const E=l.HEAPU8.length;b=b>>>0;const T=WE();if(b>T)return!1;for(let N=1;N<=4;N*=2){let L=E*(1+.2/N);L=Math.min(L,b+100663296);const A=Math.min(T,eC(Math.max(b,L),65536));if(f(A))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function m(b,E,T=1024){const N=E+T;let L=E;for(;b[L]&&!(L>=N);)++L;if(L-E>16&&b.buffer&&c)return c.decode(b.subarray(E,L));let A="";for(;E<L;){let R=b[E++];if(!(R&128)){A+=String.fromCharCode(R);continue}const z=b[E++]&63;if((R&224)===192){A+=String.fromCharCode((R&31)<<6|z);continue}const V=b[E++]&63;if((R&240)===224?R=(R&15)<<12|z<<6|V:R=(R&7)<<18|z<<12|V<<6|b[E++]&63,R<65536)A+=String.fromCharCode(R);else{const j=R-65536;A+=String.fromCharCode(55296|j>>10,56320|j&1023)}}return A}function v(b,E){return b?m(l.HEAPU8,b,E):""}const g={emscripten_get_now:JE,emscripten_memcpy_big:u,emscripten_resize_heap:h,fd_write:()=>0};async function y(){const E=await t({env:g,wasi_snapshot_preview1:g});n=E.memory,s(n.buffer),Object.assign(l,E),l.UTF8ToString=v}return await y(),l}var nC=Object.defineProperty,iC=(t,n,a)=>n in t?nC(t,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[n]=a,it=(t,n,a)=>iC(t,typeof n!="symbol"?n+"":n,a);let ut=null;function aC(t){throw new yf(t.UTF8ToString(t.getLastOnigError()))}class _s{constructor(n){it(this,"utf16Length"),it(this,"utf8Length"),it(this,"utf16Value"),it(this,"utf8Value"),it(this,"utf16OffsetToUtf8"),it(this,"utf8OffsetToUtf16");const a=n.length,l=_s._utf8ByteLength(n),s=l!==a,u=s?new Uint32Array(a+1):null;s&&(u[a]=l);const f=s?new Uint32Array(l+1):null;s&&(f[l]=a);const h=new Uint8Array(l);let c=0;for(let m=0;m<a;m++){const v=n.charCodeAt(m);let g=v,y=!1;if(v>=55296&&v<=56319&&m+1<a){const b=n.charCodeAt(m+1);b>=56320&&b<=57343&&(g=(v-55296<<10)+65536|b-56320,y=!0)}s&&(u[m]=c,y&&(u[m+1]=c),g<=127?f[c+0]=m:g<=2047?(f[c+0]=m,f[c+1]=m):g<=65535?(f[c+0]=m,f[c+1]=m,f[c+2]=m):(f[c+0]=m,f[c+1]=m,f[c+2]=m,f[c+3]=m)),g<=127?h[c++]=g:g<=2047?(h[c++]=192|(g&1984)>>>6,h[c++]=128|(g&63)>>>0):g<=65535?(h[c++]=224|(g&61440)>>>12,h[c++]=128|(g&4032)>>>6,h[c++]=128|(g&63)>>>0):(h[c++]=240|(g&1835008)>>>18,h[c++]=128|(g&258048)>>>12,h[c++]=128|(g&4032)>>>6,h[c++]=128|(g&63)>>>0),y&&m++}this.utf16Length=a,this.utf8Length=l,this.utf16Value=n,this.utf8Value=h,this.utf16OffsetToUtf8=u,this.utf8OffsetToUtf16=f}static _utf8ByteLength(n){let a=0;for(let l=0,s=n.length;l<s;l++){const u=n.charCodeAt(l);let f=u,h=!1;if(u>=55296&&u<=56319&&l+1<s){const c=n.charCodeAt(l+1);c>=56320&&c<=57343&&(f=(u-55296<<10)+65536|c-56320,h=!0)}f<=127?a+=1:f<=2047?a+=2:f<=65535?a+=3:a+=4,h&&l++}return a}createString(n){const a=n.omalloc(this.utf8Length);return n.HEAPU8.set(this.utf8Value,a),a}}const ys=class gn{constructor(n){if(it(this,"id",++gn.LAST_ID),it(this,"_onigBinding"),it(this,"content"),it(this,"utf16Length"),it(this,"utf8Length"),it(this,"utf16OffsetToUtf8"),it(this,"utf8OffsetToUtf16"),it(this,"ptr"),!ut)throw new yf("Must invoke loadWasm first.");this._onigBinding=ut,this.content=n;const a=new _s(n);this.utf16Length=a.utf16Length,this.utf8Length=a.utf8Length,this.utf16OffsetToUtf8=a.utf16OffsetToUtf8,this.utf8OffsetToUtf16=a.utf8OffsetToUtf16,this.utf8Length<1e4&&!gn._sharedPtrInUse?(gn._sharedPtr||(gn._sharedPtr=ut.omalloc(1e4)),gn._sharedPtrInUse=!0,ut.HEAPU8.set(a.utf8Value,gn._sharedPtr),this.ptr=gn._sharedPtr):this.ptr=a.createString(ut)}convertUtf8OffsetToUtf16(n){return this.utf8OffsetToUtf16?n<0?0:n>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[n]:n}convertUtf16OffsetToUtf8(n){return this.utf16OffsetToUtf8?n<0?0:n>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[n]:n}dispose(){this.ptr===gn._sharedPtr?gn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};it(ys,"LAST_ID",0);it(ys,"_sharedPtr",0);it(ys,"_sharedPtrInUse",!1);let Iv=ys;class rC{constructor(n){if(it(this,"_onigBinding"),it(this,"_ptr"),!ut)throw new yf("Must invoke loadWasm first.");const a=[],l=[];for(let h=0,c=n.length;h<c;h++){const m=new _s(n[h]);a[h]=m.createString(ut),l[h]=m.utf8Length}const s=ut.omalloc(4*n.length);ut.HEAPU32.set(a,s/4);const u=ut.omalloc(4*n.length);ut.HEAPU32.set(l,u/4);const f=ut.createOnigScanner(s,u,n.length);for(let h=0,c=n.length;h<c;h++)ut.ofree(a[h]);ut.ofree(u),ut.ofree(s),f===0&&aC(ut),this._onigBinding=ut,this._ptr=f}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(n,a,l){let s=0;if(typeof l=="number"&&(s=l),typeof n=="string"){n=new Iv(n);const u=this._findNextMatchSync(n,a,!1,s);return n.dispose(),u}return this._findNextMatchSync(n,a,!1,s)}_findNextMatchSync(n,a,l,s){const u=this._onigBinding,f=u.findNextOnigScannerMatch(this._ptr,n.id,n.ptr,n.utf8Length,n.convertUtf16OffsetToUtf8(a),s);if(f===0)return null;const h=u.HEAPU32;let c=f/4;const m=h[c++],v=h[c++],g=[];for(let y=0;y<v;y++){const b=n.convertUtf8OffsetToUtf16(h[c++]),E=n.convertUtf8OffsetToUtf16(h[c++]);g[y]={start:b,end:E,length:E-b}}return{index:m,captureIndices:g}}}function lC(t){return typeof t.instantiator=="function"}function oC(t){return typeof t.default=="function"}function sC(t){return typeof t.data<"u"}function uC(t){return typeof Response<"u"&&t instanceof Response}function cC(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let jo;function Hv(t){if(jo)return jo;async function n(){ut=await tC(async a=>{let l=t;return l=await l,typeof l=="function"&&(l=await l(a)),typeof l=="function"&&(l=await l(a)),lC(l)?l=await l.instantiator(a):oC(l)?l=await l.default(a):(sC(l)&&(l=l.data),uC(l)?typeof WebAssembly.instantiateStreaming=="function"?l=await dC(l)(a):l=await fC(l)(a):cC(l)?l=await rd(l)(a):l instanceof WebAssembly.Module?l=await rd(l)(a):"default"in l&&l.default instanceof WebAssembly.Module&&(l=await rd(l.default)(a))),"instance"in l&&(l=l.instance),"exports"in l&&(l=l.exports),l})}return jo=n(),jo}function rd(t){return n=>WebAssembly.instantiate(t,n)}function dC(t){return n=>WebAssembly.instantiateStreaming(t,n)}function fC(t){return async n=>{const a=await t.arrayBuffer();return WebAssembly.instantiate(a,n)}}let zv;function hC(t){zv=t}function pC(){return zv}async function Uv(t){return t&&await Hv(t),{createScanner(n){return new rC(n.map(a=>typeof a=="string"?a:a.source))},createString(n){return new Iv(n)}}}const mC=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:Uv,getDefaultWasmLoader:pC,loadWasm:Hv,setDefaultWasmLoader:hC},Symbol.toStringTag,{value:"Module"}));var jv=GE({});qE(jv,mC);var Ue=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function gC(t){return bf(t)}function bf(t){return Array.isArray(t)?vC(t):t instanceof RegExp?t:typeof t=="object"?_C(t):t}function vC(t){let n=[];for(let a=0,l=t.length;a<l;a++)n[a]=bf(t[a]);return n}function _C(t){let n={};for(let a in t)n[a]=bf(t[a]);return n}function Pv(t,...n){return n.forEach(a=>{for(let l in a)t[l]=a[l]}),t}function Vv(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return n===0?t:~n===t.length-1?Vv(t.substring(0,t.length-1)):t.substr(~n+1)}var ld=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Po=class{static hasCaptures(t){return t===null?!1:(ld.lastIndex=0,ld.test(t))}static replaceCaptures(t,n,a){return t.replace(ld,(l,s,u,f)=>{let h=a[parseInt(s||u,10)];if(h){let c=n.substring(h.start,h.end);for(;c[0]===".";)c=c.substring(1);switch(f){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return l})}};function Bv(t,n){return t<n?-1:t>n?1:0}function Gv(t,n){if(t===null&&n===null)return 0;if(!t)return-1;if(!n)return 1;let a=t.length,l=n.length;if(a===l){for(let s=0;s<a;s++){let u=Bv(t[s],n[s]);if(u!==0)return u}return 0}return a-l}function a0(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function $v(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var qv=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const n=this.fn(t);return this.cache.set(t,n),n}},os=class{constructor(t,n,a){this._colorMap=t,this._defaults=n,this._root=a}static createFromRawTheme(t,n){return this.createFromParsedTheme(SC(t),n)}static createFromParsedTheme(t,n){return CC(t,n)}_cachedMatchRoot=new qv(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const n=t.scopeName,l=this._cachedMatchRoot.get(n).find(s=>yC(t.parent,s.parentScopes));return l?new Fv(l.fontStyle,l.foreground,l.background):null}},od=class ts{constructor(n,a){this.parent=n,this.scopeName=a}static push(n,a){for(const l of a)n=new ts(n,l);return n}static from(...n){let a=null;for(let l=0;l<n.length;l++)a=new ts(a,n[l]);return a}push(n){return new ts(this,n)}getSegments(){let n=this;const a=[];for(;n;)a.push(n.scopeName),n=n.parent;return a.reverse(),a}toString(){return this.getSegments().join(" ")}extends(n){return this===n?!0:this.parent===null?!1:this.parent.extends(n)}getExtensionIfDefined(n){const a=[];let l=this;for(;l&&l!==n;)a.push(l.scopeName),l=l.parent;return l===n?a.reverse():void 0}};function yC(t,n){if(n.length===0)return!0;for(let a=0;a<n.length;a++){let l=n[a],s=!1;if(l===">"){if(a===n.length-1)return!1;l=n[++a],s=!0}for(;t&&!bC(t.scopeName,l);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function bC(t,n){return n===t||t.startsWith(n)&&t[n.length]==="."}var Fv=class{constructor(t,n,a){this.fontStyle=t,this.foregroundId=n,this.backgroundId=a}};function SC(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let n=t.settings,a=[],l=0;for(let s=0,u=n.length;s<u;s++){let f=n[s];if(!f.settings)continue;let h;if(typeof f.scope=="string"){let g=f.scope;g=g.replace(/^[,]+/,""),g=g.replace(/[,]+$/,""),h=g.split(",")}else Array.isArray(f.scope)?h=f.scope:h=[""];let c=-1;if(typeof f.settings.fontStyle=="string"){c=0;let g=f.settings.fontStyle.split(" ");for(let y=0,b=g.length;y<b;y++)switch(g[y]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let m=null;typeof f.settings.foreground=="string"&&a0(f.settings.foreground)&&(m=f.settings.foreground);let v=null;typeof f.settings.background=="string"&&a0(f.settings.background)&&(v=f.settings.background);for(let g=0,y=h.length;g<y;g++){let E=h[g].trim().split(" "),T=E[E.length-1],N=null;E.length>1&&(N=E.slice(0,E.length-1),N.reverse()),a[l++]=new EC(T,N,s,c,m,v)}}return a}var EC=class{constructor(t,n,a,l,s,u){this.scope=t,this.parentScopes=n,this.index=a,this.fontStyle=l,this.foreground=s,this.background=u}},yt=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(yt||{});function CC(t,n){t.sort((c,m)=>{let v=Bv(c.scope,m.scope);return v!==0||(v=Gv(c.parentScopes,m.parentScopes),v!==0)?v:c.index-m.index});let a=0,l="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(a=c.fontStyle),c.foreground!==null&&(l=c.foreground),c.background!==null&&(s=c.background)}let u=new xC(n),f=new Fv(a,u.getId(l),u.getId(s)),h=new TC(new Vd(0,null,-1,0,0),[]);for(let c=0,m=t.length;c<m;c++){let v=t[c];h.insert(0,v.scope,v.parentScopes,v.fontStyle,u.getId(v.foreground),u.getId(v.background))}return new os(u,f,h)}var xC=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let n=0,a=t.length;n<a;n++)this._color2id[t[n]]=n,this._id2color[n]=t[n]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let n=this._color2id[t];if(n)return n;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return n=++this._lastColorId,this._color2id[t]=n,this._id2color[n]=t,n}getColorMap(){return this._id2color.slice(0)}},AC=Object.freeze([]),Vd=class Yv{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(n,a,l,s,u){this.scopeDepth=n,this.parentScopes=a||AC,this.fontStyle=l,this.foreground=s,this.background=u}clone(){return new Yv(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(n){let a=[];for(let l=0,s=n.length;l<s;l++)a[l]=n[l].clone();return a}acceptOverwrite(n,a,l,s){this.scopeDepth>n?console.log("how did this happen?"):this.scopeDepth=n,a!==-1&&(this.fontStyle=a),l!==0&&(this.foreground=l),s!==0&&(this.background=s)}},TC=class Bd{constructor(n,a=[],l={}){this._mainRule=n,this._children=l,this._rulesWithParentScopes=a}_rulesWithParentScopes;static _cmpBySpecificity(n,a){if(n.scopeDepth!==a.scopeDepth)return a.scopeDepth-n.scopeDepth;let l=0,s=0;for(;n.parentScopes[l]===">"&&l++,a.parentScopes[s]===">"&&s++,!(l>=n.parentScopes.length||s>=a.parentScopes.length);){const u=a.parentScopes[s].length-n.parentScopes[l].length;if(u!==0)return u;l++,s++}return a.parentScopes.length-n.parentScopes.length}match(n){if(n!==""){let l=n.indexOf("."),s,u;if(l===-1?(s=n,u=""):(s=n.substring(0,l),u=n.substring(l+1)),this._children.hasOwnProperty(s))return this._children[s].match(u)}const a=this._rulesWithParentScopes.concat(this._mainRule);return a.sort(Bd._cmpBySpecificity),a}insert(n,a,l,s,u,f){if(a===""){this._doInsertHere(n,l,s,u,f);return}let h=a.indexOf("."),c,m;h===-1?(c=a,m=""):(c=a.substring(0,h),m=a.substring(h+1));let v;this._children.hasOwnProperty(c)?v=this._children[c]:(v=new Bd(this._mainRule.clone(),Vd.cloneArr(this._rulesWithParentScopes)),this._children[c]=v),v.insert(n+1,m,l,s,u,f)}_doInsertHere(n,a,l,s,u){if(a===null){this._mainRule.acceptOverwrite(n,l,s,u);return}for(let f=0,h=this._rulesWithParentScopes.length;f<h;f++){let c=this._rulesWithParentScopes[f];if(Gv(c.parentScopes,a)===0){c.acceptOverwrite(n,l,s,u);return}}l===-1&&(l=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),u===0&&(u=this._mainRule.background),this._rulesWithParentScopes.push(new Vd(n,a,l,s,u))}},qi=class Kt{static toBinaryStr(n){return n.toString(2).padStart(32,"0")}static print(n){const a=Kt.getLanguageId(n),l=Kt.getTokenType(n),s=Kt.getFontStyle(n),u=Kt.getForeground(n),f=Kt.getBackground(n);console.log({languageId:a,tokenType:l,fontStyle:s,foreground:u,background:f})}static getLanguageId(n){return(n&255)>>>0}static getTokenType(n){return(n&768)>>>8}static containsBalancedBrackets(n){return(n&1024)!==0}static getFontStyle(n){return(n&30720)>>>11}static getForeground(n){return(n&16744448)>>>15}static getBackground(n){return(n&4278190080)>>>24}static set(n,a,l,s,u,f,h){let c=Kt.getLanguageId(n),m=Kt.getTokenType(n),v=Kt.containsBalancedBrackets(n)?1:0,g=Kt.getFontStyle(n),y=Kt.getForeground(n),b=Kt.getBackground(n);return a!==0&&(c=a),l!==8&&(m=l),s!==null&&(v=s?1:0),u!==-1&&(g=u),f!==0&&(y=f),h!==0&&(b=h),(c<<0|m<<8|v<<10|g<<11|y<<15|b<<24)>>>0}};function ss(t,n){const a=[],l=wC(t);let s=l.next();for(;s!==null;){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=l.next()}let m=f();if(a.push({matcher:m,priority:c}),s!==",")break;s=l.next()}return a;function u(){if(s==="-"){s=l.next();const c=u();return m=>!!c&&!c(m)}if(s==="("){s=l.next();const c=h();return s===")"&&(s=l.next()),c}if(r0(s)){const c=[];do c.push(s),s=l.next();while(r0(s));return m=>n(c,m)}return null}function f(){const c=[];let m=u();for(;m;)c.push(m),m=u();return v=>c.every(g=>g(v))}function h(){const c=[];let m=f();for(;m&&(c.push(m),s==="|"||s===",");){do s=l.next();while(s==="|"||s===",");m=f()}return v=>c.some(g=>g(v))}}function r0(t){return!!t&&!!t.match(/[\w\.:]+/)}function wC(t){let n=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,a=n.exec(t);return{next:()=>{if(!a)return null;const l=a[0];return a=n.exec(t),l}}}function Xv(t){typeof t.dispose=="function"&&t.dispose()}var rl=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},LC=class{constructor(t,n){this.scopeName=t,this.ruleName=n}toKey(){return`${this.scopeName}#${this.ruleName}`}},RC=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const n=t.toKey();this._seenReferenceKeys.has(n)||(this._seenReferenceKeys.add(n),this._references.push(t))}},kC=class{constructor(t,n){this.repo=t,this.initialScopeName=n,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new rl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const n=new RC;for(const a of t)DC(a,this.initialScopeName,this.repo,n);for(const a of n.references)if(a instanceof rl){if(this.seenFullScopeRequests.has(a.scopeName))continue;this.seenFullScopeRequests.add(a.scopeName),this.Q.push(a)}else{if(this.seenFullScopeRequests.has(a.scopeName)||this.seenPartialScopeRequests.has(a.toKey()))continue;this.seenPartialScopeRequests.add(a.toKey()),this.Q.push(a)}}};function DC(t,n,a,l){const s=a.lookup(t.scopeName);if(!s){if(t.scopeName===n)throw new Error(`No grammar provided for <${n}>`);return}const u=a.lookup(n);t instanceof rl?ns({baseGrammar:u,selfGrammar:s},l):Gd(t.ruleName,{baseGrammar:u,selfGrammar:s,repository:s.repository},l);const f=a.injections(t.scopeName);if(f)for(const h of f)l.add(new rl(h))}function Gd(t,n,a){if(n.repository&&n.repository[t]){const l=n.repository[t];us([l],n,a)}}function ns(t,n){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&us(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},n),t.selfGrammar.injections&&us(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},n)}function us(t,n,a){for(const l of t){if(a.visitedRule.has(l))continue;a.visitedRule.add(l);const s=l.repository?Pv({},n.repository,l.repository):n.repository;Array.isArray(l.patterns)&&us(l.patterns,{...n,repository:s},a);const u=l.include;if(!u)continue;const f=Qv(u);switch(f.kind){case 0:ns({...n,selfGrammar:n.baseGrammar},a);break;case 1:ns(n,a);break;case 2:Gd(f.ruleName,{...n,repository:s},a);break;case 3:case 4:const h=f.scopeName===n.selfGrammar.scopeName?n.selfGrammar:f.scopeName===n.baseGrammar.scopeName?n.baseGrammar:void 0;if(h){const c={baseGrammar:n.baseGrammar,selfGrammar:h,repository:s};f.kind===4?Gd(f.ruleName,c,a):ns(c,a)}else f.kind===4?a.add(new LC(f.scopeName,f.ruleName)):a.add(new rl(f.scopeName));break}}}var OC=class{kind=0},NC=class{kind=1},MC=class{constructor(t){this.ruleName=t}kind=2},IC=class{constructor(t){this.scopeName=t}kind=3},HC=class{constructor(t,n){this.scopeName=t,this.ruleName=n}kind=4};function Qv(t){if(t==="$base")return new OC;if(t==="$self")return new NC;const n=t.indexOf("#");if(n===-1)return new IC(t);if(n===0)return new MC(t.substring(1));{const a=t.substring(0,n),l=t.substring(n+1);return new HC(a,l)}}var zC=/\\(\d+)/,l0=/\\(\d+)/g,UC=-1,Zv=-2;var pl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,n,a,l){this.$location=t,this.id=n,this._name=a||null,this._nameIsCapturing=Po.hasCaptures(this._name),this._contentName=l||null,this._contentNameIsCapturing=Po.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Vv(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,n){return!this._nameIsCapturing||this._name===null||t===null||n===null?this._name:Po.replaceCaptures(this._name,t,n)}getContentName(t,n){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Po.replaceCaptures(this._contentName,t,n)}},jC=class extends pl{retokenizeCapturedWithRuleId;constructor(t,n,a,l,s){super(t,n,a,l),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,a,l){throw new Error("Not supported!")}},PC=class extends pl{_match;captures;_cachedCompiledPatterns;constructor(t,n,a,l,s){super(t,n,a,null),this._match=new ll(l,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,a,l){return this._getCachedCompiledPatterns(t).compileAG(t,a,l)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ol,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},o0=class extends pl{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,n,a,l,s){super(t,n,a,l),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const a of this.patterns)t.getRule(a).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,a,l){return this._getCachedCompiledPatterns(t).compileAG(t,a,l)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ol,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},$d=class extends pl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,n,a,l,s,u,f,h,c,m){super(t,n,a,l),this._begin=new ll(s,this.id),this.beginCaptures=u,this._end=new ll(f||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=h,this.applyEndPatternLast=c||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,a,l){return this._getCachedCompiledPatterns(t,n).compileAG(t,a,l)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ol;for(const a of this.patterns)t.getRule(a).collectPatterns(t,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,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},cs=class extends pl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,n,a,l,s,u,f,h,c){super(t,n,a,l),this._begin=new ll(s,this.id),this.beginCaptures=u,this.whileCaptures=h,this._while=new ll(f,Zv),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(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,a,l){return this._getCachedCompiledPatterns(t).compileAG(t,a,l)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ol;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,a,l){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,a,l)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ol,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},Kv=class _t{static createCaptureRule(n,a,l,s,u){return n.registerRule(f=>new jC(a,f,l,s,u))}static getCompiledRuleId(n,a,l){return n.id||a.registerRule(s=>{if(n.id=s,n.match)return new PC(n.$vscodeTextmateLocation,n.id,n.name,n.match,_t._compileCaptures(n.captures,a,l));if(typeof n.begin>"u"){n.repository&&(l=Pv({},l,n.repository));let u=n.patterns;return typeof u>"u"&&n.include&&(u=[{include:n.include}]),new o0(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,_t._compilePatterns(u,a,l))}return n.while?new cs(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,_t._compileCaptures(n.beginCaptures||n.captures,a,l),n.while,_t._compileCaptures(n.whileCaptures||n.captures,a,l),_t._compilePatterns(n.patterns,a,l)):new $d(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,_t._compileCaptures(n.beginCaptures||n.captures,a,l),n.end,_t._compileCaptures(n.endCaptures||n.captures,a,l),n.applyEndPatternLast,_t._compilePatterns(n.patterns,a,l))}),n.id}static _compileCaptures(n,a,l){let s=[];if(n){let u=0;for(const f in n){if(f==="$vscodeTextmateLocation")continue;const h=parseInt(f,10);h>u&&(u=h)}for(let f=0;f<=u;f++)s[f]=null;for(const f in n){if(f==="$vscodeTextmateLocation")continue;const h=parseInt(f,10);let c=0;n[f].patterns&&(c=_t.getCompiledRuleId(n[f],a,l)),s[h]=_t.createCaptureRule(a,n[f].$vscodeTextmateLocation,n[f].name,n[f].contentName,c)}}return s}static _compilePatterns(n,a,l){let s=[];if(n)for(let u=0,f=n.length;u<f;u++){const h=n[u];let c=-1;if(h.include){const m=Qv(h.include);switch(m.kind){case 0:case 1:c=_t.getCompiledRuleId(l[h.include],a,l);break;case 2:let v=l[m.ruleName];v&&(c=_t.getCompiledRuleId(v,a,l));break;case 3:case 4:const g=m.scopeName,y=m.kind===4?m.ruleName:null,b=a.getExternalGrammar(g,l);if(b)if(y){let E=b.repository[y];E&&(c=_t.getCompiledRuleId(E,a,b.repository))}else c=_t.getCompiledRuleId(b.repository.$self,a,b.repository);break}}else c=_t.getCompiledRuleId(h,a,l);if(c!==-1){const m=a.getRule(c);let v=!1;if((m instanceof o0||m instanceof $d||m instanceof cs)&&m.hasMissingPatterns&&m.patterns.length===0&&(v=!0),v)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(n?n.length:0)!==s.length}}},ll=class Wv{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(n,a){if(n&&typeof n=="string"){const l=n.length;let s=0,u=[],f=!1;for(let h=0;h<l;h++)if(n.charAt(h)==="\\"&&h+1<l){const m=n.charAt(h+1);m==="z"?(u.push(n.substring(s,h)),u.push("$(?!\\n)(?<!\\n)"),s=h+2):(m==="A"||m==="G")&&(f=!0),h++}this.hasAnchor=f,s===0?this.source=n:(u.push(n.substring(s,l)),this.source=u.join(""))}else this.hasAnchor=!1,this.source=n;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=a,typeof this.source=="string"?this.hasBackReferences=zC.test(this.source):this.hasBackReferences=!1}clone(){return new Wv(this.source,this.ruleId)}setSource(n){this.source!==n&&(this.source=n,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(n,a){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let l=a.map(s=>n.substring(s.start,s.end));return l0.lastIndex=0,this.source.replace(l0,(s,u)=>$v(l[parseInt(u,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=[],a=[],l=[],s=[],u,f,h,c;for(u=0,f=this.source.length;u<f;u++)h=this.source.charAt(u),n[u]=h,a[u]=h,l[u]=h,s[u]=h,h==="\\"&&u+1<f&&(c=this.source.charAt(u+1),c==="A"?(n[u+1]="",a[u+1]="",l[u+1]="A",s[u+1]="A"):c==="G"?(n[u+1]="",a[u+1]="G",l[u+1]="",s[u+1]="G"):(n[u+1]=c,a[u+1]=c,l[u+1]=c,s[u+1]=c),u++);return{A0_G0:n.join(""),A0_G1:a.join(""),A1_G0:l.join(""),A1_G1:s.join("")}}resolveAnchors(n,a){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:n?a?this._anchorCache.A1_G1:this._anchorCache.A1_G0:a?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ol=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,n){this._items[t].source!==n&&(this._disposeCaches(),this._items[t].setSource(n))}compile(t){if(!this._cached){let n=this._items.map(a=>a.source);this._cached=new s0(t,n,this._items.map(a=>a.ruleId))}return this._cached}compileAG(t,n,a){return this._hasAnchors?n?a?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,n,a)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,n,a)),this._anchorCache.A1_G0):a?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,n,a)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,n,a)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,n,a){let l=this._items.map(s=>s.resolveAnchors(n,a));return new s0(t,l,this._items.map(s=>s.ruleId))}},s0=class{constructor(t,n,a){this.regExps=n,this.rules=a,this.scanner=t.createOnigScanner(n)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let n=0,a=this.rules.length;n<a;n++)t.push(" - "+this.rules[n]+": "+this.regExps[n]);return t.join(`
|
|
19
|
-
`)}findNextMatchSync(t,n,a){const l=this.scanner.findNextMatchSync(t,n,a);return l?{ruleId:this.rules[l.index],captureIndices:l.captureIndices}:null}},sd=class{constructor(t,n){this.languageId=t,this.tokenType=n}},VC=class qd{_defaultAttributes;_embeddedLanguagesMatcher;constructor(n,a){this._defaultAttributes=new sd(n,8),this._embeddedLanguagesMatcher=new BC(Object.entries(a||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(n){return n===null?qd._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(n)}static _NULL_SCOPE_METADATA=new sd(0,0);_getBasicScopeAttributes=new qv(n=>{const a=this._scopeToLanguage(n),l=this._toStandardTokenType(n);return new sd(a,l)});_scopeToLanguage(n){return this._embeddedLanguagesMatcher.match(n)||0}_toStandardTokenType(n){const a=n.match(qd.STANDARD_TOKEN_TYPE_REGEXP);if(!a)return 8;switch(a[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},BC=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const n=t.map(([a,l])=>$v(a));n.sort(),n.reverse(),this.scopesRegExp=new RegExp(`^((${n.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const n=t.match(this.scopesRegExp);if(n)return this.values.get(n[1])}},u0=class{constructor(t,n){this.stack=t,this.stoppedEarly=n}};function Jv(t,n,a,l,s,u,f,h){const c=n.content.length;let m=!1,v=-1;if(f){const b=GC(t,n,a,l,s,u);s=b.stack,l=b.linePos,a=b.isFirstLine,v=b.anchorPosition}const g=Date.now();for(;!m;){if(h!==0&&Date.now()-g>h)return new u0(s,!0);y()}return new u0(s,!1);function y(){const b=$C(t,n,a,l,s,v);if(!b){u.produce(s,c),m=!0;return}const E=b.captureIndices,T=b.matchedRuleId,N=E&&E.length>0?E[0].end>l:!1;if(T===UC){const L=s.getRule(t);u.produce(s,E[0].start),s=s.withContentNameScopesList(s.nameScopesList),Zr(t,n,a,s,u,L.endCaptures,E),u.produce(s,E[0].end);const A=s;if(s=s.parent,v=A.getAnchorPos(),!N&&A.getEnterPos()===l){s=A,u.produce(s,c),m=!0;return}}else{const L=t.getRule(T);u.produce(s,E[0].start);const A=s,R=L.getName(n.content,E),z=s.contentNameScopesList.pushAttributed(R,t);if(s=s.push(T,l,v,E[0].end===c,null,z,z),L instanceof $d){const V=L;Zr(t,n,a,s,u,V.beginCaptures,E),u.produce(s,E[0].end),v=E[0].end;const j=V.getContentName(n.content,E),F=z.pushAttributed(j,t);if(s=s.withContentNameScopesList(F),V.endHasBackReferences&&(s=s.withEndRule(V.getEndWithResolvedBackReferences(n.content,E))),!N&&A.hasSameRuleAs(s)){s=s.pop(),u.produce(s,c),m=!0;return}}else if(L instanceof cs){const V=L;Zr(t,n,a,s,u,V.beginCaptures,E),u.produce(s,E[0].end),v=E[0].end;const j=V.getContentName(n.content,E),F=z.pushAttributed(j,t);if(s=s.withContentNameScopesList(F),V.whileHasBackReferences&&(s=s.withEndRule(V.getWhileWithResolvedBackReferences(n.content,E))),!N&&A.hasSameRuleAs(s)){s=s.pop(),u.produce(s,c),m=!0;return}}else if(Zr(t,n,a,s,u,L.captures,E),u.produce(s,E[0].end),s=s.pop(),!N){s=s.safePop(),u.produce(s,c),m=!0;return}}E[0].end>l&&(l=E[0].end,a=!1)}}function GC(t,n,a,l,s,u){let f=s.beginRuleCapturedEOL?0:-1;const h=[];for(let c=s;c;c=c.pop()){const m=c.getRule(t);m instanceof cs&&h.push({rule:m,stack:c})}for(let c=h.pop();c;c=h.pop()){const{ruleScanner:m,findOptions:v}=YC(c.rule,t,c.stack.endRule,a,l===f),g=m.findNextMatchSync(n,l,v);if(g){if(g.ruleId!==Zv){s=c.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(u.produce(c.stack,g.captureIndices[0].start),Zr(t,n,a,c.stack,u,c.rule.whileCaptures,g.captureIndices),u.produce(c.stack,g.captureIndices[0].end),f=g.captureIndices[0].end,g.captureIndices[0].end>l&&(l=g.captureIndices[0].end,a=!1))}else{s=c.stack.pop();break}}return{stack:s,linePos:l,anchorPosition:f,isFirstLine:a}}function $C(t,n,a,l,s,u){const f=qC(t,n,a,l,s,u),h=t.getInjections();if(h.length===0)return f;const c=FC(h,t,n,a,l,s,u);if(!c)return f;if(!f)return c;const m=f.captureIndices[0].start,v=c.captureIndices[0].start;return v<m||c.priorityMatch&&v===m?c:f}function qC(t,n,a,l,s,u){const f=s.getRule(t),{ruleScanner:h,findOptions:c}=e_(f,t,s.endRule,a,l===u),m=h.findNextMatchSync(n,l,c);return m?{captureIndices:m.captureIndices,matchedRuleId:m.ruleId}:null}function FC(t,n,a,l,s,u,f){let h=Number.MAX_VALUE,c=null,m,v=0;const g=u.contentNameScopesList.getScopeNames();for(let y=0,b=t.length;y<b;y++){const E=t[y];if(!E.matcher(g))continue;const T=n.getRule(E.ruleId),{ruleScanner:N,findOptions:L}=e_(T,n,null,l,s===f),A=N.findNextMatchSync(a,s,L);if(!A)continue;const R=A.captureIndices[0].start;if(!(R>=h)&&(h=R,c=A.captureIndices,m=A.ruleId,v=E.priority,h===s))break}return c?{priorityMatch:v===-1,captureIndices:c,matchedRuleId:m}:null}function e_(t,n,a,l,s){return{ruleScanner:t.compileAG(n,a,l,s),findOptions:0}}function YC(t,n,a,l,s){return{ruleScanner:t.compileWhileAG(n,a,l,s),findOptions:0}}function Zr(t,n,a,l,s,u,f){if(u.length===0)return;const h=n.content,c=Math.min(u.length,f.length),m=[],v=f[0].end;for(let g=0;g<c;g++){const y=u[g];if(y===null)continue;const b=f[g];if(b.length===0)continue;if(b.start>v)break;for(;m.length>0&&m[m.length-1].endPos<=b.start;)s.produceFromScopes(m[m.length-1].scopes,m[m.length-1].endPos),m.pop();if(m.length>0?s.produceFromScopes(m[m.length-1].scopes,b.start):s.produce(l,b.start),y.retokenizeCapturedWithRuleId){const T=y.getName(h,f),N=l.contentNameScopesList.pushAttributed(T,t),L=y.getContentName(h,f),A=N.pushAttributed(L,t),R=l.push(y.retokenizeCapturedWithRuleId,b.start,-1,!1,null,N,A),z=t.createOnigString(h.substring(0,b.end));Jv(t,z,a&&b.start===0,b.start,R,s,!1,0),Xv(z);continue}const E=y.getName(h,f);if(E!==null){const N=(m.length>0?m[m.length-1].scopes:l.contentNameScopesList).pushAttributed(E,t);m.push(new XC(N,b.end))}}for(;m.length>0;)s.produceFromScopes(m[m.length-1].scopes,m[m.length-1].endPos),m.pop()}var XC=class{scopes;endPos;constructor(t,n){this.scopes=t,this.endPos=n}};function QC(t,n,a,l,s,u,f,h){return new KC(t,n,a,l,s,u,f,h)}function c0(t,n,a,l,s){const u=ss(n,ds),f=Kv.getCompiledRuleId(a,l,s.repository);for(const h of u)t.push({debugSelector:n,matcher:h.matcher,ruleId:f,grammar:s,priority:h.priority})}function ds(t,n){if(n.length<t.length)return!1;let a=0;return t.every(l=>{for(let s=a;s<n.length;s++)if(ZC(n[s],l))return a=s+1,!0;return!1})}function ZC(t,n){if(!t)return!1;if(t===n)return!0;const a=n.length;return t.length>a&&t.substr(0,a)===n&&t[a]==="."}var KC=class{constructor(t,n,a,l,s,u,f,h){if(this._rootScopeName=t,this.balancedBracketSelectors=u,this._onigLib=h,this._basicScopeAttributesProvider=new VC(a,l),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=f,this._grammar=d0(n,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const c of Object.keys(s)){const m=ss(c,ds);for(const v of m)this._tokenTypeMatchers.push({matcher:v.matcher,type:s[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},n=[],a=this._rootScopeName,l=t.lookup(a);if(l){const s=l.injections;if(s)for(let f in s)c0(n,f,s[f],this,l);const u=this._grammarRepository.injections(a);u&&u.forEach(f=>{const h=this.getExternalGrammar(f);if(h){const c=h.injectionSelector;c&&c0(n,c,h,this,h)}})}return n.sort((s,u)=>s.priority-u.priority),n}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const n=++this._lastRuleId,a=t(n);return this._ruleId2desc[n]=a,a}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,n){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const a=this._grammarRepository.lookup(t);if(a)return this._includedGrammars[t]=d0(a,n&&n.$base),this._includedGrammars[t]}}tokenizeLine(t,n,a=0){const l=this._tokenize(t,n,!1,a);return{tokens:l.lineTokens.getResult(l.ruleStack,l.lineLength),ruleStack:l.ruleStack,stoppedEarly:l.stoppedEarly}}tokenizeLine2(t,n,a=0){const l=this._tokenize(t,n,!0,a);return{tokens:l.lineTokens.getBinaryResult(l.ruleStack,l.lineLength),ruleStack:l.ruleStack,stoppedEarly:l.stoppedEarly}}_tokenize(t,n,a,l){this._rootId===-1&&(this._rootId=Kv.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!n||n===Fd.NULL){s=!0;const m=this._basicScopeAttributesProvider.getDefaultAttributes(),v=this.themeProvider.getDefaults(),g=qi.set(0,m.languageId,m.tokenType,null,v.fontStyle,v.foregroundId,v.backgroundId),y=this.getRule(this._rootId).getName(null,null);let b;y?b=tl.createRootAndLookUpScopeName(y,g,this):b=tl.createRoot("unknown",g),n=new Fd(null,this._rootId,-1,-1,!1,null,b,b)}else s=!1,n.reset();t=t+`
|
|
20
|
-
`;const u=this.createOnigString(t),f=u.content.length,h=new JC(a,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Jv(this,u,s,0,n,h,!0,l);return Xv(u),{lineLength:f,lineTokens:h,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function d0(t,n){return t=gC(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=n||t.repository.$self,t}var tl=class vn{constructor(n,a,l){this.parent=n,this.scopePath=a,this.tokenAttributes=l}static fromExtension(n,a){let l=n,s=n?.scopePath??null;for(const u of a)s=od.push(s,u.scopeNames),l=new vn(l,s,u.encodedTokenAttributes);return l}static createRoot(n,a){return new vn(null,new od(null,n),a)}static createRootAndLookUpScopeName(n,a,l){const s=l.getMetadataForScope(n),u=new od(null,n),f=l.themeProvider.themeMatch(u),h=vn.mergeAttributes(a,s,f);return new vn(null,u,h)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(n){return vn.equals(this,n)}static equals(n,a){do{if(n===a||!n&&!a)return!0;if(!n||!a||n.scopeName!==a.scopeName||n.tokenAttributes!==a.tokenAttributes)return!1;n=n.parent,a=a.parent}while(!0)}static mergeAttributes(n,a,l){let s=-1,u=0,f=0;return l!==null&&(s=l.fontStyle,u=l.foregroundId,f=l.backgroundId),qi.set(n,a.languageId,a.tokenType,null,s,u,f)}pushAttributed(n,a){if(n===null)return this;if(n.indexOf(" ")===-1)return vn._pushAttributed(this,n,a);const l=n.split(/ /g);let s=this;for(const u of l)s=vn._pushAttributed(s,u,a);return s}static _pushAttributed(n,a,l){const s=l.getMetadataForScope(a),u=n.scopePath.push(a),f=l.themeProvider.themeMatch(u),h=vn.mergeAttributes(n.tokenAttributes,s,f);return new vn(n,u,h)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(n){const a=[];let l=this;for(;l&&l!==n;)a.push({encodedTokenAttributes:l.tokenAttributes,scopeNames:l.scopePath.getExtensionIfDefined(l.parent?.scopePath??null)}),l=l.parent;return l===n?a.reverse():void 0}},Fd=class Pi{constructor(n,a,l,s,u,f,h,c){this.parent=n,this.ruleId=a,this.beginRuleCapturedEOL=u,this.endRule=f,this.nameScopesList=h,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=l,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new Pi(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(n){return n===null?!1:Pi._equals(this,n)}static _equals(n,a){return n===a?!0:this._structuralEquals(n,a)?tl.equals(n.contentNameScopesList,a.contentNameScopesList):!1}static _structuralEquals(n,a){do{if(n===a||!n&&!a)return!0;if(!n||!a||n.depth!==a.depth||n.ruleId!==a.ruleId||n.endRule!==a.endRule)return!1;n=n.parent,a=a.parent}while(!0)}clone(){return this}static _reset(n){for(;n;)n._enterPos=-1,n._anchorPos=-1,n=n.parent}reset(){Pi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(n,a,l,s,u,f,h){return new Pi(this,n,a,l,s,u,f,h)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(n){return n.getRule(this.ruleId)}toString(){const n=[];return this._writeString(n,0),"["+n.join(",")+"]"}_writeString(n,a){return this.parent&&(a=this.parent._writeString(n,a)),n[a++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,a}withContentNameScopesList(n){return this.contentNameScopesList===n?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,n)}withEndRule(n){return this.endRule===n?this:new Pi(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,n,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(n){let a=this;for(;a&&a._enterPos===n._enterPos;){if(a.ruleId===n.ruleId)return!0;a=a.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(n,a){const l=tl.fromExtension(n?.nameScopesList??null,a.nameScopesList);return new Pi(n,a.ruleId,a.enterPos??-1,a.anchorPos??-1,a.beginRuleCapturedEOL,a.endRule,l,tl.fromExtension(l,a.contentNameScopesList))}},WC=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,n){this.balancedBracketScopes=t.flatMap(a=>a==="*"?(this.allowAny=!0,[]):ss(a,ds).map(l=>l.matcher)),this.unbalancedBracketScopes=n.flatMap(a=>ss(a,ds).map(l=>l.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const n of this.unbalancedBracketScopes)if(n(t))return!1;for(const n of this.balancedBracketScopes)if(n(t))return!0;return this.allowAny}},JC=class{constructor(t,n,a,l){this.balancedBracketSelectors=l,this._emitBinaryTokens=t,this._tokenTypeOverrides=a,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,n){this.produceFromScopes(t.contentNameScopesList,n)}produceFromScopes(t,n){if(this._lastTokenEndIndex>=n)return;if(this._emitBinaryTokens){let l=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const u=t?.getScopeNames()??[];for(const f of this._tokenTypeOverrides)f.matcher(u)&&(l=qi.set(l,0,f.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(u))}if(s&&(l=qi.set(l,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===l){this._lastTokenEndIndex=n;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(l),this._lastTokenEndIndex=n;return}const a=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:n,scopes:a}),this._lastTokenEndIndex=n}getResult(t,n){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===n-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,n),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,n){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===n-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,n),this._binaryTokens[this._binaryTokens.length-2]=0);const a=new Uint32Array(this._binaryTokens.length);for(let l=0,s=this._binaryTokens.length;l<s;l++)a[l]=this._binaryTokens[l];return a}},ex=class{constructor(t,n){this._onigLib=n,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,n){this._rawGrammars.set(t.scopeName,t),n&&this._injectionGrammars.set(t.scopeName,n)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,n,a,l,s){if(!this._grammars.has(t)){let u=this._rawGrammars.get(t);if(!u)return null;this._grammars.set(t,QC(t,u,n,a,l,s,this,this._onigLib))}return this._grammars.get(t)}},tx=class{_options;_syncRegistry;_ensureGrammarCache;constructor(n){this._options=n,this._syncRegistry=new ex(os.createFromRawTheme(n.theme,n.colorMap),n.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(n,a){this._syncRegistry.setTheme(os.createFromRawTheme(n,a))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(n,a,l){return this.loadGrammarWithConfiguration(n,a,{embeddedLanguages:l})}loadGrammarWithConfiguration(n,a,l){return this._loadGrammar(n,a,l.embeddedLanguages,l.tokenTypes,new WC(l.balancedBracketSelectors||[],l.unbalancedBracketSelectors||[]))}loadGrammar(n){return this._loadGrammar(n,0,null,null,null)}_loadGrammar(n,a,l,s,u){const f=new kC(this._syncRegistry,n);for(;f.Q.length>0;)f.Q.map(h=>this._loadSingleGrammar(h.scopeName)),f.processQueue();return this._grammarForScopeName(n,a,l,s,u)}_loadSingleGrammar(n){this._ensureGrammarCache.has(n)||(this._doLoadSingleGrammar(n),this._ensureGrammarCache.set(n,!0))}_doLoadSingleGrammar(n){const a=this._options.loadGrammar(n);if(a){const l=typeof this._options.getInjections=="function"?this._options.getInjections(n):void 0;this._syncRegistry.addGrammar(a,l)}}addGrammar(n,a=[],l=0,s=null){return this._syncRegistry.addGrammar(n,a),this._grammarForScopeName(n.scopeName,l,s)}_grammarForScopeName(n,a=0,l=null,s=null,u=null){return this._syncRegistry.grammarForScopeName(n,a,l,s,u)}},Yd=Fd.NULL;function fs(t,n){const a=typeof t=="string"?{}:{...t.colorReplacements},l=typeof t=="string"?t:t.name;for(const[s,u]of Object.entries(n?.colorReplacements||{}))typeof u=="string"?a[s]=u:s===l&&Object.assign(a,u);return a}function yi(t,n){return t&&(n?.[t?.toLowerCase()]||t)}function nx(t){return Array.isArray(t)?t:[t]}async function t_(t){return Promise.resolve(typeof t=="function"?t():t).then(n=>n.default||n)}function bs(t){return!t||["plaintext","txt","text","plain"].includes(t)}function n_(t){return t==="ansi"||bs(t)}function Ss(t){return t==="none"}function i_(t){return Ss(t)}const ix=/(\r?\n)/g;function Es(t,n=!1){if(t.length===0)return[["",0]];const a=t.split(ix);let l=0;const s=[];for(let u=0;u<a.length;u+=2){const f=n?a[u]+(a[u+1]||""):a[u];s.push([f,l]),l+=a[u].length,l+=a[u+1]?.length||0}return s}const f0={light:"#333333",dark:"#bbbbbb"},h0={light:"#fffffe",dark:"#1e1e1e"},p0="__shiki_resolved";function Cs(t){if(t?.[p0])return t;const n={...t};n.tokenColors&&!n.settings&&(n.settings=n.tokenColors,delete n.tokenColors),n.type||="dark",n.colorReplacements={...n.colorReplacements},n.settings||=[];let{bg:a,fg:l}=n;if(!a||!l){const h=n.settings?n.settings.find(c=>!c.name&&!c.scope):void 0;h?.settings?.foreground&&(l=h.settings.foreground),h?.settings?.background&&(a=h.settings.background),!l&&n?.colors?.["editor.foreground"]&&(l=n.colors["editor.foreground"]),!a&&n?.colors?.["editor.background"]&&(a=n.colors["editor.background"]),l||(l=n.type==="light"?f0.light:f0.dark),a||(a=n.type==="light"?h0.light:h0.dark),n.fg=l,n.bg=a}n.settings[0]&&n.settings[0].settings&&!n.settings[0].scope||n.settings.unshift({settings:{foreground:n.fg,background:n.bg}});let s=0;const u=new Map;function f(h){if(u.has(h))return u.get(h);s+=1;const c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return n.colorReplacements?.[`#${c}`]?f(h):(u.set(h,c),c)}n.settings=n.settings.map(h=>{const c=h.settings?.foreground&&!h.settings.foreground.startsWith("#"),m=h.settings?.background&&!h.settings.background.startsWith("#");if(!c&&!m)return h;const v={...h,settings:{...h.settings}};if(c){const g=f(h.settings.foreground);n.colorReplacements[g]=h.settings.foreground,v.settings.foreground=g}if(m){const g=f(h.settings.background);n.colorReplacements[g]=h.settings.background,v.settings.background=g}return v});for(const h of Object.keys(n.colors||{}))if((h==="editor.foreground"||h==="editor.background"||h.startsWith("terminal.ansi"))&&!n.colors[h]?.startsWith("#")){const c=f(n.colors[h]);n.colorReplacements[c]=n.colors[h],n.colors[h]=c}return Object.defineProperty(n,p0,{enumerable:!1,writable:!1,value:!0}),n}async function a_(t){return[...new Set((await Promise.all(t.filter(n=>!n_(n)).map(async n=>await t_(n).then(a=>Array.isArray(a)?a:[a])))).flat())]}async function r_(t){return(await Promise.all(t.map(async n=>i_(n)?null:Cs(await t_(n))))).filter(n=>!!n)}function l_(t,n){if(!n)return t;if(n[t]){const a=new Set([t]);for(;n[t];){if(t=n[t],a.has(t))throw new Ue(`Circular alias \`${[...a].join(" -> ")} -> ${t}\``);a.add(t)}}return t}var ax=class extends tx{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,n,a,l={}){super(t),this._resolver=t,this._themes=n,this._langs=a,this._alias=l,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=Cs(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=os.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=l_(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const a={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const l=this.loadGrammarWithConfiguration(t.scopeName,1,a);if(l.name=t.name,this._resolvedGrammars.set(t.name,l),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,n.size)for(const s of n)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const l of t)this.resolveEmbeddedLanguages(l);const n=[...this._langGraph.entries()],a=n.filter(([l,s])=>!s);if(a.length){const l=n.filter(([s,u])=>u?(u.embeddedLanguages||u.embeddedLangs)?.some(f=>a.map(([h])=>h).includes(f)):!1).filter(s=>!a.includes(s));throw new Ue(`Missing languages ${a.map(([s])=>`\`${s}\``).join(", ")}, required by ${l.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[l,s]of n)this._resolver.addLanguage(s);for(const[l,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const a of n)this._langGraph.set(a,this._langMap.get(a))}},rx=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:a=>t.createScanner(a),createOnigString:a=>t.createString(a)},n.forEach(a=>this.addLanguage(a))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let a=[];for(let l=1;l<=n.length;l++){const s=n.slice(0,l).join(".");a=[...a,...this._injections.get(s)||[]]}return a}};let Fr=0;function lx(t){Fr+=1,t.warnings!==!1&&Fr>=10&&Fr%10===0&&console.warn(`[Shiki] ${Fr} 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 n=!1;if(!t.engine)throw new Ue("`engine` option is required for synchronous mode");const a=(t.langs||[]).flat(1),l=(t.themes||[]).flat(1).map(Cs),s=new ax(new rx(t.engine,a),l,a,t.langAlias);let u;function f(A){return l_(A,t.langAlias)}function h(A){N();const R=s.getGrammar(typeof A=="string"?A:A.name);if(!R)throw new Ue(`Language \`${A}\` not found, you may need to load it first`);return R}function c(A){if(A==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};N();const R=s.getTheme(A);if(!R)throw new Ue(`Theme \`${A}\` not found, you may need to load it first`);return R}function m(A){N();const R=c(A);return u!==A&&(s.setTheme(R),u=A),{theme:R,colorMap:s.getColorMap()}}function v(){return N(),s.getLoadedThemes()}function g(){return N(),s.getLoadedLanguages()}function y(...A){N(),s.loadLanguages(A.flat(1))}async function b(...A){return y(await a_(A))}function E(...A){N();for(const R of A.flat(1))s.loadTheme(R)}async function T(...A){return N(),E(await r_(A))}function N(){if(n)throw new Ue("Shiki instance has been disposed")}function L(){n||(n=!0,s.dispose(),Fr-=1)}return{setTheme:m,getTheme:c,getLanguage:h,getLoadedThemes:v,getLoadedLanguages:g,resolveLangAlias:f,loadLanguage:b,loadLanguageSync:y,loadTheme:T,loadThemeSync:E,dispose:L,[Symbol.dispose]:L}}async function ox(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[n,a,l]=await Promise.all([r_(t.themes||[]),a_(t.langs||[]),t.engine]);return lx({...t,themes:n,langs:a,engine:l})}const o_=new WeakMap;function xs(t,n){o_.set(t,n)}function sl(t){return o_.get(t)}var As=class s_{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(n,a){return new s_(Object.fromEntries(nx(a).map(l=>[l,Yd])),n)}constructor(...n){if(n.length===2){const[a,l]=n;this.lang=l,this._stacks=a}else{const[a,l,s]=n;this.lang=l,this._stacks={[s]:a}}}getInternalStack(n=this.theme){return this._stacks[n]}getScopes(n=this.theme){return sx(this._stacks[n])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function sx(t){const n=[],a=new Set;function l(s){if(a.has(s))return;a.add(s);const u=s?.nameScopesList?.scopeName;u&&n.push(u),s.parent&&l(s.parent)}return l(t),n}function ux(t,n){if(!(t instanceof As))throw new Ue("Invalid grammar state");return t.getInternalStack(n)}const cx=/,/,dx=/ /;function u_(t,n,a={}){const{theme:l=t.getLoadedThemes()[0]}=a;if(bs(t.resolveLangAlias(a.lang||"text"))||Ss(l))return Es(n).map(h=>[{content:h[0],offset:h[1]}]);const{theme:s,colorMap:u}=t.setTheme(l),f=t.getLanguage(a.lang||"text");if(a.grammarState){if(a.grammarState.lang!==f.name)throw new Ue(`Grammar state language "${a.grammarState.lang}" does not match highlight language "${f.name}"`);if(!a.grammarState.themes.includes(s.name))throw new Ue(`Grammar state themes "${a.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return hx(n,f,s,u,a)}function fx(...t){if(t.length===2)return sl(t[1]);const[n,a,l={}]=t,{lang:s="text",theme:u=n.getLoadedThemes()[0]}=l;if(bs(s)||Ss(u))throw new Ue("Plain language does not have grammar state");if(s==="ansi")throw new Ue("ANSI language does not have grammar state");const{theme:f,colorMap:h}=n.setTheme(u),c=n.getLanguage(s);return new As(Sf(a,c,f,h,l).stateStack,c.name,f.name)}function hx(t,n,a,l,s){const u=Sf(t,n,a,l,s),f=new As(u.stateStack,n.name,a.name);return xs(u.tokens,f),u.tokens}function Sf(t,n,a,l,s){const u=fs(a,s),{tokenizeMaxLineLength:f=0,tokenizeTimeLimit:h=500,includeExplanation:c=!1}=s,m=Es(t);let v=s.grammarState?ux(s.grammarState,a.name)??Yd:s.grammarContextCode!=null?Sf(s.grammarContextCode,n,a,l,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Yd,g=[];const y=[];for(let b=0,E=m.length;b<E;b++){const[T,N]=m[b];if(T===""){g=[],y.push([]);continue}if(f>0&&T.length>=f){g=[],y.push([{content:T,offset:N,color:"",fontStyle:0}]);continue}let L,A,R;c&&c!=="tokenType"&&(L=n.tokenizeLine(T,v,h),A=L.tokens,R=0);const z=n.tokenizeLine2(T,v,h),V=z.tokens.length/2;for(let j=0;j<V;j++){const F=z.tokens[2*j],te=j+1<V?z.tokens[2*j+2]:T.length;if(F===te)continue;const K=z.tokens[2*j+1],ee=yi(l[qi.getForeground(K)],u),Q=qi.getFontStyle(K),X={content:T.substring(F,te),offset:N+F,color:ee,fontStyle:Q};if(c==="tokenType")X.type=qi.getTokenType(K);else if(c){const W=[];if(c!=="scopeName")for(const ce of a.settings){let M;switch(typeof ce.scope){case"string":M=ce.scope.split(cx).map(Y=>Y.trim());break;case"object":M=ce.scope;break;default:continue}W.push({settings:ce,selectors:M.map(Y=>Y.split(dx))})}X.explanation=[];let oe=0;for(;F+oe<te;){const ce=A[R],M=T.substring(ce.startIndex,ce.endIndex);oe+=M.length,X.explanation.push({content:M,scopes:c==="scopeName"?px(ce.scopes):mx(W,ce.scopes)}),R+=1}}g.push(X)}y.push(g),g=[],v=z.ruleStack}return{tokens:y,stateStack:v}}function px(t){return t.map(n=>({scopeName:n}))}function mx(t,n){const a=[];for(let l=0,s=n.length;l<s;l++){const u=n[l];a[l]={scopeName:u,themeMatches:vx(t,u,n.slice(0,l))}}return a}function m0(t,n){return t===n||n.substring(0,t.length)===t&&n[t.length]==="."}function gx(t,n,a){if(!m0(t.at(-1),n))return!1;let l=t.length-2,s=a.length-1;for(;l>=0&&s>=0;)m0(t[l],a[s])&&(l-=1),s-=1;return l===-1}function vx(t,n,a){const l=[];for(const{selectors:s,settings:u}of t)for(const f of s)if(gx(f,n,a)){l.push(u);break}return l}function c_(t,n,a,l=u_){const s=Object.entries(a.themes).filter(m=>m[1]).map(m=>({color:m[0],theme:m[1]})),u=s.map(m=>{const v=l(t,n,{...a,theme:m.theme});return{tokens:v,state:sl(v),theme:typeof m.theme=="string"?m.theme:m.theme.name}}),f=_x(...u.map(m=>m.tokens)),h=f[0].map((m,v)=>m.map((g,y)=>{const b={content:g.content,variants:{},offset:g.offset};return"includeExplanation"in a&&a.includeExplanation&&(b.explanation=g.explanation),f.forEach((E,T)=>{const{content:N,explanation:L,offset:A,...R}=E[v][y];b.variants[s[T].color]=R}),b})),c=u[0].state?new As(Object.fromEntries(u.map(m=>[m.theme,m.state?.getInternalStack(m.theme)])),u[0].state.lang):void 0;return c&&xs(h,c),h}function _x(...t){const n=t.map(()=>[]),a=t.length;for(let l=0;l<t[0].length;l++){const s=t.map(c=>c[l]),u=n.map(()=>[]);n.forEach((c,m)=>c.push(u[m]));const f=s.map(()=>0),h=s.map(c=>c[0]);for(;h.every(c=>c);){const c=Math.min(...h.map(m=>m.content.length));for(let m=0;m<a;m++){const v=h[m];v.content.length===c?(u[m].push(v),f[m]+=1,h[m]=s[m][f[m]]):(u[m].push({...v,content:v.content.slice(0,c)}),h[m]={...v,content:v.content.slice(c),offset:v.offset+c})}}}return n}const g0=/\s+/g;function d_(t,n){if(!n)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(g0)),Array.isArray(t.properties.class)||(t.properties.class=[]);const a=Array.isArray(n)?n:n.split(g0);for(const l of a)l&&!t.properties.class.includes(l)&&t.properties.class.push(l);return t}function yx(t){const n=Es(t,!0).map(([s])=>s);function a(s){if(s===t.length)return{line:n.length-1,character:n.at(-1).length};let u=s,f=0;for(const h of n){if(u<h.length)break;u-=h.length,f++}return{line:f,character:u}}function l(s,u){let f=0;for(let h=0;h<s;h++)f+=n[h].length;return f+=u,f}return{lines:n,indexToPos:a,posToIndex:l}}const bx=["color","background-color"];function Sx(t,n){let a=0;const l=[];for(const s of n)s>a&&l.push({...t,content:t.content.slice(a,s),offset:t.offset+a}),a=s;return a<t.content.length&&l.push({...t,content:t.content.slice(a),offset:t.offset+a}),l}function Ex(t,n){let a=0,l=t.length;for(;a<l;){const s=a+(l-a>>1);t[s]<=n?a=s+1:l=s}return a}function Cx(t,n){const a=[...n instanceof Set?n:new Set(n)].sort((l,s)=>l-s);return a.length?t.map(l=>l.flatMap(s=>{const u=s.offset+s.content.length,f=Ex(a,s.offset);let h=f;for(;h<a.length&&a[h]<u;)h++;if(f===h)return s;const c=a.slice(f,h);for(let m=0;m<c.length;m++)c[m]-=s.offset;return Sx(s,c)})):t}function xx(t,n,a,l,s="css-vars"){const u={content:t.content,explanation:t.explanation,offset:t.offset},f=n.map(v=>hs(t.variants[v])),h=new Set(f.flatMap(v=>Object.keys(v))),c={},m=(v,g)=>{const y=g==="color"?"":g==="background-color"?"-bg":`-${g}`;return a+n[v]+(g==="color"?"":y)};return f.forEach((v,g)=>{for(const y of h){const b=v[y]||"inherit";if(g===0&&l&&bx.includes(y))if(l==="light-dark()"&&f.length>1){const E=n.findIndex(A=>A==="light"),T=n.findIndex(A=>A==="dark");if(E===-1||T===-1)throw new Ue('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const N=f[E][y]||"inherit",L=f[T][y]||"inherit";c[y]=`light-dark(${N}, ${L})`,s==="css-vars"&&(c[m(g,y)]=b)}else c[y]=b;else s==="css-vars"&&(c[m(g,y)]=b)}}),u.htmlStyle=c,u}function hs(t){const n={};if(t.color&&(n.color=t.color),t.bgColor&&(n["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&yt.Italic&&(n["font-style"]="italic"),t.fontStyle&yt.Bold&&(n["font-weight"]="bold");const a=[];t.fontStyle&yt.Underline&&a.push("underline"),t.fontStyle&yt.Strikethrough&&a.push("line-through"),a.length&&(n["text-decoration"]=a.join(" "))}return n}function Xd(t){return typeof t=="string"?t:Object.entries(t).map(([n,a])=>`${n}:${a}`).join(";")}function Ax(){const t=new WeakMap;function n(a){if(!t.has(a.meta)){let u=function(h){if(typeof h=="number"){if(h<0||h>a.source.length)throw new Ue(`Invalid decoration offset: ${h}. Code length: ${a.source.length}`);return{...s.indexToPos(h),offset:h}}else{const c=s.lines[h.line];if(c===void 0)throw new Ue(`Invalid decoration position ${JSON.stringify(h)}. Lines length: ${s.lines.length}`);let m=h.character;if(m<0&&(m=c.length+m),m<0||m>c.length)throw new Ue(`Invalid decoration position ${JSON.stringify(h)}. Line ${h.line} length: ${c.length}`);return{...h,character:m,offset:s.posToIndex(h.line,m)}}};var l=u;const s=yx(a.source),f=(a.options.decorations||[]).map(h=>({...h,start:u(h.start),end:u(h.end)}));Tx(f),t.set(a.meta,{decorations:f,converter:s,source:a.source})}return t.get(a.meta)}return{name:"shiki:decorations",tokens(a){if(this.options.decorations?.length)return Cx(a,n(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]))},code(a){if(!this.options.decorations?.length)return;const l=n(this),s=[...a.children].filter(v=>v.type==="element"&&v.tagName==="span");if(s.length!==l.converter.lines.length)throw new Ue(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${l.converter.lines.length}). Failed to apply decorations.`);function u(v,g,y,b){const E=s[v];let T="",N=-1,L=-1;if(g===0&&(N=0),y===0&&(L=0),y===Number.POSITIVE_INFINITY&&(L=E.children.length),N===-1||L===-1)for(let R=0;R<E.children.length;R++)T+=f_(E.children[R]),N===-1&&T.length===g&&(N=R+1),L===-1&&T.length===y&&(L=R+1);if(N===-1)throw new Ue(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(L===-1)throw new Ue(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const A=E.children.slice(N,L);if(!b.alwaysWrap&&A.length===E.children.length)h(E,b,"line");else if(!b.alwaysWrap&&A.length===1&&A[0].type==="element")h(A[0],b,"token");else{const R={type:"element",tagName:"span",properties:{},children:A};h(R,b,"wrapper"),E.children.splice(N,A.length,R)}}function f(v,g){s[v]=h(s[v],g,"line")}function h(v,g,y){const b=g.properties||{},E=g.transform||(T=>T);return v.tagName=g.tagName||"span",v.properties={...v.properties,...b,class:v.properties.class},g.properties?.class&&d_(v,g.properties.class),v=E(v,y)||v,v}const c=[],m=l.decorations.sort((v,g)=>g.start.offset-v.start.offset||v.end.offset-g.end.offset);for(const v of m){const{start:g,end:y}=v;if(g.line===y.line)u(g.line,g.character,y.character,v);else if(g.line<y.line){u(g.line,g.character,Number.POSITIVE_INFINITY,v);for(let b=g.line+1;b<y.line;b++)c.unshift(()=>f(b,v));u(y.line,0,y.character,v)}}c.forEach(v=>v())}}}function Tx(t){for(let n=0;n<t.length;n++){const a=t[n];if(a.start.offset>a.end.offset)throw new Ue(`Invalid decoration range: ${JSON.stringify(a.start)} - ${JSON.stringify(a.end)}`);for(let l=n+1;l<t.length;l++){const s=t[l],u=a.start.offset<=s.start.offset&&s.start.offset<a.end.offset,f=a.start.offset<s.end.offset&&s.end.offset<=a.end.offset,h=s.start.offset<=a.start.offset&&a.start.offset<s.end.offset,c=s.start.offset<a.end.offset&&a.end.offset<=s.end.offset;if(u||f||h||c){if(u&&f||h&&c||h&&a.start.offset===a.end.offset||f&&s.start.offset===s.end.offset)continue;throw new Ue(`Decorations ${JSON.stringify(a.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function f_(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(f_).join(""):""}const wx=[Ax()];function ps(t){const n=Lx(t.transformers||[]);return[...n.pre,...n.normal,...n.post,...wx]}function Lx(t){const n=[],a=[],l=[];for(const s of t)switch(s.enforce){case"pre":n.push(s);break;case"post":a.push(s);break;default:l.push(s)}return{pre:n,post:a,normal:l}}var Bi=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ud={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Rx(t,n){const a=t.indexOf("\x1B",n);if(a!==-1&&t[a+1]==="["){const l=t.indexOf("m",a);if(l!==-1)return{sequence:t.substring(a+2,l).split(";"),startPosition:a,position:l+1}}return{position:t.length}}function v0(t){const n=t.shift();if(n==="2"){const a=t.splice(0,3).map(l=>Number.parseInt(l));return a.length!==3||a.some(l=>Number.isNaN(l))?void 0:{type:"rgb",rgb:a}}else if(n==="5"){const a=t.shift();if(a)return{type:"table",index:Number(a)}}}function kx(t){const n=[];for(;t.length>0;){const a=t.shift();if(!a)continue;const l=Number.parseInt(a);if(!Number.isNaN(l))if(l===0)n.push({type:"resetAll"});else if(l<=9)ud[l]&&n.push({type:"setDecoration",value:ud[l]});else if(l<=29){const s=ud[l-20];s&&(n.push({type:"resetDecoration",value:s}),s==="dim"&&n.push({type:"resetDecoration",value:"bold"}))}else if(l<=37)n.push({type:"setForegroundColor",value:{type:"named",name:Bi[l-30]}});else if(l===38){const s=v0(t);s&&n.push({type:"setForegroundColor",value:s})}else if(l===39)n.push({type:"resetForegroundColor"});else if(l<=47)n.push({type:"setBackgroundColor",value:{type:"named",name:Bi[l-40]}});else if(l===48){const s=v0(t);s&&n.push({type:"setBackgroundColor",value:s})}else l===49?n.push({type:"resetBackgroundColor"}):l===53?n.push({type:"setDecoration",value:"overline"}):l===55?n.push({type:"resetDecoration",value:"overline"}):l>=90&&l<=97?n.push({type:"setForegroundColor",value:{type:"named",name:Bi[l-90+8]}}):l>=100&&l<=107&&n.push({type:"setBackgroundColor",value:{type:"named",name:Bi[l-100+8]}})}return n}function Dx(){let t=null,n=null,a=new Set;return{parse(l){const s=[];let u=0;do{const f=Rx(l,u),h=f.sequence?l.substring(u,f.startPosition):l.substring(u);if(h.length>0&&s.push({value:h,foreground:t,background:n,decorations:new Set(a)}),f.sequence){const c=kx(f.sequence);for(const m of c)m.type==="resetAll"?(t=null,n=null,a.clear()):m.type==="resetForegroundColor"?t=null:m.type==="resetBackgroundColor"?n=null:m.type==="resetDecoration"&&a.delete(m.value);for(const m of c)m.type==="setForegroundColor"?t=m.value:m.type==="setBackgroundColor"?n=m.value:m.type==="setDecoration"&&a.add(m.value)}u=f.position}while(u<l.length);return s}}}var Ox={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 Nx(t=Ox){function n(h){return t[h]}function a(h){return`#${h.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let l;function s(){if(l)return l;l=[];for(let m=0;m<Bi.length;m++)l.push(n(Bi[m]));let h=[0,95,135,175,215,255];for(let m=0;m<6;m++)for(let v=0;v<6;v++)for(let g=0;g<6;g++)l.push(a([h[m],h[v],h[g]]));let c=8;for(let m=0;m<24;m++,c+=10)l.push(a([c,c,c]));return l}function u(h){return s()[h]}function f(h){switch(h.type){case"named":return n(h.name);case"rgb":return a(h.rgb);case"table":return u(h.index)}}return{value:f}}const Mx=/#([0-9a-f]{3,8})/i,Ix=/var\((--[\w-]+-ansi-[\w-]+)\)/,Hx={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 zx(t,n,a){const l=fs(t,a),s=Es(n),u=Nx(Object.fromEntries(Bi.map(h=>{const c=`terminal.ansi${h[0].toUpperCase()}${h.substring(1)}`;return[h,t.colors?.[c]||Hx[h]]}))),f=Dx();return s.map(h=>f.parse(h[0]).map(c=>{let m,v;c.decorations.has("reverse")?(m=c.background?u.value(c.background):t.bg,v=c.foreground?u.value(c.foreground):t.fg):(m=c.foreground?u.value(c.foreground):t.fg,v=c.background?u.value(c.background):void 0),m=yi(m,l),v=yi(v,l),c.decorations.has("dim")&&(m=Ux(m));let g=yt.None;return c.decorations.has("bold")&&(g|=yt.Bold),c.decorations.has("italic")&&(g|=yt.Italic),c.decorations.has("underline")&&(g|=yt.Underline),c.decorations.has("strikethrough")&&(g|=yt.Strikethrough),{content:c.value,offset:h[1],color:m,bgColor:v,fontStyle:g}}))}function Ux(t){const n=t.match(Mx);if(n){const l=n[1];if(l.length===8){const s=Math.round(Number.parseInt(l.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${l.slice(0,6)}${s}`}else{if(l.length===6)return`#${l}80`;if(l.length===4){const s=l[0],u=l[1],f=l[2],h=l[3];return`#${s}${s}${u}${u}${f}${f}${Math.round(Number.parseInt(`${h}${h}`,16)/2).toString(16).padStart(2,"0")}`}else if(l.length===3){const s=l[0],u=l[1],f=l[2];return`#${s}${s}${u}${u}${f}${f}80`}}}const a=t.match(Ix);return a?`var(${a[1]}-dim)`:t}function Qd(t,n,a={}){const l=t.resolveLangAlias(a.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=a;if(!bs(l)&&!Ss(s)&&l==="ansi"){const{theme:u}=t.setTheme(s);return zx(u,n,a)}return u_(t,n,a)}function ms(t,n,a){let l,s,u,f,h,c;if("themes"in a){const{defaultColor:m="light",cssVariablePrefix:v="--shiki-",colorsRendering:g="css-vars"}=a,y=Object.entries(a.themes).filter(L=>L[1]).map(L=>({color:L[0],theme:L[1]})).sort((L,A)=>L.color===m?-1:A.color===m?1:0);if(y.length===0)throw new Ue("`themes` option must not be empty");const b=c_(t,n,a,Qd);if(c=sl(b),m&&m!=="light-dark()"&&!y.some(L=>L.color===m))throw new Ue(`\`themes\` option must contain the defaultColor key \`${m}\``);const E=y.map(L=>t.getTheme(L.theme)),T=y.map(L=>L.color);u=b.map(L=>L.map(A=>xx(A,T,v,m,g))),c&&xs(u,c);const N=y.map(L=>fs(L.theme,a));s=_0(y,E,N,v,m,"fg",g),l=_0(y,E,N,v,m,"bg",g),f=`shiki-themes ${E.map(L=>L.name).join(" ")}`,h=m?void 0:[s,l].join(";")}else if("theme"in a){const m=fs(a.theme,a);u=Qd(t,n,a);const v=t.getTheme(a.theme);l=yi(v.bg,m),s=yi(v.fg,m),f=v.name,c=sl(u)}else throw new Ue("Invalid options, either `theme` or `themes` must be provided");return{tokens:u,fg:s,bg:l,themeName:f,rootStyle:h,grammarState:c}}function _0(t,n,a,l,s,u,f){return t.map((h,c)=>{const m=yi(n[c][u],a[c])||"inherit",v=`${l+h.color}${u==="bg"?"-bg":""}:${m}`;if(c===0&&s){if(s==="light-dark()"&&t.length>1){const g=t.findIndex(b=>b.color==="light"),y=t.findIndex(b=>b.color==="dark");if(g===-1||y===-1)throw new Ue('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${yi(n[g][u],a[g])||"inherit"}, ${yi(n[y][u],a[y])||"inherit"});${v}`}return m}return f==="css-vars"?v:null}).filter(h=>!!h).join(";")}const h_=/^\s+$/,jx=/^(\s*)(.*?)(\s*)$/;function gs(t,n,a,l={meta:{},options:a,codeToHast:(s,u)=>gs(t,s,u),codeToTokens:(s,u)=>ms(t,s,u)}){let s=n;for(const E of ps(a))s=E.preprocess?.call(l,s,a)||s;let{tokens:u,fg:f,bg:h,themeName:c,rootStyle:m,grammarState:v}=ms(t,s,a);const{mergeWhitespaces:g=!0,mergeSameStyleTokens:y=!1}=a;g===!0?u=Vx(u):g==="never"&&(u=Bx(u)),y&&(u=Gx(u));const b={...l,get source(){return s}};for(const E of ps(a))u=E.tokens?.call(b,u)||u;return Px(u,{...a,fg:f,bg:h,themeName:c,rootStyle:a.rootStyle===!1?!1:a.rootStyle??m},b,v)}function Px(t,n,a,l=sl(t)){const s=ps(n),u=[],f={type:"root",children:[]},{structure:h="classic",tabindex:c="0"}=n,m={class:`shiki ${n.themeName||""}`};n.rootStyle!==!1&&(n.rootStyle!=null?m.style=n.rootStyle:m.style=`background-color:${n.bg};color:${n.fg}`),c!==!1&&c!=null&&(m.tabindex=c.toString());for(const[T,N]of Object.entries(n.meta||{}))T.startsWith("_")||(m[T]=N);let v={type:"element",tagName:"pre",properties:m,children:[],data:n.data},g={type:"element",tagName:"code",properties:{},children:u};const y=[],b={...a,structure:h,addClassToHast:d_,get source(){return a.source},get tokens(){return t},get options(){return n},get root(){return f},get pre(){return v},get code(){return g},get lines(){return y}};if(t.forEach((T,N)=>{N&&(h==="inline"?f.children.push({type:"element",tagName:"br",properties:{},children:[]}):h==="classic"&&u.push({type:"text",value:`
|
|
21
|
-
`}));let L={type:"element",tagName:"span",properties:{class:"line"},children:[]},A=0;for(const R of T){let z={type:"element",tagName:"span",properties:{...R.htmlAttrs},children:[{type:"text",value:R.content}]};const V=Xd(R.htmlStyle||hs(R));V&&(z.properties.style=V);for(const j of s)z=j?.span?.call(b,z,N+1,A,L,R)||z;h==="inline"?f.children.push(z):h==="classic"&&L.children.push(z),A+=R.content.length}if(h==="classic"){for(const R of s)L=R?.line?.call(b,L,N+1)||L;y.push(L),u.push(L)}else h==="inline"&&y.push(L)}),h==="classic"){for(const T of s)g=T?.code?.call(b,g)||g;v.children.push(g);for(const T of s)v=T?.pre?.call(b,v)||v;f.children.push(v)}else if(h==="inline"){const T=[];let N={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const A of f.children)A.type==="element"&&A.tagName==="br"?(T.push(N),N={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(A.type==="element"||A.type==="text")&&N.children.push(A);T.push(N);let L={type:"element",tagName:"code",properties:{},children:T};for(const A of s)L=A?.code?.call(b,L)||L;f.children=[];for(let A=0;A<L.children.length;A++){A>0&&f.children.push({type:"element",tagName:"br",properties:{},children:[]});const R=L.children[A];R.type==="element"&&f.children.push(...R.children)}}let E=f;for(const T of s)E=T?.root?.call(b,E)||E;return l&&xs(E,l),E}function Vx(t){return t.map(n=>{const a=[];let l="",s;return n.forEach((u,f)=>{const h=!(u.fontStyle&&(u.fontStyle&yt.Underline||u.fontStyle&yt.Strikethrough));h&&h_.test(u.content)&&n[f+1]?(s===void 0&&(s=u.offset),l+=u.content):l?(h?a.push({...u,offset:s,content:l+u.content}):a.push({content:l,offset:s},u),s=void 0,l=""):a.push(u)}),a})}function Bx(t){return t.map(n=>n.flatMap(a=>{if(h_.test(a.content))return a;const l=a.content.match(jx);if(!l)return a;const[,s,u,f]=l;if(!s&&!f)return a;const h=[{...a,offset:a.offset+s.length,content:u}];return s&&h.unshift({content:s,offset:a.offset}),f&&h.push({content:f,offset:a.offset+s.length+u.length}),h}))}function Gx(t){return t.map(n=>{const a=[];for(const l of n){if(a.length===0){a.push({...l});continue}const s=a.at(-1),u=Xd(s.htmlStyle||hs(s)),f=Xd(l.htmlStyle||hs(l)),h=s.fontStyle&&(s.fontStyle&yt.Underline||s.fontStyle&yt.Strikethrough),c=l.fontStyle&&(l.fontStyle&yt.Underline||l.fontStyle&yt.Strikethrough);!h&&!c&&u===f?s.content+=l.content:a.push({...l})}return a})}const $x=$a;function qx(t,n,a){const l={meta:{},options:a,codeToHast:(u,f)=>gs(t,u,f),codeToTokens:(u,f)=>ms(t,u,f)};let s=$x(gs(t,n,a,l));for(const u of ps(a))s=u.postprocess?.call(l,s,a)||s;return s}async function Fx(t){const n=await ox(t);return{getLastGrammarState:(...a)=>fx(n,...a),codeToTokensBase:(a,l)=>Qd(n,a,l),codeToTokensWithThemes:(a,l)=>c_(n,a,l),codeToTokens:(a,l)=>ms(n,a,l),codeToHast:(a,l)=>gs(n,a,l),codeToHtml:(a,l)=>qx(n,a,l),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...n,getInternalContext:()=>n}}function Yx(t){const n=t.langs,a=t.themes,l=t.engine;async function s(u){function f(g){if(typeof g=="string"){if(g=u.langAlias?.[g]||g,n_(g))return[];const y=n[g];if(!y)throw new Ue(`Language \`${g}\` is not included in this bundle. You may want to load it from external source.`);return y}return g}function h(g){if(i_(g))return"none";if(typeof g=="string"){const y=a[g];if(!y)throw new Ue(`Theme \`${g}\` is not included in this bundle. You may want to load it from external source.`);return y}return g}const c=(u.themes??[]).map(g=>h(g)),m=(u.langs??[]).map(g=>f(g)),v=await Fx({engine:u.engine??l(),...u,themes:c,langs:m});return{...v,loadLanguage(...g){return v.loadLanguage(...g.map(f))},loadTheme(...g){return v.loadTheme(...g.map(h))},getBundledLanguages(){return n},getBundledThemes(){return a}}}return s}const Xx=Yx({langs:Pd,themes:KE,engine:()=>(0,jv.createOnigurumaEngine)(S(()=>import("./wasm-CG6Dc4jp.js"),[]))}),y0=4294967295;var Qx=class{patterns;options;regexps;constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:a=!1,cache:l,regexConstructor:s}=n;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(u=>{if(typeof u!="string")return u;const f=l?.get(u);if(f){if(f instanceof RegExp)return f;if(a)return null;throw f}try{const h=s(u);return l?.set(u,h),h}catch(h){if(l?.set(u,h),a)return null;throw h}})}findNextMatchSync(t,n,a){const l=typeof t=="string"?t:t.content,s=[];function u(f,h,c=0){return{index:f,captureIndices:h.indices.map(m=>m==null?{start:y0,end:y0,length:0}:{start:m[0]+c,end:m[1]+c,length:m[1]-m[0]})}}for(let f=0;f<this.regexps.length;f++){const h=this.regexps[f];if(h)try{h.lastIndex=n;const c=h.exec(l);if(!c)continue;if(c.index===n)return u(f,c,0);s.push([f,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(s.length){const f=Math.min(...s.map(h=>h[1].index));for(const[h,c,m]of s)if(c.index===f)return u(h,c,m)}return null}};function Qa(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function Zx(t,n,a){return t.has(n)||t.set(n,a),t.get(n)}const Ef=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),ct=String.raw;function Za(t,n){if(t==null)throw new Error(n??"Value expected");return t}const p_=ct`\[\^?`,m_=`c.? | C(?:-.?)?|${ct`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${ct`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${ct`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${ct`o\{[^\}]*\}?`}|${ct`\d{1,3}`}`,Cf=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Vo=new RegExp(ct`
|
|
22
|
-
\\ (?:
|
|
23
|
-
${m_}
|
|
24
|
-
| [gk]<[^>]*>?
|
|
25
|
-
| [gk]'[^']*'?
|
|
26
|
-
| .
|
|
27
|
-
)
|
|
28
|
-
| \( (?:
|
|
29
|
-
\? (?:
|
|
30
|
-
[:=!>({]
|
|
31
|
-
| <[=!]
|
|
32
|
-
| <[^>]*>
|
|
33
|
-
| '[^']*'
|
|
34
|
-
| ~\|?
|
|
35
|
-
| #(?:[^)\\]|\\.?)*
|
|
36
|
-
| [^:)]*[:)]
|
|
37
|
-
)?
|
|
38
|
-
| \*[^\)]*\)?
|
|
39
|
-
)?
|
|
40
|
-
| (?:${Cf.source})+
|
|
41
|
-
| ${p_}
|
|
42
|
-
| .
|
|
43
|
-
`.replace(/\s+/g,""),"gsu"),cd=new RegExp(ct`
|
|
44
|
-
\\ (?:
|
|
45
|
-
${m_}
|
|
46
|
-
| .
|
|
47
|
-
)
|
|
48
|
-
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
49
|
-
| ${p_}
|
|
50
|
-
| &&
|
|
51
|
-
| .
|
|
52
|
-
`.replace(/\s+/g,""),"gsu");function Kx(t,n={}){const a={flags:"",...n,rules:{captureGroup:!1,singleline:!1,...n.rules}};if(typeof t!="string")throw new Error("String expected as pattern");const l=gA(a.flags),s=[l.extended],u={captureGroup:a.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(g){s.push(g)},replaceCurrentModX(g){s[s.length-1]=g},singleline:a.rules.singleline};let f=[],h;for(Vo.lastIndex=0;h=Vo.exec(t);){const g=Wx(u,t,h[0],Vo.lastIndex);g.tokens?f.push(...g.tokens):g.token&&f.push(g.token),g.lastIndex!==void 0&&(Vo.lastIndex=g.lastIndex)}const c=[];let m=0;f.filter(g=>g.type==="GroupOpen").forEach(g=>{g.kind==="capturing"?g.number=++m:g.raw==="("&&c.push(g)}),m||c.forEach((g,y)=>{g.kind="capturing",g.number=y+1});const v=m||c.length;return{tokens:f.map(g=>g.type==="EscapedNumber"?_A(g,v):g).flat(),flags:l}}function Wx(t,n,a,l){const[s,u]=a;if(a==="["||a==="[^"){const f=Jx(n,a,l);return{tokens:f.tokens,lastIndex:f.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(u))return{token:b0(a,a)};if(/^\\g[<']/.test(a)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(a))throw new Error(`Invalid group name "${a}"`);return{token:uA(a)}}if(/^\\k[<']/.test(a)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(a))throw new Error(`Invalid group name "${a}"`);return{token:v_(a)}}if(u==="K")return{token:__("keep",a)};if(u==="N"||u==="R")return{token:Gi("newline",a,{negate:u==="N"})};if(u==="O")return{token:Gi("any",a)};if(u==="X")return{token:Gi("text_segment",a)};const f=g_(a,{inCharClass:!1});return Array.isArray(f)?{tokens:f}:{token:f}}if(s==="("){if(u==="*")return{token:hA(a)};if(a==="(?{")throw new Error(`Unsupported callout "${a}"`);if(a.startsWith("(?#")){if(n[l]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:l+1}}if(/^\(\?[-imx]+[:)]$/.test(a))return{token:fA(a,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,a==="("&&!t.captureGroup||a==="(?:")return{token:ja("group",a)};if(a==="(?>")return{token:ja("atomic",a)};if(a==="(?="||a==="(?!"||a==="(?<="||a==="(?<!")return{token:ja(a[2]==="<"?"lookbehind":"lookahead",a,{negate:a.endsWith("!")})};if(a==="("&&t.captureGroup||a.startsWith("(?<")&&a.endsWith(">")||a.startsWith("(?'")&&a.endsWith("'"))return{token:ja("capturing",a,{...a!=="("&&{name:a.slice(3,-1)}})};if(a.startsWith("(?~")){if(a==="(?~|")throw new Error(`Unsupported absence function kind "${a}"`);return{token:ja("absence_repeater",a)}}throw a==="(?("?new Error(`Unsupported conditional "${a}"`):new Error(`Invalid or unsupported group option "${a}"`)}if(a===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:lA(a)}}if(t.getCurrentModX()){if(a==="#"){const f=n.indexOf(`
|
|
53
|
-
`,l);return{lastIndex:f===-1?n.length:f}}if(/^\s$/.test(a)){const f=/\s+/y;return f.lastIndex=l,{lastIndex:f.exec(n)?f.lastIndex:l}}}if(a===".")return{token:Gi("dot",a)};if(a==="^"||a==="$"){const f=t.singleline?{"^":ct`\A`,$:ct`\Z`}[a]:a;return{token:b0(f,a)}}return a==="|"?{token:tA(a)}:Cf.test(a)?{tokens:yA(a)}:{token:$n(Qa(a),a)}}function Jx(t,n,a){const l=[S0(n[1]==="^",n)];let s=1,u;for(cd.lastIndex=a;u=cd.exec(t);){const f=u[0];if(f[0]==="["&&f[1]!==":")s++,l.push(S0(f[1]==="^",f));else if(f==="]"){if(l.at(-1).type==="CharacterClassOpen")l.push($n(93,f));else if(s--,l.push(nA(f)),!s)break}else{const h=eA(f);Array.isArray(h)?l.push(...h):l.push(h)}}return{tokens:l,lastIndex:cd.lastIndex||t.length}}function eA(t){if(t[0]==="\\")return g_(t,{inCharClass:!0});if(t[0]==="["){const n=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!n||!Ef.has(n.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return Gi("posix",t,{value:n.groups.name,negate:!!n.groups.negate})}return t==="-"?iA(t):t==="&&"?aA(t):$n(Qa(t),t)}function g_(t,{inCharClass:n}){const a=t[1];if(a==="c"||a==="C")return dA(t);if("dDhHsSwW".includes(a))return pA(t);if(t.startsWith(ct`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return mA(t)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(t))try{const l=t.split(/\\x/).slice(1).map(f=>parseInt(f,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(l)),u=new TextEncoder;return[...s].map(f=>{const h=[...u.encode(f)].map(c=>`\\x${c.toString(16)}`).join("");return $n(Qa(f),h)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(a==="u"||a==="x")return $n(vA(t),t);if(E0.has(a))return $n(E0.get(a),t);if(/\d/.test(a))return rA(n,t);if(t==="\\")throw new Error(ct`Incomplete escape "\"`);if(a==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return $n(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function tA(t){return{type:"Alternator",raw:t}}function b0(t,n){return{type:"Assertion",kind:t,raw:n}}function v_(t){return{type:"Backreference",raw:t}}function $n(t,n){return{type:"Character",value:t,raw:n}}function nA(t){return{type:"CharacterClassClose",raw:t}}function iA(t){return{type:"CharacterClassHyphen",raw:t}}function aA(t){return{type:"CharacterClassIntersector",raw:t}}function S0(t,n){return{type:"CharacterClassOpen",negate:t,raw:n}}function Gi(t,n,a={}){return{type:"CharacterSet",kind:t,...a,raw:n}}function __(t,n,a={}){return t==="keep"?{type:"Directive",kind:t,raw:n}:{type:"Directive",kind:t,flags:Za(a.flags),raw:n}}function rA(t,n){return{type:"EscapedNumber",inCharClass:t,raw:n}}function lA(t){return{type:"GroupClose",raw:t}}function ja(t,n,a={}){return{type:"GroupOpen",kind:t,...a,raw:n}}function oA(t,n,a,l){return{type:"NamedCallout",kind:t,tag:n,arguments:a,raw:l}}function sA(t,n,a,l){return{type:"Quantifier",kind:t,min:n,max:a,raw:l}}function uA(t){return{type:"Subroutine",raw:t}}const cA=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),E0=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function dA(t){const n=t[1]==="c"?t[2]:t[3];if(!n||!/[A-Za-z]/.test(n))throw new Error(`Unsupported control character "${t}"`);return $n(Qa(n.toUpperCase())-64,t)}function fA(t,n){let{on:a,off:l}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;l??="";const s=(n.getCurrentModX()||a.includes("x"))&&!l.includes("x"),u=x0(a),f=x0(l),h={};if(u&&(h.enable=u),f&&(h.disable=f),t.endsWith(")"))return n.replaceCurrentModX(s),__("flags",t,{flags:h});if(t.endsWith(":"))return n.pushModX(s),n.numOpenGroups++,ja("group",t,{...(u||f)&&{flags:h}});throw new Error(`Unexpected flag modifier "${t}"`)}function hA(t){const n=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!n)throw new Error(`Incomplete or invalid named callout "${t}"`);const{name:a,tag:l,args:s}=n.groups;if(!a)throw new Error(`Invalid named callout "${t}"`);if(l==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);const u=s?s.split(",").filter(v=>v!=="").map(v=>/^[+-]?\d+$/.test(v)?+v:v):[],[f,h,c]=u,m=cA.has(a)?a.toLowerCase():"custom";switch(m){case"fail":case"mismatch":case"skip":if(u.length>0)throw new Error(`Named callout arguments not allowed "${u}"`);break;case"error":if(u.length>1)throw new Error(`Named callout allows only one argument "${u}"`);if(typeof f=="string")throw new Error(`Named callout argument must be a number "${f}"`);break;case"max":if(!u.length||u.length>2)throw new Error(`Named callout must have one or two arguments "${u}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument one must be a tag or number "${f}"`);if(u.length===2&&(typeof h=="number"||!/^[<>X]$/.test(h)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${h}"`);break;case"count":case"total_count":if(u.length>1)throw new Error(`Named callout allows only one argument "${u}"`);if(u.length===1&&(typeof f=="number"||!/^[<>X]$/.test(f)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${f}"`);break;case"cmp":if(u.length!==3)throw new Error(`Named callout must have three arguments "${u}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument one must be a tag or number "${f}"`);if(typeof h=="number"||!/^(?:[<>!=]=|[<>])$/.test(h))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${h}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${a}"`);default:throw new Error(`Unexpected named callout kind "${m}"`)}return oA(m,l??null,s?.split(",")??null,t)}function C0(t){let n=null,a,l;if(t[0]==="{"){const{minStr:s,maxStr:u}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,f=1e5;if(+s>f||u&&+u>f)throw new Error("Quantifier value unsupported in Oniguruma");if(a=+s,l=u===void 0?+s:u===""?1/0:+u,a>l&&(n="possessive",[a,l]=[l,a]),t.endsWith("?")){if(n==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');n="lazy"}else n||(n="greedy")}else a=t[0]==="+"?1:0,l=t[0]==="?"?1:1/0,n=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return sA(n,a,l,t)}function pA(t){const n=t[1].toLowerCase();return Gi({d:"digit",h:"hex",s:"space",w:"word"}[n],t,{negate:t[1]!==n})}function mA(t){const{p:n,neg:a,value:l}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return Gi("property",t,{value:l,negate:n==="P"&&!a||n==="p"&&!!a})}function x0(t){const n={};return t.includes("i")&&(n.ignoreCase=!0),t.includes("m")&&(n.dotAll=!0),t.includes("x")&&(n.extended=!0),Object.keys(n).length?n:null}function gA(t){const n={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let a=0;a<t.length;a++){const l=t[a];if(!"imxDPSWy".includes(l))throw new Error(`Invalid flag "${l}"`);if(l==="y"){if(!/^y{[gw]}/.test(t.slice(a)))throw new Error('Invalid or unspecified flag "y" mode');n.textSegmentMode=t[a+2]==="g"?"grapheme":"word",a+=3;continue}n[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[l]]=!0}return n}function vA(t){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(t))throw new Error(`Incomplete or invalid escape "${t}"`);const n=t[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(t).groups.hex:t.slice(2);return parseInt(n,16)}function _A(t,n){const{raw:a,inCharClass:l}=t,s=a.slice(1);if(!l&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=n))return[v_(a)];const u=[],f=s.match(/^[0-7]+|\d/g);for(let h=0;h<f.length;h++){const c=f[h];let m;if(h===0&&c!=="8"&&c!=="9"){if(m=parseInt(c,8),m>127)throw new Error(ct`Octal encoded byte above 177 unsupported "${a}"`)}else m=Qa(c);u.push($n(m,(h===0?"\\":"")+c))}return u}function yA(t){const n=[],a=new RegExp(Cf,"gy");let l;for(;l=a.exec(t);){const s=l[0];if(s[0]==="{"){const u=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(u){const{min:f,max:h}=u.groups;if(+f>+h&&s.endsWith("?")){a.lastIndex--,n.push(C0(s.slice(0,-1)));continue}}}n.push(C0(s))}return n}function y_(t,n){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;const a=t.body[0];return!n||Object.keys(n).every(l=>n[l]===a[l])}function bA(t){return SA.has(t.type)}const SA=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function b_(t,n={}){const a={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n,rules:{captureGroup:!1,singleline:!1,...n.rules}},l=Kx(t,{flags:a.flags,rules:{captureGroup:a.rules.captureGroup,singleline:a.rules.singleline}}),s=(y,b)=>{const E=l.tokens[u.nextIndex];switch(u.parent=y,u.nextIndex++,E.type){case"Alternator":return Yi();case"Assertion":return EA(E);case"Backreference":return CA(E,u);case"Character":return Ts(E.value,{useLastValid:!!b.isCheckingRangeEnd});case"CharacterClassHyphen":return xA(E,u,b);case"CharacterClassOpen":return AA(E,u,b);case"CharacterSet":return TA(E,u);case"Directive":return OA(E.kind,{flags:E.flags});case"GroupOpen":return wA(E,u,b);case"NamedCallout":return MA(E.kind,E.tag,E.arguments);case"Quantifier":return LA(E,u);case"Subroutine":return RA(E,u);default:throw new Error(`Unexpected token type "${E.type}"`)}},u={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:a.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:a.skipBackrefValidation,skipLookbehindValidation:a.skipLookbehindValidation,skipPropertyNameValidation:a.skipPropertyNameValidation,subroutines:[],tokens:l.tokens,unicodePropertyMap:a.unicodePropertyMap,walk:s},f=HA(NA(l.flags));let h=f.body[0];for(;u.nextIndex<l.tokens.length;){const y=s(h,{});y.type==="Alternative"?(f.body.push(y),h=y):h.body.push(y)}const{capturingGroups:c,hasNumberedRef:m,namedGroupsByName:v,subroutines:g}=u;if(m&&v.size&&!a.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:y}of g)if(typeof y=="number"){if(y>c.length)throw new Error("Subroutine uses a group number that's not defined");y&&(c[y-1].isSubroutined=!0)}else if(v.has(y)){if(v.get(y).length>1)throw new Error(ct`Subroutine uses a duplicate group name "\g<${y}>"`);v.get(y)[0].isSubroutined=!0}else throw new Error(ct`Subroutine uses a group name that's not defined "\g<${y}>"`);return f}function EA({kind:t}){return Zd(Za({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[t],`Unexpected assertion kind "${t}"`),{negate:t===ct`\B`||t===ct`\Y`})}function CA({raw:t},n){const a=/^\\k[<']/.test(t),l=a?t.slice(3,-1):t.slice(1),s=(u,f=!1)=>{const h=n.capturingGroups.length;let c=!1;if(u>h)if(n.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return n.hasNumberedRef=!0,Kd(f?h+1-u:u,{orphan:c})};if(a){const u=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(l);if(u)return s(+u.groups.num,!!u.groups.sign);if(/[-+]/.test(l))throw new Error(`Invalid backref name "${t}"`);if(!n.namedGroupsByName.has(l))throw new Error(`Group name not defined to the left "${t}"`);return Kd(l)}return s(+l)}function xA(t,n,a){const{tokens:l,walk:s}=n,u=n.parent,f=u.body.at(-1),h=l[n.nextIndex];if(!a.isCheckingRangeEnd&&f&&f.type!=="CharacterClass"&&f.type!=="CharacterClassRange"&&h&&h.type!=="CharacterClassOpen"&&h.type!=="CharacterClassClose"&&h.type!=="CharacterClassIntersector"){const c=s(u,{...a,isCheckingRangeEnd:!0});if(f.type==="Character"&&c.type==="Character")return u.body.pop(),DA(f,c);throw new Error("Invalid character class range")}return Ts(Qa("-"))}function AA({negate:t},n,a){const{tokens:l,walk:s}=n,u=[is()],f=l[n.nextIndex];let h=w0(f);for(;h.type!=="CharacterClassClose";){if(h.type==="CharacterClassIntersector")u.push(is()),n.nextIndex++;else{const m=u.at(-1);m.body.push(s(m,a))}h=w0(l[n.nextIndex],f)}const c=is({negate:t});return u.length===1?c.body=u[0].body:(c.kind="intersection",c.body=u.map(m=>m.body.length===1?m.body[0]:m)),n.nextIndex++,c}function TA({kind:t,negate:n,value:a},l){const{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:u,unicodePropertyMap:f}=l;if(t==="property"){const h=ws(a);if(Ef.has(h)&&!f?.has(h))t="posix",a=h;else return Pa(a,{negate:n,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:u,unicodePropertyMap:f})}return t==="posix"?IA(a,{negate:n}):Wd(t,{negate:n})}function wA(t,n,a){const{tokens:l,capturingGroups:s,namedGroupsByName:u,skipLookbehindValidation:f,walk:h}=n,c=zA(t),m=c.type==="AbsenceFunction",v=T0(c),g=v&&c.negate;if(c.type==="CapturingGroup"&&(s.push(c),c.name&&Zx(u,c.name,[]).push(c)),m&&a.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let y=L0(l[n.nextIndex]);for(;y.type!=="GroupClose";){if(y.type==="Alternator")c.body.push(Yi()),n.nextIndex++;else{const b=c.body.at(-1),E=h(b,{...a,isInAbsenceFunction:a.isInAbsenceFunction||m,isInLookbehind:a.isInLookbehind||v,isInNegLookbehind:a.isInNegLookbehind||g});if(b.body.push(E),(v||a.isInLookbehind)&&!f){const T="Lookbehind includes a pattern not allowed by Oniguruma";if(g||a.isInNegLookbehind){if(A0(E)||E.type==="CapturingGroup")throw new Error(T)}else if(A0(E)||T0(E)&&E.negate)throw new Error(T)}}y=L0(l[n.nextIndex])}return n.nextIndex++,c}function LA({kind:t,min:n,max:a},l){const s=l.parent,u=s.body.at(-1);if(!u||!bA(u))throw new Error("Quantifier requires a repeatable token");const f=E_(t,n,a,u);return s.body.pop(),f}function RA({raw:t},n){const{capturingGroups:a,subroutines:l}=n;let s=t.slice(3,-1);const u=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(u){const h=+u.groups.num,c=a.length;if(n.hasNumberedRef=!0,s={"":h,"+":c+h,"-":c+1-h}[u.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);const f=C_(s);return l.push(f),f}function kA(t,n){return{type:"AbsenceFunction",kind:t,body:ml(n?.body)}}function Yi(t){return{type:"Alternative",body:x_(t?.body)}}function Zd(t,n){const a={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(a.negate=!!n?.negate),a}function Kd(t,n){const a=!!n?.orphan;return{type:"Backreference",ref:t,...a&&{orphan:a}}}function S_(t,n){const a={name:void 0,isSubroutined:!1,...n};if(a.name!==void 0&&!UA(a.name))throw new Error(`Group name "${a.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...a.name&&{name:a.name},...a.isSubroutined&&{isSubroutined:a.isSubroutined},body:ml(n?.body)}}function Ts(t,n){const a={useLastValid:!1,...n};if(t>1114111){const l=t.toString(16);if(a.useLastValid)t=1114111;else throw t>1310719?new Error(`Invalid code point out of range "\\x{${l}}"`):new Error(`Invalid code point out of range in JS "\\x{${l}}"`)}return{type:"Character",value:t}}function is(t){const n={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:n.kind,negate:n.negate,body:x_(t?.body)}}function DA(t,n){if(n.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:n}}function Wd(t,n){const a=!!n?.negate,l={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(l.negate=a),(t==="text_segment"||t==="newline"&&!a)&&(l.variableLength=!0),l}function OA(t,n={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:Za(n.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function NA(t){return{type:"Flags",...t}}function un(t){const n=t?.atomic,a=t?.flags;if(n&&a)throw new Error("Atomic group cannot have flags");return{type:"Group",...n&&{atomic:n},...a&&{flags:a},body:ml(t?.body)}}function Vi(t){const n={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:n.behind?"lookbehind":"lookahead",negate:n.negate,body:ml(t?.body)}}function MA(t,n,a){return{type:"NamedCallout",kind:t,tag:n,arguments:a}}function IA(t,n){const a=!!n?.negate;if(!Ef.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:a}}function E_(t,n,a,l){if(n>a)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:n,max:a,body:l}}function HA(t,n){return{type:"Regex",body:ml(n?.body),flags:t}}function C_(t){return{type:"Subroutine",ref:t}}function Pa(t,n){const a={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n};let l=a.unicodePropertyMap?.get(ws(t));if(!l){if(a.normalizeUnknownPropertyNames)l=jA(t);else if(a.unicodePropertyMap&&!a.skipPropertyNameValidation)throw new Error(ct`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:l??t,negate:a.negate}}function zA({flags:t,kind:n,name:a,negate:l,number:s}){switch(n){case"absence_repeater":return kA("repeater");case"atomic":return un({atomic:!0});case"capturing":return S_(s,{name:a});case"group":return un({flags:t});case"lookahead":case"lookbehind":return Vi({behind:n==="lookbehind",negate:l});default:throw new Error(`Unexpected group kind "${n}"`)}}function ml(t){if(t===void 0)t=[Yi()];else if(!Array.isArray(t)||!t.length||!t.every(n=>n.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function x_(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(n=>!!n.type))throw new Error("Invalid body; expected array of nodes");return t}function A0(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function T0(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function UA(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function jA(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}function ws(t){return t.replace(/[- _]+/g,"").toLowerCase()}function w0(t,n){const a=n;return Za(t,`Unclosed character class${a?.type==="Character"&&a.value===93&&a.raw==="]"?' (started with "]")':""}`)}function L0(t){return Za(t,"Unclosed group")}function nl(t,n,a=null){function l(u,f){for(let h=0;h<u.length;h++){const c=s(u[h],f,h,u);h=Math.max(-1,h+c)}}function s(u,f=null,h=null,c=null){let m=0,v=!1;const g={node:u,parent:f,key:h,container:c,root:t,remove(){Bo(c).splice(Math.max(0,Ia(h)+m),1),m--,v=!0},removeAllNextSiblings(){return Bo(c).splice(Ia(h)+1)},removeAllPrevSiblings(){const L=Ia(h)+m;return m-=L,Bo(c).splice(0,Math.max(0,L))},replaceWith(L,A={}){const R=!!A.traverse;c?c[Math.max(0,Ia(h)+m)]=L:Za(f,"Can't replace root node")[h]=L,R&&s(L,f,h,c),v=!0},replaceWithMultiple(L,A={}){const R=!!A.traverse;if(Bo(c).splice(Math.max(0,Ia(h)+m),1,...L),m+=L.length-1,R){let z=0;for(let V=0;V<L.length;V++)z+=s(L[V],f,Ia(h)+V+z,c)}v=!0},skip(){v=!0}},{type:y}=u,b=n["*"],E=n[y],T=typeof b=="function"?b:b?.enter,N=typeof E=="function"?E:E?.enter;if(T?.(g,a),N?.(g,a),!v)switch(y){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":l(u.body,u);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(u.min,u,"min"),s(u.max,u,"max");break;case"Quantifier":s(u.body,u,"body");break;case"Regex":l(u.body,u),s(u.flags,u,"flags");break;default:throw new Error(`Unexpected node type "${y}"`)}return E?.exit?.(g,a),b?.exit?.(g,a),m}return s(t),t}function Bo(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function Ia(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}const PA=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function VA(t,n){for(let a=0;a<t.length;a++)t[a]>=n&&t[a]++}function BA(t,n,a,l){return t.slice(0,n)+l+t.slice(n+a.length)}const en=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function xf(t,n,a,l){const s=new RegExp(String.raw`${n}|(?<$skip>\[\^?|\\?.)`,"gsu"),u=[!1];let f=0,h="";for(const c of t.matchAll(s)){const{0:m,groups:{$skip:v}}=c;if(!v&&(!l||l===en.DEFAULT==!f)){a instanceof Function?h+=a(c,{context:f?en.CHAR_CLASS:en.DEFAULT,negated:u[u.length-1]}):h+=a;continue}m[0]==="["?(f++,u.push(m[1]==="^")):m==="]"&&f&&(f--,u.pop()),h+=m}return h}function A_(t,n,a,l){xf(t,n,a,l)}function GA(t,n,a=0,l){if(!new RegExp(n,"su").test(t))return null;const s=new RegExp(`${n}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=a;let u=0,f;for(;f=s.exec(t);){const{0:h,groups:{$skip:c}}=f;if(!c&&(!l||l===en.DEFAULT==!u))return f;h==="["?u++:h==="]"&&u&&u--,s.lastIndex==f.index&&s.lastIndex++}return null}function Go(t,n,a){return!!GA(t,n,0,a)}function $A(t,n){const a=/\\?./gsu;a.lastIndex=n;let l=t.length,s=0,u=1,f;for(;f=a.exec(t);){const[h]=f;if(h==="[")s++;else if(s)h==="]"&&s--;else if(h==="(")u++;else if(h===")"&&(u--,!u)){l=f.index;break}}return t.slice(n,l)}const R0=new RegExp(String.raw`(?<noncapturingStart>${PA})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function qA(t,n){const a=n?.hiddenCaptures??[];let l=n?.captureTransfers??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:l,hiddenCaptures:a};const s="(?>",u="(?:(?=(",f=[0],h=[];let c=0,m=0,v=NaN,g;do{g=!1;let y=0,b=0,E=!1,T;for(R0.lastIndex=Number.isNaN(v)?0:v+u.length;T=R0.exec(t);){const{0:N,index:L,groups:{capturingStart:A,noncapturingStart:R}}=T;if(N==="[")y++;else if(y)N==="]"&&y--;else if(N===s&&!E)v=L,E=!0;else if(E&&R)b++;else if(A)E?b++:(c++,f.push(c+m));else if(N===")"&&E){if(!b){m++;const z=c+m;if(t=`${t.slice(0,v)}${u}${t.slice(v+s.length,L)}))<$$${z}>)${t.slice(L+1)}`,g=!0,h.push(z),VA(a,z),l.size){const V=new Map;l.forEach((j,F)=>{V.set(F>=z?F+1:F,j.map(te=>te>=z?te+1:te))}),l=V}break}b--}}}while(g);return a.push(...h),t=xf(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:y,groups:{backrefNum:b,wrappedBackrefNum:E}})=>{if(b){const T=+b;if(T>f.length-1)throw new Error(`Backref "${y}" greater than number of captures`);return`\\${f[T]}`}return`\\${E}`},en.DEFAULT),{pattern:t,captureTransfers:l,hiddenCaptures:a}}const T_=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,dd=new RegExp(String.raw`
|
|
54
|
-
\\(?: \d+
|
|
55
|
-
| c[A-Za-z]
|
|
56
|
-
| [gk]<[^>]+>
|
|
57
|
-
| [pPu]\{[^\}]+\}
|
|
58
|
-
| u[A-Fa-f\d]{4}
|
|
59
|
-
| x[A-Fa-f\d]{2}
|
|
60
|
-
)
|
|
61
|
-
| \((?: \? (?: [:=!>]
|
|
62
|
-
| <(?:[=!]|[^>]+>)
|
|
63
|
-
| [A-Za-z\-]+:
|
|
64
|
-
| \(DEFINE\)
|
|
65
|
-
))?
|
|
66
|
-
| (?<qBase>${T_})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
67
|
-
| \\?.
|
|
68
|
-
`.replace(/\s+/g,""),"gsu");function FA(t){if(!new RegExp(`${T_}\\+`).test(t))return{pattern:t};const n=[];let a=null,l=null,s="",u=0,f;for(dd.lastIndex=0;f=dd.exec(t);){const{0:h,index:c,groups:{qBase:m,qMod:v,invalidQ:g}}=f;if(h==="[")u||(l=c),u++;else if(h==="]")u?u--:l=null;else if(!u)if(v==="+"&&s&&!s.startsWith("(")){if(g)throw new Error(`Invalid quantifier "${h}"`);let y=-1;if(/^\{\d+\}$/.test(m))t=BA(t,c+m.length,v,"");else{if(s===")"||s==="]"){const b=s===")"?a:l;if(b===null)throw new Error(`Invalid unmatched "${s}"`);t=`${t.slice(0,b)}(?>${t.slice(b,c)}${m})${t.slice(c+h.length)}`}else t=`${t.slice(0,c-s.length)}(?>${s}${m})${t.slice(c+h.length)}`;y+=4}dd.lastIndex+=y}else h[0]==="("?n.push(c):h===")"&&(a=n.length?n.pop():null);s=h}return{pattern:t}}const Wt=String.raw,YA=Wt`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Jd=Wt`\(\?R=(?<rDepth>[^\)]+)\)|${YA}`,Ls=Wt`\(\?<(?![=!])(?<captureName>[^>]+)>`,w_=Wt`${Ls}|(?<unnamed>\()(?!\?)`,ji=new RegExp(Wt`${Ls}|${Jd}|\(\?|\\?.`,"gsu"),fd="Cannot use multiple overlapping recursions";function XA(t,n){const{hiddenCaptures:a,mode:l}={hiddenCaptures:[],mode:"plugin",...n};let s=n?.captureTransfers??new Map;if(!new RegExp(Jd,"su").test(t))return{pattern:t,captureTransfers:s,hiddenCaptures:a};if(l==="plugin"&&Go(t,Wt`\(\?\(DEFINE\)`,en.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const u=[],f=Go(t,Wt`\\[1-9]`,en.DEFAULT),h=new Map,c=[];let m=!1,v=0,g=0,y;for(ji.lastIndex=0;y=ji.exec(t);){const{0:b,groups:{captureName:E,rDepth:T,gRNameOrNum:N,gRDepth:L}}=y;if(b==="[")v++;else if(v)b==="]"&&v--;else if(T){if(k0(T),m)throw new Error(fd);if(f)throw new Error(`${l==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const A=t.slice(0,y.index),R=t.slice(ji.lastIndex);if(Go(R,Jd,en.DEFAULT))throw new Error(fd);const z=+T-1;t=D0(A,R,z,!1,a,u,g),s=N0(s,A,z,u.length,0,g);break}else if(N){k0(L);let A=!1;for(const X of c)if(X.name===N||X.num===+N){if(A=!0,X.hasRecursedWithin)throw new Error(fd);break}if(!A)throw new Error(Wt`Recursive \g cannot be used outside the referenced group "${l==="external"?N:Wt`\g<${N}&R=${L}>`}"`);const R=h.get(N),z=$A(t,R);if(f&&Go(z,Wt`${Ls}|\((?!\?)`,en.DEFAULT))throw new Error(`${l==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const V=t.slice(R,y.index),j=z.slice(V.length+b.length),F=u.length,te=+L-1,K=D0(V,j,te,!0,a,u,g);s=N0(s,V,te,u.length-F,F,g);const ee=t.slice(0,R),Q=t.slice(R+z.length);t=`${ee}${K}${Q}`,ji.lastIndex+=K.length-b.length-V.length-j.length,c.forEach(X=>X.hasRecursedWithin=!0),m=!0}else if(E)g++,h.set(String(g),ji.lastIndex),h.set(E,ji.lastIndex),c.push({num:g,name:E});else if(b[0]==="("){const A=b==="(";A&&(g++,h.set(String(g),ji.lastIndex)),c.push(A?{num:g}:{})}else b===")"&&c.pop()}return a.push(...u),{pattern:t,captureTransfers:s,hiddenCaptures:a}}function k0(t){const n=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(n);if(t=+t,t<2||t>100)throw new Error(n)}function D0(t,n,a,l,s,u,f){const h=new Set;l&&A_(t+n,Ls,({groups:{captureName:m}})=>{h.add(m)},en.DEFAULT);const c=[a,l?h:null,s,u,f];return`${t}${O0(`(?:${t}`,"forward",...c)}(?:)${O0(`${n})`,"backward",...c)}${n}`}function O0(t,n,a,l,s,u,f){const c=v=>n==="forward"?v+2:a-v+2-1;let m="";for(let v=0;v<a;v++){const g=c(v);m+=xf(t,Wt`${w_}|\\k<(?<backref>[^>]+)>`,({0:y,groups:{captureName:b,unnamed:E,backref:T}})=>{if(T&&l&&!l.has(T))return y;const N=`_$${g}`;if(E||b){const L=f+u.length+1;return u.push(L),QA(s,L),E?y:`(?<${b}${N}>`}return Wt`\k<${T}${N}>`},en.DEFAULT)}return m}function QA(t,n){for(let a=0;a<t.length;a++)t[a]>=n&&t[a]++}function N0(t,n,a,l,s,u){if(t.size&&l){let f=0;A_(n,w_,()=>f++,en.DEFAULT);const h=u-f+s,c=new Map;return t.forEach((m,v)=>{const g=(l-f*a)/a,y=f*a,b=v>h+f?v+l:v,E=[];for(const T of m)if(T<=h)E.push(T);else if(T>h+f+g)E.push(T+l);else if(T<=h+f)for(let N=0;N<=a;N++)E.push(T+f*N);else for(let N=0;N<=a;N++)E.push(T+y+g*N);c.set(b,E)}),c}return t}var at=String.fromCodePoint,me=String.raw,cn={},Rs=globalThis.RegExp;cn.flagGroups=(()=>{try{new Rs("(?i:)")}catch{return!1}return!0})();cn.unicodeSets=(()=>{try{new Rs("[[]]","v")}catch{return!1}return!0})();cn.bugFlagVLiteralHyphenIsRange=cn.unicodeSets?(()=>{try{new Rs(me`[\d\-a]`,"v")}catch{return!0}return!1})():!1;cn.bugNestedClassIgnoresNegation=cn.unicodeSets&&new Rs("[[^a]]","v").test("a");function vs(t,{enable:n,disable:a}){return{dotAll:!a?.dotAll&&!!(n?.dotAll||t.dotAll),ignoreCase:!a?.ignoreCase&&!!(n?.ignoreCase||t.ignoreCase)}}function ul(t,n,a){return t.has(n)||t.set(n,a),t.get(n)}function ef(t,n){return M0[t]>=M0[n]}function ZA(t,n){if(t==null)throw new Error(n??"Value expected");return t}var M0={ES2025:2025,ES2024:2024,ES2018:2018},KA={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function L_(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!KA[t.target])throw new Error(`Unexpected target "${t.target}"`);const n={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return n.target==="auto"&&(n.target=cn.flagGroups?"ES2025":cn.unicodeSets?"ES2024":"ES2018"),n}var WA="[ -\r ]",JA=new Set([at(304),at(305)]),Vn=me`[\p{L}\p{M}\p{N}\p{Pc}]`;function R_(t){if(JA.has(t))return[t];const n=new Set,a=t.toLowerCase(),l=a.toUpperCase(),s=nT.get(a),u=eT.get(a),f=tT.get(a);return[...l].length===1&&n.add(l),f&&n.add(f),s&&n.add(s),n.add(a),u&&n.add(u),[...n]}var Af=new Map(`C Other
|
|
69
|
-
Cc Control cntrl
|
|
70
|
-
Cf Format
|
|
71
|
-
Cn Unassigned
|
|
72
|
-
Co Private_Use
|
|
73
|
-
Cs Surrogate
|
|
74
|
-
L Letter
|
|
75
|
-
LC Cased_Letter
|
|
76
|
-
Ll Lowercase_Letter
|
|
77
|
-
Lm Modifier_Letter
|
|
78
|
-
Lo Other_Letter
|
|
79
|
-
Lt Titlecase_Letter
|
|
80
|
-
Lu Uppercase_Letter
|
|
81
|
-
M Mark Combining_Mark
|
|
82
|
-
Mc Spacing_Mark
|
|
83
|
-
Me Enclosing_Mark
|
|
84
|
-
Mn Nonspacing_Mark
|
|
85
|
-
N Number
|
|
86
|
-
Nd Decimal_Number digit
|
|
87
|
-
Nl Letter_Number
|
|
88
|
-
No Other_Number
|
|
89
|
-
P Punctuation punct
|
|
90
|
-
Pc Connector_Punctuation
|
|
91
|
-
Pd Dash_Punctuation
|
|
92
|
-
Pe Close_Punctuation
|
|
93
|
-
Pf Final_Punctuation
|
|
94
|
-
Pi Initial_Punctuation
|
|
95
|
-
Po Other_Punctuation
|
|
96
|
-
Ps Open_Punctuation
|
|
97
|
-
S Symbol
|
|
98
|
-
Sc Currency_Symbol
|
|
99
|
-
Sk Modifier_Symbol
|
|
100
|
-
Sm Math_Symbol
|
|
101
|
-
So Other_Symbol
|
|
102
|
-
Z Separator
|
|
103
|
-
Zl Line_Separator
|
|
104
|
-
Zp Paragraph_Separator
|
|
105
|
-
Zs Space_Separator
|
|
106
|
-
ASCII
|
|
107
|
-
ASCII_Hex_Digit AHex
|
|
108
|
-
Alphabetic Alpha
|
|
109
|
-
Any
|
|
110
|
-
Assigned
|
|
111
|
-
Bidi_Control Bidi_C
|
|
112
|
-
Bidi_Mirrored Bidi_M
|
|
113
|
-
Case_Ignorable CI
|
|
114
|
-
Cased
|
|
115
|
-
Changes_When_Casefolded CWCF
|
|
116
|
-
Changes_When_Casemapped CWCM
|
|
117
|
-
Changes_When_Lowercased CWL
|
|
118
|
-
Changes_When_NFKC_Casefolded CWKCF
|
|
119
|
-
Changes_When_Titlecased CWT
|
|
120
|
-
Changes_When_Uppercased CWU
|
|
121
|
-
Dash
|
|
122
|
-
Default_Ignorable_Code_Point DI
|
|
123
|
-
Deprecated Dep
|
|
124
|
-
Diacritic Dia
|
|
125
|
-
Emoji
|
|
126
|
-
Emoji_Component EComp
|
|
127
|
-
Emoji_Modifier EMod
|
|
128
|
-
Emoji_Modifier_Base EBase
|
|
129
|
-
Emoji_Presentation EPres
|
|
130
|
-
Extended_Pictographic ExtPict
|
|
131
|
-
Extender Ext
|
|
132
|
-
Grapheme_Base Gr_Base
|
|
133
|
-
Grapheme_Extend Gr_Ext
|
|
134
|
-
Hex_Digit Hex
|
|
135
|
-
IDS_Binary_Operator IDSB
|
|
136
|
-
IDS_Trinary_Operator IDST
|
|
137
|
-
ID_Continue IDC
|
|
138
|
-
ID_Start IDS
|
|
139
|
-
Ideographic Ideo
|
|
140
|
-
Join_Control Join_C
|
|
141
|
-
Logical_Order_Exception LOE
|
|
142
|
-
Lowercase Lower
|
|
143
|
-
Math
|
|
144
|
-
Noncharacter_Code_Point NChar
|
|
145
|
-
Pattern_Syntax Pat_Syn
|
|
146
|
-
Pattern_White_Space Pat_WS
|
|
147
|
-
Quotation_Mark QMark
|
|
148
|
-
Radical
|
|
149
|
-
Regional_Indicator RI
|
|
150
|
-
Sentence_Terminal STerm
|
|
151
|
-
Soft_Dotted SD
|
|
152
|
-
Terminal_Punctuation Term
|
|
153
|
-
Unified_Ideograph UIdeo
|
|
154
|
-
Uppercase Upper
|
|
155
|
-
Variation_Selector VS
|
|
156
|
-
White_Space space
|
|
157
|
-
XID_Continue XIDC
|
|
158
|
-
XID_Start XIDS`.split(/\s/).map(t=>[ws(t),t])),eT=new Map([["s",at(383)],[at(383),"s"]]),tT=new Map([[at(223),at(7838)],[at(107),at(8490)],[at(229),at(8491)],[at(969),at(8486)]]),nT=new Map([vi(453),vi(456),vi(459),vi(498),...hd(8072,8079),...hd(8088,8095),...hd(8104,8111),vi(8124),vi(8140),vi(8188)]),iT=new Map([["alnum",me`[\p{Alpha}\p{Nd}]`],["alpha",me`\p{Alpha}`],["ascii",me`\p{ASCII}`],["blank",me`[\p{Zs}\t]`],["cntrl",me`\p{Cc}`],["digit",me`\p{Nd}`],["graph",me`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",me`\p{Lower}`],["print",me`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",me`[\p{P}\p{S}]`],["space",me`\p{space}`],["upper",me`\p{Upper}`],["word",me`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",me`\p{AHex}`]]);function aT(t,n){const a=[];for(let l=t;l<=n;l++)a.push(l);return a}function vi(t){const n=at(t);return[n.toLowerCase(),n]}function hd(t,n){return aT(t,n).map(a=>vi(a))}var k_=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function rT(t,n){const a={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...n};D_(t);const l={accuracy:a.accuracy,asciiWordBoundaries:a.asciiWordBoundaries,avoidSubclass:a.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:ef(a.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};nl(t,lT,l);const s={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},u={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:l.subroutineRefMap};nl(t,oT,u);const f={groupsByName:u.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:u.reffedNodesByReferencer};return nl(t,sT,f),t._originMap=u.groupOriginByCopy,t._strategy=l.strategy,t}var lT={AbsenceFunction({node:t,parent:n,replaceWith:a}){const{body:l,kind:s}=t;if(s==="repeater"){const u=un();u.body[0].body.push(Vi({negate:!0,body:l}),Pa("Any"));const f=un();f.body[0].body.push(E_("greedy",0,1/0,u)),a(Qe(f,n),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:n,key:a},{flagDirectivesByAlt:l}){const s=t.body.filter(u=>u.kind==="flags");for(let u=a+1;u<n.body.length;u++){const f=n.body[u];ul(l,f,[]).push(...s)}},exit({node:t},{flagDirectivesByAlt:n}){if(n.get(t)?.length){const a=N_(n.get(t));if(a){const l=un({flags:a});l.body[0].body=t.body,t.body=[Qe(l,t)]}}}},Assertion({node:t,parent:n,key:a,container:l,root:s,remove:u,replaceWith:f},h){const{kind:c,negate:m}=t,{asciiWordBoundaries:v,avoidSubclass:g,supportedGNodes:y,wordIsAscii:b}=h;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${m?"Y":"y"}"`);if(c==="line_end")f(Qe(Vi({body:[Yi({body:[Zd("string_end")]}),Yi({body:[Ts(10)]})]}),n));else if(c==="line_start")f(Qe(Bn(me`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),n));else if(c==="search_start")if(y.has(t))s.flags.sticky=!0,u();else{const E=l[a-1];if(E&&pT(E))f(Qe(Vi({negate:!0}),n));else{if(g)throw new Error(me`Uses "\G" in a way that requires a subclass`);f(_i(Zd("string_start"),n)),h.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")f(Qe(Bn(me`(?=\n?\z)`),n));else if(c==="word_boundary"){if(!b&&!v){const E=`(?:(?<=${Vn})(?!${Vn})|(?<!${Vn})(?=${Vn}))`,T=`(?:(?<=${Vn})(?=${Vn})|(?<!${Vn})(?!${Vn}))`;f(Qe(Bn(m?T:E),n))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:t},{jsGroupNameMap:n}){let{ref:a}=t;typeof a=="string"&&!md(a)&&(a=pd(a,n),t.ref=a)},CapturingGroup({node:t},{jsGroupNameMap:n,subroutineRefMap:a}){let{name:l}=t;l&&!md(l)&&(l=pd(l,n),t.name=l),a.set(t.number,t),l&&a.set(l,t)},CharacterClassRange({node:t,parent:n,replaceWith:a}){if(n.kind==="intersection"){const l=is({body:[t]});a(Qe(l,n),{traverse:!0})}},CharacterSet({node:t,parent:n,replaceWith:a},{accuracy:l,minTargetEs2024:s,digitIsAscii:u,spaceIsAscii:f,wordIsAscii:h}){const{kind:c,negate:m,value:v}=t;if(u&&(c==="digit"||v==="digit")){a(_i(Wd("digit",{negate:m}),n));return}if(f&&(c==="space"||v==="space")){a(Qe(gd(Bn(WA),m),n));return}if(h&&(c==="word"||v==="word")){a(_i(Wd("word",{negate:m}),n));return}if(c==="any")a(_i(Pa("Any"),n));else if(c==="digit")a(_i(Pa("Nd",{negate:m}),n));else if(c!=="dot")if(c==="text_segment"){if(l==="strict")throw new Error(me`Use of "\X" requires non-strict accuracy`);const g="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",y=me`\p{RI}{2}|${g}(?:\u200D${g})*`;a(Qe(Bn(me`(?>\r\n|${s?me`\p{RGI_Emoji}`:y}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),n))}else if(c==="hex")a(_i(Pa("AHex",{negate:m}),n));else if(c==="newline")a(Qe(Bn(m?`[^
|
|
159
|
-
]`:`(?>\r
|
|
160
|
-
?|[
|
|
161
|
-
\v\f
\u2028\u2029])`),n));else if(c==="posix")if(!s&&(v==="graph"||v==="print")){if(l==="strict")throw new Error(`POSIX class "${v}" requires min target ES2024 or non-strict accuracy`);let g={graph:"!-~",print:" -~"}[v];m&&(g=`\0-${at(g.codePointAt(0)-1)}${at(g.codePointAt(2)+1)}-`),a(Qe(Bn(`[${g}]`),n))}else a(Qe(gd(Bn(iT.get(v)),m),n));else if(c==="property")Af.has(ws(v))||(t.key="sc");else if(c==="space")a(_i(Pa("space",{negate:m}),n));else if(c==="word")a(Qe(gd(Bn(Vn),m),n));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:t,parent:n,root:a,remove:l,replaceWith:s,removeAllPrevSiblings:u,removeAllNextSiblings:f}){const{kind:h,flags:c}=t;if(h==="flags")if(!c.enable&&!c.disable)l();else{const m=un({flags:c});m.body[0].body=f(),s(Qe(m,n),{traverse:!0})}else if(h==="keep"){const m=a.body[0],g=a.body.length===1&&y_(m,{type:"Group"})&&m.body[0].body.length===1?m.body[0]:a;if(n.parent!==g||g.body.length>1)throw new Error(me`Uses "\K" in a way that's unsupported`);const y=Vi({behind:!0});y.body[0].body=u(),s(Qe(y,n))}else throw new Error(`Unexpected directive kind "${h}"`)},Flags({node:t,parent:n}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(a=>delete t[a]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),n.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;const{enable:n,disable:a}=t.flags;n?.extended&&delete n.extended,a?.extended&&delete a.extended,n?.dotAll&&a?.dotAll&&delete n.dotAll,n?.ignoreCase&&a?.ignoreCase&&delete n.ignoreCase,n&&!Object.keys(n).length&&delete t.flags.enable,a&&!Object.keys(a).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},n){const{kind:a}=t;a==="lookbehind"&&(n.passedLookbehind=!0)},NamedCallout({node:t,parent:n,replaceWith:a}){const{kind:l}=t;if(l==="fail")a(Qe(Vi({negate:!0}),n));else throw new Error(`Unsupported named callout "(*${l.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){const n=un();n.body[0].body.push(t.body),t.body=Qe(n,t)}},Regex:{enter({node:t},{supportedGNodes:n}){const a=[];let l=!1,s=!1;for(const u of t.body)if(u.body.length===1&&u.body[0].kind==="search_start")u.body.pop();else{const f=I_(u.body);f?(l=!0,Array.isArray(f)?a.push(...f):a.push(f)):s=!0}l&&!s&&a.forEach(u=>n.add(u))},exit(t,{accuracy:n,passedLookbehind:a,strategy:l}){if(n==="strict"&&a&&l)throw new Error(me`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:n}){let{ref:a}=t;typeof a=="string"&&!md(a)&&(a=pd(a,n),t.ref=a)}},oT={Backreference({node:t},{multiplexCapturesToLeftByRef:n,reffedNodesByReferencer:a}){const{orphan:l,ref:s}=t;l||a.set(t,[...n.get(s).map(({node:u})=>u)])},CapturingGroup:{enter({node:t,parent:n,replaceWith:a,skip:l},{groupOriginByCopy:s,groupsByName:u,multiplexCapturesToLeftByRef:f,openRefs:h,reffedNodesByReferencer:c}){const m=s.get(t);if(m&&h.has(t.number)){const g=_i(I0(t.number),n);c.set(g,h.get(t.number)),a(g);return}h.set(t.number,t),f.set(t.number,[]),t.name&&ul(f,t.name,[]);const v=f.get(t.name??t.number);for(let g=0;g<v.length;g++){const y=v[g];if(m===y.node||m&&m===y.origin||t===y.origin){v.splice(g,1);break}}if(f.get(t.number).push({node:t,origin:m}),t.name&&f.get(t.name).push({node:t,origin:m}),t.name){const g=ul(u,t.name,new Map);let y=!1;if(m)y=!0;else for(const b of g.values())if(!b.hasDuplicateNameToRemove){y=!0;break}u.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:y})}},exit({node:t},{openRefs:n}){n.get(t.number)===t&&n.delete(t.number)}},Group:{enter({node:t},n){n.prevFlags=n.currentFlags,t.flags&&(n.currentFlags=vs(n.currentFlags,t.flags))},exit(t,n){n.currentFlags=n.prevFlags}},Subroutine({node:t,parent:n,replaceWith:a},l){const{isRecursive:s,ref:u}=t;if(s){let v=n;for(;(v=v.parent)&&!(v.type==="CapturingGroup"&&(v.name===u||v.number===u)););l.reffedNodesByReferencer.set(t,v);return}const f=l.subroutineRefMap.get(u),h=u===0,c=h?I0(0):O_(f,l.groupOriginByCopy,null);let m=c;if(!h){const v=N_(dT(f,y=>y.type==="Group"&&!!y.flags)),g=v?vs(l.globalFlags,v):l.globalFlags;uT(g,l.currentFlags)||(m=un({flags:fT(g)}),m.body[0].body.push(c))}a(Qe(m,n),{traverse:!h})}},sT={Backreference({node:t,parent:n,replaceWith:a},l){if(t.orphan){l.highestOrphanBackref=Math.max(l.highestOrphanBackref,t.ref);return}const u=l.reffedNodesByReferencer.get(t).filter(f=>cT(f,t));if(!u.length)a(Qe(Vi({negate:!0}),n));else if(u.length>1){const f=un({atomic:!0,body:u.reverse().map(h=>Yi({body:[Kd(h.number)]}))});a(Qe(f,n))}else t.ref=u[0].number},CapturingGroup({node:t},n){t.number=++n.numCapturesToLeft,t.name&&n.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},n){const a=Math.max(n.highestOrphanBackref-n.numCapturesToLeft,0);for(let l=0;l<a;l++){const s=S_();t.body.at(-1).body.push(s)}}},Subroutine({node:t},n){!t.isRecursive||t.ref===0||(t.ref=n.reffedNodesByReferencer.get(t).number)}};function D_(t){nl(t,{"*"({node:n,parent:a}){n.parent=a}})}function uT(t,n){return t.dotAll===n.dotAll&&t.ignoreCase===n.ignoreCase}function cT(t,n){let a=n;do{if(a.type==="Regex")return!1;if(a.type==="Alternative")continue;if(a===t)return!1;const l=M_(a.parent);for(const s of l){if(s===a)break;if(s===t||H_(s,t))return!0}}while(a=a.parent);throw new Error("Unexpected path")}function O_(t,n,a,l){const s=Array.isArray(t)?[]:{};for(const[u,f]of Object.entries(t))u==="parent"?s.parent=Array.isArray(a)?l:a:f&&typeof f=="object"?s[u]=O_(f,n,s,a):(u==="type"&&f==="CapturingGroup"&&n.set(s,n.get(t)??t),s[u]=f);return s}function I0(t){const n=C_(t);return n.isRecursive=!0,n}function dT(t,n){const a=[];for(;t=t.parent;)(!n||n(t))&&a.push(t);return a}function pd(t,n){if(n.has(t))return n.get(t);const a=`$${n.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return n.set(t,a),a}function N_(t){const n=["dotAll","ignoreCase"],a={enable:{},disable:{}};return t.forEach(({flags:l})=>{n.forEach(s=>{l.enable?.[s]&&(delete a.disable[s],a.enable[s]=!0),l.disable?.[s]&&(a.disable[s]=!0)})}),Object.keys(a.enable).length||delete a.enable,Object.keys(a.disable).length||delete a.disable,a.enable||a.disable?a:null}function fT({dotAll:t,ignoreCase:n}){const a={};return(t||n)&&(a.enable={},t&&(a.enable.dotAll=!0),n&&(a.enable.ignoreCase=!0)),(!t||!n)&&(a.disable={},!t&&(a.disable.dotAll=!0),!n&&(a.disable.ignoreCase=!0)),a}function M_(t){if(!t)throw new Error("Node expected");const{body:n}=t;return Array.isArray(n)?n:n?[n]:null}function I_(t){const n=t.find(a=>a.kind==="search_start"||mT(a,{negate:!1})||!hT(a));if(!n)return null;if(n.kind==="search_start")return n;if(n.type==="LookaroundAssertion")return n.body[0].body[0];if(n.type==="CapturingGroup"||n.type==="Group"){const a=[];for(const l of n.body){const s=I_(l.body);if(!s)return null;Array.isArray(s)?a.push(...s):a.push(s)}return a}return null}function H_(t,n){const a=M_(t)??[];for(const l of a)if(l===n||H_(l,n))return!0;return!1}function hT({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function pT(t){const n=["Character","CharacterClass","CharacterSet"];return n.includes(t.type)||t.type==="Quantifier"&&t.min&&n.includes(t.body.type)}function mT(t,n){const a={negate:null,...n};return t.type==="LookaroundAssertion"&&(a.negate===null||t.negate===a.negate)&&t.body.length===1&&y_(t.body[0],{type:"Assertion",kind:"search_start"})}function md(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function Bn(t,n){const l=b_(t,{...n,unicodePropertyMap:Af}).body;return l.length>1||l[0].body.length>1?un({body:l}):l[0].body[0]}function gd(t,n){return t.negate=n,t}function _i(t,n){return t.parent=n,t}function Qe(t,n){return D_(t),t.parent=n,t}function gT(t,n){const a=L_(n),l=ef(a.target,"ES2024"),s=ef(a.target,"ES2025"),u=a.rules.recursionLimit;if(!Number.isInteger(u)||u<2||u>20)throw new Error("Invalid recursionLimit; use 2-20");let f=null,h=null;if(!s){const b=[t.flags.ignoreCase];nl(t,vT,{getCurrentModI:()=>b.at(-1),popModI(){b.pop()},pushModI(E){b.push(E)},setHasCasedChar(){b.at(-1)?f=!0:h=!0}})}const c={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||f)&&!h)};let m=t;const v={accuracy:a.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:m,originMap:t._originMap,recursionLimit:u,useAppliedIgnoreCase:!!(!s&&f&&h),useFlagMods:s,useFlagV:l,verbose:a.verbose};function g(b){return v.lastNode=m,m=b,ZA(_T[b.type],`Unexpected node type "${b.type}"`)(b,v,g)}const y={pattern:t.body.map(g).join("|"),flags:g(t.flags),options:{...t.options}};return l||(delete y.options.force.v,y.options.disable.v=!0,y.options.unicodeSetsPlugin=null),y._captureTransfers=new Map,y._hiddenCaptures=[],v.captureMap.forEach((b,E)=>{b.hidden&&y._hiddenCaptures.push(E),b.transferTo&&ul(y._captureTransfers,b.transferTo,[]).push(E)}),y}var vT={"*":{enter({node:t},n){if(z0(t)){const a=n.getCurrentModI();n.pushModI(t.flags?vs({ignoreCase:a},t.flags).ignoreCase:a)}},exit({node:t},n){z0(t)&&n.popModI()}},Backreference(t,n){n.setHasCasedChar()},Character({node:t},n){Tf(at(t.value))&&n.setHasCasedChar()},CharacterClassRange({node:t,skip:n},a){n(),z_(t,{firstOnly:!0}).length&&a.setHasCasedChar()},CharacterSet({node:t},n){t.kind==="property"&&k_.has(t.value)&&n.setHasCasedChar()}},_T={Alternative({body:t},n,a){return t.map(a).join("")},Assertion({kind:t,negate:n}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return n?me`\B`:me`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},n){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!n.useFlagMods&&n.accuracy==="strict"&&n.currentFlags.ignoreCase&&!n.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,n,a){const{body:l,name:s,number:u}=t,f={ignoreCase:n.currentFlags.ignoreCase},h=n.originMap.get(t);return h&&(f.hidden=!0,u>h.number&&(f.transferTo=h.number)),n.captureMap.set(u,f),`(${s?`?<${s}>`:""}${l.map(a).join("|")})`},Character({value:t},n){const a=at(t),l=Ha(t,{escDigit:n.lastNode.type==="Backreference",inCharClass:n.inCharClass,useFlagV:n.useFlagV});if(l!==a)return l;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase&&Tf(a)){const s=R_(a);return n.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return a},CharacterClass(t,n,a){const{kind:l,negate:s,parent:u}=t;let{body:f}=t;if(l==="intersection"&&!n.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");cn.bugFlagVLiteralHyphenIsRange&&n.useFlagV&&f.some(U0)&&(f=[Ts(45),...f.filter(m=>!U0(m))]);const h=()=>`[${s?"^":""}${f.map(a).join(l==="intersection"?"&&":"")}]`;if(!n.inCharClass){if((!n.useFlagV||cn.bugNestedClassIgnoresNegation)&&!s){const v=f.filter(g=>g.type==="CharacterClass"&&g.kind==="union"&&g.negate);if(v.length){const g=un(),y=g.body[0];return g.parent=u,y.parent=g,f=f.filter(b=>!v.includes(b)),t.body=f,f.length?(t.parent=y,y.body.push(t)):g.body.pop(),v.forEach(b=>{const E=Yi({body:[b]});b.parent=E,E.parent=g,g.body.push(E)}),a(g)}}n.inCharClass=!0;const m=h();return n.inCharClass=!1,m}const c=f[0];if(l==="union"&&!s&&c&&((!n.useFlagV||!n.verbose)&&u.kind==="union"&&!(cn.bugFlagVLiteralHyphenIsRange&&n.useFlagV)||!n.verbose&&u.kind==="intersection"&&f.length===1&&c.type!=="CharacterClassRange"))return f.map(a).join("");if(!n.useFlagV&&u.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return h()},CharacterClassRange(t,n){const a=t.min.value,l=t.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:n.useFlagV},u=Ha(a,s),f=Ha(l,s),h=new Set;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase){const c=z_(t);CT(c).forEach(v=>{h.add(Array.isArray(v)?`${Ha(v[0],s)}-${Ha(v[1],s)}`:Ha(v,s))})}return`${u}-${f}${[...h].join("")}`},CharacterSet({kind:t,negate:n,value:a,key:l},s){if(t==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":me`[^\n]`;if(t==="digit")return n?me`\D`:me`\d`;if(t==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&k_.has(a))throw new Error(`Unicode property "${a}" can't be case-insensitive when other chars have specific case`);return`${n?me`\P`:me`\p`}{${l?`${l}=`:""}${a}}`}if(t==="word")return n?me`\W`:me`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,n){return(n.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:n,flags:a,parent:l},s,u){const f=s.currentFlags;a&&(s.currentFlags=vs(f,a));const h=n.map(u).join("|"),c=!s.verbose&&n.length===1&&l.type!=="Quantifier"&&!t&&(!s.useFlagMods||!a)?h:`(?${xT(t,a,s.useFlagMods)}${h})`;return s.currentFlags=f,c},LookaroundAssertion({body:t,kind:n,negate:a},l,s){return`(?${`${n==="lookahead"?"":"<"}${a?"!":"="}`}${t.map(s).join("|")})`},Quantifier(t,n,a){return a(t.body)+AT(t)},Subroutine({isRecursive:t,ref:n},a){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");const l=a.recursionLimit;return n===0?`(?R=${l})`:me`\g<${n}&R=${l}>`}},yT=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),bT=new Set(["-","\\","]","^","["]),ST=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),H0=new Map([[9,me`\t`],[10,me`\n`],[11,me`\v`],[12,me`\f`],[13,me`\r`],[8232,me`\u2028`],[8233,me`\u2029`],[65279,me`\uFEFF`]]),ET=new RegExp("^\\p{Cased}$","u");function Tf(t){return ET.test(t)}function z_(t,n){const a=!!n?.firstOnly,l=t.min.value,s=t.max.value,u=[];if(l<65&&(s===65535||s>=131071)||l===65536&&s>=131071)return u;for(let f=l;f<=s;f++){const h=at(f);if(!Tf(h))continue;const c=R_(h).filter(m=>{const v=m.codePointAt(0);return v<l||v>s});if(c.length&&(u.push(...c),a))break}return u}function Ha(t,{escDigit:n,inCharClass:a,useFlagV:l}){if(H0.has(t))return H0.get(t);if(t<32||t>126&&t<160||t>262143||n&&TT(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;const s=a?l?ST:bT:yT,u=at(t);return(s.has(u)?"\\":"")+u}function CT(t){const n=t.map(s=>s.codePointAt(0)).sort((s,u)=>s-u),a=[];let l=null;for(let s=0;s<n.length;s++)n[s+1]===n[s]+1?l??=n[s]:l===null?a.push(n[s]):(a.push([l,n[s]]),l=null);return a}function xT(t,n,a){if(t)return">";let l="";if(n&&a){const{enable:s,disable:u}=n;l=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(u?"-":"")+(u?.ignoreCase?"i":"")+(u?.dotAll?"s":"")}return`${l}:`}function AT({kind:t,max:n,min:a}){let l;return!a&&n===1?l="?":!a&&n===1/0?l="*":a===1&&n===1/0?l="+":a===n?l=`{${a}}`:l=`{${a},${n===1/0?"":n}}`,l+{greedy:"",lazy:"?",possessive:"+"}[t]}function z0({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function TT(t){return t>47&&t<58}function U0({type:t,value:n}){return t==="Character"&&n===45}var wT=class tf extends RegExp{#t=new Map;#e=null;#i;#n=null;#a=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(n,a,l){const s=!!l?.lazyCompile;if(n instanceof RegExp){if(l)throw new Error("Cannot provide options when copying a regexp");const u=n;super(u,a),this.#i=u.source,u instanceof tf&&(this.#t=u.#t,this.#n=u.#n,this.#a=u.#a,this.rawOptions=u.rawOptions)}else{const u={hiddenCaptures:[],strategy:null,transfers:[],...l};super(s?"":n,a),this.#i=n,this.#t=RT(u.hiddenCaptures,u.transfers),this.#a=u.strategy,this.rawOptions=l??{}}s||(this.#e=this)}exec(n){if(!this.#e){const{lazyCompile:s,...u}=this.rawOptions;this.#e=new tf(this.#i,this.flags,u)}const a=this.global||this.sticky,l=this.lastIndex;if(this.#a==="clip_search"&&a&&l){this.lastIndex=0;const s=this.#r(n.slice(l));return s&&(LT(s,l,n,this.hasIndices),this.lastIndex+=l),s}return this.#r(n)}#r(n){this.#e.lastIndex=this.lastIndex;const a=super.exec.call(this.#e,n);if(this.lastIndex=this.#e.lastIndex,!a||!this.#t.size)return a;const l=[...a];a.length=1;let s;this.hasIndices&&(s=[...a.indices],a.indices.length=1);const u=[0];for(let f=1;f<l.length;f++){const{hidden:h,transferTo:c}=this.#t.get(f)??{};if(h?u.push(null):(u.push(a.length),a.push(l[f]),this.hasIndices&&a.indices.push(s[f])),c&&l[f]!==void 0){const m=u[c];if(!m)throw new Error(`Invalid capture transfer to "${m}"`);if(a[m]=l[f],this.hasIndices&&(a.indices[m]=s[f]),a.groups){this.#n||(this.#n=kT(this.source));const v=this.#n.get(c);v&&(a.groups[v]=l[f],this.hasIndices&&(a.indices.groups[v]=s[f]))}}}return a}};function LT(t,n,a,l){if(t.index+=n,t.input=a,l){const s=t.indices;for(let f=0;f<s.length;f++){const h=s[f];h&&(s[f]=[h[0]+n,h[1]+n])}const u=s.groups;u&&Object.keys(u).forEach(f=>{const h=u[f];h&&(u[f]=[h[0]+n,h[1]+n])})}}function RT(t,n){const a=new Map;for(const l of t)a.set(l,{hidden:!0});for(const[l,s]of n)for(const u of s)ul(a,u,{}).transferTo=l;return a}function kT(t){const n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,a=new Map;let l=0,s=0,u;for(;u=n.exec(t);){const{0:f,groups:{capture:h,name:c}}=u;f==="["?l++:l?f==="]"&&l--:h&&(s++,c&&a.set(s,c))}return a}function DT(t,n){const a=OT(t,n);return a.options?new wT(a.pattern,a.flags,a.options):new RegExp(a.pattern,a.flags)}function OT(t,n){const a=L_(n),l=b_(t,{flags:a.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:a.rules.captureGroup,singleline:a.rules.singleline},skipBackrefValidation:a.rules.allowOrphanBackrefs,unicodePropertyMap:Af}),s=rT(l,{accuracy:a.accuracy,asciiWordBoundaries:a.rules.asciiWordBoundaries,avoidSubclass:a.avoidSubclass,bestEffortTarget:a.target}),u=gT(s,a),f=XA(u.pattern,{captureTransfers:u._captureTransfers,hiddenCaptures:u._hiddenCaptures,mode:"external"}),h=FA(f.pattern),c=qA(h.pattern,{captureTransfers:f.captureTransfers,hiddenCaptures:f.hiddenCaptures}),m={pattern:c.pattern,flags:`${a.hasIndices?"d":""}${a.global?"g":""}${u.flags}${u.options.disable.v?"u":"v"}`};if(a.avoidSubclass){if(a.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const v=c.hiddenCaptures.sort((E,T)=>E-T),g=Array.from(c.captureTransfers),y=s._strategy,b=m.pattern.length>=a.lazyCompileLength;(v.length||g.length||y||b)&&(m.options={...v.length&&{hiddenCaptures:v},...g.length&&{transfers:g},...y&&{strategy:y},...b&&{lazyCompile:b}})}return m}function NT(t,n){return DT(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...n})}function MT(t={}){const n={target:"auto",cache:new Map,...t};return n.regexConstructor||=a=>NT(a,{target:n.target}),{createScanner(a){return new Qx(a,n)},createString(a){return{content:a}}}}async function IT(t){if(Nv())throw new Error(`resolveLanguage("${t}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const n=ad.get(t);if(n!=null)return n;try{let a=jE.get(t);if(a==null&&Object.prototype.hasOwnProperty.call(Pd,t)&&(a=Pd[t]),a==null)throw new Error(`resolveLanguage: "${t}" not found in bundled or custom languages`);const l=a().then(({default:s})=>{const u={name:t,data:s};return al.has(t)||al.set(t,u),u});return ad.set(t,l),await l}finally{ad.delete(t)}}function HT(t){return al.get(t)??IT(t)}const nf=new Set;function cl(t){const n=[],a=new Set;for(const g of zT(t.themes)){const y=U_(g)?g.getThemes():[g];for(const b of y){if(a.has(b.name))throw new Error(`Theme collection already contains theme "${b.name}"`);a.add(b.name),n.push(b)}}const l=Object.freeze([...n]),s=Object.freeze(l.filter(g=>g.colorScheme==="light")),u=Object.freeze(l.filter(g=>g.colorScheme==="dark")),f=new Map(l.map(g=>[g.name,g])),h=Object.freeze(l.map(g=>g.name)),c=Object.freeze(s.map(g=>g.name)),m=Object.freeze(u.map(g=>g.name));function v(g){if(g==null)return l;const{colorScheme:y,collection:b}=g;return b==null?y==="light"?s:y==="dark"?u:l:l.filter(E=>E.collection!==b?!1:y==null||E.colorScheme===y)}return{getTheme(g){return f.get(g)},getThemes(g){return v(g)},getThemeNames(g){return g?.collection==null?g?.colorScheme==="light"?c:g?.colorScheme==="dark"?m:h:v(g).map(y=>y.name)},hasTheme(g){return f.has(g)},orderBy(g){return cl({themes:l.map((y,b)=>({descriptor:y,index:b})).sort((y,b)=>{const E=g(y.descriptor,b.descriptor);return E!==0?E:y.index-b.index}).map(y=>y.descriptor)})},pick(g){const y=[],b=new Set;for(const E of g){if(b.has(E))throw new Error(`Theme collection pick already includes theme "${E}"`);b.add(E);const T=f.get(E);if(T==null)throw new Error(`Theme collection does not contain theme "${E}"`);y.push(T)}return cl({themes:y})},registerInto(g){for(const y of l)g.registerThemeIfAbsent(y.name,y.load)}}}function zT(t){return UT(t)?[t]:t}function UT(t){return U_(t)||jT(t)}function jT(t){return typeof t.name=="string"&&typeof t.load=="function"}function U_(t){return typeof t.getThemes=="function"}function j_(t){return t!==null&&typeof t=="object"&&"default"in t?t.default:t}var PT=class extends Error{constructor(t){super(`Theme "${t}" is already registered`),this.name="DuplicateThemeError"}},VT=class extends Error{constructor(t){super(`No loader registered for theme "${t}"`),this.name="UnregisteredThemeError"}},BT=class extends Error{constructor(t){super(`Theme "${t}" has not been resolved`),this.name="UnresolvedThemeError"}};function GT(){const t=new Map,n=new Map,a=new Map;let l=0;function s(L,A){if(t.has(L))throw new PT(L);t.set(L,A)}function u(L,A){return t.has(L)?!1:(t.set(L,A),!0)}function f(L){return t.has(L)}function h(L){const A=n.get(L);if(A!==void 0)return Promise.resolve(A);const R=a.get(L);if(R!==void 0)return R;const z=t.get(L);if(z===void 0)return Promise.reject(new VT(L));const V=l,j=z().then(F=>{const te=j_(F);return V===l&&n.set(L,te),a.get(L)===j&&a.delete(L),te}).catch(F=>{throw a.get(L)===j&&a.delete(L),F});return a.set(L,j),j}function c(L){return Promise.all(L.map(A=>h(A)))}function m(L,A){n.set(L,A)}function v(L){for(const[A,R]of L)m(A,R)}function g(L){return n.get(L)}function y(L){const A=[];for(const R of L){const z=n.get(R);if(z===void 0)throw new BT(R);A.push(z)}return A}function b(L){return n.has(L)}function E(L){for(const A of L)if(!n.has(A))return!1;return!0}function T(L){const A=n.get(L);return A!==void 0?A:h(L)}function N(){l++,n.clear(),a.clear()}return{clearResolvedThemes:N,getResolvedOrResolveTheme:T,getResolvedTheme:g,getResolvedThemes:y,hasRegisteredTheme:f,hasResolvedTheme:b,hasResolvedThemes:E,registerTheme:s,registerThemeIfAbsent:u,resolveTheme:h,resolveThemes:c,seedResolvedTheme:m,seedResolvedThemes:v}}const bi=GT();function j0(t,n){t=Array.isArray(t)?t:[t];for(let a of t){let l;if(typeof a=="string"){if(l=bi.getResolvedTheme(a),l==null)throw new Error(`loadResolvedThemes: ${a} is not resolved, you must resolve it before calling loadResolvedThemes`)}else l=a,a=a.name,bi.getResolvedTheme(a)==null&&bi.seedResolvedTheme(a,l);nf.has(a)||(nf.add(a),n.loadThemeSync(l))}}function P_({name:t,load:n,colorScheme:a,collection:l,displayName:s}){return{name:t,colorScheme:a,collection:l,displayName:s,load:$T(n)}}function $T(t){return async()=>Cs(j_(await t()))}const qT="pierre",FT=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],V_=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],YT=[...V_,...FT],XT=new Set(V_);function QT(t){return XT.has(t)?"light":"dark"}const ZT={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},KT={"pierre-dark":()=>S(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>S(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>S(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>S(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>S(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>S(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>S(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>S(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>S(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>S(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function WT(t){return P_({name:t,collection:qT,colorScheme:QT(t),displayName:ZT[t],load:KT[t]})}const B_=cl({themes:YT.map(t=>WT(t))}),JT="shiki",G_=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],ew=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],tw=new Set(G_);function nw(t){return tw.has(t)?"light":"dark"}const iw={andromeeda:()=>S(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>S(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>S(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>S(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>S(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>S(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]),"catppuccin-latte":()=>S(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]),"catppuccin-macchiato":()=>S(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]),"catppuccin-mocha":()=>S(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]),"dark-plus":()=>S(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>S(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>S(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>S(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>S(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>S(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>S(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>S(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>S(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>S(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>S(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>S(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>S(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>S(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>S(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>S(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>S(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>S(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>S(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>S(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>S(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>S(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]),"kanagawa-lotus":()=>S(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]),"kanagawa-wave":()=>S(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]),laserwave:()=>S(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>S(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>S(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>S(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>S(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>S(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>S(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>S(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>S(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>S(()=>import("./monokai-BRVnQi9A.js"),[]),"night-owl":()=>S(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>S(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>S(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>S(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>S(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>S(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>S(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>S(()=>import("./red-hvxz__6c.js"),[]),"rose-pine":()=>S(()=>import("./rose-pine-5qJOZa0Y.js"),[]),"rose-pine-dawn":()=>S(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]),"rose-pine-moon":()=>S(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]),"slack-dark":()=>S(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>S(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>S(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>S(()=>import("./solarized-dark-CpvCGNkr.js"),[]),"solarized-light":()=>S(()=>import("./solarized-light-Dlz6yCKv.js"),[]),"synthwave-84":()=>S(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>S(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>S(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>S(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>S(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>S(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function P0(t){return P_({name:t,collection:JT,colorScheme:nw(t),load:iw[t]})}const $_=cl({themes:Object.freeze([...G_.map(t=>P0(t)),...ew.map(t=>P0(t))])});cl({themes:[B_,$_]});function aw(t){if(Nv())throw new 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 resolvedLanguages parameter.`);if(bi.hasRegisteredTheme(t))return;const n=$_.getTheme(t);if(n!=null){bi.registerThemeIfAbsent(n.name,n.load);return}throw new Error(`No valid theme loader registered for "${t}"`)}function rw(t,n){if(n.name!==t)throw new Error(`resolvedTheme: themeName: ${t} does not match theme.name: ${n.name}`)}async function lw(t){aw(t);const n=await bi.resolveTheme(t);return rw(t,n),n}function ow(t){return bi.getResolvedTheme(t)??lw(t)}let _n;async function sw({themes:t,langs:n,preferredHighlighter:a="shiki-js"}){_n??=Xx({themes:[],langs:["text"],engine:a==="shiki-wasm"?Uv(S(()=>import("./wasm-CG6Dc4jp.js"),[])):MT()});const l=cw(_n)?await _n:_n;_n=l;const s=[];for(const f of n){if(f==="text"||f==="ansi")continue;const h=HT(f);"then"in h?s.push(h):n0(h,l)}const u=[];for(const f of t){const h=ow(f);"then"in h?u.push(h):j0(h,_n)}return(s.length>0||u.length>0)&&await Promise.all([Promise.all(s).then(f=>{n0(f,l)}),Promise.all(u).then(f=>{j0(f,l)})]),l}function uw(){if(_n!=null&&!("then"in _n))return _n}function cw(t=_n){return t!=null&&"then"in t}for(const t of B_.getThemes())bi.registerThemeIfAbsent(t.name,t.load);function q_(t=Jt){const n=[];return typeof t=="string"?n.push(t):(n.push(t.dark),n.push(t.light)),n}function vd(t){for(const n of q_(t))if(!nf.has(n))return!1;return!0}function V0(t,n){return t?.cacheKey===n?.cacheKey&&t?.contents===n?.contents&&t?.name===n?.name&&t?.lang===n?.lang}function F_(t,n){return t==null||n==null?t===n:t.startingLine===n.startingLine&&t.totalLines===n.totalLines&&t.bufferBefore===n.bufferBefore&&t.bufferAfter===n.bufferAfter}function dw(t){return ye({tagName:"div",children:[ye({tagName:"div",children:t.annotations?.map(n=>ye({tagName:"slot",properties:{name:n}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${t.hunkIndex},${t.lineIndex}`}})}function fw(t){switch(t){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 hw({fileOrDiff:t,mode:n,stickyHeader:a}){const l="type"in t?t:void 0,s={"data-diffs-header":n,"data-change-type":l?.type,"data-sticky":a?"":void 0};return ye({tagName:"div",children:[n==="custom"?ye({tagName:"slot",properties:{name:pf}}):pw({name:t.name,prevName:"prevName"in t?t.prevName:void 0,iconType:l?.type??"file"}),...n==="custom"?[]:[mw(l)]],properties:s})}function pw({name:t,prevName:n,iconType:a}){const l=[ye({tagName:"slot",properties:{name:gv}}),ls({name:fw(a),properties:{"data-change-icon":a}})];return n!=null&&(l.push(ye({tagName:"div",children:[ye({tagName:"bdi",children:[yn(n)]})],properties:{"data-prev-name":""}})),l.push(ls({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),l.push(ye({tagName:"div",children:[ye({tagName:"bdi",children:[yn(t)]})],properties:{"data-title":""}})),ye({tagName:"div",children:l,properties:{"data-header-content":""}})}function mw(t){const n=[];if(t!=null){let a=0,l=0;for(const s of t.hunks)a+=s.additionLines,l+=s.deletionLines;(l>0||a===0)&&n.push(ye({tagName:"span",children:[yn(`-${l}`)],properties:{"data-deletions-count":""}})),(a>0||l===0)&&n.push(ye({tagName:"span",children:[yn(`+${a}`)],properties:{"data-additions-count":""}}))}return n.push(ye({tagName:"slot",properties:{name:vv}})),ye({tagName:"div",children:n,properties:{"data-metadata":""}})}function gw(t){return ye({tagName:"pre",properties:vw(t)})}function vw({diffIndicators:t,disableBackground:n,disableLineNumbers:a,overflow:l,split:s,totalLines:u,type:f,customProperties:h}){return{...h,"data-diff":f==="diff"?"":void 0,"data-file":f==="file"?"":void 0,"data-diff-type":f==="diff"?s?"split":"single":void 0,"data-overflow":l,"data-disable-line-numbers":a?"":void 0,"data-background":n?void 0:"","data-indicators":t==="bars"||t==="classic"?t:void 0,style:`--diffs-min-number-column-width-default:${`${u}`.length}ch;`}}const za=new Map,Yr={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Fi(t){if(za.has(t))return za.get(t)??"text";if(Yr[t]!=null)return Yr[t];const n=t.match(/\.([^/\\]+\.[^/\\]+)$/);if(n!=null){if(za.has(n[1]))return za.get(n[1])??"text";if(Yr[n[1]]!=null)return Yr[n[1]]??"text"}const a=t.match(/\.([^.]+)$/)?.[1]??"";return za.has(a)?za.get(a)??"text":Yr[a]??"text"}function _w(t,{theme:n,preferredHighlighter:a="shiki-js"}){return{langs:[t??"text"],themes:q_(n),preferredHighlighter:a}}function qa(t){return`annotation-${"side"in t?`${t.side}-`:""}${t.lineNumber}`}function Fa(t){return t.replace(/\n$|\r\n$/,"")}function yw(t,n,a){const l=typeof a.lineInfo=="function"?a.lineInfo(n):a.lineInfo[n-1];if(l==null){const s=`processLine: line ${n}, contains no state.lineInfo`;throw console.error(s,{node:t,line:n,state:a}),new Error(s)}return t.tagName="div",t.properties["data-line"]=l.lineNumber,t.properties["data-alt-line"]=l.altLineNumber,t.properties["data-line-type"]=l.type,t.properties["data-line-index"]=l.lineIndex,t.children.length===0&&t.children.push(yn(`
|
|
162
|
-
`)),t}const $o=Symbol("no-token"),_d=Symbol("multiple-tokens");function Y_(t){const n=bw(t);if(n!=null)return n;let a=$o;const l=[];let s=[],u;const f=()=>{if(s.length===0||u==null){s=[],u=void 0;return}if(s.length===1){const c=s[0];if(c?.type==="element"){Sw(c,u);for(const m of c.children)as(m)}else as(c);l.push(c),s=[],u=void 0;return}for(const c of s)as(c);l.push(ye({tagName:"span",properties:{"data-char":u},children:s})),s=[],u=void 0},h=c=>{if(c!==$o){if(c===_d){a=_d;return}if(a===$o){a=c;return}a!==c&&(a=_d)}};for(const c of t.children){const m=c.type==="element"?Y_(c):$o;if(h(m),typeof m!="number"){f(),l.push(c);continue}u!=null&&u!==m&&f(),u??=m,s.push(c)}return f(),t.children=l,a}function bw(t){const n=t.properties["data-char"];if(typeof n=="number")return n}function as(t){if(t.type==="element"){t.properties["data-char"]=void 0;for(const n of t.children)as(n)}}function Sw(t,n){t.properties["data-char"]=n}function Ew(t={}){const{classPrefix:n="__shiki_",classSuffix:a="",classReplacer:l=h=>h}=t,s=new Map;function u(h){return Object.entries(h).map(([c,m])=>`${c}:${m}`).join(";")}function f(h){const c=typeof h=="string"?h:u(h);let m=n+Cw(c)+a;return m=l(m),s.has(m)||s.set(m,typeof h=="string"?h:{...h}),m}return{name:"@shikijs/transformers:style-to-class",pre(h){if(!h.properties.style)return;const c=f(h.properties.style);delete h.properties.style,this.addClassToHast(h,c)},tokens(h){for(const c of h)for(const m of c){if(!m.htmlStyle)continue;const v=f(m.htmlStyle);m.htmlStyle={},m.htmlAttrs||={},m.htmlAttrs.class?m.htmlAttrs.class+=` ${v}`:m.htmlAttrs.class=v}},getClassRegistry(){return s},getCSS(){let h="";for(const[c,m]of s.entries())h+=`.${c}{${typeof m=="string"?m:u(m)}}`;return h},clearRegistry(){s.clear()}}}function Cw(t,n=0){let a=3735928559^n,l=1103547991^n;for(let s=0,u;s<t.length;s++)u=t.charCodeAt(s),a=Math.imul(a^u,2654435761),l=Math.imul(l^u,1597334677);return a=Math.imul(a^a>>>16,2246822507),a^=Math.imul(l^l>>>13,3266489909),l=Math.imul(l^l>>>16,2246822507),l^=Math.imul(a^a>>>13,3266489909),(4294967296*(2097151&l)+(a>>>0)).toString(36).slice(0,6)}function xw(t=!1,n=!1){const a={lineInfo:[]},l=[{line(s){return delete s.properties.class,s},pre(s){const u=o1(s),f=[];if(u!=null){let h=1;for(const c of u.children)c.type==="element"&&(t&&Y_(c),f.push(yw(c,h,a)),h++);u.children=f}return s},...t?{tokens(s){for(const u of s){let f=0;for(const h of u){const c=h;c.__lineChar??=f,f+=h.content.length}}},preprocess(s,u){u.mergeWhitespaces="never"},span(s,u,f,h,c){if(c?.offset!=null&&c.content!=null){const m=c.__lineChar;return m!=null&&(s.properties["data-char"]=m),s}return s}}:null}];return n&&l.push(Aw,B0),{state:a,transformers:l,toClass:B0}}const B0=Ew({classPrefix:"hl-"}),Aw={name:"token-style-normalizer",tokens(t){for(const n of t)for(const a of n){if(a.htmlStyle!=null)continue;const l={};a.color!=null&&(l.color=a.color),a.bgColor!=null&&(l["background-color"]=a.bgColor),a.fontStyle!=null&&a.fontStyle!==0&&((a.fontStyle&1)!==0&&(l["font-style"]="italic"),(a.fontStyle&2)!==0&&(l["font-weight"]="bold"),(a.fontStyle&4)!==0&&(l["text-decoration"]="underline")),Object.keys(l).length>0&&(a.htmlStyle=l)}}};function sn(t){return`--${t==="token"?"diffs-token":"diffs"}-`}const Tw=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,ww=/^0(?:\.0+)?%?$/;function Lw(t){const n=t.indexOf("(");if(n<=0||!t.endsWith(")"))return;const a=t.slice(0,n).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(a))return;const l=t.slice(n+1,-1).trim();if(l.length===0)return;const s=l.lastIndexOf("/");if(s!==-1)return l.slice(s+1).trim();if(/^(?:rgba|hsla)$/i.test(a)){const u=l.split(",");if(u.length===4)return u[3]?.trim()}}function Rw(t){const n=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(t.trim());if(n==null)return null;const a=n[1];let l,s=1;return a.length===3?l=a.split("").map(u=>u+u).join(""):a.length===6?l=a:(l=a.slice(0,6),s=parseInt(a.slice(6,8),16)/255),[parseInt(l.slice(0,2),16),parseInt(l.slice(2,4),16),parseInt(l.slice(4,6),16),s]}function yd(t){if(t==null)return null;const n=Rw(t);if(n==null)return null;const a=n[0]/255,l=n[1]/255,s=n[2]/255,u=f=>f<=.03928?f/12.92:((f+.055)/1.055)**2.4;return .2126*u(a)+.7152*u(l)+.0722*u(s)}function G0(t){if(t==null)return!1;const n=t.trim().toLowerCase();if(n==="transparent"||Tw.test(n))return!0;const a=Lw(n);return a!=null&&ww.test(a)}function kw(t,n,a){if(n==null||a==null)return!1;const l=yd(t),s=yd(n),u=yd(a);return l==null||s==null||u==null?!1:Math.abs(l-u)<Math.abs(l-s)}const $0=new WeakMap;function bd(t){const n=$0.get(t);if(n!=null)return n;const a=t.colors??{},l={...a},s=a["editor.background"]??t.bg,u=a["editor.foreground"]??t.fg,f=a["sideBar.background"]??s,h=a["sideBar.foreground"]??u;mn(l,"editor.background",s),mn(l,"editor.foreground",u),mn(l,"sideBar.background",f),mn(l,"sideBar.foreground",h),mn(l,"input.background",a["input.background"]??f),mn(l,"sideBarSectionHeader.foreground",a["sideBarSectionHeader.foreground"]??h),mn(l,"list.activeSelectionForeground",a["list.activeSelectionForeground"]??h),mn(l,"gitDecoration.addedResourceForeground",Sd(a["gitDecoration.addedResourceForeground"],a["terminal.ansiGreen"],a["editorGutter.addedBackground"])),mn(l,"gitDecoration.modifiedResourceForeground",Sd(a["gitDecoration.modifiedResourceForeground"],a["terminal.ansiBlue"],a["editorGutter.modifiedBackground"])),mn(l,"gitDecoration.deletedResourceForeground",Sd(a["gitDecoration.deletedResourceForeground"],a["terminal.ansiRed"],a["editorGutter.deletedBackground"]));const c=(G0(a["list.focusOutline"])?void 0:a["list.focusOutline"])??(G0(a.focusBorder)?void 0:a.focusBorder);c!=null?l["list.focusOutline"]=c:delete l["list.focusOutline"];const m=a["list.hoverBackground"];m!=null&&(Dw(m,f)||kw(m,f,h))&&delete l["list.hoverBackground"];const v=Object.freeze({...t,colors:Object.freeze(l)});return $0.set(t,v),v}function mn(t,n,a){a!=null&&a!==""&&(t[n]=a)}function Sd(...t){for(const n of t)if(n!=null&&n!=="")return n}function Dw(t,n){return n!=null&&t.toLowerCase()===n.toLowerCase()}function Ow({theme:t=Jt,highlighter:n,prefix:a}){let l="";if(typeof t=="string"){const s=n.getTheme(t),u=bd(s);l+=`color:${u.fg};`,l+=`background-color:${u.bg};`,l+=`${sn("global")}fg:${u.fg};`,l+=`${sn("global")}bg:${u.bg};`,l+=Ed(s,a)}else{let s=n.getTheme(t.dark),u=bd(s);l+=`${sn("global")}dark:${u.fg};`,l+=`${sn("global")}dark-bg:${u.bg};`,l+=Ed(s,"dark"),s=n.getTheme(t.light),u=bd(s),l+=`${sn("global")}light:${u.fg};`,l+=`${sn("global")}light-bg:${u.bg};`,l+=Ed(s,"light")}return l}function Ed(t,n){n=n!=null?`${n}-`:"";let a="";const l=t.colors?.["gitDecoration.addedResourceForeground"]??t.colors?.["terminal.ansiGreen"];l!=null&&(a+=`${sn("global")}${n}addition-color:${l};`);const s=t.colors?.["gitDecoration.deletedResourceForeground"]??t.colors?.["terminal.ansiRed"];s!=null&&(a+=`${sn("global")}${n}deletion-color:${s};`);const u=t.colors?.["gitDecoration.modifiedResourceForeground"]??t.colors?.["terminal.ansiBlue"];return u!=null&&(a+=`${sn("global")}${n}modified-color:${u};`),a}function q0(t){let n=t.children[0];for(;n!=null;){if(n.type==="element"&&n.tagName==="code")return n.children;"children"in n?n=n.children[0]:n=null}throw console.error(t),new Error("getLineNodes: Unable to find children")}const Nw="-1,-1";function Mw(t){return t?.some(n=>n.lineNumber===0)??!1}function F0(t){const n=t[0];return n!=null&&n.length>0?n:void 0}function X_(t){return t.startingLine===0&&t.totalLines>0}function Iw(t,n){return ye({tagName:"div",children:t,properties:{"data-content":"",style:`grid-row: span ${n}`}})}function Hw(t){return t.useTokenTransformer===!0||t.onTokenClick!=null||t.onTokenEnter!=null||t.onTokenLeave!=null}const zw=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
163
|
-
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
164
|
-
<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"/>
|
|
165
|
-
</symbol>
|
|
166
|
-
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
167
|
-
<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"/>
|
|
168
|
-
</symbol>
|
|
169
|
-
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
170
|
-
<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"/>
|
|
171
|
-
</symbol>
|
|
172
|
-
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
173
|
-
<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"/>
|
|
174
|
-
</symbol>
|
|
175
|
-
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
176
|
-
<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"/>
|
|
177
|
-
</symbol>
|
|
178
|
-
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
179
|
-
<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"/>
|
|
180
|
-
</symbol>
|
|
181
|
-
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
182
|
-
<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"/>
|
|
183
|
-
</symbol>
|
|
184
|
-
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
185
|
-
<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"/>
|
|
186
|
-
</symbol>
|
|
187
|
-
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
188
|
-
<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"/>
|
|
189
|
-
</symbol>
|
|
190
|
-
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
191
|
-
<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"/>
|
|
192
|
-
</symbol>
|
|
193
|
-
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
194
|
-
<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"/>
|
|
195
|
-
</symbol>
|
|
196
|
-
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
197
|
-
<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"/>
|
|
198
|
-
</symbol>
|
|
199
|
-
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
200
|
-
<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"/>
|
|
201
|
-
</symbol>
|
|
202
|
-
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
203
|
-
<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"/>
|
|
204
|
-
</symbol>
|
|
205
|
-
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
206
|
-
<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"/>
|
|
207
|
-
</symbol>
|
|
208
|
-
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
209
|
-
<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"/>
|
|
210
|
-
</symbol>
|
|
211
|
-
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
212
|
-
<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"/>
|
|
213
|
-
</symbol>
|
|
214
|
-
</svg>`;function Uw(t,n){return t==null||n==null?t===n:jw(t.customProperties,n.customProperties)&&t.type===n.type&&t.diffIndicators===n.diffIndicators&&t.disableBackground===n.disableBackground&&t.disableLineNumbers===n.disableLineNumbers&&t.overflow===n.overflow&&t.split===n.split&&t.totalLines===n.totalLines}const Y0={};function jw(t=Y0,n=Y0){if(t===n)return!0;const a=Object.keys(t),l=Object.keys(n);if(a.length!==l.length)return!1;for(const s of a)if(t[s]!==n[s])return!1;return!0}function Pw(t){const n=document.createElement("div");return n.dataset.annotationSlot="",n.slot=t,n.style.whiteSpace="normal",n}function Vw(){const t=document.createElement("div");return t.slot="gutter-utility-slot",t.style.position="absolute",t.style.top="0",t.style.bottom="0",t.style.textAlign="center",t.style.whiteSpace="normal",t.style.touchAction="none",t}function Bw(){const t=document.createElement("style");return t.setAttribute(t1,""),t}var Gw=`@layer base {
|
|
215
|
-
:host {
|
|
216
|
-
--diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
|
|
217
|
-
"Courier New", monospace;
|
|
218
|
-
--diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
|
|
219
|
-
"Noto Sans", "Liberation Sans", Arial, sans-serif;
|
|
220
|
-
--diffs-mixer: light-dark(#000, #fff);
|
|
221
|
-
--diffs-gap-fallback: 8px;
|
|
222
|
-
--diffs-scrollbar-gutter-fallback: 6px;
|
|
223
|
-
--diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
|
|
224
|
-
--diffs-added-light: #0dbe4e;
|
|
225
|
-
--diffs-added-dark: #5ecc71;
|
|
226
|
-
--diffs-modified-light: #009fff;
|
|
227
|
-
--diffs-modified-dark: #69b1ff;
|
|
228
|
-
--diffs-deleted-light: #ff2e3f;
|
|
229
|
-
--diffs-deleted-dark: #ff6762;
|
|
230
|
-
color-scheme: light dark;
|
|
231
|
-
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
232
|
-
font-size: var(--diffs-font-size, 13px);
|
|
233
|
-
line-height: var(--diffs-line-height, 20px);
|
|
234
|
-
font-feature-settings: var(--diffs-font-features);
|
|
235
|
-
--diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
|
|
236
|
-
--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))));
|
|
237
|
-
--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))));
|
|
238
|
-
--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))));
|
|
239
|
-
--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))));
|
|
240
|
-
--diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
|
|
241
|
-
--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))));
|
|
242
|
-
--diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
|
|
243
|
-
--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)))));
|
|
244
|
-
--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)))));
|
|
245
|
-
--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)))));
|
|
246
|
-
--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))));
|
|
247
|
-
--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)));
|
|
248
|
-
--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))));
|
|
249
|
-
--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)));
|
|
250
|
-
--diffs-selection-base: var(--diffs-modified-base);
|
|
251
|
-
--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)));
|
|
252
|
-
background-color: var(--diffs-bg);
|
|
253
|
-
color: var(--diffs-fg);
|
|
254
|
-
display: block;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
pre, code, [data-error-wrapper] {
|
|
258
|
-
isolation: isolate;
|
|
259
|
-
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
260
|
-
outline: none;
|
|
261
|
-
margin: 0;
|
|
262
|
-
padding: 0;
|
|
263
|
-
display: block;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
pre, code {
|
|
267
|
-
background-color: var(--diffs-bg);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
code {
|
|
271
|
-
contain: content;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
*, :before, :after {
|
|
275
|
-
box-sizing: border-box;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
[data-icon-sprite] {
|
|
279
|
-
display: none;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
[data-diffs-header], [data-separator] {
|
|
283
|
-
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
[data-diffs-header][data-sticky] {
|
|
287
|
-
z-index: 1;
|
|
288
|
-
background-color: var(--diffs-bg);
|
|
289
|
-
position: sticky;
|
|
290
|
-
top: 0;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
[data-file-info] {
|
|
294
|
-
color: var(--fg);
|
|
295
|
-
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
296
|
-
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
297
|
-
padding: 10px;
|
|
298
|
-
font-weight: 700;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
[data-diff], [data-file] {
|
|
302
|
-
--diffs-grid-number-column-width: minmax(min-content, max-content);
|
|
303
|
-
--diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
|
|
304
|
-
|
|
305
|
-
&[data-dehydrated] {
|
|
306
|
-
--diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
&:hover [data-code]::-webkit-scrollbar-thumb {
|
|
310
|
-
background-color: var(--diffs-bg-context);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
@supports (-webkit-touch-callout: none) {
|
|
315
|
-
:host {
|
|
316
|
-
--diffs-scrollbar-gutter-fallback: 0px;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
[data-line] span {
|
|
321
|
-
color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
|
|
322
|
-
background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
|
|
323
|
-
font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
|
|
324
|
-
font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
|
|
325
|
-
text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
[data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions] {
|
|
329
|
-
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
330
|
-
--diffs-computed-diff-line-bg: var(--diffs-bg);
|
|
331
|
-
--diffs-computed-selected-line-bg: var(--diffs-bg);
|
|
332
|
-
color: var(--diffs-fg);
|
|
333
|
-
background-color: var(--diffs-line-bg, var(--diffs-bg));
|
|
334
|
-
|
|
335
|
-
@media (pointer: fine) {
|
|
336
|
-
&:where([data-hovered]) {
|
|
337
|
-
--diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
|
|
338
|
-
var(--diffs-computed-selected-line-bg) 97%,
|
|
339
|
-
var(--diffs-bg-hover-override, var(--diffs-mixer))), color-mix(in lab,
|
|
340
|
-
var(--diffs-computed-selected-line-bg) 91%,
|
|
341
|
-
var(--diffs-bg-hover-override, var(--diffs-mixer))));
|
|
342
|
-
--diffs-line-bg: var(--diffs-computed-hovered-line-bg, inherit);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
[data-line], [data-no-newline] {
|
|
348
|
-
&[data-decoration-bg] {
|
|
349
|
-
--mix-deco-light: 92%;
|
|
350
|
-
--mix-deco-dark: 85%;
|
|
351
|
-
|
|
352
|
-
&[data-decoration-bg-depth="2"] {
|
|
353
|
-
--mix-deco-light: 88%;
|
|
354
|
-
--mix-deco-dark: 80%;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
&[data-decoration-bg-depth="3"] {
|
|
358
|
-
--mix-deco-light: 85%;
|
|
359
|
-
--mix-deco-dark: 78%;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
@media (pointer: fine) {
|
|
363
|
-
&[data-hovered]:not([data-selected-line]) {
|
|
364
|
-
--mix-deco-light: 85%;
|
|
365
|
-
--mix-deco-dark: 85%;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
&[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="2"] {
|
|
369
|
-
--mix-deco-light: 83%;
|
|
370
|
-
--mix-deco-dark: 83%;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
&[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="3"] {
|
|
374
|
-
--mix-deco-light: 81%;
|
|
375
|
-
--mix-deco-dark: 81%;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
380
|
-
var(--diffs-bg) var(--mix-deco-light),
|
|
381
|
-
var(--diffs-decoration-bg)), color-mix(in lab,
|
|
382
|
-
var(--diffs-bg) var(--mix-deco-dark),
|
|
383
|
-
var(--diffs-decoration-bg)));
|
|
384
|
-
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
385
|
-
--diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
|
|
386
|
-
--diffs-line-bg: var(--diffs-computed-decoration-bg);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
[data-line-annotation], [data-gutter-buffer="annotation"] {
|
|
391
|
-
--diffs-annotation-bg: var(--diffs-bg-context);
|
|
392
|
-
--diffs-computed-decoration-bg: var(--diffs-annotation-bg);
|
|
393
|
-
--diffs-computed-diff-line-bg: var(--diffs-annotation-bg);
|
|
394
|
-
--diffs-computed-selected-line-bg: var(--diffs-annotation-bg);
|
|
395
|
-
--diffs-line-bg: var(--diffs-annotation-bg);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
[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"] {
|
|
399
|
-
--diffs-computed-decoration-bg: var(--diffs-bg-context);
|
|
400
|
-
--diffs-computed-diff-line-bg: var(--diffs-bg-context);
|
|
401
|
-
--diffs-computed-selected-line-bg: var(--diffs-bg-context);
|
|
402
|
-
--diffs-line-bg: var(--diffs-bg-context);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
[data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
|
|
406
|
-
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
407
|
-
var(--diffs-bg) 78%,
|
|
408
|
-
var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
|
|
409
|
-
var(--diffs-bg) 68%,
|
|
410
|
-
var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
|
|
411
|
-
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
412
|
-
--diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
|
|
413
|
-
--diffs-line-bg: var(--diffs-computed-decoration-bg);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
[data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
|
|
417
|
-
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
418
|
-
var(--diffs-bg) 78%,
|
|
419
|
-
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
|
|
420
|
-
var(--diffs-bg) 68%,
|
|
421
|
-
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
|
|
422
|
-
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
423
|
-
--diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
|
|
424
|
-
--diffs-line-bg: var(--diffs-computed-decoration-bg);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
[data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
|
|
428
|
-
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
429
|
-
--diffs-computed-diff-line-bg: var(--diffs-bg);
|
|
430
|
-
--diffs-computed-selected-line-bg: var(--diffs-bg);
|
|
431
|
-
--diffs-line-bg: var(--diffs-bg);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
:where([data-background]) {
|
|
435
|
-
& [data-gutter-buffer], & [data-column-number] {
|
|
436
|
-
--mix-light: 91%;
|
|
437
|
-
--mix-dark: 85%;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
& [data-line], & [data-no-newline] {
|
|
441
|
-
--mix-light: 88%;
|
|
442
|
-
--mix-dark: 80%;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
& [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
|
|
446
|
-
--diffs-diff-line-mix-target: var(--diffs-bg);
|
|
447
|
-
|
|
448
|
-
&[data-line-type="change-deletion"] {
|
|
449
|
-
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
|
|
450
|
-
|
|
451
|
-
@media (pointer: fine) {
|
|
452
|
-
&[data-hovered] {
|
|
453
|
-
--mix-light: 80%;
|
|
454
|
-
--mix-dark: 75%;
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
&:where([data-gutter-buffer], [data-column-number]) {
|
|
459
|
-
color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
|
|
460
|
-
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
464
|
-
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
465
|
-
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
466
|
-
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
467
|
-
var(--diffs-diff-line-mix-target)));
|
|
468
|
-
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
469
|
-
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
&[data-line-type="change-addition"] {
|
|
473
|
-
--diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
|
|
474
|
-
|
|
475
|
-
@media (pointer: fine) {
|
|
476
|
-
&[data-hovered] {
|
|
477
|
-
--mix-light: 80%;
|
|
478
|
-
--mix-dark: 70%;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
&:where([data-gutter-buffer], [data-column-number]) {
|
|
483
|
-
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
484
|
-
--diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
488
|
-
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
489
|
-
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
490
|
-
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
491
|
-
var(--diffs-diff-line-mix-target)));
|
|
492
|
-
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
493
|
-
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
&[data-merge-conflict="current"] {
|
|
497
|
-
--diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
|
|
498
|
-
|
|
499
|
-
&:where([data-gutter-buffer], [data-column-number]) {
|
|
500
|
-
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
501
|
-
--diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
@media (pointer: fine) {
|
|
505
|
-
&[data-hovered] {
|
|
506
|
-
--mix-light: 80%;
|
|
507
|
-
--mix-dark: 70%;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
512
|
-
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
513
|
-
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
514
|
-
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
515
|
-
var(--diffs-diff-line-mix-target)));
|
|
516
|
-
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
517
|
-
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
&[data-merge-conflict="incoming"] {
|
|
521
|
-
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
|
|
522
|
-
|
|
523
|
-
&:where([data-gutter-buffer], [data-column-number]) {
|
|
524
|
-
color: var(--diffs-modified-base);
|
|
525
|
-
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
@media (pointer: fine) {
|
|
529
|
-
&[data-hovered] {
|
|
530
|
-
--mix-light: 80%;
|
|
531
|
-
--mix-dark: 70%;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
536
|
-
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
537
|
-
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
538
|
-
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
539
|
-
var(--diffs-diff-line-mix-target)));
|
|
540
|
-
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
541
|
-
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
[data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline] {
|
|
547
|
-
--diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
|
|
548
|
-
|
|
549
|
-
&:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
|
|
550
|
-
--mix-selection-light: 82%;
|
|
551
|
-
--mix-selection-dark: 75%;
|
|
552
|
-
|
|
553
|
-
@media (pointer: fine) {
|
|
554
|
-
&[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
|
|
555
|
-
--mix-selection-light: 75%;
|
|
556
|
-
--mix-selection-dark: 70%;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
&:where([data-gutter-buffer], [data-column-number])[data-selected-line] {
|
|
562
|
-
--mix-selection-light: 75%;
|
|
563
|
-
--mix-selection-dark: 60%;
|
|
564
|
-
--diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
|
|
565
|
-
|
|
566
|
-
@media (pointer: fine) {
|
|
567
|
-
&[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
|
|
568
|
-
--mix-selection-light: 70%;
|
|
569
|
-
--mix-selection-dark: 55%;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
&[data-selected-line] {
|
|
575
|
-
--diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
|
|
576
|
-
var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
|
|
577
|
-
var(--diffs-selection-mix-target)), color-mix(in lab,
|
|
578
|
-
var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
|
|
579
|
-
var(--diffs-selection-mix-target)));
|
|
580
|
-
--diffs-line-bg: var(--diffs-computed-selected-line-bg, inherit);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
[data-gutter-buffer], [data-column-number] {
|
|
585
|
-
&[data-selected-line] {
|
|
586
|
-
color: var(--diffs-selection-number-fg);
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
[data-no-newline] {
|
|
591
|
-
user-select: none;
|
|
592
|
-
|
|
593
|
-
& span {
|
|
594
|
-
opacity: .6;
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
[data-diff-type="split"][data-overflow="scroll"] {
|
|
599
|
-
grid-template-columns: 1fr 1fr;
|
|
600
|
-
display: grid;
|
|
601
|
-
|
|
602
|
-
& [data-additions] {
|
|
603
|
-
border-left: 1px solid var(--diffs-bg);
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
& [data-deletions] {
|
|
607
|
-
border-right: 1px solid var(--diffs-bg);
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
[data-code] {
|
|
612
|
-
grid-auto-flow: dense;
|
|
613
|
-
grid-template-columns: var(--diffs-code-grid);
|
|
614
|
-
overflow: var(--diffs-overflow-override, scroll) clip;
|
|
615
|
-
overscroll-behavior-x: none;
|
|
616
|
-
tab-size: var(--diffs-tab-size, 2);
|
|
617
|
-
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
618
|
-
padding-bottom: max(0px,
|
|
619
|
-
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
|
|
620
|
-
var(--diffs-scrollbar-gutter)));
|
|
621
|
-
scrollbar-gutter: stable;
|
|
622
|
-
align-self: flex-start;
|
|
623
|
-
display: grid;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
[data-diffs-scrollbar-measure] {
|
|
627
|
-
opacity: 0;
|
|
628
|
-
pointer-events: none;
|
|
629
|
-
scrollbar-gutter: auto;
|
|
630
|
-
grid-template-columns: none;
|
|
631
|
-
width: 100px;
|
|
632
|
-
height: 100px;
|
|
633
|
-
padding: 0;
|
|
634
|
-
position: absolute;
|
|
635
|
-
top: -200px;
|
|
636
|
-
left: -200px;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
[data-container-size] {
|
|
640
|
-
container-type: inline-size;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
[data-code]::-webkit-scrollbar {
|
|
644
|
-
width: 0;
|
|
645
|
-
height: var(--diffs-scrollbar-gutter);
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
[data-code]::-webkit-scrollbar-track {
|
|
649
|
-
background: none;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
[data-code]::-webkit-scrollbar-thumb {
|
|
653
|
-
background-color: #0000;
|
|
654
|
-
background-clip: content-box;
|
|
655
|
-
border: 1px solid #0000;
|
|
656
|
-
border-radius: 3px;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
[data-code]::-webkit-scrollbar-corner {
|
|
660
|
-
background-color: #0000;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
@supports ((-moz-appearance: none)) {
|
|
664
|
-
[data-code] {
|
|
665
|
-
scrollbar-width: thin;
|
|
666
|
-
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
667
|
-
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
[data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
|
|
672
|
-
& [data-code], &[data-overflow="wrap"] {
|
|
673
|
-
padding-top: 0;
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
[data-gutter] {
|
|
678
|
-
grid-template-rows: subgrid;
|
|
679
|
-
grid-template-columns: subgrid;
|
|
680
|
-
z-index: 3;
|
|
681
|
-
background-color: var(--diffs-bg);
|
|
682
|
-
grid-column: 1;
|
|
683
|
-
display: grid;
|
|
684
|
-
position: relative;
|
|
685
|
-
|
|
686
|
-
& [data-gutter-buffer], & [data-column-number] {
|
|
687
|
-
border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
[data-content] {
|
|
692
|
-
grid-template-rows: subgrid;
|
|
693
|
-
grid-template-columns: subgrid;
|
|
694
|
-
background-color: var(--diffs-bg);
|
|
695
|
-
grid-column: 2;
|
|
696
|
-
min-width: 0;
|
|
697
|
-
display: grid;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
[data-diff-type="split"][data-overflow="wrap"] {
|
|
701
|
-
grid-auto-flow: dense;
|
|
702
|
-
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
703
|
-
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
704
|
-
display: grid;
|
|
705
|
-
|
|
706
|
-
& [data-deletions] {
|
|
707
|
-
display: contents;
|
|
708
|
-
|
|
709
|
-
& [data-gutter] {
|
|
710
|
-
grid-column: 1;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
& [data-content] {
|
|
714
|
-
border-right: 1px solid var(--diffs-bg);
|
|
715
|
-
grid-column: 2;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
& [data-additions] {
|
|
720
|
-
display: contents;
|
|
721
|
-
|
|
722
|
-
& [data-gutter] {
|
|
723
|
-
border-left: 1px solid var(--diffs-bg);
|
|
724
|
-
grid-column: 3;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
& [data-content] {
|
|
728
|
-
grid-column: 4;
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
[data-overflow="scroll"] [data-gutter] {
|
|
734
|
-
position: sticky;
|
|
735
|
-
left: 0;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
[data-interactive-lines] [data-line] {
|
|
739
|
-
cursor: pointer;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
[data-interactive-line-numbers] [data-column-number] {
|
|
743
|
-
cursor: pointer;
|
|
744
|
-
touch-action: none;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
[data-content-buffer], [data-gutter-buffer] {
|
|
748
|
-
user-select: none;
|
|
749
|
-
min-height: 1lh;
|
|
750
|
-
position: relative;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
[data-gutter-buffer] {
|
|
754
|
-
padding-left: 2ch;
|
|
755
|
-
padding-right: 1ch;
|
|
756
|
-
|
|
757
|
-
&:before {
|
|
758
|
-
content: "";
|
|
759
|
-
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
760
|
-
display: block;
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
[data-gutter-buffer="annotation"] {
|
|
765
|
-
--diffs-annotation-bg: var(--diffs-bg-context-gutter);
|
|
766
|
-
min-height: 0;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
[data-gutter-buffer="buffer"] {
|
|
770
|
-
--diffs-line-bg: var(--diffs-bg-context-gutter);
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
[data-content-buffer] {
|
|
774
|
-
background-position: 5px 0;
|
|
775
|
-
background-size: 8px 8px;
|
|
776
|
-
background-origin: border-box;
|
|
777
|
-
background-image: repeating-linear-gradient(-45deg,
|
|
778
|
-
transparent,
|
|
779
|
-
transparent calc(3px * 1.414),
|
|
780
|
-
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
781
|
-
var(--diffs-bg-buffer) calc(4px * 1.414));
|
|
782
|
-
grid-column: 1;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
[data-separator] {
|
|
786
|
-
box-sizing: content-box;
|
|
787
|
-
background-color: var(--diffs-bg);
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
[data-separator="simple"] {
|
|
791
|
-
min-height: 4px;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
|
|
795
|
-
background-color: var(--diffs-bg-separator);
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
799
|
-
height: 32px;
|
|
800
|
-
position: relative;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
[data-separator-wrapper] {
|
|
804
|
-
user-select: none;
|
|
805
|
-
fill: currentColor;
|
|
806
|
-
background-color: var(--diffs-bg);
|
|
807
|
-
align-items: center;
|
|
808
|
-
height: 100%;
|
|
809
|
-
display: flex;
|
|
810
|
-
position: absolute;
|
|
811
|
-
inset-inline: 0;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
[data-content] [data-separator-wrapper] {
|
|
815
|
-
display: none;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
[data-separator="metadata"] [data-separator-wrapper] {
|
|
819
|
-
background-color: var(--diffs-bg-separator);
|
|
820
|
-
height: 100%;
|
|
821
|
-
color: var(--diffs-fg-number);
|
|
822
|
-
white-space: nowrap;
|
|
823
|
-
text-overflow: ellipsis;
|
|
824
|
-
min-width: min-content;
|
|
825
|
-
padding-inline: 1ch;
|
|
826
|
-
inset-inline: 100% auto;
|
|
827
|
-
overflow: hidden;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
[data-separator="line-info"] {
|
|
831
|
-
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
832
|
-
|
|
833
|
-
& [data-separator-wrapper] {
|
|
834
|
-
min-width: 16px;
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
[data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
839
|
-
margin-block: 0;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
[data-separator="line-info"][data-separator-first] {
|
|
843
|
-
margin-top: 0;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
[data-separator="line-info"][data-separator-last] {
|
|
847
|
-
margin-bottom: 0;
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
[data-expand-index] [data-separator-wrapper] {
|
|
851
|
-
grid-template-columns: 32px auto;
|
|
852
|
-
display: grid;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
[data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
|
|
856
|
-
grid-template-columns: 32px 32px auto;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
[data-expand-button], [data-separator-content] {
|
|
860
|
-
background-color: var(--diffs-bg-separator);
|
|
861
|
-
flex: none;
|
|
862
|
-
align-items: center;
|
|
863
|
-
display: flex;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
[data-expand-index] [data-separator-content]:hover {
|
|
867
|
-
cursor: pointer;
|
|
868
|
-
text-decoration: underline;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
[data-expand-button] {
|
|
872
|
-
cursor: pointer;
|
|
873
|
-
min-width: 32px;
|
|
874
|
-
color: var(--diffs-fg-number);
|
|
875
|
-
border-right: 2px solid var(--diffs-bg);
|
|
876
|
-
flex-shrink: 0;
|
|
877
|
-
justify-content: center;
|
|
878
|
-
align-self: stretch;
|
|
879
|
-
|
|
880
|
-
&:hover {
|
|
881
|
-
color: var(--diffs-fg);
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
&[data-expand-all-button] {
|
|
885
|
-
display: none;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
[data-expand-down] [data-icon] {
|
|
890
|
-
transform: scaleY(-1);
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
[data-separator-content] {
|
|
894
|
-
height: 100%;
|
|
895
|
-
color: var(--diffs-fg-number);
|
|
896
|
-
flex: auto;
|
|
897
|
-
justify-content: flex-start;
|
|
898
|
-
padding: 0 1ch;
|
|
899
|
-
overflow: hidden;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
903
|
-
& [data-separator-content] {
|
|
904
|
-
user-select: none;
|
|
905
|
-
height: 100%;
|
|
906
|
-
overflow: clip;
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
[data-unmodified-lines] {
|
|
911
|
-
text-overflow: ellipsis;
|
|
912
|
-
white-space: nowrap;
|
|
913
|
-
flex: 0 auto;
|
|
914
|
-
min-width: 0;
|
|
915
|
-
display: block;
|
|
916
|
-
overflow: hidden;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
@supports (width: 1cqi) {
|
|
920
|
-
[data-unified] {
|
|
921
|
-
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
922
|
-
padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
923
|
-
width: 100cqi;
|
|
924
|
-
|
|
925
|
-
& [data-separator-content] {
|
|
926
|
-
border-radius: 6px;
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
& [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
|
|
931
|
-
border-top-left-radius: unset;
|
|
932
|
-
border-bottom-left-radius: unset;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
[data-gutter] {
|
|
937
|
-
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
938
|
-
padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
& [data-separator="line-info"] [data-separator-content] {
|
|
942
|
-
border-top-left-radius: 6px;
|
|
943
|
-
border-bottom-left-radius: 6px;
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
& [data-separator="line-info"][data-expand-index] [data-separator-content] {
|
|
947
|
-
border-top-left-radius: unset;
|
|
948
|
-
border-bottom-left-radius: unset;
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
[data-additions] {
|
|
953
|
-
& [data-content] [data-separator="line-info"] {
|
|
954
|
-
background-color: var(--diffs-bg);
|
|
955
|
-
|
|
956
|
-
& [data-separator-wrapper] {
|
|
957
|
-
display: none;
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
& [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
962
|
-
background-color: var(--diffs-bg-separator);
|
|
963
|
-
border-top-right-radius: 6px;
|
|
964
|
-
border-bottom-right-radius: 6px;
|
|
965
|
-
height: 100%;
|
|
966
|
-
display: block;
|
|
967
|
-
|
|
968
|
-
& [data-separator-content], & [data-expand-button] {
|
|
969
|
-
display: none;
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
[data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
975
|
-
width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
[data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
|
|
979
|
-
background-color: var(--diffs-bg-separator);
|
|
980
|
-
height: 100%;
|
|
981
|
-
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
982
|
-
border-top-right-radius: 6px;
|
|
983
|
-
border-bottom-right-radius: 6px;
|
|
984
|
-
display: block;
|
|
985
|
-
|
|
986
|
-
& [data-separator-content], & [data-expand-button] {
|
|
987
|
-
display: none;
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
[data-separator="line-info"] [data-separator-wrapper] {
|
|
992
|
-
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
993
|
-
border-top-left-radius: 6px;
|
|
994
|
-
border-bottom-left-radius: 6px;
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
@media (pointer: fine) {
|
|
999
|
-
[data-separator="line-info"] [data-separator-wrapper] {
|
|
1000
|
-
&[data-separator-multi-button] {
|
|
1001
|
-
& [data-expand-up] {
|
|
1002
|
-
border-top-left-radius: 6px;
|
|
1003
|
-
border-bottom-left-radius: unset;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
& [data-expand-down] {
|
|
1007
|
-
border-bottom-left-radius: 6px;
|
|
1008
|
-
border-top-left-radius: unset;
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
@media (pointer: coarse) {
|
|
1016
|
-
[data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
|
|
1017
|
-
grid-template-columns: 34px 34px auto;
|
|
1018
|
-
|
|
1019
|
-
& [data-separator-content] {
|
|
1020
|
-
grid-column: unset;
|
|
1021
|
-
grid-row: unset;
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
@supports (width: 1cqi) {
|
|
1026
|
-
[data-separator="line-info"] [data-separator-wrapper] {
|
|
1027
|
-
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
1028
|
-
border-top-left-radius: 6px;
|
|
1029
|
-
border-bottom-left-radius: 6px;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
&[data-separator-multi-button] {
|
|
1033
|
-
& [data-expand-up] {
|
|
1034
|
-
border-top-left-radius: 6px;
|
|
1035
|
-
border-bottom-left-radius: 6px;
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
& [data-expand-down] {
|
|
1039
|
-
border-bottom-left-radius: unset;
|
|
1040
|
-
border-top-left-radius: unset;
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
@media (pointer: fine) {
|
|
1048
|
-
[data-separator-wrapper][data-separator-multi-button] {
|
|
1049
|
-
grid-template-rows: 50% 50%;
|
|
1050
|
-
display: grid;
|
|
1051
|
-
|
|
1052
|
-
& [data-separator-content] {
|
|
1053
|
-
grid-area: 1 / 2 / -1;
|
|
1054
|
-
min-width: min-content;
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
& [data-expand-button] {
|
|
1058
|
-
grid-column: 1;
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
[data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
|
|
1063
|
-
grid-template-columns: 34px auto;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
[data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
|
|
1067
|
-
grid-template-columns: 100% auto;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
1071
|
-
& [data-separator-multi-button] {
|
|
1072
|
-
& [data-expand-up] {
|
|
1073
|
-
border-bottom: 1px solid var(--diffs-bg);
|
|
1074
|
-
border-right: 2px solid var(--diffs-bg);
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
& [data-expand-down] {
|
|
1078
|
-
border-top: 1px solid var(--diffs-bg);
|
|
1079
|
-
border-right: 2px solid var(--diffs-bg);
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
[data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
|
|
1086
|
-
display: none;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
[data-line-annotation] {
|
|
1090
|
-
min-height: var(--diffs-annotation-min-height, 0);
|
|
1091
|
-
z-index: 2;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
[data-merge-conflict-actions] {
|
|
1095
|
-
z-index: 2;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
[data-separator="custom"] {
|
|
1099
|
-
grid-template-columns: subgrid;
|
|
1100
|
-
display: grid;
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
[data-line], [data-column-number], [data-no-newline] {
|
|
1104
|
-
padding-inline: 1ch;
|
|
1105
|
-
position: relative;
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
[data-indicators="classic"] [data-line] {
|
|
1109
|
-
padding-inline-start: 2ch;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
[data-indicators="classic"] {
|
|
1113
|
-
& [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
|
|
1114
|
-
&[data-no-newline], &[data-line] {
|
|
1115
|
-
&:before {
|
|
1116
|
-
user-select: none;
|
|
1117
|
-
width: 1ch;
|
|
1118
|
-
height: 1lh;
|
|
1119
|
-
display: inline-block;
|
|
1120
|
-
position: absolute;
|
|
1121
|
-
top: 0;
|
|
1122
|
-
left: 0;
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
& [data-line-type="change-addition"] {
|
|
1128
|
-
&[data-line], &[data-no-newline] {
|
|
1129
|
-
&:before {
|
|
1130
|
-
content: "+";
|
|
1131
|
-
color: var(--diffs-addition-base);
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
& [data-line-type="change-deletion"] {
|
|
1137
|
-
&[data-line], &[data-no-newline] {
|
|
1138
|
-
&:before {
|
|
1139
|
-
content: "-";
|
|
1140
|
-
color: var(--diffs-deletion-base);
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
[data-indicators="bars"] {
|
|
1147
|
-
& [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
|
|
1148
|
-
&[data-column-number] {
|
|
1149
|
-
&:before {
|
|
1150
|
-
content: "";
|
|
1151
|
-
user-select: none;
|
|
1152
|
-
contain: strict;
|
|
1153
|
-
width: 4px;
|
|
1154
|
-
height: 100%;
|
|
1155
|
-
display: block;
|
|
1156
|
-
position: absolute;
|
|
1157
|
-
top: 0;
|
|
1158
|
-
left: 0;
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
& [data-line-type="change-deletion"] {
|
|
1164
|
-
&[data-column-number] {
|
|
1165
|
-
&:before {
|
|
1166
|
-
background-image: linear-gradient(0deg,
|
|
1167
|
-
var(--diffs-bg-deletion) 50%,
|
|
1168
|
-
var(--diffs-deletion-base) 50%);
|
|
1169
|
-
background-repeat: repeat;
|
|
1170
|
-
background-size: 2px 2px;
|
|
1171
|
-
background-size: calc(1lh / round(1lh / 2px))
|
|
1172
|
-
calc(1lh / round(1lh / 2px));
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
& [data-line-type="change-addition"] {
|
|
1178
|
-
&[data-column-number] {
|
|
1179
|
-
&:before {
|
|
1180
|
-
background-color: var(--diffs-addition-base);
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
[data-overflow="wrap"] {
|
|
1187
|
-
& [data-line], & [data-annotation-content] {
|
|
1188
|
-
white-space: pre-wrap;
|
|
1189
|
-
word-break: break-word;
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
[data-overflow="scroll"] [data-line] {
|
|
1194
|
-
white-space: pre;
|
|
1195
|
-
min-height: 1lh;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
[data-column-number] {
|
|
1199
|
-
box-sizing: content-box;
|
|
1200
|
-
text-align: right;
|
|
1201
|
-
user-select: none;
|
|
1202
|
-
color: var(--diffs-fg-number);
|
|
1203
|
-
padding-left: 2ch;
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
[data-line-number-content] {
|
|
1207
|
-
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
1208
|
-
z-index: 1;
|
|
1209
|
-
display: inline-block;
|
|
1210
|
-
position: relative;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
[data-disable-line-numbers] {
|
|
1214
|
-
& [data-gutter-buffer], & [data-column-number] {
|
|
1215
|
-
min-width: 4px;
|
|
1216
|
-
padding: 0;
|
|
1217
|
-
|
|
1218
|
-
&:before {
|
|
1219
|
-
min-width: 0;
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
& [data-line-number-content] {
|
|
1224
|
-
display: none;
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
& [data-gutter-utility-slot] {
|
|
1228
|
-
right: unset;
|
|
1229
|
-
justify-content: flex-start;
|
|
1230
|
-
left: 0;
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
&[data-indicators="bars"] [data-gutter-utility-slot] {
|
|
1234
|
-
left: 6px;
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
[data-file][data-disable-line-numbers] {
|
|
1239
|
-
& [data-gutter-buffer], & [data-column-number] {
|
|
1240
|
-
border-right: 0;
|
|
1241
|
-
min-width: 0;
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
[data-diff-span] {
|
|
1246
|
-
box-decoration-break: clone;
|
|
1247
|
-
border-radius: 3px;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
[data-line-type="change-addition"] [data-diff-span] {
|
|
1251
|
-
background-color: var(--diffs-bg-addition-emphasis);
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
[data-line-type="change-deletion"] [data-diff-span] {
|
|
1255
|
-
background-color: var(--diffs-bg-deletion-emphasis);
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
|
|
1259
|
-
color: var(--diffs-fg);
|
|
1260
|
-
padding-left: 1ch;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
|
|
1264
|
-
align-items: center;
|
|
1265
|
-
display: flex;
|
|
1266
|
-
|
|
1267
|
-
&:after {
|
|
1268
|
-
color: var(--diffs-fg-conflict-marker);
|
|
1269
|
-
font-size: .75rem;
|
|
1270
|
-
font-style: normal;
|
|
1271
|
-
line-height: 1.25rem;
|
|
1272
|
-
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1273
|
-
padding-left: 1ch;
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
[data-merge-conflict="marker-start"]:after {
|
|
1278
|
-
content: "(Current Change)";
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
[data-merge-conflict="marker-end"]:after {
|
|
1282
|
-
content: "(Incoming Change)";
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
[data-merge-conflict-actions-content] {
|
|
1286
|
-
min-height: 1.75rem;
|
|
1287
|
-
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1288
|
-
color: var(--diffs-fg);
|
|
1289
|
-
align-items: center;
|
|
1290
|
-
gap: .25rem;
|
|
1291
|
-
padding-inline: .5rem;
|
|
1292
|
-
font-size: .75rem;
|
|
1293
|
-
line-height: 1.2;
|
|
1294
|
-
display: flex;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
[data-merge-conflict-action] {
|
|
1298
|
-
appearance: none;
|
|
1299
|
-
color: var(--diffs-fg-number);
|
|
1300
|
-
font: inherit;
|
|
1301
|
-
cursor: pointer;
|
|
1302
|
-
background: none;
|
|
1303
|
-
border: 0;
|
|
1304
|
-
padding: 0;
|
|
1305
|
-
font-style: normal;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
[data-merge-conflict-action]:hover {
|
|
1309
|
-
color: var(--diffs-fg);
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
[data-merge-conflict-action="current"]:hover {
|
|
1313
|
-
color: var(--diffs-addition-base);
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
[data-merge-conflict-action="incoming"]:hover {
|
|
1317
|
-
color: var(--diffs-modified-base);
|
|
1318
|
-
}
|
|
1319
|
-
|
|
1320
|
-
[data-merge-conflict-action-separator] {
|
|
1321
|
-
color: var(--diffs-fg-number);
|
|
1322
|
-
opacity: .6;
|
|
1323
|
-
user-select: none;
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
[data-diffs-header="default"] {
|
|
1327
|
-
background-color: var(--diffs-bg);
|
|
1328
|
-
justify-content: space-between;
|
|
1329
|
-
align-items: center;
|
|
1330
|
-
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1331
|
-
min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
|
|
1332
|
-
z-index: 2;
|
|
1333
|
-
flex-direction: row;
|
|
1334
|
-
padding-inline: 16px;
|
|
1335
|
-
display: flex;
|
|
1336
|
-
position: relative;
|
|
1337
|
-
top: 0;
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
[data-header-content] {
|
|
1341
|
-
align-items: center;
|
|
1342
|
-
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1343
|
-
white-space: nowrap;
|
|
1344
|
-
flex-direction: row;
|
|
1345
|
-
min-width: 0;
|
|
1346
|
-
display: flex;
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
[data-header-content] [data-prev-name], [data-header-content] [data-title] {
|
|
1350
|
-
text-overflow: ellipsis;
|
|
1351
|
-
white-space: nowrap;
|
|
1352
|
-
direction: rtl;
|
|
1353
|
-
min-width: 0;
|
|
1354
|
-
overflow: hidden;
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
[data-prev-name] {
|
|
1358
|
-
opacity: .7;
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
[data-rename-icon] {
|
|
1362
|
-
fill: currentColor;
|
|
1363
|
-
flex-grow: 0;
|
|
1364
|
-
flex-shrink: 0;
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
[data-diffs-header="default"] [data-metadata] {
|
|
1368
|
-
white-space: nowrap;
|
|
1369
|
-
align-items: center;
|
|
1370
|
-
gap: 1ch;
|
|
1371
|
-
display: flex;
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
[data-diffs-header="default"] [data-additions-count] {
|
|
1375
|
-
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1376
|
-
color: var(--diffs-addition-base);
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
[data-diffs-header="default"] [data-deletions-count] {
|
|
1380
|
-
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1381
|
-
color: var(--diffs-deletion-base);
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
[data-change-icon] {
|
|
1385
|
-
fill: currentColor;
|
|
1386
|
-
flex-shrink: 0;
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
[data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
|
|
1390
|
-
color: var(--diffs-modified-base);
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
[data-change-icon="new"] {
|
|
1394
|
-
color: var(--diffs-addition-base);
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
[data-change-icon="deleted"] {
|
|
1398
|
-
color: var(--diffs-deletion-base);
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
[data-change-icon="file"] {
|
|
1402
|
-
opacity: .6;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
[data-annotation-content] {
|
|
1406
|
-
z-index: 2;
|
|
1407
|
-
isolation: isolate;
|
|
1408
|
-
align-self: flex-start;
|
|
1409
|
-
min-width: 0;
|
|
1410
|
-
display: flow-root;
|
|
1411
|
-
position: relative;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
[data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
|
|
1415
|
-
width: var(--diffs-column-content-width, auto);
|
|
1416
|
-
left: var(--diffs-column-number-width, 0);
|
|
1417
|
-
position: sticky;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
[data-annotation-slot] {
|
|
1421
|
-
text-wrap-mode: wrap;
|
|
1422
|
-
word-break: normal;
|
|
1423
|
-
white-space-collapse: collapse;
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
[data-gutter-utility-slot] {
|
|
1427
|
-
touch-action: none;
|
|
1428
|
-
justify-content: flex-end;
|
|
1429
|
-
display: flex;
|
|
1430
|
-
position: absolute;
|
|
1431
|
-
top: 0;
|
|
1432
|
-
bottom: 0;
|
|
1433
|
-
right: 0;
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
[data-utility-button] {
|
|
1437
|
-
appearance: none;
|
|
1438
|
-
cursor: pointer;
|
|
1439
|
-
width: 1lh;
|
|
1440
|
-
height: 1lh;
|
|
1441
|
-
font-size: var(--diffs-font-size, 13px);
|
|
1442
|
-
line-height: var(--diffs-line-height, 20px);
|
|
1443
|
-
background-color: var(--diffs-modified-base);
|
|
1444
|
-
color: var(--diffs-bg);
|
|
1445
|
-
fill: currentColor;
|
|
1446
|
-
z-index: 4;
|
|
1447
|
-
touch-action: none;
|
|
1448
|
-
border: none;
|
|
1449
|
-
border-radius: 4px;
|
|
1450
|
-
justify-content: center;
|
|
1451
|
-
align-items: center;
|
|
1452
|
-
margin-right: calc(-1lh + 1ch);
|
|
1453
|
-
padding: 0;
|
|
1454
|
-
display: flex;
|
|
1455
|
-
position: relative;
|
|
1456
|
-
|
|
1457
|
-
&:before {
|
|
1458
|
-
content: "";
|
|
1459
|
-
display: block;
|
|
1460
|
-
position: absolute;
|
|
1461
|
-
inset: 0 0 0 -4px;
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
[data-decoration-bar-stack] {
|
|
1466
|
-
pointer-events: none;
|
|
1467
|
-
isolation: isolate;
|
|
1468
|
-
z-index: 1;
|
|
1469
|
-
background-color: var(--diffs-decoration-bar-color, transparent);
|
|
1470
|
-
box-sizing: content-box;
|
|
1471
|
-
border-left: 2px solid var(--diffs-bg);
|
|
1472
|
-
border-right: 2px solid var(--diffs-bg);
|
|
1473
|
-
width: 6px;
|
|
1474
|
-
position: absolute;
|
|
1475
|
-
top: 0;
|
|
1476
|
-
bottom: 0;
|
|
1477
|
-
right: -2px;
|
|
1478
|
-
|
|
1479
|
-
[data-decoration-bar-depth="1"] & {
|
|
1480
|
-
background-color: color-mix(in lab,
|
|
1481
|
-
var(--diffs-bg) 20%,
|
|
1482
|
-
var(--diffs-decoration-bar-color, transparent));
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
[data-decoration-bar-depth="2"] & {
|
|
1486
|
-
background-color: color-mix(in lab,
|
|
1487
|
-
var(--diffs-bg) 45%,
|
|
1488
|
-
var(--diffs-decoration-bar-color, transparent));
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
[data-decoration-bar-depth="3"] & {
|
|
1492
|
-
background-color: color-mix(in lab,
|
|
1493
|
-
var(--diffs-bg) 65%,
|
|
1494
|
-
var(--diffs-decoration-bar-color, transparent));
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
[data-decoration-bar-start] & {
|
|
1498
|
-
border-top-left-radius: 5px;
|
|
1499
|
-
border-top-right-radius: 5px;
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
[data-decoration-bar-end] & {
|
|
1503
|
-
z-index: 3;
|
|
1504
|
-
border-bottom-right-radius: 5px;
|
|
1505
|
-
border-bottom-left-radius: 5px;
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
[data-placeholder] {
|
|
1510
|
-
contain: strict;
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
[data-error-wrapper] {
|
|
1514
|
-
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
1515
|
-
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1516
|
-
scrollbar-width: none;
|
|
1517
|
-
max-height: 400px;
|
|
1518
|
-
overflow: auto;
|
|
1519
|
-
|
|
1520
|
-
& [data-error-message] {
|
|
1521
|
-
color: var(--diffs-deletion-base);
|
|
1522
|
-
font-size: 18px;
|
|
1523
|
-
font-weight: bold;
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
& [data-error-stack] {
|
|
1527
|
-
color: var(--diffs-fg-number);
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
@layer theme, rendered, unsafe;
|
|
1533
|
-
`;let qo;function af(t){if(qo!=null)return qo;const n=t.host;if(typeof HTMLElement<"u"&&n instanceof HTMLElement&&!n.isConnected)return;const a=document.createElement("div");a.setAttribute("data-code",""),a.setAttribute(n1,"true");const l=document.createElement("div");return l.style.position="relative",l.style.width="200%",l.style.height="200%",a.appendChild(l),t.appendChild(a),qo=Math.max(a.offsetHeight-a.clientHeight,0),a.remove(),qo}function Q_(t){return`${_v}: ${t==null?"var(--diffs-scrollbar-gutter-fallback)":`${t}px`};`}const Z_="@layer base, theme, rendered, unsafe;",$w=new RegExp(`${Xw(_v)}\\s*:\\s*[^;]+;`);function qw(t){return`${Z_}
|
|
1534
|
-
@layer unsafe {
|
|
1535
|
-
${t}
|
|
1536
|
-
}`}function Fw(t,n="system",a){return`${Z_}
|
|
1537
|
-
@layer rendered {
|
|
1538
|
-
:host {${n==="system"?"":`
|
|
1539
|
-
color-scheme: ${n};`}
|
|
1540
|
-
${Q_(a)}
|
|
1541
|
-
${t}
|
|
1542
|
-
}
|
|
1543
|
-
}`}function Yw(t,n){const a=Q_(n);return t.replace($w,a)}function Xw(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cd({code:t,pre:n,columnType:a,rowSpan:l,containerSize:s=!1}={}){return t==null&&(t=document.createElement("code"),t.setAttribute("data-code",""),a!=null&&t.setAttribute(`data-${a}`,""),n?.appendChild(t)),l!=null?t.style.setProperty("grid-row",`span ${l}`):t.style.removeProperty("grid-row"),s?t.setAttribute("data-container-size",""):t.removeAttribute("data-container-size"),t}function Qw(t,n){if(n==null)return;const a=t.shadowRoot??t.attachShadow({mode:"open"});a.innerHTML===""&&(a.innerHTML=n)}function Zw(t,{type:n,diffIndicators:a,disableBackground:l,disableLineNumbers:s,overflow:u,split:f,totalLines:h,customProperties:c}){if(c!=null)for(const m in c){const v=c[m];v!=null&&t.setAttribute(m,`${v}`)}switch(n==="diff"?(t.setAttribute("data-diff",""),t.removeAttribute("data-file")):(t.setAttribute("data-file",""),t.removeAttribute("data-diff")),a){case"bars":case"classic":t.setAttribute("data-indicators",a);break;case"none":t.removeAttribute("data-indicators");break}return s?t.setAttribute("data-disable-line-numbers",""):t.removeAttribute("data-disable-line-numbers"),l?t.removeAttribute("data-background"):t.setAttribute("data-background",""),n==="diff"?t.setAttribute("data-diff-type",f?"split":"single"):t.removeAttribute("data-diff-type"),t.setAttribute("data-overflow",u),t.style.setProperty("--diffs-min-number-column-width-default",`${`${h}`.length}ch`),t}function X0(t){if(typeof HTMLStyleElement<"u"&&t instanceof HTMLStyleElement)return!0;const n=t.tagName??t.nodeName;return typeof n=="string"&&n.toLowerCase()==="style"}function Kw({shadowRoot:t,currentNode:n,themeCSS:a}){if(a.trim()===""){n?.remove();return}return n??=Ww(),n.textContent=a,n.parentNode!==t&&t.appendChild(n),n}function Ww(){const t=document.createElement("style");return t.setAttribute(e1,""),t}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let t;class n extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const l=this.attachShadow({mode:"open"});t==null&&(t=new CSSStyleSheet,t.replaceSync(Gw)),l.adoptedStyleSheets=[t]}connectedCallback(){af(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(pv,n)}function xd(t){return{...a1,...t}}function Va(t,n){const a=Jw(t,n);return n?a:t.diffHeaderHeight+a}function Jw(t,n){return t.paddingTop??(n?t.spacing:0)}function K_(t){return t.paddingBottom??t.spacing}function eL(t){switch(t){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}function Kr(t,n){return t===n||t?.cacheKey!=null&&t.cacheKey===n?.cacheKey}const tL=new TextEncoder,nL=new TextDecoder("utf-8",{ignoreBOM:!0}),iL=/[\uD800-\uDFFF]/,rf=1024;let Ba=new Uint8Array(rf);function W_(){Ba.length!==rf&&(Ba=new Uint8Array(rf))}function nt(t){if(t.length===0)return t;if(iL.test(t))return JSON.parse(JSON.stringify(t));const n=t.length*3;Ba.length<n&&(Ba=new Uint8Array(n));const{written:a}=tL.encodeInto(t,Ba);return nL.decode(Ba.subarray(0,a))}function aL(t,n,a){try{return rL(t,n,a)}finally{W_()}}function rL(t,n,a=!1){const l=mL(t),s=l?uL(t):cL(t);let u;const f=[];for(const h of s){if(l&&!mv.test(h)){if(u==null)u=nt(h);else{if(a)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",h)}continue}else if(!l&&!dL(h)){if(u==null)u=nt(h);else{if(a)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",h)}continue}const c=J_(h,{cacheKey:void 0,isGitDiff:l,throwOnError:a});c!=null&&f.push(c)}return{patchMetadata:u,files:f}}function lL(t,n){try{return J_(t,n)}finally{W_()}}function J_(t,{cacheKey:n,isGitDiff:a=mv.test(t),oldFile:l,newFile:s,throwOnError:u=!1}={}){let f=0;const h=iy(t,"@@ ");let c;const m=l==null||s==null;let v=0,g=0;for(const y of h){const b=ey(y),E=b[0];if(E==null){if(u)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",y);continue}const T=ny(E);let N=0,L=0;if(T==null||c==null){if(c!=null){if(u)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",y);continue}c={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:m,additionLines:!m&&l!=null&&s!=null?Q0(s.contents):[],deletionLines:!m&&l!=null&&s!=null?Q0(l.contents):[],cacheKey:W0(n)},c.additionLines.length===1&&s?.contents===""&&(c.additionLines.length=0),c.deletionLines.length===1&&l?.contents===""&&(c.deletionLines.length=0);for(const K of b){if(K.startsWith("diff --git")){const Q=K.trim().match(WS),X=Q?.[1]??Q?.[2],W=Q?.[3]??Q?.[4];if(X==null||W==null){if(u)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",K);continue}c.name=nt(W.trim()),X!==W&&(c.prevName=nt(X.trim()));continue}const ee=K.startsWith("---")||K.startsWith("+++")?K.match(a?KS:ZS):null;if(ee!=null){const[,Q,X]=ee;if(Q==="---"&&X!=="/dev/null"){const W=nt(X.trim());c.prevName=W,c.name=W}else Q==="+++"&&X!=="/dev/null"&&(c.name=nt(X.trim()))}else if(a){if(K.startsWith("new mode ")&&(c.mode=nt(K.slice(8).trim())),K.startsWith("old mode ")&&(c.prevMode=nt(K.slice(8).trim())),K.startsWith("new file mode")&&(c.type="new",c.mode=nt(K.slice(13).trim())),K.startsWith("deleted file mode")&&(c.type="deleted",c.mode=nt(K.slice(17).trim())),K.startsWith("similarity index")&&(K.startsWith("similarity index 100%")?c.type="rename-pure":c.type="rename-changed"),K.startsWith("index ")){const[,Q,X,W]=K.trim().match(JS)??[];Q!=null&&(c.prevObjectId=nt(Q)),X!=null&&(c.newObjectId=nt(X)),W!=null&&(c.mode=nt(W))}K.startsWith("rename from ")&&(c.prevName=nt(K.slice(12).trim())),K.startsWith("rename to ")&&(c.name=nt(K.slice(10).trim()))}}continue}let A,R;for(;b.length>0&&(b[b.length-1]===`
|
|
1544
|
-
`||b[b.length-1]==="\r"||b[b.length-1]===`\r
|
|
1545
|
-
`||b[b.length-1]==="");)b.pop();const{additionStart:z,deletionStart:V}=T;v=m?v:V-1,g=m?g:z-1;const j={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:T.additionCount,additionStart:z,additionLines:N,deletionCount:T.deletionCount,deletionStart:V,deletionLines:L,deletionLineIndex:v,additionLineIndex:g,hunkContent:[],hunkContext:W0(T.hunkContext),hunkSpecs:nt(E),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let F=0,te=0;for(let K=1;K<b.length;K++){const ee=b[K];if(F>=j.additionCount&&te>=j.deletionCount&&!ee.startsWith("\\")){if(u&&fL(ee)&&!hL(ee))throw Error("parsePatchContent: hunk has more lines than expected");break}const Q=ee[0];if(Q!=="+"&&Q!=="-"&&Q!==" "&&Q!=="\\"){if(u)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${Q}", full line: "${ee}"`),console.error("processFile: invalid rawLine:",ee);continue}const X=gL(Q);if(X==="addition"){if(u&&F>=j.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const W=Ad(ee);(A==null||A.type!=="change")&&(A=Td("change",v,g),j.hunkContent.push(A)),g++,F++,m&&c.additionLines.push(W),A.additions++,N++,R="addition"}else if(X==="deletion"){if(u&&te>=j.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const W=Ad(ee);(A==null||A.type!=="change")&&(A=Td("change",v,g),j.hunkContent.push(A)),v++,te++,m&&c.deletionLines.push(W),A.deletions++,L++,R="deletion"}else if(X==="context"){if(u&&(te>=j.deletionCount||F>=j.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const W=Ad(ee);(A==null||A.type!=="context")&&(A=Td("context",v,g),j.hunkContent.push(A)),g++,v++,F++,te++,m&&(c.deletionLines.push(W),c.additionLines.push(W)),A.lines++,R="context"}else if(X==="metadata"&&A!=null){if(A.type==="context"?(j.noEOFCRAdditions=!0,j.noEOFCRDeletions=!0):R==="deletion"?j.noEOFCRDeletions=!0:R==="addition"&&(j.noEOFCRAdditions=!0),m&&(R==="addition"||R==="context")){const W=c.additionLines.length-1;W>=0&&(c.additionLines[W]=Fa(c.additionLines[W]))}if(m&&(R==="deletion"||R==="context")){const W=c.deletionLines.length-1;W>=0&&(c.deletionLines[W]=Fa(c.deletionLines[W]))}}}if(u&&(F!==j.additionCount||te!==j.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");j.additionLines=N,j.deletionLines=L,j.collapsedBefore=Math.max(j.additionStart-1-f,0),c.hunks.push(j),f=j.additionStart+j.additionCount-1;for(const K of j.hunkContent)K.type==="context"?(j.splitLineCount+=K.lines,j.unifiedLineCount+=K.lines):(j.splitLineCount+=Math.max(K.additions,K.deletions),j.unifiedLineCount+=K.deletions+K.additions);j.splitLineStart=c.splitLineCount+j.collapsedBefore,j.unifiedLineStart=c.unifiedLineCount+j.collapsedBefore,c.splitLineCount+=j.collapsedBefore+j.splitLineCount,c.unifiedLineCount+=j.collapsedBefore+j.unifiedLineCount}if(c!=null){if(u&&m&&!a&&c.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(c.hunks.length>0&&!m&&c.additionLines.length>0&&c.deletionLines.length>0){const y=c.hunks[c.hunks.length-1],b=y.additionStart+y.additionCount-1,E=c.additionLines.length,T=Math.max(E-b,0);c.splitLineCount+=T,c.unifiedLineCount+=T}return a||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type="rename-changed":c.type="rename-pure":(l==null||l.contents==="")&&s!=null&&s.contents!==""?c.type="new":l!=null&&l.contents!==""&&(s==null||s.contents==="")&&(c.type="deleted")),c.type!=="rename-pure"&&c.type!=="rename-changed"&&(c.prevName=void 0),c}}function oL(t,n,a=!1){const l=[],s=sL(t)?t.split(QS):[t];for(const u of s)try{l.push(aL(u,n!=null?`${n}-${l.length}`:void 0,a))}catch(f){if(a)throw f;console.error(f)}return l}function sL(t){return t.startsWith("From ")||t.includes(`
|
|
1546
|
-
From `)}function Q0(t){const n=ey(t);for(let a=0;a<n.length;a++)n[a]=nt(n[a]);return n}function ey(t){if(t.length===0)return[""];const n=[];let a=0;for(;;){const l=t.indexOf(`
|
|
1547
|
-
`,a);if(l===-1)break;n.push(t.slice(a,l+1)),a=l+1}return a<t.length&&n.push(t.slice(a)),n}function uL(t){return iy(t,"diff --git")}function cL(t){if(t.length===0)return[""];const n=[];let a=0,l=0,s=0,u=0,f=!1;for(;l<t.length;){const h=lf(t,l);if(s<=0&&u<=0){if(ty(t,l)){l>a&&n.push(t.slice(a,l)),a=l,f=!0,l=lf(t,h);continue}if(f&&t.startsWith("@@ -",l)){const m=ny(t.slice(l,h));m!=null&&(s=m.deletionCount,u=m.additionCount)}l=h;continue}const c=t[l];if(c==="\\"){l=h;continue}c===" "?(s=Math.max(s-1,0),u=Math.max(u-1,0)):c==="-"?s=Math.max(s-1,0):c==="+"&&(u=Math.max(u-1,0)),l=h}return n.push(t.slice(a)),n}function dL(t){return ty(t,0)}function ty(t,n){const a=lf(t,n);return Z0(t,n,"---")&&Z0(t,a,"+++")}function Z0(t,n,a){if(!t.startsWith(a,n))return!1;const l=t[n+a.length];if(l!==" "&&l!==" ")return!1;for(let s=n+a.length+1;s<t.length;s++){const u=t[s];if(u===`
|
|
1548
|
-
`||u==="\r")break;if(u!==" "&&u!==" ")return!0}return!1}function lf(t,n){const a=t.indexOf(`
|
|
1549
|
-
`,n);return a===-1?t.length:a+1}function fL(t){const n=t[0];return n==="+"||n==="-"||n===" "}function hL(t){if(!t.startsWith("--"))return!1;for(let n=2;n<t.length;n++){const a=t[n];if(a!==" "&&a!==" "&&a!==`
|
|
1550
|
-
`&&a!=="\r")return!1}return!0}function ny(t){if(!t.startsWith("@@ -"))return;let n=4;const a=Fo(t,n);if(a==null)return;const l=a.value;n=a.endIndex;let s=1;if(t[n]===","){const v=Fo(t,n+1);if(v==null)return;s=v.value,n=v.endIndex}if(t[n]!==" "||t[n+1]!=="+")return;n+=2;const u=Fo(t,n);if(u==null)return;const f=u.value;n=u.endIndex;let h=1;if(t[n]===","){const v=Fo(t,n+1);if(v==null)return;h=v.value,n=v.endIndex}if(t[n]!==" "||t[n+1]!=="@"||t[n+2]!=="@")return;let c;const m=n+3;return t[m]===" "&&(c=pL(t.slice(m+1))),{additionCount:h,additionStart:f,deletionCount:s,deletionStart:l,hunkContext:c}}function Fo(t,n){let a=n,l=0;for(;a<t.length;a++){const s=t.charCodeAt(a)-48;if(s<0||s>9)break;l=l*10+s}if(a!==n)return{value:l,endIndex:a}}function pL(t){return t.endsWith(`\r
|
|
1551
|
-
`)?t.slice(0,-2):t.endsWith(`
|
|
1552
|
-
`)?t.slice(0,-1):t}function mL(t){return t.startsWith("diff --git")||t.includes(`
|
|
1553
|
-
diff --git`)}function iy(t,n){if(t.length===0)return[""];const a=`
|
|
1554
|
-
${n}`,l=t.startsWith(n)?0:K0(t,a,0);if(l===-1)return[t];const s=[];l>0&&s.push(t.slice(0,l));let u=l;for(;;){const f=K0(t,a,u+1);if(f===-1)break;s.push(t.slice(u,f)),u=f}return s.push(t.slice(u)),s}function K0(t,n,a){const l=t.indexOf(n,a);return l===-1?-1:l+1}function W0(t){return t==null?t:nt(t)}function gL(t){return t===" "?"context":t==="\\"?"metadata":t==="+"?"addition":"deletion"}function Ad(t){const n=t.slice(1);return nt(n===""?`
|
|
1555
|
-
`:n)}function Td(t,n,a){return t==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:a,deletionLineIndex:n}:{type:"context",lines:0,additionLineIndex:a,deletionLineIndex:n}}class wf{diff(n,a,l={}){let s;typeof l=="function"?(s=l,l={}):"callback"in l&&(s=l.callback);const u=this.castInput(n,l),f=this.castInput(a,l),h=this.removeEmpty(this.tokenize(u,l)),c=this.removeEmpty(this.tokenize(f,l));return this.diffWithOptionsObj(h,c,l,s)}diffWithOptionsObj(n,a,l,s){var u;const f=A=>{if(A=this.postProcess(A,l),s){setTimeout(function(){s(A)},0);return}else return A},h=a.length,c=n.length;let m=1,v=h+c;l.maxEditLength!=null&&(v=Math.min(v,l.maxEditLength));const g=(u=l.timeout)!==null&&u!==void 0?u:1/0,y=Date.now()+g,b=[{oldPos:-1,lastComponent:void 0}];let E=this.extractCommon(b[0],a,n,0,l);if(b[0].oldPos+1>=c&&E+1>=h)return f(this.buildValues(b[0].lastComponent,a,n));let T=-1/0,N=1/0;const L=()=>{for(let A=Math.max(T,-m);A<=Math.min(N,m);A+=2){let R;const z=b[A-1],V=b[A+1];z&&(b[A-1]=void 0);let j=!1;if(V){const te=V.oldPos-A;j=V&&0<=te&&te<h}const F=z&&z.oldPos+1<c;if(!j&&!F){b[A]=void 0;continue}if(!F||j&&z.oldPos<V.oldPos?R=this.addToPath(V,!0,!1,0,l):R=this.addToPath(z,!1,!0,1,l),E=this.extractCommon(R,a,n,A,l),R.oldPos+1>=c&&E+1>=h)return f(this.buildValues(R.lastComponent,a,n))||!0;b[A]=R,R.oldPos+1>=c&&(N=Math.min(N,A-1)),E+1>=h&&(T=Math.max(T,A+1))}m++};if(s)(function A(){setTimeout(function(){if(m>v||Date.now()>y)return s(void 0);L()||A()},0)})();else for(;m<=v&&Date.now()<=y;){const A=L();if(A)return A}}addToPath(n,a,l,s,u){const f=n.lastComponent;return f&&!u.oneChangePerToken&&f.added===a&&f.removed===l?{oldPos:n.oldPos+s,lastComponent:{count:f.count+1,added:a,removed:l,previousComponent:f.previousComponent}}:{oldPos:n.oldPos+s,lastComponent:{count:1,added:a,removed:l,previousComponent:f}}}extractCommon(n,a,l,s,u){const f=a.length,h=l.length;let c=n.oldPos,m=c-s,v=0;for(;m+1<f&&c+1<h&&this.equals(l[c+1],a[m+1],u);)m++,c++,v++,u.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return v&&!u.oneChangePerToken&&(n.lastComponent={count:v,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=c,m}equals(n,a,l){return l.comparator?l.comparator(n,a):n===a||!!l.ignoreCase&&n.toLowerCase()===a.toLowerCase()}removeEmpty(n){const a=[];for(let l=0;l<n.length;l++)n[l]&&a.push(n[l]);return a}castInput(n,a){return n}tokenize(n,a){return Array.from(n)}join(n){return n.join("")}postProcess(n,a){return n}get useLongestToken(){return!1}buildValues(n,a,l){const s=[];let u;for(;n;)s.push(n),u=n.previousComponent,delete n.previousComponent,n=u;s.reverse();const f=s.length;let h=0,c=0,m=0;for(;h<f;h++){const v=s[h];if(v.removed)v.value=this.join(l.slice(m,m+v.count)),m+=v.count;else{if(!v.added&&this.useLongestToken){let g=a.slice(c,c+v.count);g=g.map(function(y,b){const E=l[m+b];return E.length>y.length?E:y}),v.value=this.join(g)}else v.value=this.join(a.slice(c,c+v.count));c+=v.count,v.added||(m+=v.count)}}return s}}class vL extends wf{}const _L=new vL;function yL(t,n,a){return _L.diff(t,n,a)}const J0="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class bL extends wf{tokenize(n){const a=new RegExp(`(\\r?\\n)|[${J0}]+|[^\\S\\n\\r]+|[^${J0}]`,"ug");return n.match(a)||[]}}const SL=new bL;function EL(t,n,a){return SL.diff(t,n,a)}class CL extends wf{constructor(){super(...arguments),this.tokenize=AL}equals(n,a,l){return l.ignoreWhitespace?((!l.newlineIsToken||!n.includes(`
|
|
1556
|
-
`))&&(n=n.trim()),(!l.newlineIsToken||!a.includes(`
|
|
1557
|
-
`))&&(a=a.trim())):l.ignoreNewlineAtEof&&!l.newlineIsToken&&(n.endsWith(`
|
|
1558
|
-
`)&&(n=n.slice(0,-1)),a.endsWith(`
|
|
1559
|
-
`)&&(a=a.slice(0,-1))),super.equals(n,a,l)}}const xL=new CL;function ev(t,n,a){return xL.diff(t,n,a)}function AL(t,n){n.stripTrailingCr&&(t=t.replace(/\r\n/g,`
|
|
1560
|
-
`));const a=[],l=t.split(/(\n|\r\n)/);l[l.length-1]||l.pop();for(let s=0;s<l.length;s++){const u=l[s];s%2&&!n.newlineIsToken?a[a.length-1]+=u:a.push(u)}return a}function TL(t){for(let n=0;n<t.length;n++)if(t[n]<" "||t[n]>"~"||t[n]==='"'||t[n]==="\\")return!0;return!1}function gi(t){if(!TL(t))return t;let n='"';const a=new TextEncoder().encode(t);let l=0;for(;l<a.length;){const s=a[l];s===7?n+="\\a":s===8?n+="\\b":s===9?n+="\\t":s===10?n+="\\n":s===11?n+="\\v":s===12?n+="\\f":s===13?n+="\\r":s===34?n+='\\"':s===92?n+="\\\\":s>=32&&s<=126?n+=String.fromCharCode(s):n+="\\"+s.toString(8).padStart(3,"0"),l++}return n+='"',n}const tv={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function nv(t,n,a,l,s,u,f){let h;f?typeof f=="function"?h={callback:f}:h=f:h={},typeof h.context>"u"&&(h.context=4);const c=h.context;if(h.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(h.callback){const{callback:v}=h;ev(a,l,Object.assign(Object.assign({},h),{callback:g=>{const y=m(g);v(y)}}))}else return m(ev(a,l,h));function m(v){if(!v)return;v.push({value:"",lines:[]});function g(A){return A.map(function(R){return" "+R})}const y=[];let b=0,E=0,T=[],N=1,L=1;for(let A=0;A<v.length;A++){const R=v[A],z=R.lines||LL(R.value);if(R.lines=z,R.added||R.removed){if(!b){const V=v[A-1];b=N,E=L,V&&(T=c>0?g(V.lines.slice(-c)):[],b-=T.length,E-=T.length)}for(const V of z)T.push((R.added?"+":"-")+V);R.added?L+=z.length:N+=z.length}else{if(b)if(z.length<=c*2&&A<v.length-2)for(const V of g(z))T.push(V);else{const V=Math.min(z.length,c);for(const F of g(z.slice(0,V)))T.push(F);const j={oldStart:b,oldLines:N-b+V,newStart:E,newLines:L-E+V,lines:T};y.push(j),b=0,E=0,T=[]}N+=z.length,L+=z.length}}for(const A of y)for(let R=0;R<A.lines.length;R++)A.lines[R].endsWith(`
|
|
1561
|
-
`)?A.lines[R]=A.lines[R].slice(0,-1):(A.lines.splice(R+1,0,"\"),R++);return{oldFileName:t,newFileName:n,oldHeader:s,newHeader:u,hunks:y}}}function of(t,n){var a,l,s,u,f,h;if(n||(n=tv),Array.isArray(t)){if(t.length>1&&!n.includeFileHeaders&&!t.every(v=>v.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return t.map(v=>of(v,n)).join(`
|
|
1562
|
-
`)}const c=[];if(t.isGit){if(n=tv,!t.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!t.newFileName)throw new Error("newFileName must be specified for Git patches");let v=t.oldFileName,g=t.newFileName;t.isCreate&&v==="/dev/null"?v=g.replace(/^b\//,"a/"):t.isDelete&&g==="/dev/null"&&(g=v.replace(/^a\//,"b/")),c.push("diff --git "+gi(v)+" "+gi(g)),t.isDelete&&c.push("deleted file mode "+((a=t.oldMode)!==null&&a!==void 0?a:"100644")),t.isCreate&&c.push("new file mode "+((l=t.newMode)!==null&&l!==void 0?l:"100644")),t.oldMode&&t.newMode&&!t.isDelete&&!t.isCreate&&(c.push("old mode "+t.oldMode),c.push("new mode "+t.newMode)),t.isRename&&(c.push("rename from "+gi(((s=t.oldFileName)!==null&&s!==void 0?s:"").replace(/^a\//,""))),c.push("rename to "+gi(((u=t.newFileName)!==null&&u!==void 0?u:"").replace(/^b\//,"")))),t.isCopy&&(c.push("copy from "+gi(((f=t.oldFileName)!==null&&f!==void 0?f:"").replace(/^a\//,""))),c.push("copy to "+gi(((h=t.newFileName)!==null&&h!==void 0?h:"").replace(/^b\//,""))))}else n.includeIndex&&t.oldFileName==t.newFileName&&t.oldFileName!==void 0&&c.push("Index: "+t.oldFileName),n.includeUnderline&&c.push("===================================================================");const m=t.hunks.length>0;n.includeFileHeaders&&t.oldFileName!==void 0&&t.newFileName!==void 0&&(!t.isGit||m)&&(c.push("--- "+gi(t.oldFileName)+(t.oldHeader?" "+t.oldHeader:"")),c.push("+++ "+gi(t.newFileName)+(t.newHeader?" "+t.newHeader:"")));for(let v=0;v<t.hunks.length;v++){const g=t.hunks[v],y=g.oldLines===0?g.oldStart-1:g.oldStart,b=g.newLines===0?g.newStart-1:g.newStart;c.push("@@ -"+y+","+g.oldLines+" +"+b+","+g.newLines+" @@");for(const E of g.lines)c.push(E)}return c.join(`
|
|
1563
|
-
`)+`
|
|
1564
|
-
`}function wL(t,n,a,l,s,u,f){if(typeof f=="function"&&(f={callback:f}),f?.callback){const{callback:h}=f;nv(t,n,a,l,s,u,Object.assign(Object.assign({},f),{callback:c=>{h(c?of(c,f.headerOptions):void 0)}}))}else{const h=nv(t,n,a,l,s,u,f);return h?of(h,f?.headerOptions):void 0}}function LL(t){const n=t.endsWith(`
|
|
1565
|
-
`),a=t.split(`
|
|
1566
|
-
`).map(l=>l+`
|
|
1567
|
-
`);return n?a.pop():a.push(a.pop().slice(0,-1)),a}function sf(t,n,a,l=!1){const s=lL(wL(t.name,n.name,t.contents,n.contents,t.header,n.header,a),{cacheKey:(()=>{if(t.cacheKey!=null&&n.cacheKey!=null)return`${t.cacheKey}:${n.cacheKey}`})(),oldFile:t,newFile:n,throwOnError:l});if(s==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return n.lang!=null&&(s.lang=n.lang),s}var RL=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(t,n,a){if(n==null||a==null)for(const l of t.children??[])l instanceof HTMLElement&&("deletions"in l.dataset?n=l:"additions"in l.dataset&&(a=l));if(a==null||n==null){this.cleanUp();return}this.codeDeletions!==n&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=n,n.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==a&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=a,a.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 Xr(t,n){return mf(t.theme,n.theme)&&t.useTokenTransformer===n.useTokenTransformer&&t.tokenizeMaxLineLength===n.tokenizeMaxLineLength&&t.lineDiffType===n.lineDiffType&&t.maxLineDiffLength===n.maxLineDiffLength}function Yo(t){return ye({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":t,style:`grid-row: span ${t};min-height:calc(${t} * 1lh)`}})}function Xo(t){return ye({tagName:"div",children:[ye({tagName:"span",children:[yn("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":t,"data-column-content":""}})}function wd(t){return ye({tagName:"div",children:[ls({name:t==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","data-expand-button":"","data-expand-both":t==="both"?"":void 0,"data-expand-up":t==="up"?"":void 0,"data-expand-down":t==="down"?"":void 0}})}function Ua({type:t,content:n,expandIndex:a,chunked:l=!1,slotName:s,isFirstHunk:u,isLastHunk:f}){let h=0;const c=[];if(t==="metadata"&&n!=null&&c.push(ye({tagName:"div",children:[yn(n)],properties:{"data-separator-wrapper":""}})),(t==="line-info"||t==="line-info-basic")&&n!=null){const m=[];a!=null&&(l?(u||(m.push(wd("up")),h++),f||(m.push(wd("down")),h++)):(m.push(wd(!u&&!f?"both":u?"down":"up")),h++)),m.push(ye({tagName:"div",children:[ye({tagName:"span",children:[yn(n)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),l&&a!=null&&m.push(ye({tagName:"div",children:[yn("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),c.push(ye({tagName:"div",children:m,properties:{"data-separator-wrapper":"","data-separator-multi-button":h>1?"":void 0}}))}return t==="custom"&&s!=null&&c.push(ye({tagName:"slot",properties:{name:s}})),ye({tagName:"div",children:c,properties:{"data-separator":c.length===0?"simple":t,"data-expand-index":a,"data-separator-first":u?"":void 0,"data-separator-last":f?"":void 0}})}function kL(t,n){return`hunk-separator-${t}-${n}`}function DL(t){const n=t.at(-1);return n==null?0:Math.max(n.additionStart+n.additionCount,n.deletionStart+n.deletionCount)}function OL(t){return t.startingLine===0&&t.totalLines===1/0&&t.bufferBefore===0&&t.bufferAfter===0}function iv({line:t,spanStart:n,spanLength:a}){return{start:{line:t,character:n},end:{line:t,character:n+a},properties:{"data-diff-span":""},alwaysWrap:!0}}function Qo({item:t,arr:n,enableJoin:a,isNeutral:l=!1,isLastItem:s=!1}){const u=n[n.length-1];if(u==null||s||!a){n.push([l?0:1,t.value]);return}const f=u[0]===0;if(l===f||l&&t.value.length===1&&!f){u[1]+=t.value;return}n.push([l?0:1,t.value])}function dl({isPartial:t,rangeSize:n,expandedHunks:a,hunkIndex:l,collapsedContextThreshold:s}){const u=Math.max(n,0);if(u===0||t)return{fromStart:0,fromEnd:0,rangeSize:u,collapsedLines:u,renderAll:!1};if(a===!0||u<=s)return{fromStart:u,fromEnd:0,rangeSize:u,collapsedLines:0,renderAll:!0};const f=a?.get(l),h=Math.min(Math.max(f?.fromStart??0,0),u),c=Math.min(Math.max(f?.fromEnd??0,0),u),m=h+c,v=m>=u;return{fromStart:v?u:h,fromEnd:v?0:c,rangeSize:u,collapsedLines:Math.max(u-m,0),renderAll:v}}function ay({fileDiff:t,errorPrefix:n}){const a=t.hunks[t.hunks.length-1];if(a==null||t.isPartial||t.additionLines.length===0||t.deletionLines.length===0)return 0;const l=t.additionLines.length-(a.additionLineIndex+a.additionCount),s=t.deletionLines.length-(a.deletionLineIndex+a.deletionCount);if(l<=0&&s<=0)return 0;if(l!==s)throw new Error(`${n}: trailing context mismatch (additions=${l}, deletions=${s}) for ${t.name}`);return Math.min(l,s)}function fl({fileDiff:t,hunkIndex:n,expandedHunks:a,collapsedContextThreshold:l,errorPrefix:s}){if(n!==t.hunks.length-1)return;const u=ay({fileDiff:t,errorPrefix:s});if(u<=0)return;if(a===!0||u<=l)return{fromStart:u,fromEnd:0,rangeSize:u,collapsedLines:0,renderAll:!0};const f=a?.get(t.hunks.length),h=Math.min(Math.max(f?.fromStart??0,0),u);return{fromStart:h,fromEnd:0,rangeSize:u,collapsedLines:u-h,renderAll:h>=u}}function ry({type:t,metrics:n}){return n.hunkSeparatorHeight??eL(t)}function ly({type:t,metrics:n}){return t==="simple"||t==="metadata"||t==="line-info-basic"?0:n.spacing}function NL({type:t,hunkIndex:n,hunkSpecs:a}){switch(t){case"simple":return n>0;case"metadata":return a!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function ML(t){return t!=="simple"&&t!=="metadata"}function Wr({type:t,metrics:n,hunkIndex:a,hunkSpecs:l}){if(!NL({type:t,hunkIndex:a,hunkSpecs:l}))return;const s=ry({type:t,metrics:n}),u=ly({type:t,metrics:n}),f=a>0?u:0,h=u;return{height:s,gapBefore:f,gapAfter:h,totalHeight:f+s+h}}function Jr({type:t,metrics:n}){if(!ML(t))return;const a=ry({type:t,metrics:n}),l=ly({type:t,metrics:n});return{height:a,gapBefore:l,gapAfter:0,totalHeight:l+a}}function il({diff:t,diffStyle:n,startingLine:a=0,totalLines:l=1/0,expandedHunks:s,collapsedContextThreshold:u=1,callback:f}){const h=IL({diff:t,diffStyle:n,startingLine:a,expandedHunks:s,collapsedContextThreshold:u}),c={viewportStart:a,viewportEnd:a+l,isWindowedHighlight:a>0||l<1/0,splitCount:h.splitCount,unifiedCount:h.unifiedCount,finalHunkIndex:t.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;const g=c.unifiedCount>=a+l,y=c.splitCount>=a+l;return n==="unified"?g:(n==="split"||g)&&y},shouldSkip(g,y){if(!c.isWindowedHighlight)return!1;const b=c.unifiedCount+g<a,E=c.splitCount+y<a;return n==="unified"?b:(n==="split"||b)&&E},incrementCounts(g,y){(n==="unified"||n==="both")&&(c.unifiedCount+=g),(n==="split"||n==="both")&&(c.splitCount+=y)},isInWindow(g,y){if(!c.isWindowedHighlight)return!0;const b=c.isInUnifiedWindow(g),E=c.isInSplitWindow(y);return n==="unified"?b:n==="split"?E:b||E},isInUnifiedWindow(g){return!c.isWindowedHighlight||c.unifiedCount>=a-g&&c.unifiedCount<a+l},isInSplitWindow(g){return!c.isWindowedHighlight||c.splitCount>=a-g&&c.splitCount<a+l},emit(g,y=!1){return y||(n==="unified"?c.incrementCounts(1,0):n==="split"?c.incrementCounts(0,1):c.incrementCounts(1,1)),f(g)??!1}};e:for(let g=h.hunkIndex;g<t.hunks.length;g++){let N=function(ee,Q){return E==null||E.collapsedLines<=0||E.fromStart+E.fromEnd>0?0:n==="unified"?ee===y.unifiedLineStart+y.unifiedLineCount-1?E.collapsedLines:0:Q===y.splitLineStart+y.splitLineCount-1?E.collapsedLines:0},A=function(){return L?0:(L=!0,b.collapsedLines)};var m=N,v=A;const y=t.hunks[g];if(y==null)throw new Error("iterateOverDiff: invalid hunk index");if(c.shouldBreak())break;const b=dl({isPartial:t.isPartial,rangeSize:y.collapsedBefore,expandedHunks:s,hunkIndex:g,collapsedContextThreshold:u}),E=g===c.finalHunkIndex?fl({fileDiff:t,hunkIndex:g,expandedHunks:s,collapsedContextThreshold:u,errorPrefix:"iterateOverDiff"}):void 0,T=b.fromStart+b.fromEnd;let L=b.collapsedLines===0;if(c.shouldSkip(T,T))c.incrementCounts(T,T),A();else{let ee=y.unifiedLineStart-b.rangeSize,Q=y.splitLineStart-b.rangeSize,X=y.deletionLineIndex-b.rangeSize,W=y.additionLineIndex-b.rangeSize,oe=y.deletionStart-b.rangeSize,ce=y.additionStart-b.rangeSize;if(Zo(c,b.fromStart,n,M=>c.emit({hunkIndex:g,hunk:y,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:oe+M,lineIndex:X+M,noEOFCR:!1,unifiedLineIndex:ee+M,splitLineIndex:Q+M},additionLine:{unifiedLineIndex:ee+M,splitLineIndex:Q+M,lineIndex:W+M,lineNumber:ce+M,noEOFCR:!1}}))||(ee=y.unifiedLineStart-b.fromEnd,Q=y.splitLineStart-b.fromEnd,X=y.deletionLineIndex-b.fromEnd,W=y.additionLineIndex-b.fromEnd,oe=y.deletionStart-b.fromEnd,ce=y.additionStart-b.fromEnd,Zo(c,b.fromEnd,n,M=>c.emit({hunkIndex:g,hunk:y,collapsedBefore:A(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:oe+M,lineIndex:X+M,noEOFCR:!1,unifiedLineIndex:ee+M,splitLineIndex:Q+M},additionLine:{unifiedLineIndex:ee+M,splitLineIndex:Q+M,lineIndex:W+M,lineNumber:ce+M,noEOFCR:!1}}),()=>{A()})))break e}let R=y.unifiedLineStart,z=y.splitLineStart,V=y.deletionLineIndex,j=y.additionLineIndex,F=y.deletionStart,te=y.additionStart;const K=y.hunkContent.at(-1);for(const ee of y.hunkContent){if(c.shouldBreak())break e;const Q=ee===K;if(ee.type==="context"){if(c.shouldSkip(ee.lines,ee.lines))c.incrementCounts(ee.lines,ee.lines),A();else if(Zo(c,ee.lines,n,X=>{const W=Q&&X===ee.lines-1,oe=R+X,ce=z+X;return c.emit({hunkIndex:g,hunk:y,collapsedBefore:A(),collapsedAfter:N(oe,ce),type:"context",deletionLine:{lineNumber:F+X,lineIndex:V+X,noEOFCR:W&&y.noEOFCRDeletions,unifiedLineIndex:oe,splitLineIndex:ce},additionLine:{unifiedLineIndex:oe,splitLineIndex:ce,lineIndex:j+X,lineNumber:te+X,noEOFCR:W&&y.noEOFCRAdditions}})},()=>{A()}))break e;R+=ee.lines,z+=ee.lines,V+=ee.lines,j+=ee.lines,F+=ee.lines,te+=ee.lines}else{const X=Math.max(ee.deletions,ee.additions),W=ee.deletions+ee.additions;if(!c.shouldSkip(W,X)){const oe=UL(c,ee,n);(oe[0]?.[0]??0)>0&&A();for(const[ce,M]of oe)for(let Y=ce;Y<M;Y++){const ne=N(R+Y,n==="unified"?z+(Y<ee.deletions?Y:Y-ee.deletions):z+Y);if(c.emit(jL({hunkIndex:g,hunk:y,collapsedBefore:A(),collapsedAfter:ne,diffStyle:n,index:Y,unifiedLineIndex:R,splitLineIndex:z,additionLineIndex:j,deletionLineIndex:V,additionLineNumber:te,deletionLineNumber:F,content:ee,isLastContent:Q,unifiedCount:W,splitCount:X}),!0))break e}}A(),c.incrementCounts(W,X),R+=W,z+=X,V+=ee.deletions,j+=ee.additions,F+=ee.deletions,te+=ee.additions}}if(E!=null){const{collapsedLines:ee,fromStart:Q,fromEnd:X}=E,W=Q+X;if(Zo(c,W,n,oe=>{const ce=oe===W-1;return c.emit({hunkIndex:t.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:ce?ee:0,type:"context-expanded",deletionLine:{lineNumber:F+oe,lineIndex:V+oe,noEOFCR:!1,unifiedLineIndex:R+oe,splitLineIndex:z+oe},additionLine:{unifiedLineIndex:R+oe,splitLineIndex:z+oe,lineIndex:j+oe,lineNumber:te+oe,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break e}}}function IL({diff:t,diffStyle:n,startingLine:a,expandedHunks:l,collapsedContextThreshold:s}){if(a<=0||n==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const u=HL({diff:t,expandedHunks:l,collapsedContextThreshold:s});let f=0,h=t.hunks.length-1,c=t.hunks.length;for(;f<=h;){const v=f+h>>1,g=u[v+1];if(g==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(n==="unified"?g.unifiedCount:g.splitCount)>a?(c=v,h=v-1):f=v+1}if(c>=t.hunks.length){const v=u[t.hunks.length];if(v==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:t.hunks.length,splitCount:v.splitCount,unifiedCount:v.unifiedCount}}const m=u[c];if(m==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:c,splitCount:m.splitCount,unifiedCount:m.unifiedCount}}function HL({diff:t,expandedHunks:n,collapsedContextThreshold:a}){let l=0,s=0;const u=t.hunks.length-1,f=[{splitCount:0,unifiedCount:0}];for(let h=0;h<t.hunks.length;h++){const c=t.hunks[h];if(c==null)throw new Error("iterateOverDiff: invalid hunk summary index");const m=dl({isPartial:t.isPartial,rangeSize:c.collapsedBefore,expandedHunks:n,hunkIndex:h,collapsedContextThreshold:a}),v=m.fromStart+m.fromEnd;l+=v+c.splitLineCount,s+=v+c.unifiedLineCount;const g=h===u?fl({fileDiff:t,hunkIndex:h,expandedHunks:n,collapsedContextThreshold:a,errorPrefix:"iterateOverDiff"}):void 0;if(g!=null){const y=g.fromStart+g.fromEnd;l+=y,s+=y}f.push({splitCount:l,unifiedCount:s})}return f}function zL(t,n,a){if(!t.isWindowedHighlight||n<=0)return[0,n];const l=[];function s(h){const c=Math.max(0,t.viewportStart-h),m=Math.min(n,t.viewportEnd-h);m>c&&l.push([c,m])}if(a!=="split"&&s(t.unifiedCount),a!=="unified"&&s(t.splitCount),l.length===0)return[0,0];let u=l[0][0],f=l[0][1];for(let h=1;h<l.length;h++){const c=l[h];u=Math.min(u,c[0]),f=Math.max(f,c[1])}return[u,f]}function Zo(t,n,a,l,s,u){const[f,h]=zL(t,n,a);f>0&&(t.incrementCounts(f,f),s?.());let c=f;for(;c<n;){if(u?.()===!0)return!0;if(c>=h){t.incrementCounts(n-c,n-c);break}if(t.isInWindow(0,0)){if(l(c)===!0)return!0}else t.incrementCounts(1,1);c++}return!1}function UL(t,n,a){if(!t.isWindowedHighlight)return[[0,a==="unified"?n.deletions+n.additions:Math.max(n.deletions,n.additions)]];const l=a!=="split",s=a!=="unified",u=a==="unified"?"unified":"split",f=[];function h(g,y){if(g+y<=t.viewportStart||g>=t.viewportEnd)return;const b=Math.max(0,t.viewportStart-g),E=Math.min(y,t.viewportEnd-g);return E>b?[b,E]:void 0}function c(g,y){return u==="split"?g:y==="additions"?[g[0]+n.deletions,g[1]+n.deletions]:g}function m(g,y){if(g==null)return;const[b,E]=c(g,y);E>b&&f.push([b,E])}if(l&&(m(h(t.unifiedCount,n.deletions),"deletions"),m(h(t.unifiedCount+n.deletions,n.additions),"additions")),s&&(m(h(t.splitCount,n.deletions),"deletions"),m(h(t.splitCount,n.additions),"additions")),f.length===0)return f;f.sort((g,y)=>g[0]-y[0]);const v=[f[0]];for(const[g,y]of f.slice(1)){const b=v[v.length-1];g<=b[1]?b[1]=Math.max(b[1],y):v.push([g,y])}return v}function jL({hunkIndex:t,hunk:n,collapsedAfter:a,collapsedBefore:l,diffStyle:s,index:u,unifiedLineIndex:f,splitLineIndex:h,additionLineIndex:c,deletionLineIndex:m,additionLineNumber:v,deletionLineNumber:g,content:y,isLastContent:b,unifiedCount:E,splitCount:T}){const N=u<y.deletions?f+u:void 0,L=s==="unified"?u>=y.deletions?f+u:void 0:u<y.additions?f+y.deletions+u:void 0,A=s==="unified"?h+(u<y.deletions?u:u-y.deletions):h+u,R=u<y.deletions?m+u:void 0,z=u<y.deletions?g+u:void 0,V=s==="unified"?u>=y.deletions?c+(u-y.deletions):void 0:u<y.additions?c+u:void 0,j=s==="unified"?u>=y.deletions?v+(u-y.deletions):void 0:u<y.additions?v+u:void 0,F=s==="unified"?b&&u===y.deletions-1&&n.noEOFCRDeletions:b&&u===T-1&&n.noEOFCRDeletions,te=s==="unified"?b&&u===E-1&&n.noEOFCRAdditions:b&&u===T-1&&n.noEOFCRAdditions,K=R!=null&&z!=null&&N!=null?{lineNumber:z,lineIndex:R,noEOFCR:F,unifiedLineIndex:N,splitLineIndex:A}:void 0,ee=V!=null&&j!=null&&L!=null?{unifiedLineIndex:L,splitLineIndex:A,lineIndex:V,lineNumber:j,noEOFCR:te}:void 0;if(K==null&&ee!=null)return{type:"change",hunkIndex:t,hunk:n,collapsedAfter:a,collapsedBefore:l,deletionLine:void 0,additionLine:ee};if(K!=null&&ee==null)return{type:"change",hunkIndex:t,hunk:n,collapsedAfter:a,collapsedBefore:l,deletionLine:K,additionLine:void 0};if(K==null||ee==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:t,hunk:n,collapsedAfter:a,collapsedBefore:l,deletionLine:K,additionLine:ee}}const PL={forcePlainText:!1};function VL(t,n,a,{forcePlainText:l,startingLine:s,totalLines:u,expandedHunks:f,collapsedContextThreshold:h=1}=PL){l?(s??=0,u??=1/0):(s=0,u=1/0);const c=s>0||u<1/0,m=typeof a.theme=="string"?n.getTheme(a.theme).type:void 0,v=Ow({theme:a.theme,highlighter:n}),g=l&&!c&&(t.unifiedLineCount>1e3||t.splitLineCount>1e3)?"none":a.lineDiffType,y={deletionLines:[],additionLines:[]},{maxLineDiffLength:b}=a,E=!l&&!t.isPartial,T=l?f:void 0,N=new Map;function L(R){const z=E?0:R,V=N.get(z)??GL();return N.set(z,V),V}function A(R,z,V,j){if(c){let F=V.at(-1);(F==null||F.targetIndex+F.count!==z)&&(F={targetIndex:z,originalOffset:j.length,count:0},V.push(F)),F.count++}j.push(R)}il({diff:t,diffStyle:"both",startingLine:s,totalLines:u,expandedHunks:c?T:!0,collapsedContextThreshold:h,callback:({hunkIndex:R,additionLine:z,deletionLine:V,type:j})=>{const F=L(R),te=z!=null?z.splitLineIndex:V.splitLineIndex;j==="change"&&z!=null&&V!=null&&BL({additionLine:t.additionLines[z.lineIndex],deletionLine:t.deletionLines[V.lineIndex],deletionLineIndex:F.deletionContent.length,additionLineIndex:F.additionContent.length,deletionDecorations:F.deletionDecorations,additionDecorations:F.additionDecorations,lineDiffType:g,maxLineDiffLength:b}),V!=null&&(A(t.deletionLines[V.lineIndex],V.lineIndex,F.deletionSegments,F.deletionContent),F.deletionInfo.push({type:j==="change"?"change-deletion":j,lineNumber:V.lineNumber,altLineNumber:j==="change"?void 0:z.lineNumber??void 0,lineIndex:`${V.unifiedLineIndex},${te}`})),z!=null&&(A(t.additionLines[z.lineIndex],z.lineIndex,F.additionSegments,F.additionContent),F.additionInfo.push({type:j==="change"?"change-addition":j,lineNumber:z.lineNumber,altLineNumber:j==="change"?void 0:V.lineNumber??void 0,lineIndex:`${z.unifiedLineIndex},${te}`}))}});for(const R of N.values()){if(R.deletionContent.length===0&&R.additionContent.length===0)continue;const z={name:t.prevName??t.name,contents:R.deletionContent.value},V={name:t.name,contents:R.additionContent.value},{deletionLines:j,additionLines:F}=$L({deletionFile:z,deletionInfo:R.deletionInfo,deletionDecorations:R.deletionDecorations,additionFile:V,additionInfo:R.additionInfo,additionDecorations:R.additionDecorations,highlighter:n,options:a,languageOverride:l?"text":t.lang});if(E){y.deletionLines=j,y.additionLines=F;continue}if(R.deletionSegments.length>0)for(const te of R.deletionSegments)for(let K=0;K<te.count;K++)y.deletionLines[te.targetIndex+K]=j[te.originalOffset+K];else y.deletionLines.push(...j);if(R.additionSegments.length>0)for(const te of R.additionSegments)for(let K=0;K<te.count;K++)y.additionLines[te.targetIndex+K]=F[te.originalOffset+K];else y.additionLines.push(...F)}return{code:y,themeStyles:v,baseThemeType:m}}function BL({deletionLine:t,additionLine:n,deletionLineIndex:a,additionLineIndex:l,deletionDecorations:s,additionDecorations:u,lineDiffType:f,maxLineDiffLength:h}){if(t==null||n==null||f==="none"||(t=Fa(t),n=Fa(n),t.length>h||n.length>h))return;const c=f==="char"?yL(t,n):EL(t,n),m=[],v=[],g=f==="word-alt",y=c.at(-1);for(const E of c){const T=E===y;!E.added&&!E.removed?(Qo({item:E,arr:m,enableJoin:g,isNeutral:!0,isLastItem:T}),Qo({item:E,arr:v,enableJoin:g,isNeutral:!0,isLastItem:T})):E.removed?Qo({item:E,arr:m,enableJoin:g,isLastItem:T}):Qo({item:E,arr:v,enableJoin:g,isLastItem:T})}let b=0;for(const E of m)E[0]===1&&s.push(iv({line:a,spanStart:b,spanLength:E[1].length})),b+=E[1].length;b=0;for(const E of v)E[0]===1&&u.push(iv({line:l,spanStart:b,spanLength:E[1].length})),b+=E[1].length}function GL(){return{deletionContent:{push(t){this.value+=t,this.length++},value:"",length:0},additionContent:{push(t){this.value+=t,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function $L({deletionFile:t,additionFile:n,deletionInfo:a,additionInfo:l,highlighter:s,deletionDecorations:u,additionDecorations:f,languageOverride:h,options:{theme:c=Jt,...m}}){const v=h??Fi(t.name),g=h??Fi(n.name),{state:y,transformers:b}=xw(m.useTokenTransformer),E=typeof c=="string"?{...m,lang:"text",theme:c,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:sn("token"),tokenizeTimeLimit:0}:{...m,lang:"text",themes:c,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:sn("token"),tokenizeTimeLimit:0};return{deletionLines:t.contents===""?[]:(E.lang=v,y.lineInfo=a,E.decorations=u,q0(s.codeToHast(Fa(t.contents),E))),additionLines:n.contents===""?[]:(E.lang=g,E.decorations=f,y.lineInfo=l,q0(s.codeToHast(Fa(n.contents),E)))}}function uf(t){const n=t.lang??Fi(t.name),a=t.lang??(t.prevName!=null?Fi(t.prevName):"text");return n==="text"&&a==="text"}let qL=-1;var FL=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++qL}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(t={theme:Jt},n,a){this.options=t,this.onRenderUpdate=n,this.workerManager=a,a?.isWorkingPool()!==!0&&(this.highlighter=vd(t.theme??Jt)?uw():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(t){this.options=t}mergeOptions(t){this.options={...this.options,...t}}expandHunk(t,n,a=this.getOptionsWithDefaults().expansionLineCount){const l={...this.expandedHunks.get(t)??{fromStart:0,fromEnd:0}};(n==="up"||n==="both")&&(l.fromStart+=a),(n==="down"||n==="both")&&(l.fromEnd+=a),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(t,l)}getExpandedHunk(t){return this.expandedHunks.get(t)??r1}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(t){this.additionAnnotations={},this.deletionAnnotations={};for(const n of t){const a=(()=>{switch(n.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),l=a[n.lineNumber]??[];a[n.lineNumber]=l,l.push(n)}}getUnifiedLineDecoration({lineType:t}){return{gutterLineType:t}}getSplitLineDecoration({side:t,type:n}){return n!=="change"?{gutterLineType:n}:{gutterLineType:t==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement=t=>dw(t);getOptionsWithDefaults(){const{diffIndicators:t="bars",diffStyle:n="split",disableBackground:a=!1,disableFileHeader:l=!1,disableLineNumbers:s=!1,disableVirtualizationBuffers:u=!1,collapsed:f=!1,expandUnchanged:h=!1,collapsedContextThreshold:c=1,expansionLineCount:m=100,hunkSeparators:v="line-info",lineDiffType:g="word-alt",maxLineDiffLength:y=1e3,overflow:b="scroll",stickyHeader:E=!1,theme:T=Jt,headerRenderMode:N="default",tokenizeMaxLineLength:L=1e3,tokenizeMaxLength:A=i1,useTokenTransformer:R=!1,useCSSClasses:z=!1}=this.options;return{diffIndicators:t,diffStyle:n,disableBackground:a,disableFileHeader:l,disableLineNumbers:s,disableVirtualizationBuffers:u,collapsed:f,expandUnchanged:h,collapsedContextThreshold:c,expansionLineCount:m,hunkSeparators:v,lineDiffType:g,maxLineDiffLength:y,overflow:b,stickyHeader:E,theme:this.workerManager?.getDiffRenderOptions().theme??T,headerRenderMode:N,tokenizeMaxLineLength:L,tokenizeMaxLength:A,useTokenTransformer:R,useCSSClasses:z}}async initializeHighlighter(){return this.highlighter=await sw(_w(this.computedLang,this.options)),this.highlighter}hydrate(t){if(t==null)return;this.diff=t;const{options:n}=this.getRenderOptions(t),a=Rd(t,this.getTokenizeMaxLength());let l=this.workerManager?.getDiffResultCache(t);l!=null&&!Xr(n,l.options)&&(l=void 0),this.renderCache??={diff:t,highlighted:!a&&!uf(t),options:n,result:a?void 0:l?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!a&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=t.lang??Fi(t.name),this.initializeHighlighter())}getRenderOptions(t){const n=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:l,tokenizeMaxLineLength:s,lineDiffType:u,maxLineDiffLength:f}=this.getOptionsWithDefaults();return{theme:l,useTokenTransformer:Hw(this.options),tokenizeMaxLineLength:s,lineDiffType:u,maxLineDiffLength:f}})();this.getOptionsWithDefaults();const{renderCache:a}=this;return a?.result==null?{options:n,forceHighlight:!0}:!Kr(t,a.diff)||!Xr(n,a.options)?{options:n,forceHighlight:!0}:{options:n,forceHighlight:!1}}renderDiff(t=this.renderCache?.diff,n=jg){if(t==null)return;const{expandUnchanged:a=!1,collapsedContextThreshold:l}=this.getOptionsWithDefaults();let{options:s,forceHighlight:u}=this.getRenderOptions(t);const f=this.getMatchingWorkerResultCache(t,s);f!=null&&!this.hasHighlightedRenderCache(t,s)&&(this.renderCache={diff:t,highlighted:!0,renderRange:void 0,...f},u=!1),this.renderCache??={diff:t,highlighted:!1,options:s,result:void 0,renderRange:void 0};const h=t.additionLines.length>0||t.deletionLines.length>0,c=!h||uf(t)||Rd(t,this.getTokenizeMaxLength()),m=!Kr(t,this.renderCache.diff),v=!F_(this.renderCache.renderRange,n);if(this.workerManager?.isWorkingPool()===!0)(c||this.renderCache.result==null||!this.renderCache.highlighted&&(m||v))&&(this.renderCache.diff=t,this.renderCache.options=s,this.renderCache.highlighted=!1,(this.renderCache.result==null||m||v||u)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(t,n.startingLine,n.totalLines,OL(n)||a?!0:this.expandedHunks,l)),this.renderCache.renderRange=n),!c&&h&&(!this.renderCache.highlighted||u)&&this.workerManager.highlightDiffAST(this,t);else{this.computedLang=t.lang??Fi(t.name);const g=this.highlighter!=null&&vd(s.theme),y=this.highlighter!=null&&t0(this.computedLang),b=!c&&y;if(this.highlighter!=null&&g&&(u||c||!this.renderCache.highlighted&&b||this.renderCache.result==null)){const{result:E,options:T}=this.renderDiffWithHighlighter(t,this.highlighter,c||!y);this.renderCache={diff:t,options:T,highlighted:b,result:E,renderRange:void 0}}(!g||!c&&!y)&&this.asyncHighlight(t).then(({result:E,options:T})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(t,E,T,!c)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,n,this.renderCache.result):void 0}async asyncRender(t,n=jg){const{result:a}=await this.asyncHighlight(t);return this.processDiffResult(t,n,a)}createPreElement(t,n,a){const{diffIndicators:l,disableBackground:s,disableLineNumbers:u,overflow:f}=this.getOptionsWithDefaults();return gw({type:"diff",diffIndicators:l,disableBackground:s,disableLineNumbers:u,overflow:f,split:t,totalLines:n,customProperties:a})}async asyncHighlight(t){const n=Rd(t,this.getTokenizeMaxLength());this.computedLang=n?"text":t.lang??Fi(t.name);const a=this.highlighter!=null&&vd(this.options.theme??Jt),l=n||this.highlighter!=null&&t0(this.computedLang);return(this.highlighter==null||!a||!l)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(t,this.highlighter,n)}renderDiffWithHighlighter(t,n,a=!1){const{options:l}=this.getRenderOptions(t),{collapsedContextThreshold:s}=this.getOptionsWithDefaults();return{result:VL(t,n,l,{forcePlainText:a,expandedHunks:a?!0:void 0,collapsedContextThreshold:s}),options:l}}onHighlightSuccess(t,n,a,l=!0){if(this.renderCache==null)return;const s=!this.renderCache.highlighted||!Xr(this.renderCache.options,a)||!Kr(this.renderCache.diff,t);this.renderCache={diff:t,options:a,highlighted:l,result:n,renderRange:void 0},s&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(t,n){const a=this.workerManager?.getDiffResultCache(t);if(!(a==null||!Xr(n,a.options)))return a}hasHighlightedRenderCache(t,n){const{renderCache:a}=this;return a?.result!=null&&a.highlighted&&Kr(t,a.diff)&&Xr(n,a.options)}onHighlightError(t){console.error(t)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(t,n,{code:a,themeStyles:l,baseThemeType:s}){const{diffStyle:u,disableFileHeader:f,expandUnchanged:h,expansionLineCount:c,collapsedContextThreshold:m,hunkSeparators:v}=this.getOptionsWithDefaults();this.diff=t;const g=u==="unified";let y=[],b=[],E=[];const T=[],{additionLines:N,deletionLines:L}=a,A={rowCount:0,hunkSeparators:v,additionsContentAST:y,deletionsContentAST:b,unifiedContentAST:E,unifiedGutterAST:Mo(),deletionsGutterAST:Mo(),additionsGutterAST:Mo(),expansionLineCount:c,hunkData:T,incrementRowCount(W=1){A.rowCount+=W},pushToGutter(W,oe){switch(W){case"unified":A.unifiedGutterAST.children.push(oe);break;case"deletions":A.deletionsGutterAST.children.push(oe);break;case"additions":A.additionsGutterAST.children.push(oe);break}}},R=ay({fileDiff:t,errorPrefix:"DiffHunksRenderer.processDiffResult"}),z={size:0,side:void 0,increment(){this.size+=1},flush(){if(u!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(A.pushToGutter("additions",on(void 0,"buffer",this.size)),y?.push(Yo(this.size))):(A.pushToGutter("deletions",on(void 0,"buffer",this.size)),b?.push(Yo(this.size))),this.size=0,this.side=void 0}}},V=(W,oe,ce,M,Y)=>{A.pushToGutter(W,s1(oe,ce,M,Y))};function j(W){z.flush(),u==="unified"?Ld("unified",W,A):(Ld("deletions",W,A),Ld("additions",W,A))}this.pushFileLevelAnnotations(t,u,n,A),il({diff:t,diffStyle:u,startingLine:n.startingLine,totalLines:n.totalLines,expandedHunks:h?!0:this.expandedHunks,collapsedContextThreshold:m,callback:({hunkIndex:W,hunk:oe,collapsedBefore:ce,collapsedAfter:M,additionLine:Y,deletionLine:ne,type:ue})=>{const be=ne!=null?ne.splitLineIndex:Y.splitLineIndex,D=Y!=null?Y.unifiedLineIndex:ne.unifiedLineIndex;u==="split"&&ue!=="change"&&z.flush(),ce>0&&j({hunkIndex:W,collapsedLines:ce,rangeSize:Math.max(oe?.collapsedBefore??0,0),hunkSpecs:oe?.hunkSpecs,isFirstHunk:W===0,isLastHunk:!1,isExpandable:!t.isPartial});const $=u==="unified"?D:be,J={type:ue,hunkIndex:W,lineIndex:$,unifiedLineIndex:D,splitLineIndex:be,deletionLine:ne,additionLine:Y};if(u==="unified"){const pe=this.getUnifiedInjectedRowsForLine?.(J);pe?.before!=null&&lv(pe.before,A);let Fe=ne!=null?L[ne.lineIndex]:void 0,Be=Y!=null?N[Y.lineIndex]:void 0;if(Fe==null&&Be==null){const lt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(lt,{file:t.name}),new Error(lt)}const nn=ue==="change"?Y!=null?"change-addition":"change-deletion":ue,Rt=this.getUnifiedLineDecoration({type:ue,lineType:nn,additionLineIndex:Y?.lineIndex,deletionLineIndex:ne?.lineIndex});V("unified",Rt.gutterLineType,Y!=null?Y.lineNumber:ne.lineNumber,`${D},${be}`,Rt.gutterProperties),Be!=null?Be=Wo(Be,Rt.contentProperties):Fe!=null&&(Fe=Wo(Fe,Rt.contentProperties)),Ko({diffStyle:"unified",type:ue,deletionLine:Fe,additionLine:Be,unifiedSpan:this.getAnnotations("unified",ne?.lineNumber,Y?.lineNumber,W,$),createAnnotationElement:lt=>this.createAnnotationElement(lt),context:A}),pe?.after!=null&&lv(pe.after,A)}else{const pe=this.getSplitInjectedRowsForLine?.(J);pe?.before!=null&&ov(pe.before,A,z);let Fe=ne!=null?L[ne.lineIndex]:void 0,Be=Y!=null?N[Y.lineIndex]:void 0;const nn=this.getSplitLineDecoration({side:"deletions",type:ue,lineIndex:ne?.lineIndex}),Rt=this.getSplitLineDecoration({side:"additions",type:ue,lineIndex:Y?.lineIndex});if(Fe==null&&Be==null){const dt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(dt,{file:t.name}),new Error(dt)}const lt=(()=>{if(ue==="change"){if(Be==null)return"additions";if(Fe==null)return"deletions"}})();if(lt!=null){if(z.side!=null&&z.side!==lt)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");z.side=lt,z.increment()}const Sn=this.getAnnotations("split",ne?.lineNumber,Y?.lineNumber,W,$);if(Sn!=null&&z.size>0&&z.flush(),ne!=null){const dt=Wo(Fe,nn.contentProperties);V("deletions",nn.gutterLineType,ne.lineNumber,`${ne.unifiedLineIndex},${be}`,nn.gutterProperties),dt!=null&&(Fe=dt)}if(Y!=null){const dt=Wo(Be,Rt.contentProperties);V("additions",Rt.gutterLineType,Y.lineNumber,`${Y.unifiedLineIndex},${be}`,Rt.gutterProperties),dt!=null&&(Be=dt)}Ko({diffStyle:"split",type:ue,additionLine:Be,deletionLine:Fe,...Sn,createAnnotationElement:dt=>this.createAnnotationElement(dt),context:A}),pe?.after!=null&&ov(pe.after,A,z)}const ie=u==="split"&&oe!=null&&be===oe.splitLineStart+oe.splitLineCount-1,de=ie?oe.noEOFCRDeletions:!1,ve=ie?oe.noEOFCRAdditions:!1,xe=(ne?.noEOFCR??!1)||de,qe=(Y?.noEOFCR??!1)||ve;if(qe||xe){if(u==="split"&&z.flush(),xe){const pe=ue==="context"||ue==="context-expanded"?ue:"change-deletion";u==="unified"?(A.unifiedContentAST.push(Xo(pe)),A.pushToGutter("unified",on(pe,"metadata",1))):(A.deletionsContentAST.push(Xo(pe)),A.pushToGutter("deletions",on(pe,"metadata",1)),qe||(A.pushToGutter("additions",on(void 0,"buffer",1)),A.additionsContentAST.push(Yo(1))))}if(qe){const pe=ue==="context"||ue==="context-expanded"?ue:"change-addition";u==="unified"?(A.unifiedContentAST.push(Xo(pe)),A.pushToGutter("unified",on(pe,"metadata",1))):(A.additionsContentAST.push(Xo(pe)),A.pushToGutter("additions",on(pe,"metadata",1)),xe||(A.pushToGutter("deletions",on(void 0,"buffer",1)),A.deletionsContentAST.push(Yo(1))))}A.incrementRowCount(1)}M>0&&v!=="simple"&&j({hunkIndex:ue==="context-expanded"?W:W+1,collapsedLines:M,rangeSize:R,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!t.isPartial}),A.incrementRowCount(1)}}),u==="split"&&z.flush();const F=Math.max(DL(t.hunks),t.additionLines.length??0,t.deletionLines.length??0),te=n.bufferBefore>0||n.bufferAfter>0,K=!g&&t.type!=="deleted",ee=!g&&t.type!=="new",Q=A.rowCount>0||te;y=K&&Q?y:void 0,b=ee&&Q?b:void 0,E=g&&Q?E:void 0;const X=this.createPreElement(b!=null&&y!=null,F);return{unifiedGutterAST:g&&Q?A.unifiedGutterAST.children:void 0,unifiedContentAST:E,deletionsGutterAST:ee&&Q?A.deletionsGutterAST.children:void 0,deletionsContentAST:b,additionsGutterAST:K&&Q?A.additionsGutterAST.children:void 0,additionsContentAST:y,hunkData:T,preNode:X,themeStyles:l,baseThemeType:s,headerElement:f?void 0:this.renderHeader(this.diff),totalLines:F,rowCount:A.rowCount,bufferBefore:n.bufferBefore,bufferAfter:n.bufferAfter,css:""}}renderCodeAST(t,n){const a=t==="unified"?n.unifiedGutterAST:t==="deletions"?n.deletionsGutterAST:n.additionsGutterAST,l=t==="unified"?n.unifiedContentAST:t==="deletions"?n.deletionsContentAST:n.additionsContentAST;if(a==null||l==null)return;const s=Mo(a);return s.properties.style=`grid-row: span ${n.rowCount}`,[s,Iw(l,n.rowCount)]}renderFullAST(t,n=[]){const a=this.getOptionsWithDefaults().hunkSeparators==="line-info",l=this.renderCodeAST("unified",t);if(l!=null)return n.push(ye({tagName:"code",children:l,properties:{"data-code":"","data-container-size":a?"":void 0,"data-unified":""}})),{...t.preNode,children:n};const s=this.renderCodeAST("deletions",t);s!=null&&n.push(ye({tagName:"code",children:s,properties:{"data-code":"","data-container-size":a?"":void 0,"data-deletions":""}}));const u=this.renderCodeAST("additions",t);return u!=null&&n.push(ye({tagName:"code",children:u,properties:{"data-code":"","data-container-size":a?"":void 0,"data-additions":""}})),{...t.preNode,children:n}}renderFullHTML(t,n=[]){return $a(this.renderFullAST(t,n))}renderPartialHTML(t,n){return n==null?$a(t):$a(ye({tagName:"code",children:t,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${n}`]:""}}))}pushFileLevelAnnotations(t,n,a,l){if(!X_(a))return;const s=t.type!=="new"?av(F0(this.deletionAnnotations)):[],u=t.type!=="deleted"?av(F0(this.additionAnnotations)):[];if(s.length===0&&u.length===0)return;const f=-1,h=-1,{createAnnotationElement:c}=this;if(n==="unified"){Ko({diffStyle:n,type:"context",unifiedSpan:{type:"annotation",hunkIndex:f,lineIndex:h,annotations:s.concat(u)},createAnnotationElement:c,context:l});return}Ko({diffStyle:n,type:"context",deletionSpan:{type:"annotation",hunkIndex:f,lineIndex:h,annotations:s},additionSpan:{type:"annotation",hunkIndex:f,lineIndex:h,annotations:u},createAnnotationElement:c,context:l})}getAnnotations(t,n,a,l,s){const u={type:"annotation",hunkIndex:l,lineIndex:s,annotations:[]};if(n!=null)for(const h of this.deletionAnnotations[n]??[])u.annotations.push(qa(h));const f={type:"annotation",hunkIndex:l,lineIndex:s,annotations:[]};if(a!=null)for(const h of this.additionAnnotations[a]??[])(t==="unified"?u:f).annotations.push(qa(h));if(t==="unified")return u.annotations.length>0?u:void 0;if(!(f.annotations.length===0&&u.annotations.length===0))return{deletionSpan:u,additionSpan:f}}renderHeader(t){const{headerRenderMode:n,stickyHeader:a}=this.getOptionsWithDefaults();return hw({fileOrDiff:t,mode:n,stickyHeader:a})}};function av(t){return t?.map(n=>qa(n))??[]}const YL=new Intl.PluralRules("en-US");function rv(t){return`${t} unmodified line${YL.select(t)==="one"?"":"s"}`}function lv(t,n){for(const a of t)n.unifiedContentAST.push(a.content),n.pushToGutter("unified",a.gutter),n.incrementRowCount(1)}function ov(t,n,a){for(const{deletion:l,addition:s}of t){if(l==null&&s==null)continue;const u=l!=null&&s!=null?void 0:l==null?"deletions":"additions";(u==null||a.side!==u)&&a.flush(),l!=null&&(n.deletionsContentAST.push(l.content),n.pushToGutter("deletions",l.gutter)),s!=null&&(n.additionsContentAST.push(s.content),n.pushToGutter("additions",s.gutter)),u!=null&&(a.side=u,a.increment()),n.incrementRowCount(1)}}function Ko({diffStyle:t,type:n,deletionLine:a,additionLine:l,unifiedSpan:s,deletionSpan:u,additionSpan:f,createAnnotationElement:h,context:c}){let m=!1;if(t==="unified"){if(l!=null?c.unifiedContentAST.push(l):a!=null&&c.unifiedContentAST.push(a),s!=null){const v=n==="change"?a!=null?"change-deletion":"change-addition":n;c.unifiedContentAST.push(h(s)),c.pushToGutter("unified",on(v,"annotation",1)),m=!0}}else if(t==="split"){if(a!=null&&c.deletionsContentAST.push(a),l!=null&&c.additionsContentAST.push(l),u!=null){const v=n==="change"?a!=null?"change-deletion":"context":n;c.deletionsContentAST.push(h(u)),c.pushToGutter("deletions",on(v,"annotation",1)),m=!0}if(f!=null){const v=n==="change"?l!=null?"change-addition":"context":n;c.additionsContentAST.push(h(f)),c.pushToGutter("additions",on(v,"annotation",1)),m=!0}}m&&c.incrementRowCount(1)}function Ld(t,{hunkIndex:n,collapsedLines:a,rangeSize:l,hunkSpecs:s,isFirstHunk:u,isLastHunk:f,isExpandable:h},c){if(a<=0)return;const m=t==="unified"?c.unifiedContentAST:t==="deletions"?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators==="metadata"){s!=null&&(c.pushToGutter(t,Ua({type:"metadata",content:s,isFirstHunk:u,isLastHunk:f})),m.push(Ua({type:"metadata",content:s,isFirstHunk:u,isLastHunk:f})),t!=="additions"&&c.incrementRowCount(1));return}if(c.hunkSeparators==="simple"){n>0&&(c.pushToGutter(t,Ua({type:"simple",isFirstHunk:u,isLastHunk:!1})),m.push(Ua({type:"simple",isFirstHunk:u,isLastHunk:!1})),t!=="additions"&&c.incrementRowCount(1));return}const v=kL(t,n),g=l>c.expansionLineCount,y=h?n:void 0;c.pushToGutter(t,Ua({type:c.hunkSeparators,content:rv(a),expandIndex:y,chunked:g,slotName:v,isFirstHunk:u,isLastHunk:f})),m.push(Ua({type:c.hunkSeparators,content:rv(a),expandIndex:y,chunked:g,slotName:v,isFirstHunk:u,isLastHunk:f})),t!=="additions"&&c.incrementRowCount(1),c.hunkData.push({slotName:v,hunkIndex:n,lines:a,type:t,expandable:h?{up:!u,down:!f,chunked:g}:void 0})}function Wo(t,n){return t==null||t.type!=="element"||n==null?t:{...t,properties:{...t.properties,...n}}}function Rd(t,n){return Math.max(t.additionLines.length,t.deletionLines.length)>n}function XL(t,n){return t.lineNumber===n.lineNumber&&t.side===n.side&&t.metadata===n.metadata}function QL(t,n){return t.slotName===n.slotName&&t.hunkIndex===n.hunkIndex&&t.lines===n.lines&&t.type===n.type&&t.expandable?.chunked===n.expandable?.chunked&&t.expandable?.up===n.expandable?.up&&t.expandable?.down===n.expandable?.down}function ZL(t){return{theme:t?.theme,disableLineNumbers:t?.disableLineNumbers,overflow:t?.overflow,collapsed:t?.collapsed,disableFileHeader:t?.disableFileHeader,disableVirtualizationBuffers:t?.disableVirtualizationBuffers,stickyHeader:t?.stickyHeader,preferredHighlighter:t?.preferredHighlighter,useCSSClasses:t?.useCSSClasses,useTokenTransformer:t?.useTokenTransformer,tokenizeMaxLineLength:t?.tokenizeMaxLineLength,tokenizeMaxLength:t?.tokenizeMaxLength,diffStyle:t?.diffStyle,diffIndicators:t?.diffIndicators,disableBackground:t?.disableBackground,hunkSeparators:typeof t?.hunkSeparators=="function"?"custom":t?.hunkSeparators,expandUnchanged:t?.expandUnchanged,collapsedContextThreshold:t?.collapsedContextThreshold,lineDiffType:t?.lineDiffType,maxLineDiffLength:t?.maxLineDiffLength,expansionLineCount:t?.expansionLineCount,headerRenderMode:t?.renderCustomHeader!=null?"custom":"default"}}let KL=-1;var oy=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++KL}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(n={theme:Jt},a,l=!1){this.options=n,this.workerManager=a,this.isContainerManaged=l,this.hunksRenderer=this.createHunksRenderer(n),this.resizeManager=new ME,this.scrollSyncManager=new RL,this.interactionManager=new TE("diff",Zg(n,typeof n.hunkSeparators=="function"||(n.hunkSeparators??"line-info")==="line-info"||n.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(n){return ZL(n)}createHunksRenderer(n){return new FL(this.getHunksRendererOptions(n),this.handleHighlightRender,this.workerManager)}getLineIndex=(n,a="additions")=>{if(this.fileDiff==null)return;const l=this.fileDiff.hunks.at(-1);let s,u;e:for(const f of this.fileDiff.hunks){let h=a==="deletions"?f.deletionStart:f.additionStart;const c=a==="deletions"?f.deletionCount:f.additionCount;let m=f.splitLineStart,v=f.unifiedLineStart;if(n<h){const g=h-n;s=Math.max(v-g,0),u=Math.max(m-g,0);break e}if(n>=h+c){if(f===l){const g=n-(h+c);s=v+f.unifiedLineCount+g,u=m+f.splitLineCount+g;break e}continue}for(const g of f.hunkContent)if(g.type==="context")if(n<h+g.lines){const y=n-h;u=m+y,s=v+y;break e}else h+=g.lines,m+=g.lines,v+=g.lines;else{const y=a==="deletions"?g.deletions:g.additions;if(n<h+y){const b=n-h;s=v+(a==="additions"?g.deletions:0)+b,u=m+b;break e}else h+=y,m+=Math.max(g.deletions,g.additions),v+=g.deletions+g.additions}break e}if(!(s==null||u==null))return[s,u]};setOptions(n){n!=null&&(this.options=n,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(n)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Zg(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(n){this.options={...this.options,...n}}setThemeType(n){(this.options.themeType??"system")!==n&&(this.mergeOptions({themeType:n}),this.applyCachedThemeState(n))}applyCachedThemeState(n){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const a=this.appliedThemeCSS.baseThemeType??n;return this.appliedThemeCSS.themeType===a?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,n,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!mf(this.appliedThemeCSS.theme,this.options.theme??Jt)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(n){this.lineAnnotations=n}canPartiallyRender(n,a,l){return!(n||a||l||typeof this.options.hunkSeparators=="function")}setSelectedLines(n,a){this.interactionManager.setSelection(n,a)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:n="split",overflow:a="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,a==="wrap"),a==="scroll"&&n==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(n=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,n||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,n||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,n?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(n){const{fileContainer:a,prerenderedHTML:l,preventEmit:s=!1,lineAnnotations:u,oldFile:f,newFile:h,fileDiff:c}=n;this.hydrateElements(a,l),eR(this.pre,WL({fileDiff:c,oldFile:f,newFile:h}),this.options.collapsed)||tR(this.headerElement,JL({fileDiff:c,oldFile:f,newFile:h}),this.options.disableFileHeader)?this.render({...n,preventEmit:!0}):this.hydrationSetup({fileDiff:c,oldFile:f,newFile:h,lineAnnotations:u}),s||this.emitPostRender()}hydrateElements(n,a){this.fileContainer!==n&&this.emitPostRender(!0),Qw(n,a);for(const l of n.shadowRoot?.children??[]){if(l instanceof SVGElement){this.spriteSVG=l;continue}if(l instanceof HTMLElement){if(l instanceof HTMLPreElement){this.pre=l;for(const s of l.children)!(s instanceof HTMLElement)||s.tagName.toLowerCase()!=="code"||("deletions"in s.dataset&&(this.codeDeletions=s),"additions"in s.dataset&&(this.codeAdditions=s),"unified"in s.dataset&&(this.codeUnified=s));continue}if("diffsHeader"in l.dataset){this.headerElement=l;continue}if(l instanceof HTMLStyleElement&&l.hasAttribute("data-theme-css")){this.themeCSSStyle=l;continue}if(l instanceof HTMLStyleElement&&l.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=l,this.appliedUnsafeCSS=l.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=n,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:n,oldFile:a,newFile:l,lineAnnotations:s}){this.lineAnnotations=s??this.lineAnnotations,this.additionFile=l,this.deletionFile=a,this.fileDiff=n??(a!=null&&l!=null?sf(a,l,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(n,a,l)=>{this.expandHunk(n,a,l)};expandHunk=(n,a,l)=>{this.hunksRenderer.expandHunk(n,a,l),this.rerender()};render({oldFile:n,newFile:a,fileDiff:l,deferManagers:s=!1,forceRender:u=!1,preventEmit:f=!1,lineAnnotations:h,fileContainer:c,containerWrapper:m,renderRange:v}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:g=!1,themeType:y="system"}=this.options,b=g?void 0:v,E=this.hasThemeChanged(),T=n!=null&&a!=null&&(!V0(n,this.deletionFile)||!V0(a,this.additionFile));let N=l!=null&&l!==this.fileDiff;const L=h!=null&&(h.length>0||this.lineAnnotations.length>0)?h!==this.lineAnnotations:!1;if(!g&&F_(b,this.renderRange)&&!u&&!L&&!E&&(l!=null&&l===this.fileDiff||l==null&&!T))return this.applyCachedThemeState(y);const{renderRange:A}=this;if(this.renderRange=b,this.deletionFile=n,this.additionFile=a,l!=null?this.fileDiff=l:n!=null&&a!=null&&T&&(N=!0,this.fileDiff=sf(n,a,this.options.parseDiffOptions)),N&&(this.cachedHeaderHTML=void 0),h!=null&&this.setLineAnnotations(h),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:R=!1,disableFileHeader:z=!1}=this.options;if(z&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),c=this.getOrCreateFileContainer(c,m),this.applyCachedThemeState(y),g){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const V=this.hunksRenderer.renderDiff(this.fileDiff,l1);V!=null&&this.applyThemeState(c,V.themeStyles,y,V.baseThemeType),V?.headerElement!=null&&this.applyHeaderToDOM(V.headerElement,c),this.renderSeparators([]),this.injectUnsafeCSS()}catch(V){if(R)throw V;console.error(V),V instanceof Error&&this.applyErrorToDOM(V,c)}return f||this.emitPostRender(),!0}try{const V=this.getOrCreatePreNode(c);if(!(this.canPartiallyRender(u,L,T||N||E)&&this.applyPartialRender({previousRenderRange:A,renderRange:b}))){const j=this.hunksRenderer.renderDiff(this.fileDiff,b);if(j==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(c,j.themeStyles,y,j.baseThemeType),j.headerElement!=null&&this.applyHeaderToDOM(j.headerElement,c),j.additionsContentAST!=null||j.deletionsContentAST!=null||j.unifiedContentAST!=null?this.applyHunksToDOM(V,j):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(j.hunkData)}this.applyBuffers(V,b),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,s||this.flushManagers()}catch(V){if(R)throw V;console.error(V),V instanceof Error&&this.applyErrorToDOM(V,c)}return f||this.emitPostRender(),!0}emitPostRender(n=!1){const{fileContainer:a,options:{onPostRender:l}}=this;if(n){if(!this.mounted||(this.mounted=!1,a==null))return;this.options.onPostRender?.(a,this,"unmount");return}if(a==null)return;const s=this.mounted?"update":"mount";this.mounted=!0,l?.(a,this,s)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:n}of this.separatorCache.values())n.remove();this.separatorCache.clear();for(const{element:n}of this.annotationCache.values())n.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(n){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const a=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",a.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${n}px`),!0}primeHighlightCache(){const{fileDiff:n,workerManager:a}=this;if(n==null||a==null||uf(n))return;const l=this.options.tokenizeMaxLength??1e5;Math.max(n.additionLines.length,n.deletionLines.length)>l||a.primeDiffHighlightCache(n)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(n){const{hunkSeparators:a}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof a!="function"){for(const{element:s}of this.separatorCache.values())s.remove();this.separatorCache.clear();return}const l=new Map(this.separatorCache);for(const s of n){const u=s.slotName;let f=this.separatorCache.get(u);if(f==null||!QL(s,f.hunkData)){f?.element.remove();const h=document.createElement("div");h.style.display="contents",h.slot=s.slotName;const c=a(s,this);c!=null&&h.appendChild(c),this.fileContainer.appendChild(h),f={element:h,hunkData:s},this.separatorCache.set(u,f)}l.delete(u)}for(const[s,{element:u}]of l.entries())this.separatorCache.delete(s),u.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:l}of this.annotationCache.values())l.remove();this.annotationCache.clear();return}const n=new Map(this.annotationCache),{renderAnnotation:a}=this.options;if(a!=null&&this.lineAnnotations.length>0)for(const[l,s]of this.lineAnnotations.entries()){const u=`${l}-${qa(s)}`;let f=this.annotationCache.get(u);if(f==null||!XL(s,f.annotation)){f?.element.remove();const h=a(s);if(h==null)continue;f={element:Pw(qa(s)),annotation:s},f.element.appendChild(h),this.fileContainer.appendChild(f.element),this.annotationCache.set(u,f)}n.delete(u)}for(const[l,{element:s}]of n.entries())this.annotationCache.delete(l),s.remove()}renderGutterUtility(){const{renderGutterUtility:n}=this.options;if(this.fileContainer==null||n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const a=n(this.interactionManager.getHoveredLine);if(a!=null&&this.gutterUtilityContent!=null)return;if(a==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const l=Vw();l.appendChild(a),this.fileContainer.appendChild(l),this.gutterUtilityContent=l}getOrCreateFileContainer(n,a){const{fileContainer:l}=this,s=n??l??document.createElement("diffs-container"),u=l!==s;return u&&this.emitPostRender(!0),this.fileContainer=s,l!=null&&u&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),a!=null&&this.fileContainer.parentNode!==a&&a.appendChild(this.fileContainer),u&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(n){const{shadowRoot:a}=n;if(a!=null)for(const l of a.children)l instanceof SVGElement?this.spriteSVG??=l:X0(l)&&l.hasAttribute("data-theme-css")?(this.themeCSSStyle??=l,this.hasAdoptedThemeCSS=!0):X0(l)&&l.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=l,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(n){const a=n.shadowRoot??n.attachShadow({mode:"open"});if(this.spriteSVG==null){const l=document.createElement("div");l.innerHTML=zw;const s=l.firstChild;s instanceof SVGElement&&(this.spriteSVG=s)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==a&&a.appendChild(this.spriteSVG)}getOrCreatePreNode(n){const a=n.shadowRoot??n.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,a.appendChild(this.pre)):this.pre.parentNode!==a&&(a.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(n){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const a of Array.from(n.children))a instanceof HTMLElement&&(a.hasAttribute("data-unified")?this.codeUnified=a:a.hasAttribute("data-deletions")?this.codeDeletions=a:a.hasAttribute("data-additions")&&(this.codeAdditions=a))}applyHeaderToDOM(n,a){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:l}=this,s=this.cachedHeaderHTML??$a(n);if(this.cachedHeaderHTML=s,s!==this.lastRenderedHeaderHTML){const v=document.createElement("div");v.innerHTML=s;const g=v.firstElementChild;if(!(g instanceof HTMLElement))return;this.headerElement!=null?a.shadowRoot?.replaceChild(g,this.headerElement):a.shadowRoot?.prepend(g),this.headerElement=g,this.lastRenderedHeaderHTML=s}if(this.isContainerManaged||l==null)return;const{renderCustomHeader:u,renderHeaderPrefix:f,renderHeaderMetadata:h}=this.options;if(u!=null){const v=u(l)??void 0;this.headerCustom=this.upsertHeaderSlotElement(a,this.headerCustom,pf,v),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const c=f?.(l)??void 0,m=h?.(l)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(a,this.headerPrefix,gv,c),this.headerMetadata=this.upsertHeaderSlotElement(a,this.headerMetadata,vv,m),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(n,a,l,s){if(s==null){a?.remove();return}const u=a??this.createHeaderSlotElement(l);return a==null&&n.appendChild(u),this.replaceHeaderSlotContent(u,s),u}replaceHeaderSlotContent(n,a){n.replaceChildren(),a instanceof Element?n.appendChild(a):n.innerText=`${a}`}createHeaderSlotElement(n){const a=document.createElement("div");return a.slot=n,a}injectUnsafeCSS(){const{unsafeCSS:n}=this.options,a=this.fileContainer?.shadowRoot;if(a!=null){if(n==null||n===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===a&&this.appliedUnsafeCSS===n||(this.unsafeCSSStyle??=Bw(),this.unsafeCSSStyle.parentNode!==a&&a.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=qw(n),this.appliedUnsafeCSS=n)}}applyThemeState(n,a,l,s){const u=n.shadowRoot??n.attachShadow({mode:"open"}),f=s??l,h=this.options.theme??Jt,c=typeof h=="string"?h:{...h},m=af(u);if(this.themeCSSStyle?.parentNode===u&&this.appliedThemeCSS?.themeStyles===a&&this.appliedThemeCSS.themeType===f&&this.appliedThemeCSS.scrollbarGutter===m){this.appliedThemeCSS.theme=c;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===u){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:c,themeStyles:a,themeType:f,baseThemeType:s,scrollbarGutter:m};return}this.themeCSSStyle=Kw({shadowRoot:u,currentNode:this.themeCSSStyle,themeCSS:Fw(a,f,m)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:c,themeStyles:a,themeType:f,baseThemeType:s,scrollbarGutter:m}:void 0}hydrateMeasuredScrollbar(){const n=this.fileContainer?.shadowRoot;n==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=Yw(this.themeCSSStyle.textContent??"",af(n)))}applyHunksToDOM(n,a){const{overflow:l="scroll"}=this.options,s=(this.options.hunkSeparators??"line-info")==="line-info",u=l==="wrap"?a.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,a);let f=!1;const h=[],c=this.hunksRenderer.renderCodeAST("unified",a),m=this.hunksRenderer.renderCodeAST("deletions",a),v=this.hunksRenderer.renderCodeAST("additions",a);c!=null?(f=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=Cd({code:this.codeUnified,columnType:"unified",rowSpan:u,containerSize:s}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(c),h.push(this.codeUnified)):m!=null||v!=null?(m!=null?(f=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Cd({code:this.codeDeletions,columnType:"deletions",rowSpan:u,containerSize:s}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(m),h.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),v!=null?(f=f||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Cd({code:this.codeAdditions,columnType:"additions",rowSpan:u,containerSize:s}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(v),h.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),h.length===0?n.textContent="":f&&n.replaceChildren(...h),this.lastRowCount=a.rowCount}applyPartialRender({previousRenderRange:n,renderRange:a}){const{pre:l,codeUnified:s,codeAdditions:u,codeDeletions:f,options:{diffStyle:h="split"}}=this;if(l==null||n==null||a==null||!Number.isFinite(n.totalLines)||!Number.isFinite(a.totalLines)||this.lastRowCount==null)return!1;const c=this.getCodeColumns(h,s,f,u);if(c==null)return!1;const m=n.startingLine,v=a.startingLine,g=m+n.totalLines,y=v+a.totalLines,b=Math.max(m,v),E=Math.min(g,y);if(E<=b)return!1;const T=Math.max(0,b-m),N=Math.max(0,g-E),L=this.trimColumns({columns:c,trimStart:T,trimEnd:N,previousStart:m,overlapStart:b,overlapEnd:E,diffStyle:h});if(L<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<L)throw new Error("applyPartialRender: trimmed beyond DOM row count");let A=this.lastRowCount-L;const R=(F,te)=>{if(!(te<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:F,totalLines:te,bufferBefore:0,bufferAfter:0})},z=R(v,Math.max(b-v,0));if(z==null&&v<b)return!1;const V=R(E,Math.max(y-E,0));if(V==null&&y>E)return!1;const j=(F,te)=>{if(F!=null){if(h==="unified"&&!Array.isArray(c))this.insertPartialHTML(h,c,F,te);else if(h==="split"&&Array.isArray(c))this.insertPartialHTML(h,c,F,te);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");A+=F.rowCount}};return this.cleanupErrorWrapper(),j(z,"afterbegin"),j(V,"beforeend"),this.lastRowCount!==A&&(this.applyRowSpan(h,c,A),this.lastRowCount=A),!0}insertPartialHTML(n,a,l,s){if(n==="unified"&&!Array.isArray(a)){const u=this.hunksRenderer.renderCodeAST("unified",l);this.renderPartialColumn(a,u,s)}else if(n==="split"&&Array.isArray(a)){const u=this.hunksRenderer.renderCodeAST("deletions",l),f=this.hunksRenderer.renderCodeAST("additions",l);this.renderPartialColumn(a[0],u,s),this.renderPartialColumn(a[1],f,s)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(n,a,l){if(n==null||a==null)return;const s=sv(a[0]),u=sv(a[1]);if(s==null||u==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const f=u.at(0);l==="beforeend"&&f?.type==="element"&&typeof f.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(f.properties["data-buffer-size"],n.content.children[n.content.children.length-1],n.gutter.children[n.gutter.children.length-1],s,u,!0);const h=u.at(-1);l==="afterbegin"&&h?.type==="element"&&typeof h.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(h.properties["data-buffer-size"],n.content.children[0],n.gutter.children[0],s,u,!1),n.gutter.insertAdjacentHTML(l,this.hunksRenderer.renderPartialHTML(s)),n.content.insertAdjacentHTML(l,this.hunksRenderer.renderPartialHTML(u))}mergeBuffersIfNecessary(n,a,l,s,u,f){if(!(a instanceof HTMLElement)||!(l instanceof HTMLElement))return;const h=this.getBufferSize(a.dataset);h!=null&&(f?(s.shift(),u.shift()):(s.pop(),u.pop()),this.updateBufferSize(a,h+n),this.updateBufferSize(l,h+n))}applyRowSpan(n,a,l){const s=u=>{u!=null&&(u.gutter.style.setProperty("grid-row",`span ${l}`),u.content.style.setProperty("grid-row",`span ${l}`))};if(n==="unified"&&!Array.isArray(a))s(a);else if(n==="split"&&Array.isArray(a))s(a[0]),s(a[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(n,a,l){let s=0,u=0,f=0,h=!1;const c=l>=0;if(n==null)return 0;const m=Array.from(n.content.children),v=Array.from(n.gutter.children);if(m.length!==v.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;f<m.length&&!(a<=0&&!c&&!h);){const g=v[f],y=m[f];if(f++,!(g instanceof HTMLElement)||!(y instanceof HTMLElement))throw console.error({gutterElement:g,contentElement:y}),new Error("FileDiff.trimColumnRows: invalid row elements");if(h&&(h=!1,g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in y.dataset||g.dataset.gutterBuffer==="metadata"&&"noNewline"in y.dataset)){g.remove(),y.remove(),u++;continue}if("lineIndex"in g.dataset&&"lineIndex"in y.dataset){(a>0||c&&s>=l)&&(g.remove(),y.remove(),a>0&&(a--,a===0&&(h=!0)),u++),s++;continue}if("separator"in g.dataset&&"separator"in y.dataset){(a>0||c&&s>=l)&&(g.remove(),y.remove(),u++);continue}if(g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in y.dataset){(a>0||c&&s>=l)&&(g.remove(),y.remove(),u++);continue}if(g.dataset.gutterBuffer==="metadata"&&"noNewline"in y.dataset){(a>0||c&&s>=l)&&(g.remove(),y.remove(),u++);continue}if(g.dataset.gutterBuffer==="buffer"&&"contentBuffer"in y.dataset){const b=this.getBufferSize(y.dataset);if(b==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(a>0){const E=Math.min(a,b),T=b-E;T>0?(this.updateBufferSize(g,T),this.updateBufferSize(y,T),u+=E):(g.remove(),y.remove(),u+=b),a-=E,a===0&&T===0&&(h=!0)}else if(c){const E=s,T=s+b-1;if(l<=E)g.remove(),y.remove(),u+=b;else if(l<=T){const N=T-l+1,L=b-N;this.updateBufferSize(g,L),this.updateBufferSize(y,L),u+=N}}s+=b;continue}throw console.error({gutterElement:g,contentElement:y}),new Error("FileDiff.trimColumnRows: unknown row elements")}return u}trimColumns({columns:n,diffStyle:a,overlapEnd:l,overlapStart:s,previousStart:u,trimEnd:f,trimStart:h}){const c=Math.max(0,s-u),m=l-u;if(m<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const v=h>0,g=f>0;if(!v&&!g)return 0;const y=v?c:0,b=g?m:-1;if(a==="unified"&&!Array.isArray(n))return this.trimColumnRows(n,y,b);if(a==="split"&&Array.isArray(n)){const E=this.trimColumnRows(n[0],y,b),T=this.trimColumnRows(n[1],y,b);if(n[0]!=null&&n[1]!=null&&E!==T)throw new Error("FileDiff.trimColumns: split columns out of sync");return n[0]!=null?E:T}else throw console.error({diffStyle:a,columns:n}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(n){const a=Number.parseInt(n?.bufferSize??"",10);return Number.isNaN(a)?void 0:a}updateBufferSize(n,a){n.dataset.bufferSize=`${a}`,n.style.setProperty("grid-row",`span ${a}`),n.style.setProperty("min-height",`calc(${a} * 1lh)`)}getCodeColumns(n,a,l,s){function u(f){if(f==null)return;const h=f.children[0],c=f.children[1];if(!(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||h.dataset.gutter==null||c.dataset.content==null))return{gutter:h,content:c}}if(n==="unified")return u(a);{const f=u(l),h=u(s);return f!=null||h!=null?[f,h]:void 0}}applyBuffers(n,a){if(a==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}a.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",n.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${a.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),a.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",n.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${a.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(n,{additionsContentAST:a,deletionsContentAST:l,totalLines:s},u){const{diffIndicators:f="bars",disableBackground:h=!1,disableLineNumbers:c=!1,overflow:m="scroll",diffStyle:v="split"}=this.options,g={type:"diff",diffIndicators:f,disableBackground:h,disableLineNumbers:c,overflow:m,split:v==="unified"?!1:a!=null&&l!=null,totalLines:s,customProperties:u};Uw(g,this.appliedPreAttributes)||(Zw(n,g),this.appliedPreAttributes=g)}applyErrorToDOM(n,a){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const l=a.shadowRoot??a.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",l.appendChild(this.errorWrapper);const s=document.createElement("div");s.dataset.errorMessage="",s.innerText=n.message,this.errorWrapper.appendChild(s);const u=document.createElement("pre");u.dataset.errorStack="",u.innerText=n.stack??"No Error Stack",this.errorWrapper.appendChild(u)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function WL({fileDiff:t,oldFile:n,newFile:a}){return t!=null&&t.hunks.length>0||n!=null||a!=null}function JL({fileDiff:t,oldFile:n,newFile:a}){return t!=null||n!=null||a!=null}function eR(t,n,a=!1){return!a&&t==null&&n}function tR(t,n,a=!1){return t==null&&n&&!a}function sv(t){if(!(t==null||t.type!=="element"))return t.children??[]}function nR({fileDiff:t,metrics:n,disableFileHeader:a,hunkSeparators:l,expandUnchanged:s,expandedHunks:u,collapsedContextThreshold:f}){let h=Va(n,a),c=h;const m=s?!0:u,v=t.hunks.length-1;for(let g=0;g<t.hunks.length;g++){const y=t.hunks[g];if(y==null)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const b=dl({isPartial:t.isPartial,rangeSize:y.collapsedBefore,expandedHunks:m,hunkIndex:g,collapsedContextThreshold:f}),E=(b.fromStart+b.fromEnd)*n.lineHeight;if(h+=E,c+=E,b.collapsedLines>0){const L=Wr({type:l,metrics:n,hunkIndex:g,hunkSpecs:y.hunkSpecs})?.totalHeight??0;h+=L,c+=L}h+=y.splitLineCount*n.lineHeight,c+=y.unifiedLineCount*n.lineHeight;const T=iR(y);h+=T.split*n.lineHeight,c+=T.unified*n.lineHeight;const N=g===v?fl({fileDiff:t,hunkIndex:g,expandedHunks:m,collapsedContextThreshold:f,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(N!=null){const L=(N.fromStart+N.fromEnd)*n.lineHeight;if(h+=L,c+=L,N.collapsedLines>0){const A=Jr({type:l,metrics:n})?.totalHeight??0;h+=A,c+=A}}}if(t.hunks.length>0){const g=K_(n);h+=g,c+=g}return{splitHeight:h,unifiedHeight:c}}function iR(t){if(!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return{split:0,unified:0};const n=t.hunkContent.at(-1);if(n==null)return{split:0,unified:0};if(n.type==="context"){const a=n.lines>0?1:0;return{split:a,unified:a}}return aR(t,n)}function aR(t,n){const a=(n.deletions>0&&t.noEOFCRDeletions?1:0)+(n.additions>0&&t.noEOFCRAdditions?1:0),l=n.deletions>0&&t.noEOFCRDeletions,s=n.additions>0&&t.noEOFCRAdditions;return{split:l||s?1:0,unified:a}}const cf=5e3;let rR=-1;var lR=class extends oy{__id=`little-virtualized-file-diff:${++rR}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(t,n,a,l,s=!1){super(t,l,s),this.virtualizer=n,this.metrics=xd(a)}setMetrics(t,n=!1){const a=xd(t);!n&&Nd(this.metrics,a)||(this.metrics=a,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(t){this.syncLineAnnotations(t)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(t){return t==null||t===this.lineAnnotations||t.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(t),!0)}setFileAnnotationHeight(t){const n=this.cache.fileAnnotationHeight;return t===n?!1:(this.cache.fileAnnotationHeight=t,this.cache.measuredHeightDeltaTotal+=t-n,!0)}hasFileAnnotations(t=this.fileDiff){return t==null||!Mw(this.lineAnnotations)?!1:this.lineAnnotations.some(n=>n.lineNumber!==0?!1:t.type==="new"?n.side==="additions":t.type==="deleted"?n.side==="deletions":!0)}getLineHeight(t,n=!1){return this.getEstimatedLineHeight(n)+(this.cache.heightDeltas.get(t)??0)}getEstimatedLineHeight(t=!1){const n=t?2:1;return this.metrics.lineHeight*n}setOptions(t){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(t==null)return;const{options:n}=this,a=!yv(n,t),l=a&&fR(n,t);super.setOptions(t),l&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:hR(n,t)}),a&&(this.forceRenderOverride=!0),a&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,l)}setThemeType(t){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(t)}resetLayoutCache({forceSimpleRecompute:t=!1,includeEstimatedHeights:n=!1}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),n&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),t&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let t=!1;const{overflow:n="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(t=!0),this.height=0,t;if(this.top=this.getVirtualizedTop(),n==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return t;const a=this.getDiffStyle(),l=a==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],s=this.hasFileAnnotations(this.fileDiff);if(this.renderRange!=null&&s&&X_(this.renderRange)){const u=oR(l)??0;this.setFileAnnotationHeight(u)&&(t=!0)}else!s&&this.setFileAnnotationHeight(0)&&(t=!0);for(const u of l){if(u==null)continue;const f=u.children[1];if(f instanceof HTMLElement)for(const h of f.children){if(!(h instanceof HTMLElement))continue;const c=h.dataset.lineIndex;if(c==null)continue;const m=mR(c,a);let v=h.getBoundingClientRect().height,g=!1;h.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in h.nextElementSibling.dataset||"noNewline"in h.nextElementSibling.dataset)&&("noNewline"in h.nextElementSibling.dataset&&(g=!0),v+=h.nextElementSibling.getBoundingClientRect().height);const y=this.getEstimatedLineHeight(g),b=this.cache.heightDeltas.get(m)??0,E=v-y;E!==b&&(t=!0,this.cache.measuredHeightDeltaTotal+=E-b,E===0?this.cache.heightDeltas.delete(m):this.cache.heightDeltas.set(m,E))}}return(t||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),t}onRender=t=>this.fileContainer==null?!1:(t&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(t,n,a,l){const s=!Kr(this.fileDiff,t),u=this.syncLineAnnotations(l);let f=a?.resetDiffLayoutCache===!0||s||u,h=s||a?.resetDiffLayoutCache===!0&&a.includeEstimatedDiffHeights;a?.metrics!=null&&(this.metrics=xd(a.metrics),f=!0,h=!0);const{collapsed:c=!1}=this.options;return this.currentCollapsed!==c&&(this.currentCollapsed=c,f=!0),f&&this.resetLayoutCache({includeEstimatedHeights:h}),this.fileDiff=t,this.top=n,this.computeApproximateSize(),this.height}getLinePosition(t,n="additions"){if(this.fileDiff==null||t<1)return;const a=this.getLineIndex(t,n);if(a==null)return;const{disableFileHeader:l=!1,expandUnchanged:s=!1,collapsed:u=!1,collapsedContextThreshold:f=1}=this.options,h=this.getDiffStyle(),c=this.getHunkSeparatorType(),m=h==="split"?a[1]:a[0];this.approximateLayoutCheckpoints();const v=Va(this.metrics,l),g=this.getLayoutCheckpointBeforeLineIndex(m);let y=g?.top??v+this.cache.fileAnnotationHeight;if(u)return{top:v,height:0};let b;return il({diff:this.fileDiff,diffStyle:h,startingLine:g?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:f,callback:({hunkIndex:E,hunk:T,collapsedBefore:N,collapsedAfter:L,deletionLine:A,additionLine:R})=>{const z=h==="split"?R?.splitLineIndex??A?.splitLineIndex:R?.unifiedLineIndex??A?.unifiedLineIndex;if(z==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(N>0){const j=Wr({type:c,metrics:this.metrics,hunkIndex:E,hunkSpecs:T?.hunkSpecs});if(j!=null){if(y+=j.gapBefore,m>=z-N&&m<z)return b={top:y,height:j.height},!0;y+=j.height+j.gapAfter}}const V=this.getLineHeight(z,(R?.noEOFCR??!1)||(A?.noEOFCR??!1));if(z===m)return b={top:y,height:V},!0;if(y+=V,L>0){const j=Jr({type:c,metrics:this.metrics});if(j!=null){if(m>z&&m<=z+L)return b={top:y+j.gapBefore,height:j.height},!0;y+=j.totalHeight}}return!1}}),b}getNumericScrollAnchor(t){if(this.fileDiff==null)return;const{disableFileHeader:n=!1,expandUnchanged:a=!1,collapsed:l=!1,collapsedContextThreshold:s=1}=this.options;if(l)return;const u=this.getDiffStyle(),f=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const h=this.getLayoutCheckpointBeforeTop(t);let c=h?.top??Va(this.metrics,n)+this.cache.fileAnnotationHeight,m;return il({diff:this.fileDiff,diffStyle:u,startingLine:h?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:v,hunk:g,collapsedBefore:y,collapsedAfter:b,deletionLine:E,additionLine:T})=>{const N=u==="split"?T?.splitLineIndex??E?.splitLineIndex:T?.unifiedLineIndex??E?.unifiedLineIndex;if(N==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(y>0){const A=Wr({type:f,metrics:this.metrics,hunkIndex:v,hunkSpecs:g?.hunkSpecs});A!=null&&(c+=A.totalHeight)}if(c>=t&&(E!=null?m={lineNumber:E.lineNumber,side:"deletions",top:c}:T!=null&&(m={lineNumber:T.lineNumber,side:"additions",top:c}),m!=null))return!0;const L=this.getLineHeight(N,(T?.noEOFCR??!1)||(E?.noEOFCR??!1));if(c+=L,b>0){const A=Jr({type:f,metrics:this.metrics});A!=null&&(c+=A.totalHeight)}return!1}}),m}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(t){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const n=t!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,t):this.renderRange;if(n==null)return;const{bufferBefore:a,bufferAfter:l,totalLines:s}=n;let u=0;if(s===0){const f=t??this.virtualizer.getWindowSpecs();this.top<f.top&&(u=l)}return{topOffset:this.top+a+u,height:this.height-(a+l)}}cleanUp(t=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),t||this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSetup=!1,super.cleanUp(t)}expandHunk=(t,n,a)=>{this.hunksRenderer.expandHunk(t,n,a),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(t){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,t&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!t&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(t=!1){const n=this.isResizeDebuggingEnabled();if(!t&&!this.layoutDirty&&!n)return;const a=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}const{disableFileHeader:l=!1,collapsed:s=!1}=this.options,u=Va(this.metrics,l);if(this.height+=u,s){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,n&&!a&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();const t=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return t}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:a=1}=this.options,{splitHeight:l,unifiedHeight:s}=nR({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a});this.cache.estimatedSplitHeight=l,this.cache.estimatedUnifiedHeight=s}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;const t=this.fileContainer.getBoundingClientRect();t.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:t.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:t,oldFile:n,newFile:a,fileDiff:l,forceRender:s=!1,lineAnnotations:u,...f}={}){const{forceRenderOverride:h,isSetup:c}=this;this.forceRenderOverride=void 0;const m=this.syncLineAnnotations(u);if(m&&this.resetLayoutCache({includeEstimatedHeights:!1}),this.fileDiff??=l??(n!=null&&a!=null?sf(n,a,this.options.parseDiffOptions):void 0),t=this.getOrCreateFileContainer(t),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(c)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const b=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(b==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");b.connect(t,this),this.isVisible=b.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const v=this.virtualizer.getWindowSpecs(),g=this.top??0,y=this.computeRenderRangeFromWindow(this.fileDiff,g,v);return super.render({fileDiff:this.fileDiff,fileContainer:t,renderRange:y,oldFile:n,newFile:a,lineAnnotations:u,forceRender:(h??s)||m,...f})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return pR(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:a=1}=this.options,l=this.fileDiff.hunks.length-1,s=this.getDiffStyle(),u=this.getHunkSeparatorType(),f=n?!0:this.hunksRenderer.getExpandedHunksMap(),h=sR(this.cache.heightDeltas);let c=Va(this.metrics,t)+this.cache.fileAnnotationHeight,m=0;const v=({rowCount:g,startLineIndex:y,preSeparatorHeight:b=0,postSeparatorHeight:E=0,metadataOffsets:T=[]})=>{if(g<=0)return;const N=m,L=m+g;let A=uR(N);for(;A<L;){const R=A-N,z=c+(R>0?b:0)+R*this.metrics.lineHeight+cR(T,R)*this.metrics.lineHeight+uv(h,y,y+R);this.cache.checkpoints.push({renderedLineIndex:A,lineIndex:y+R,top:z}),A+=cf}c+=b+g*this.metrics.lineHeight+T.length*this.metrics.lineHeight+uv(h,y,y+g)+E,m=L};for(let g=0;g<this.fileDiff.hunks.length;g++){const y=this.fileDiff.hunks[g];if(y==null)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const b=dl({isPartial:this.fileDiff.isPartial,rangeSize:y.collapsedBefore,expandedHunks:f,hunkIndex:g,collapsedContextThreshold:a}),E=b.collapsedLines>0?Wr({type:u,metrics:this.metrics,hunkIndex:g,hunkSpecs:y.hunkSpecs})?.totalHeight??0:0;v({rowCount:b.fromStart,startLineIndex:(s==="split"?y.splitLineStart:y.unifiedLineStart)-b.rangeSize});let T=E;v({rowCount:b.fromEnd,startLineIndex:(s==="split"?y.splitLineStart:y.unifiedLineStart)-b.fromEnd,preSeparatorHeight:T}),b.fromEnd>0&&(T=0);const N=g===l?fl({fileDiff:this.fileDiff,hunkIndex:g,expandedHunks:f,collapsedContextThreshold:a,errorPrefix:"VirtualizedFileDiff"}):void 0,L=N!=null&&N.collapsedLines>0?Jr({type:u,metrics:this.metrics})?.totalHeight??0:0,A=N!=null?N.fromStart+N.fromEnd:0,R=s==="split"?y.splitLineCount:y.unifiedLineCount,z=s==="split"?y.splitLineStart:y.unifiedLineStart;v({rowCount:R,startLineIndex:z,preSeparatorHeight:T,postSeparatorHeight:A===0?L:0,metadataOffsets:dR({diffStyle:s,hunk:y,rowCount:R})}),N!=null&&A>0&&v({rowCount:A,startLineIndex:z+R,postSeparatorHeight:L})}this.cache.totalLines=m}getLayoutCheckpointBeforeLineIndex(t){if(t<=0||this.cache.checkpoints.length===0)return;let n=0,a=this.cache.checkpoints.length-1,l;for(;n<=a;){const s=n+a>>1,u=this.cache.checkpoints[s];if(u==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");u.lineIndex<=t?(l=u,n=s+1):a=s-1}return l}getLayoutCheckpointBeforeTop(t,n){let a=0,l=this.cache.checkpoints.length-1,s=-1;for(;a<=l;){const u=a+l>>1,f=this.cache.checkpoints[u];if(f==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");f.top<=t?(s=u,a=u+1):l=u-1}if(n==null)return s>=0?this.cache.checkpoints[s]:void 0;for(let u=s;u>=0;u--){const f=this.cache.checkpoints[u];if(f==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(f.renderedLineIndex%n===0)return f}}getExpandedLineCount(t,n){let a=0;if(t.isPartial){for(const h of t.hunks)a+=n==="split"?h.splitLineCount:h.unifiedLineCount;return a}const{expandUnchanged:l=!1,collapsedContextThreshold:s=1}=this.options,u=l?!0:this.hunksRenderer.getExpandedHunksMap();for(const[h,c]of t.hunks.entries()){const m=n==="split"?c.splitLineCount:c.unifiedLineCount;a+=m;const v=Math.max(c.collapsedBefore,0),{fromStart:g,fromEnd:y,renderAll:b}=dl({isPartial:t.isPartial,rangeSize:v,expandedHunks:u,hunkIndex:h,collapsedContextThreshold:s});v>0&&(a+=b?v:g+y)}const f=fl({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:u,collapsedContextThreshold:s,errorPrefix:"VirtualizedFileDiff"});return f!=null&&(a+=f.fromStart+f.fromEnd),a}computeRenderRangeFromWindow(t,n,{top:a,bottom:l}){const{disableFileHeader:s=!1,expandUnchanged:u=!1,collapsedContextThreshold:f=1}=this.options,{hunkLineCount:h,lineHeight:c}=this.metrics,m=this.getDiffStyle(),v=this.getHunkSeparatorType(),g=this.height;let y=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(t,m);const b=Va(this.metrics,s),E=t.hunks.length>0?K_(this.metrics):0,{fileAnnotationHeight:T}=this.cache,N=b+T,L=Math.max(0,g-b-T-E),A=this.hasFileAnnotations(t),R=n+b,z=T>0&&A&&R<l&&R+T>a;if(n<a-g||n>l)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-b-E};if(y<=h||t.hunks.length===0)return{startingLine:0,totalLines:h,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),y=this.cache.totalLines>0?this.cache.totalLines:y;const V=Math.ceil(Math.max(l-a,0)/c),j=Math.ceil(V/h)*h+h,F=j/h,te=F,K=[],ee=(a+l)/2,Q=this.getLayoutCheckpointBeforeTop(Math.max(0,a-n-j*c*2),h);let X=n+(Q?.top??N),W=Q?.renderedLineIndex??0,oe,ce,M;if(il({diff:t,diffStyle:m,startingLine:Q?.renderedLineIndex??0,expandedHunks:u?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:f,callback:({hunkIndex:ve,hunk:xe,collapsedBefore:qe,collapsedAfter:pe,deletionLine:Fe,additionLine:Be})=>{const nn=Be!=null?Be.splitLineIndex:Fe.splitLineIndex,Rt=Be!=null?Be.unifiedLineIndex:Fe.unifiedLineIndex,lt=(Be?.noEOFCR??!1)||(Fe?.noEOFCR??!1),Sn=(qe>0?Wr({type:v,metrics:this.metrics,hunkIndex:ve,hunkSpecs:xe?.hunkSpecs}):void 0)?.totalHeight??0;X+=Sn;const dt=W%h===0,Ka=Math.floor(W/h);if(dt&&(K[Ka]=X-(n+N+Sn),M!=null)){if(M<=0)return!0;M--}const Zi=this.getLineHeight(m==="split"?nn:Rt,lt);return X>a-Zi&&X<l&&(oe??=Ka),ce==null&&X+Zi>ee&&(ce=Ka),M==null&&X>=l&&dt&&(M=te),W++,X+=Zi,pe>0&&(X+=Jr({type:v,metrics:this.metrics})?.totalHeight??0),!1}}),oe==null)if(z)oe=0,ce=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-b-E};ce??=oe;const Y=Math.round(ce-F/2),ne=Math.max(0,Math.ceil(y/h)-F),ue=Math.max(0,Math.min(Y,ne)),be=ue*h,D=Y<0?j+Y*h:j,$=K[ue]??0,J=be===0?0:T+$,ie=ue+D/h,de=ie<K.length?L-K[ie]:L-(X-n-N);return{startingLine:be,totalLines:D,bufferBefore:J,bufferAfter:Math.max(0,de)}}};function oR(t){let n;for(const a of t){if(a==null)continue;const l=a.children[1];if(l instanceof HTMLElement)for(const s of l.children)s instanceof HTMLElement&&s.dataset.lineAnnotation===Nw&&(n=Math.max(n??0,s.getBoundingClientRect().height))}return n}function sR(t){const n=Array.from(t).sort((u,f)=>u[0]-f[0]),a=[],l=[0];let s=0;for(const[u,f]of n)a.push(u),s+=f,l.push(s);return{lineIndexes:a,prefixTotals:l}}function uv({lineIndexes:t,prefixTotals:n},a,l){if(a>=l||t.length===0)return 0;const s=cv(t,a);return(n[cv(t,l)]??0)-(n[s]??0)}function cv(t,n){let a=0,l=t.length;for(;a<l;){const s=a+l>>1,u=t[s];if(u==null)throw new Error("VirtualizedFileDiff: invalid prefix index");u<n?a=s+1:l=s}return a}function uR(t){return Math.ceil(t/cf)*cf}function cR(t,n){let a=0;for(const l of t)l<n&&a++;return a}function dR({diffStyle:t,hunk:n,rowCount:a}){if(a<=0||!n.noEOFCRAdditions&&!n.noEOFCRDeletions)return[];const l=n.hunkContent.at(-1);if(l==null)return[];if(l.type==="context")return[a-1];const s=Math.max(l.deletions,l.additions),u=l.deletions+l.additions;if(t==="split")return s>0&&(n.noEOFCRAdditions||n.noEOFCRDeletions)?[a-1]:[];const f=[],h=a-u;return l.deletions>0&&n.noEOFCRDeletions&&f.push(h+l.deletions-1),l.additions>0&&n.noEOFCRAdditions&&f.push(a-1),f}function fR(t,n){return(t.diffStyle??"split")!==(n.diffStyle??"split")||(t.overflow??"scroll")!==(n.overflow??"scroll")||(t.collapsed??!1)!==(n.collapsed??!1)||(t.disableLineNumbers??!1)!==(n.disableLineNumbers??!1)||(t.disableFileHeader??!1)!==(n.disableFileHeader??!1)||(t.diffIndicators??"bars")!==(n.diffIndicators??"bars")||(t.hunkSeparators??"line-info")!==(n.hunkSeparators??"line-info")||(t.expandUnchanged??!1)!==(n.expandUnchanged??!1)||(t.collapsedContextThreshold??1)!==(n.collapsedContextThreshold??1)||t.unsafeCSS!==n.unsafeCSS}function hR(t,n){return(t.disableFileHeader??!1)!==(n.disableFileHeader??!1)||(t.hunkSeparators??"line-info")!==(n.hunkSeparators??"line-info")||(t.expandUnchanged??!1)!==(n.expandUnchanged??!1)||(t.collapsedContextThreshold??1)!==(n.collapsedContextThreshold??1)}function pR(t){return typeof t=="function"?"custom":t??"line-info"}function mR(t,n){const[a,l]=t.split(",").map(Number);return n==="split"?l:a}function gR({hunkIndex:t,lineIndex:n,conflictIndex:a}){return`merge-conflict-action-${t}-${n}-${a}`}function vR(t,n){const a=n.hunks[t.hunkIndex];if(a!=null)return{hunkIndex:t.hunkIndex,lineIndex:_R(a,t.startContentIndex)}}function _R(t,n){let a=t.unifiedLineStart;for(let l=0;l<n;l++){const s=t.hunkContent[l];a+=s.type==="context"?s.lines:s.deletions+s.additions}return a}const yR={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},bR={display:"contents"};function dv(){return null}function SR({fileDiff:t,actions:n,renderCustomHeader:a,renderHeaderPrefix:l,renderHeaderMetadata:s,renderAnnotation:u,renderGutterUtility:f,renderMergeConflictUtility:h,lineAnnotations:c,getHoveredLine:m,getInstance:v}){const g=a?.(t),y=l?.(t),b=s?.(t);return x.jsxs(x.Fragment,{children:[g!=null?x.jsx("div",{slot:pf,children:g}):x.jsxs(x.Fragment,{children:[y!=null&&x.jsx("div",{slot:"header-prefix",children:y}),b!=null&&x.jsx("div",{slot:"header-metadata",children:b})]}),u!=null&&c?.map((E,T)=>x.jsx("div",{slot:qa(E),children:u(E)},T)),n!=null&&h!=null&&v!=null&&n.map(E=>{if(E==null)return;const T=ER(E,t);return x.jsx("div",{slot:T,style:bR,children:h(E,v)},T)}),f!=null&&x.jsx("div",{slot:"gutter-utility-slot",style:yR,children:f(m)})]})}function ER(t,n){const a=vR(t,n);return a!=null?gR({hunkIndex:a.hunkIndex,lineIndex:a.lineIndex,conflictIndex:t.conflictIndex}):void 0}function CR(t){const n=tn.useRef(t);return tn.useInsertionEffect(()=>{n.current=t}),tn.useCallback((...a)=>n.current(...a),[])}const xR=tn.createContext(void 0);function AR(t,n){return typeof window>"u"&&n!=null?x.jsxs(x.Fragment,{children:[x.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:n}}),t]}):x.jsx(x.Fragment,{children:t})}const TR=tn.createContext(void 0);function wR(){return tn.useContext(TR)}const LR=typeof window>"u"?tn.useEffect:tn.useLayoutEffect;function RR({fileDiff:t,options:n,lineAnnotations:a,selectedLines:l,prerenderedHTML:s,metrics:u,hasGutterRenderUtility:f,hasCustomHeader:h,disableWorkerPool:c}){const m=wR(),v=l!==void 0,g=tn.useContext(xR),y=tn.useRef(null),b=CR(E=>{if(E!=null){if(y.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");m!=null?y.current=new lR(kd({controlledSelection:v,hasCustomHeader:h,hasGutterRenderUtility:f,options:n}),m,u,c?void 0:g,!0):y.current=new oy(kd({controlledSelection:v,hasCustomHeader:h,hasGutterRenderUtility:f,options:n}),c?void 0:g,!0),y.current.hydrate({fileDiff:t,fileContainer:E,lineAnnotations:a,prerenderedHTML:s})}else{if(y.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");y.current.cleanUp(),y.current=null}});return LR(()=>{const{current:E}=y;if(E==null)return;const T=kd({controlledSelection:v,hasCustomHeader:h,hasGutterRenderUtility:f,options:n}),N=!yv(E.options,T);E.setOptions(T),E.render({forceRender:N,fileDiff:t,lineAnnotations:a}),l!==void 0&&E.setSelectedLines(l)}),{ref:b,getHoveredLine:tn.useCallback(()=>y.current?.getHoveredLine(),[])}}function kd({options:t,controlledSelection:n,hasCustomHeader:a,hasGutterRenderUtility:l}){return!n&&!l&&!a?t:{...t,controlledSelection:n,renderCustomHeader:a?dv:t?.renderCustomHeader,renderGutterUtility:l?dv:t?.renderGutterUtility}}function kR({fileDiff:t,options:n,metrics:a,lineAnnotations:l,selectedLines:s,className:u,style:f,prerenderedHTML:h,renderAnnotation:c,renderCustomHeader:m,renderHeaderPrefix:v,renderHeaderMetadata:g,renderGutterUtility:y,disableWorkerPool:b=!1}){const{ref:E,getHoveredLine:T}=RR({fileDiff:t,options:n,metrics:a,lineAnnotations:l,selectedLines:s,prerenderedHTML:h,hasGutterRenderUtility:y!=null,hasCustomHeader:m!=null,disableWorkerPool:b});return x.jsx(pv,{ref:E,className:u,style:f,children:AR(SR({fileDiff:t,renderCustomHeader:m,renderHeaderPrefix:v,renderHeaderMetadata:g,renderAnnotation:c,renderGutterUtility:y,lineAnnotations:l,getHoveredLine:T}),h)})}async function fv(t,n,a,l,s){const u=await l(t,n);!n.aborted&&a(t)&&s(u)}const rs=Ce.createContext("light"),sy=[{id:"brief",label:"Brief"},{id:"tests",label:"Tests"},{id:"gold",label:"Reference"},{id:"validation",label:"Validation"},{id:"runs",label:"Model runs"},{id:"task",label:"Task config"}],DR=["unreviewed","in_review","approved","changes_requested","rejected"],OR=[48,65,82,55,72,89,62,79,52,69,86,59];async function df(t,n){const a=await fetch(t,n);if(!a.ok){const l=await a.json().catch(()=>null);throw new Error(l?.error??`${a.status} ${a.statusText}`)}return a.json()}function NR(){const t=Ce.useMemo(()=>new URLSearchParams(window.location.search),[]),[n,a]=Ce.useState(null),[l,s]=Ce.useState(()=>t.get("task")),[u,f]=Ce.useState(null),[h,c]=Ce.useState(()=>ek(t.get("tab"))),[m,v]=Ce.useState("all"),[g,y]=Ce.useState(""),[b,E]=Ce.useState(null),[T,N]=Ce.useState(!1),[L,A]=Ce.useState(ak),R=Ce.useRef(l);R.current=l;const z=Ce.useCallback((Q,X)=>df(`/api/tasks/${encodeURIComponent(Q)}`,{signal:X}),[]),V=Ce.useCallback(async()=>{const Q=await df("/api/tasks");a(Q),s(X=>X&&Q.tasks.some(W=>W.task_id===X)?X:Q.tasks[0]?.task_id??null)},[]);Ce.useEffect(()=>{V().catch(Q=>E(String(Q)))},[V]),Ce.useLayoutEffect(()=>{document.documentElement.dataset.theme=L,document.documentElement.style.colorScheme=L,window.localStorage.setItem("selfbench-theme",L),document.querySelector('meta[name="theme-color"]')?.setAttribute("content",L==="dark"?"#0d1016":"#f4f5f7")},[L]),Ce.useEffect(()=>{if(!l){f(null);return}const Q=new AbortController;return f(null),fv(l,Q.signal,X=>R.current===X,z,f).catch(X=>{Q.signal.aborted||E(String(X))}),()=>Q.abort()},[z,l]),Ce.useEffect(()=>{const Q=new URL(window.location.href);l?Q.searchParams.set("task",l):Q.searchParams.delete("task"),Q.searchParams.set("tab",h),window.history.replaceState(null,"",Q)},[h,l]);const j=Ce.useMemo(()=>{const Q=g.trim().toLowerCase();return(n?.tasks??[]).filter(X=>m==="approved"?X.review_status==="approved":m==="attention"?X.review_status!=="approved"||Object.values(X.model_results).includes("fail"):!0).filter(X=>Q?`${X.task_id} ${X.repo} ${X.source_pr??""}`.toLowerCase().includes(Q):!0)},[m,g,n]);Ce.useEffect(()=>{const Q=X=>{if(ik(X.target)||X.key!=="j"&&X.key!=="k")return;const W=j.findIndex(M=>M.task_id===l),oe=Math.min(Math.max(W+(X.key==="j"?1:-1),0),j.length-1),ce=j[oe];ce&&s(ce.task_id)};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[l,j]);const F=Ce.useCallback(async()=>{N(!0),E(null);const Q=R.current,X=new AbortController;try{await V(),Q&&R.current===Q&&await fv(Q,X.signal,W=>R.current===W,z,f)}catch(W){E(String(W))}finally{X.abort(),N(!1)}},[z,V]);if(b)return x.jsx(rs.Provider,{value:L,children:x.jsx(ZR,{error:b,onRetry:()=>{F()}})});if(!n)return x.jsx(rs.Provider,{value:L,children:x.jsx(QR,{})});const te=j.findIndex(Q=>Q.task_id===l),K=te>0?j[te-1]?.task_id:null,ee=te>=0?j[te+1]?.task_id:null;return x.jsx(rs.Provider,{value:L,children:x.jsxs("div",{className:"app-shell",children:[x.jsx(MR,{summaries:n,refreshing:T,theme:L,onRefresh:()=>{F()},onTheme:()=>A(Q=>Q==="dark"?"light":"dark")}),x.jsxs("div",{className:"app-grid",children:[x.jsx(IR,{filter:m,models:n.models,onFilter:v,onSearch:y,onSelect:Q=>{s(Q),c("brief")},search:g,selected:l,tasks:j,total:n.tasks.length}),x.jsx("main",{className:"workspace",children:u?x.jsx(zR,{detail:u,models:n.models,nextTask:ee??null,onNavigate:s,onSaved:Q=>{f(X=>X?.summary.task_id===Q.summary.task_id?Q:X),V()},onSection:c,previousTask:K??null,section:h}):x.jsx(KR,{})})]})]})})}function MR({summaries:t,refreshing:n,theme:a,onRefresh:l,onTheme:s}){const f=t.tasks.flatMap(h=>Object.values(h.model_results)).filter(h=>h==="missing").length;return x.jsxs("header",{className:"site-header",children:[x.jsxs("div",{className:"brand-lockup",children:[x.jsx("div",{className:"brand-mark","aria-hidden":"true",children:"S"}),x.jsxs("div",{children:[x.jsx("div",{className:"brand-name",children:"SelfBench"}),x.jsx("div",{className:"brand-context",children:"Evaluation review"})]})]}),x.jsxs("div",{className:"header-status",children:[x.jsx("span",{className:"live-dot","data-active":f>0}),x.jsx("span",{children:f>0?`${f} runs in progress`:"All results synchronized"})]}),x.jsxs("div",{className:"header-actions",children:[x.jsxs("div",{className:"keyboard-hint",title:"Keyboard shortcut",children:[x.jsx("kbd",{children:"J"}),x.jsx("kbd",{children:"K"}),x.jsx("span",{children:"navigate"})]}),x.jsx("button",{className:"button secondary theme-toggle",type:"button","aria-label":`Use ${a==="dark"?"light":"dark"} mode`,title:`Use ${a==="dark"?"light":"dark"} mode`,onClick:s,children:x.jsx(lk,{theme:a})}),x.jsxs("button",{className:"button secondary",type:"button",disabled:n,onClick:l,children:[x.jsx(rk,{spinning:n}),n?"Refreshing":"Refresh"]})]})]})}function IR({tasks:t,total:n,selected:a,models:l,search:s,filter:u,onSearch:f,onFilter:h,onSelect:c}){return x.jsxs("aside",{className:"queue",children:[x.jsxs("div",{className:"queue-head",children:[x.jsxs("div",{className:"queue-title-row",children:[x.jsxs("div",{children:[x.jsx("div",{className:"eyebrow",children:"Review queue"}),x.jsxs("h1",{children:[n," tasks"]})]}),x.jsx("div",{className:"model-legend",children:l.map(m=>x.jsx("span",{children:Lf(m)},m))})]}),x.jsxs("label",{className:"search-field",children:[x.jsx(fy,{}),x.jsx("input",{"aria-label":"Search tasks",placeholder:"Search tasks or PRs",type:"search",value:s,onChange:m=>f(m.target.value)})]}),x.jsx("nav",{className:"filter-tabs","aria-label":"Queue filter",children:["all","attention","approved"].map(m=>x.jsx("button",{type:"button","data-active":u===m,onClick:()=>h(m),children:bn(m)},m))})]}),x.jsx("div",{className:"task-list",children:t.length?t.map(m=>x.jsx(HR,{active:m.task_id===a,models:l,onSelect:()=>c(m.task_id),task:m},m.task_id)):x.jsx(Os,{title:"No matching tasks",body:"Try a broader search or a different filter."})})]})}function HR({task:t,models:n,active:a,onSelect:l}){const s=Object.values(t.model_results).filter(f=>f==="pass").length,u=Object.values(t.model_results).filter(f=>["pass","fail","unreadable"].includes(f)).length;return x.jsxs("button",{className:"task-row",type:"button","data-active":a,onClick:l,children:[x.jsxs("div",{className:"task-row-top",children:[x.jsx("span",{className:"task-name",children:cy(t.task_id)}),x.jsxs("span",{className:"task-score",children:[s,"/",u||n.length]})]}),x.jsx("div",{className:"task-id",children:t.task_id}),x.jsxs("div",{className:"task-row-bottom",children:[x.jsxs("span",{children:["PR ",t.source_pr??"—"]}),x.jsx("div",{className:"result-dots",children:n.map(f=>x.jsx(uy,{label:Lf(f),result:t.model_results[f]},f))})]})]})}function zR({detail:t,models:n,section:a,previousTask:l,nextTask:s,onNavigate:u,onSection:f,onSaved:h}){return x.jsxs(x.Fragment,{children:[x.jsxs("section",{className:"task-hero",children:[x.jsxs("div",{className:"hero-topline",children:[x.jsxs("div",{className:"breadcrumbs",children:[x.jsx("span",{children:t.summary.repo}),x.jsx(ok,{}),x.jsxs("span",{children:["PR ",t.summary.source_pr??"—"]})]}),x.jsxs("div",{className:"queue-navigation",children:[x.jsx("button",{type:"button","aria-label":"Previous task",disabled:!l,onClick:()=>l&&u(l),children:x.jsx(hv,{direction:"left"})}),x.jsx("button",{type:"button","aria-label":"Next task",disabled:!s,onClick:()=>s&&u(s),children:x.jsx(hv,{direction:"right"})})]})]}),x.jsxs("div",{className:"hero-title-row",children:[x.jsxs("div",{children:[x.jsx("h2",{children:cy(t.summary.task_id)}),x.jsx("div",{className:"hero-id",children:t.summary.task_id})]}),x.jsx(ks,{result:t.summary.verdict==="accepted"?"pass":"fail",children:t.summary.validation})]}),x.jsxs("div",{className:"outcome-strip",children:[n.map(c=>x.jsx(XR,{model:c,result:t.summary.model_results[c]??"missing"},c)),x.jsxs("div",{className:"test-counts",children:[x.jsxs("span",{children:[x.jsx("strong",{children:t.summary.fail_to_pass_count})," fail-to-pass"]}),x.jsxs("span",{children:[x.jsx("strong",{children:t.summary.pass_to_pass_count})," regressions"]})]})]})]}),x.jsx("nav",{className:"section-tabs","aria-label":"Task detail",children:sy.map(c=>x.jsx("button",{type:"button","data-active":a===c.id,onClick:()=>f(c.id),children:c.label},c.id))}),x.jsx("section",{className:"section-content",children:x.jsx(UR,{detail:t,models:n,section:a,onSaved:h})})]})}function UR({detail:t,models:n,section:a,onSaved:l}){return a==="tests"?x.jsx(ff,{taskId:t.summary.task_id,kind:"test",label:"Held-out test patch"}):a==="gold"?x.jsx(ff,{taskId:t.summary.task_id,kind:"gold",label:"Reference patch"}):a==="validation"?x.jsx(GR,{detail:t}):a==="runs"?x.jsx($R,{detail:t,models:n}):a==="task"?x.jsx(Ds,{value:t.task_json_text}):x.jsx(jR,{detail:t,onSaved:l})}function jR({detail:t,onSaved:n}){return x.jsxs("div",{className:"brief-grid",children:[x.jsxs("article",{className:"surface prompt-surface",children:[x.jsx(Xi,{eyebrow:"Evaluation brief",title:"What the agent receives",children:x.jsx("span",{className:"source-chip",children:tk(t.prompt_origin)})}),x.jsx("div",{className:"prompt-copy",children:t.prompt})]}),x.jsxs("div",{className:"brief-side",children:[x.jsx(VR,{detail:t,onSaved:n}),x.jsx(PR,{summary:t.summary})]}),t.source_trace?x.jsxs("article",{className:"surface source-surface",children:[x.jsx(Xi,{eyebrow:"Provenance",title:"Original request history"}),x.jsx(BR,{trace:t.source_trace,promptOrigin:t.prompt_origin})]}):null]})}function PR({summary:t}){return x.jsxs("article",{className:"surface evidence-card",children:[x.jsx(Xi,{eyebrow:"Evidence",title:"Task facts"}),x.jsxs("dl",{className:"fact-list",children:[x.jsx(Jo,{label:"Repository",value:t.repo}),x.jsx(Jo,{label:"Workdir",value:t.workdir,mono:!0}),x.jsx(Jo,{label:"Source",value:t.source_url?x.jsxs("a",{href:t.source_url,target:"_blank",rel:"noreferrer",children:["Pull request ",t.source_pr," ",x.jsx(hy,{})]}):`PR ${t.source_pr??"—"}`}),x.jsx(Jo,{label:"Solver signal",value:t.solver_signal})]}),t.blockers.length||t.warnings.length?x.jsxs("div",{className:"issue-stack",children:[t.blockers.map(n=>x.jsx(Ya,{tone:"danger",children:n},n)),t.warnings.map(n=>x.jsx(Ya,{tone:"warning",children:n},n))]}):null]})}function VR({detail:t,onSaved:n}){const[a,l]=Ce.useState(t.summary.quality.review_notes??""),[s,u]=Ce.useState(t.summary.review_status),[f,h]=Ce.useState(!1),[c,m]=Ce.useState(null),v=async()=>{h(!0),m(null);try{const g=await df(`/api/tasks/${encodeURIComponent(t.summary.task_id)}/quality`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({review_notes:a,reviewed_warnings:t.summary.quality.reviewed_warnings??[],review_status:s})});n(g)}catch(g){m(String(g))}finally{h(!1)}};return x.jsxs("article",{className:"surface review-card",children:[x.jsx(Xi,{eyebrow:"Human review",title:"Decision",children:x.jsx(ks,{result:nk(s),children:bn(s)})}),x.jsx("label",{className:"field-label",htmlFor:"review-status",children:"Status"}),x.jsx("select",{id:"review-status",className:"input-control",value:s,onChange:g=>u(g.target.value),children:DR.map(g=>x.jsx("option",{value:g,children:bn(g)},g))}),x.jsx("label",{className:"field-label",htmlFor:"review-notes",children:"Notes"}),x.jsx("textarea",{id:"review-notes",className:"input-control notes-field",placeholder:"Record why this task is fair or what needs to change.",value:a,onChange:g=>l(g.target.value)}),c?x.jsxs(Ya,{tone:"danger",children:["Review was not saved: ",c]}):null,x.jsx("button",{className:"button primary full",type:"button",disabled:f,onClick:()=>{v()},children:f?"Saving…":"Save review"})]})}function BR({trace:t,promptOrigin:n}){const[a,l]=Ce.useState(!1),s=n.kind==="agent_json"&&n.path===t.origin.path?n.message_index:null,u=a?t.messages:t.messages.filter(f=>f.role==="user");return x.jsxs("div",{className:"source-session",children:[x.jsxs("div",{className:"source-controls",children:[x.jsxs("span",{children:[t.origin.format," · ",t.origin.path]}),x.jsx("button",{className:"text-button",type:"button",onClick:()=>l(!a),children:a?"Human turns only":"Include assistant context"})]}),u.map(f=>{const h=f.role==="user"&&f.user_message_index===s;return x.jsxs("div",{className:"source-message","data-role":f.role,"data-selected":h,children:[x.jsxs("div",{className:"source-message-label",children:[f.role==="user"?"Human":"Assistant",h?x.jsx("span",{children:"Prompt source"}):null]}),x.jsx("pre",{children:f.content})]},`${f.role}:${f.user_message_index??"context"}:${f.content}`)})]})}function GR({detail:t}){if(!t.validation_result)return x.jsx(Os,{title:"No validation artifact",body:"This task has no attached validation result."});const n=t.validation_result,a=el(n.coupling)?n.coupling:null;return x.jsxs("div",{className:"validation-grid",children:[x.jsxs("article",{className:"surface validation-summary",children:[x.jsx(Xi,{eyebrow:"Qualification",title:"Validation gates"}),x.jsxs("div",{className:"gate-list",children:[x.jsx(Dd,{label:"No-op exposes the bug",status:String(n.nop??"recorded")}),x.jsx(Dd,{label:"Reference solves the task",status:String(n.oracle??"recorded")}),x.jsx(Dd,{label:"Independent coupling review",status:String(a?.verdict??"recorded")})]}),typeof a?.reason=="string"?x.jsxs("div",{className:"review-rationale",children:[x.jsx("div",{className:"eyebrow",children:"Reviewer rationale"}),x.jsx("p",{children:a.reason})]}):null]}),x.jsxs("article",{className:"surface raw-validation",children:[x.jsx(Xi,{eyebrow:"Artifact",title:"Raw validation result"}),x.jsx(Ds,{value:t.validation_text})]})]})}function $R({detail:t,models:n}){const a=n.find(h=>t.summary.model_results[h]==="fail")??n[0]??"",[l,s]=Ce.useState(a);Ce.useEffect(()=>s(a),[a]);const u=t.runs[l],f=t.summary.model_results[l]??"missing";return x.jsxs("div",{className:"runs-layout",children:[x.jsx("div",{className:"run-selector",children:n.map(h=>x.jsxs("button",{type:"button","data-active":l===h,onClick:()=>s(h),children:[x.jsxs("div",{children:[x.jsx("span",{className:"model-name",children:Rf(h)}),x.jsx("span",{className:"model-full",children:h})]}),x.jsx(ks,{result:t.summary.model_results[h]??"missing",children:bn(t.summary.model_results[h]??"missing")})]},h))}),u?x.jsx(qR,{model:l,result:f,run:u,taskId:t.summary.task_id},`${t.summary.task_id}:${l}`):x.jsx(Os,{title:"No run selected",body:"Select a model to inspect its result."})]})}function qR({taskId:t,model:n,result:a,run:l}){const[s,u]=Ce.useState(!1),f=JR(l);return x.jsxs("article",{className:"surface run-inspector",children:[x.jsx(Xi,{eyebrow:"Selected run",title:n,children:x.jsx(ks,{result:a,children:bn(a)})}),l.stale_reason?x.jsx(Ya,{tone:"warning",children:l.stale_reason}):null,x.jsx("div",{className:"run-facts",children:f.map(h=>x.jsxs("div",{children:[x.jsx("span",{children:h.label}),x.jsx("strong",{children:h.value})]},h.label))}),x.jsxs("div",{className:"inspector-toolbar",children:[x.jsxs("div",{children:[x.jsx("h3",{children:"Agent patch"}),x.jsx("p",{children:"The code produced during this one-shot trial."})]}),x.jsxs("button",{className:"button ghost",type:"button",onClick:()=>u(!s),children:[x.jsx(uk,{}),s?"Hide result JSON":"View result JSON"]})]}),s?x.jsx(Ds,{value:l.result_text||"No result artifact."}):null,l.agent_patch?x.jsx(ff,{taskId:t,kind:"agent",label:`${Rf(n)} patch`,modelSlug:n}):x.jsx(Os,{title:"No patch captured",body:"This run did not produce an agent patch."})]})}function ff({taskId:t,kind:n,label:a,modelSlug:l}){const[s,u]=Ce.useState(""),[f,h]=Ce.useState(null),[c,m]=Ce.useState(!1),v=l?`/api/tasks/${encodeURIComponent(t)}/patch/${n}/${encodeURIComponent(l)}`:`/api/tasks/${encodeURIComponent(t)}/patch/${n}`;return Ce.useEffect(()=>{const g=new AbortController;return u(""),h(null),fetch(v,{signal:g.signal,cache:"no-store"}).then(y=>{if(!y.ok)throw new Error(`Patch fetch failed: ${y.status}`);return y.text()}).then(u).catch(y=>{g.signal.aborted||h(String(y))}),()=>g.abort()},[v]),x.jsxs("div",{className:"diff-surface","data-expanded":c,children:[x.jsxs("div",{className:"diff-toolbar",children:[x.jsxs("div",{children:[x.jsx("div",{className:"eyebrow",children:"Code review"}),x.jsx("h3",{children:a})]}),x.jsxs("div",{className:"diff-actions",children:[x.jsxs("button",{className:"button ghost",type:"button",onClick:()=>m(!c),children:[x.jsx(sk,{}),c?"Exit full screen":"Full screen"]}),x.jsxs("a",{className:"button ghost",href:v,target:"_blank",rel:"noreferrer",children:[x.jsx(hy,{}),"Raw patch"]})]})]}),x.jsx("div",{className:"diff-body",children:f?x.jsx(Ya,{tone:"danger",children:f}):s?x.jsx(YR,{children:x.jsx(FR,{patch:s})},v):x.jsx(WR,{})})]})}function FR({patch:t}){const n=Ce.useContext(rs),a=Ce.useMemo(()=>oL(t).flatMap(u=>u.files),[t]);if(!a.length)return x.jsx(Ds,{value:t});const l=window.matchMedia("(max-width: 900px)").matches,s={themeType:n,diffStyle:l?"unified":"split",diffIndicators:"bars",overflow:"scroll",disableBackground:!1,disableLineNumbers:!1,stickyHeader:!0,lineHoverHighlight:"number"};return x.jsx("div",{className:"patch-files",children:a.map(u=>x.jsx(kR,{fileDiff:u,disableWorkerPool:!0,options:s},`${u.prevName??""}:${u.name}`))})}class YR extends Ce.Component{state={error:null};static getDerivedStateFromError(n){return{error:String(n)}}componentDidCatch(n){console.error("Pierre diff renderer failed",n)}render(){return this.state.error?x.jsx(Ya,{tone:"danger",children:"The diff could not render. Open the raw patch instead."}):this.props.children}}function Xi({eyebrow:t,title:n,children:a}){return x.jsxs("div",{className:"surface-header",children:[x.jsxs("div",{children:[x.jsx("div",{className:"eyebrow",children:t}),x.jsx("h3",{children:n})]}),a?x.jsx("div",{className:"surface-action",children:a}):null]})}function Jo({label:t,value:n,mono:a=!1}){return x.jsxs("div",{children:[x.jsx("dt",{children:t}),x.jsx("dd",{"data-mono":a,children:n})]})}function Dd({label:t,status:n}){const a=["passed","clean","accepted","recorded"].includes(n.toLowerCase());return x.jsxs("div",{className:"gate-row",children:[x.jsx("span",{className:"gate-check","data-pass":a,children:a?x.jsx(ck,{}):x.jsx(dk,{})}),x.jsx("span",{children:t}),x.jsx("strong",{children:bn(n)})]})}function XR({model:t,result:n}){return x.jsxs("div",{className:"model-outcome",children:[x.jsx(uy,{label:Lf(t),result:n}),x.jsxs("div",{children:[x.jsx("strong",{children:Rf(t)}),x.jsx("span",{children:bn(n)})]})]})}function uy({label:t,result:n="missing"}){return x.jsx("span",{className:"result-dot","data-result":n,role:"img","aria-label":`${t}: ${bn(n)}`,title:`${t}: ${bn(n)}`,children:t})}function ks({result:t,children:n}){return x.jsxs("span",{className:"status-pill","data-result":t,children:[x.jsx("span",{}),n]})}function Ya({tone:t,children:n}){return x.jsxs("div",{className:"notice","data-tone":t,children:[x.jsx(py,{}),x.jsx("span",{children:n})]})}function Ds({value:t}){return x.jsx("pre",{className:"code-block",children:t})}function Os({title:t,body:n}){return x.jsxs("div",{className:"empty-state",children:[x.jsx("div",{className:"empty-icon",children:x.jsx(fy,{})}),x.jsx("strong",{children:t}),x.jsx("p",{children:n})]})}function QR(){return x.jsxs("div",{className:"loading-screen",children:[x.jsx("div",{className:"brand-mark",children:"S"}),x.jsxs("div",{children:[x.jsx("strong",{children:"Opening review workspace"}),x.jsx("span",{children:"Loading tasks and model results…"})]})]})}function ZR({error:t,onRetry:n}){return x.jsxs("div",{className:"error-screen",children:[x.jsx(py,{}),x.jsx("h1",{children:"Could not open the review workspace"}),x.jsx("p",{children:t}),x.jsx("button",{className:"button primary",type:"button",onClick:n,children:"Try again"})]})}function KR(){return x.jsxs("div",{className:"workspace-skeleton",role:"status","aria-label":"Loading task",children:[x.jsx("div",{}),x.jsx("div",{}),x.jsx("div",{})]})}function WR(){return x.jsx("div",{className:"diff-skeleton",role:"status","aria-label":"Loading patch",children:OR.map(t=>x.jsx("span",{style:{width:`${t}%`}},t))})}function JR(t){const n=t.result;if(!n)return[{label:"Status",value:"No result"}];const a=el(n.trial)?n.trial:n,l=el(a.verifier_result)?a.verifier_result:null,s=l&&el(l.rewards)?l.rewards:null,u=el(a.exception_info)?a.exception_info:null,f=typeof n.live_status=="string"?n.live_status:t.exists?"completed":"missing",h=[{label:"Status",value:bn(f)}];return s&&(h.push({label:"Patch applied",value:Od(s.patch_applied)}),h.push({label:"Fail-to-pass",value:Od(s.fail_to_pass)}),h.push({label:"Regressions",value:Od(s.pass_to_pass)})),typeof u?.exception_type=="string"&&h.push({label:"Exception",value:u.exception_type}),h}function Od(t){return t===1?"Passed":t===0?"Failed":"—"}function ek(t){return t==="prompt"||t==="source"?"brief":t==="test"?"tests":t&&sy.some(n=>n.id===t)?t:"brief"}function tk(t){return t.kind==="agent_json"?`${t.format??"session"} · message ${t.message_index??"—"}`:t.path}function Lf(t){return t.includes("sol")?"S":t.includes("terra")?"T":t.includes("luna")?"L":t.at(0)?.toUpperCase()??"?"}function Rf(t){return t.replace(/^gpt-5\.6-/,"").replace(/^openai__/,"")}function cy(t){return t.replace(/^agent-host-/,"").split("-").map(n=>n.length<=3&&/^\d+$/.test(n)?n:dy(n)).join(" ")}function dy(t){return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function bn(t){return t.split("_").map(dy).join(" ")}function nk(t){return t==="approved"?"pass":t==="rejected"||t==="changes_requested"?"fail":"missing"}function ik(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement}function el(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function ak(){const t=window.localStorage.getItem("selfbench-theme");return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function fy(){return x.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",children:[x.jsx("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),x.jsx("path",{d:"m13 13 4 4"})]})}function rk({spinning:t}){return x.jsxs("svg",{"aria-hidden":"true","data-spinning":t,viewBox:"0 0 20 20",children:[x.jsx("path",{d:"M16 7a6.5 6.5 0 1 0 .2 5.5"}),x.jsx("path",{d:"M16 3v4h-4"})]})}function lk({theme:t}){return t==="dark"?x.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",children:[x.jsx("circle",{cx:"10",cy:"10",r:"3.2"}),x.jsx("path",{d:"M10 2v2M10 16v2M2 10h2M16 10h2M4.3 4.3l1.4 1.4M14.3 14.3l1.4 1.4M15.7 4.3l-1.4 1.4M5.7 14.3l-1.4 1.4"})]}):x.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",children:x.jsx("path",{d:"M16.5 12.6A6.8 6.8 0 0 1 7.4 3.5 6.8 6.8 0 1 0 16.5 12.6Z"})})}function ok(){return x.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",children:x.jsx("path",{d:"m6 3 5 5-5 5"})})}function hv({direction:t}){return x.jsx("svg",{"aria-hidden":"true","data-direction":t,viewBox:"0 0 20 20",children:x.jsx("path",{d:"m12.5 4-6 6 6 6"})})}function hy(){return x.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 18 18",children:[x.jsx("path",{d:"M10 3h5v5M15 3l-7 7"}),x.jsx("path",{d:"M14 10v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h4"})]})}function sk(){return x.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 18 18",children:x.jsx("path",{d:"M7 3H3v4M11 3h4v4M7 15H3v-4M11 15h4v-4"})})}function uk(){return x.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 18 18",children:x.jsx("path",{d:"m6 5-4 4 4 4M12 5l4 4-4 4M10.5 3 7.5 15"})})}function ck(){return x.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",children:x.jsx("path",{d:"m3 8 3 3 7-7"})})}function dk(){return x.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",children:x.jsx("path",{d:"M3 8h10"})})}function py(){return x.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 18 18",children:[x.jsx("path",{d:"M9 2 1.8 15h14.4L9 2Z"}),x.jsx("path",{d:"M9 6v4M9 13h.01"})]})}const my=document.getElementById("root");if(!my)throw new Error("review root is missing");XS.createRoot(my).render(x.jsx(Ce.StrictMode,{children:x.jsx(NR,{})}));
|