@openspecui/web 2.3.5 → 2.3.6

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.
Files changed (69) hide show
  1. package/dist/assets/CanvasRenderer-BxSz1S0N.js +1 -0
  2. package/dist/assets/WebGLRenderer-BHhaJ0WJ.js +1 -0
  3. package/dist/assets/WebGPURenderer-DRKX39eh.js +1 -0
  4. package/dist/assets/browserAll-D4RKeA6K.js +1 -0
  5. package/dist/assets/{dist-5fi0H1tv.js → dist-7cHS5QWY.js} +1 -1
  6. package/dist/assets/dist-BDHG1KDB.js +1 -0
  7. package/dist/assets/{dist-BY07yBep.js → dist-Bmr28z9J.js} +1 -1
  8. package/dist/assets/{dist-DTgAMGJk.js → dist-C9Q1D0iI.js} +1 -1
  9. package/dist/assets/{dist-9w-ZAZ0x.js → dist-CHCyBtgU.js} +1 -1
  10. package/dist/assets/{dist-DtkkWh_t.js → dist-CbImOnsL.js} +1 -1
  11. package/dist/assets/dist-CdimBSfI.js +1 -0
  12. package/dist/assets/{dist-DDChZc3A.js → dist-DmBfd3XF.js} +1 -1
  13. package/dist/assets/{dist-j40sCais.js → dist-DoTjw0T7.js} +1 -1
  14. package/dist/assets/{dist-DQMVt2X6.js → dist-Pw11Vg0a.js} +1 -1
  15. package/dist/assets/dist-TbE9jx_5.js +1 -0
  16. package/dist/assets/{dist-AstaMS2N.js → dist-o5BKCN_5.js} +1 -1
  17. package/dist/assets/{ghostty-web-BRCaoYqS.js → ghostty-web-BM-sB-n_.js} +1 -1
  18. package/dist/assets/index-Cf-Bih4u.css +1 -0
  19. package/dist/assets/{index-CUgehjti.js → index-DglxXq77.js} +87 -87
  20. package/dist/assets/{init-CIIgfU1P.js → init-CdYLlWcL.js} +1 -1
  21. package/dist/assets/trpc-Zloaz5j7.js +1 -0
  22. package/dist/assets/webworkerAll-B7pVi8gv.js +1 -0
  23. package/dist/index.html +2 -2
  24. package/dist-ssg/client/.vite/ssr-manifest.json +15 -15
  25. package/dist-ssg/client/assets/CanvasRenderer-C1h1JIPm.js +1 -0
  26. package/dist-ssg/client/assets/WebGLRenderer-8qk8lSz6.js +1 -0
  27. package/dist-ssg/client/assets/WebGPURenderer-BevM1O4I.js +1 -0
  28. package/dist-ssg/client/assets/browserAll-BgTDhPwL.js +1 -0
  29. package/dist-ssg/client/assets/{dist-CRvuTuq9.js → dist-BA9W6ivS.js} +1 -1
  30. package/dist-ssg/client/assets/dist-BHVRVW4G.js +1 -0
  31. package/dist-ssg/client/assets/{dist-B_u-l1Yw.js → dist-BKmYJegx.js} +1 -1
  32. package/dist-ssg/client/assets/{dist-BNNep2NV.js → dist-Bl-Yx_pv.js} +1 -1
  33. package/dist-ssg/client/assets/{dist-BFqpuvkT.js → dist-Bo9PZWYk.js} +1 -1
  34. package/dist-ssg/client/assets/{dist-DKZbBcYn.js → dist-BrVgy81Q.js} +1 -1
  35. package/dist-ssg/client/assets/dist-CI8PS7VF.js +1 -0
  36. package/dist-ssg/client/assets/dist-CM3Rniow.js +1 -0
  37. package/dist-ssg/client/assets/{dist-ClTBYSyP.js → dist-COdrA1_m.js} +1 -1
  38. package/dist-ssg/client/assets/{dist-CmH6Ad9e.js → dist-DcyfplO7.js} +1 -1
  39. package/dist-ssg/client/assets/{dist-CXGBVAg6.js → dist-GfVlAkN6.js} +1 -1
  40. package/dist-ssg/client/assets/{dist-DBjExBIn.js → dist-VPeqJD5l.js} +1 -1
  41. package/dist-ssg/client/assets/{ghostty-web-PY5w9Rgq.js → ghostty-web-DoANeMT4.js} +1 -1
  42. package/dist-ssg/client/assets/index-DbX4vFFM.css +2 -0
  43. package/dist-ssg/client/assets/{index.ssg-yS5IzoBe.js → index.ssg-C2pskB7h.js} +7 -7
  44. package/dist-ssg/client/assets/{init-zJql3EoS.js → init-DSot5A37.js} +1 -1
  45. package/dist-ssg/client/assets/trpc-T5xQ21pb.js +1 -0
  46. package/dist-ssg/client/assets/webworkerAll-DnUz-KLD.js +1 -0
  47. package/dist-ssg/client/index.ssg.html +2 -2
  48. package/dist-ssg/server/entry-server.js +3 -0
  49. package/package.json +1 -1
  50. package/dist/assets/CanvasRenderer-DLCesp1A.js +0 -1
  51. package/dist/assets/WebGLRenderer-DYT9IbsA.js +0 -1
  52. package/dist/assets/WebGPURenderer-CYfC6MR9.js +0 -1
  53. package/dist/assets/browserAll-CmR4zgGr.js +0 -1
  54. package/dist/assets/dist-BkrPETxD.js +0 -1
  55. package/dist/assets/dist-DABwUepA.js +0 -1
  56. package/dist/assets/dist-hgHsmBgz.js +0 -1
  57. package/dist/assets/index-C0tlID-0.css +0 -1
  58. package/dist/assets/trpc-2zCd4YGO.js +0 -1
  59. package/dist/assets/webworkerAll-CwuSdyaU.js +0 -1
  60. package/dist-ssg/client/assets/CanvasRenderer-vRzYl9FZ.js +0 -1
  61. package/dist-ssg/client/assets/WebGLRenderer-BrfpRfdk.js +0 -1
  62. package/dist-ssg/client/assets/WebGPURenderer-r7TRWUkD.js +0 -1
  63. package/dist-ssg/client/assets/browserAll-D7igzN7y.js +0 -1
  64. package/dist-ssg/client/assets/dist-Ky-fb63H.js +0 -1
  65. package/dist-ssg/client/assets/dist-tjvftgmy.js +0 -1
  66. package/dist-ssg/client/assets/dist-y9aZTMms.js +0 -1
  67. package/dist-ssg/client/assets/index-DvpLdKST.css +0 -2
  68. package/dist-ssg/client/assets/trpc-Z2U-lHEj.js +0 -1
  69. package/dist-ssg/client/assets/webworkerAll-_OODBDte.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-BngumzOu.js","assets/chunk-DECur_0Z.js","assets/html-UgL0pUTh.js","assets/css-MgOOddo9.js","assets/javascript-DweALdcl.js","assets/angular-ts-C6vKMqNQ.js","assets/scss-CPtRJnQJ.js","assets/apl-CanOX78I.js","assets/json-BsydYQ7o.js","assets/xml-DY6OW6fx.js","assets/java-CJzioqY5.js","assets/astro-D3RhqyEX.js","assets/postcss-BtHn3WbL.js","assets/tsx-D6BgBzWj.js","assets/typescript-C5zt0SwC.js","assets/blade-DL2UFKF3.js","assets/html-derivative-CWqzWmfe.js","assets/sql-C-Fa9hzb.js","assets/bsl-baasCE8P.js","assets/sdbl-lyJ_q2qY.js","assets/c-BOqe9lRQ.js","assets/cairo-BkvliMUx.js","assets/python-B0QK5ArY.js","assets/cobol-Bh6VT3qK.js","assets/coffee-B0QZgCFK.js","assets/cpp-K7si_9PA.js","assets/glsl-COhnwF2O.js","assets/regexp-ClEH90rn.js","assets/crystal-CkrKPPPJ.js","assets/shellscript-BO8cBTbG.js","assets/edge-QC_gsDDT.js","assets/elixir-CLr7lZvD.js","assets/elm-C7vdad3p.js","assets/erb-CpyGfXUh.js","assets/ruby-D8NfXwCK.js","assets/graphql-DKIR2AFZ.js","assets/jsx-DfCzNrFp.js","assets/haml-BwSG8gbZ.js","assets/lua-Cl7HpIv3.js","assets/yaml-hSl-jO2_.js","assets/erlang-vfCdWglx.js","assets/markdown-jQZFZ3m0.js","assets/fortran-fixed-form-eRZkDVxE.js","assets/fortran-free-form-dGWJP-PE.js","assets/fsharp-lKBUVRnt.js","assets/gdresource-C_R0x-CQ.js","assets/gdscript-CW6S_vBb.js","assets/gdshader-BqnlaYeo.js","assets/git-commit-SMAxcXsl.js","assets/diff-Eg5NxGYi.js","assets/git-rebase-3yOGJ52K.js","assets/glimmer-js-B4B76dDY.js","assets/glimmer-ts-DQpCtGkl.js","assets/hack-483kQD0h.js","assets/handlebars-BTt4M9z6.js","assets/http-XCrN_CGn.js","assets/hurl-CfAoEXjj.js","assets/csv-DkOKkcud.js","assets/hxml-BNnDhNNK.js","assets/haxe-BPFrQPtj.js","assets/jinja-CAumwAh3.js","assets/jison-DXiwFEpC.js","assets/julia-D_rxuOJz.js","assets/r-Bxdh_Vt4.js","assets/latex-D0WE8LAX.js","assets/tex-BJpc6dbv.js","assets/liquid-CBi5ZjV2.js","assets/marko-Wx-5ycuy.js","assets/less-BZZ-PLfd.js","assets/mdc-Cnw__bfS.js","assets/nginx-CSLtRIGs.js","assets/nim-Bl94tPNK.js","assets/perl-AQuNRAmj.js","assets/php-Bm5VHYVk.js","assets/pug-Qd0aeXah.js","assets/qml-DdPnfnAH.js","assets/razor-BIPGoiD9.js","assets/csharp-_SaU5MOa.js","assets/rst-C5Xv_6wF.js","assets/cmake-BHzgnx8G.js","assets/sas-DTaGstnC.js","assets/shaderlab-DhaYSNG2.js","assets/hlsl-g9gCsmqR.js","assets/shellsession-mh7kK8rm.js","assets/soy-Y4jbujLe.js","assets/sparql-CbwLv0Nv.js","assets/turtle-CrO-XU5O.js","assets/stata-DGls8UgY.js","assets/svelte-gQr6WDsc.js","assets/templ-CAmLeg1s.js","assets/go-qASC_aC8.js","assets/ts-tags-CTBvtuWV.js","assets/twig-BC4BZrit.js","assets/vue-CWweBK92.js","assets/vue-html-B29OwJ5K.js","assets/vue-vine-Caa--IjA.js","assets/stylus-DBx-JbUM.js","assets/xsl-CAbj-pad.js","assets/dist-DVFW0GyF.js","assets/dist-BGaHY1kO.js","assets/dist-QUHuPJsA.js","assets/dist-DltQmFDE.js","assets/dist-y9aZTMms.js","assets/dist-CLKxKEQH.js","assets/dist-BNNep2NV.js","assets/dist--FTL3P_Y.js","assets/dist-BiexWhMB.js","assets/dist-DKZbBcYn.js","assets/dist-Ky-fb63H.js","assets/dist-CXGBVAg6.js","assets/dist-DBjExBIn.js","assets/dist-B_u-l1Yw.js","assets/dist-BFqpuvkT.js","assets/dist-ExQdmG6u.js","assets/dist-BNF0fuPB.js","assets/dist-CmH6Ad9e.js","assets/dist-CRs-U2qz.js","assets/dist-CbIYKZT0.js","assets/dist-tjvftgmy.js","assets/dockerfile-Ci0-ApQC.js","assets/simple-mode-kdHrpFjq.js","assets/factor-DMvifS-k.js","assets/nsis-BbRIeGvl.js","assets/pug-D1ZtszdL.js","assets/javascript-BcqCeS4O.js","assets/dist-ClTBYSyP.js","assets/dist-CRvuTuq9.js","assets/browserAll-D7igzN7y.js","assets/Geometry-CNDxiJq_.js","assets/init-zJql3EoS.js","assets/webworkerAll-_OODBDte.js","assets/WebGPURenderer-r7TRWUkD.js","assets/WebGLRenderer-BrfpRfdk.js","assets/CanvasRenderer-vRzYl9FZ.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-BngumzOu.js","assets/chunk-DECur_0Z.js","assets/html-UgL0pUTh.js","assets/css-MgOOddo9.js","assets/javascript-DweALdcl.js","assets/angular-ts-C6vKMqNQ.js","assets/scss-CPtRJnQJ.js","assets/apl-CanOX78I.js","assets/json-BsydYQ7o.js","assets/xml-DY6OW6fx.js","assets/java-CJzioqY5.js","assets/astro-D3RhqyEX.js","assets/postcss-BtHn3WbL.js","assets/tsx-D6BgBzWj.js","assets/typescript-C5zt0SwC.js","assets/blade-DL2UFKF3.js","assets/html-derivative-CWqzWmfe.js","assets/sql-C-Fa9hzb.js","assets/bsl-baasCE8P.js","assets/sdbl-lyJ_q2qY.js","assets/c-BOqe9lRQ.js","assets/cairo-BkvliMUx.js","assets/python-B0QK5ArY.js","assets/cobol-Bh6VT3qK.js","assets/coffee-B0QZgCFK.js","assets/cpp-K7si_9PA.js","assets/glsl-COhnwF2O.js","assets/regexp-ClEH90rn.js","assets/crystal-CkrKPPPJ.js","assets/shellscript-BO8cBTbG.js","assets/edge-QC_gsDDT.js","assets/elixir-CLr7lZvD.js","assets/elm-C7vdad3p.js","assets/erb-CpyGfXUh.js","assets/ruby-D8NfXwCK.js","assets/graphql-DKIR2AFZ.js","assets/jsx-DfCzNrFp.js","assets/haml-BwSG8gbZ.js","assets/lua-Cl7HpIv3.js","assets/yaml-hSl-jO2_.js","assets/erlang-vfCdWglx.js","assets/markdown-jQZFZ3m0.js","assets/fortran-fixed-form-eRZkDVxE.js","assets/fortran-free-form-dGWJP-PE.js","assets/fsharp-lKBUVRnt.js","assets/gdresource-C_R0x-CQ.js","assets/gdscript-CW6S_vBb.js","assets/gdshader-BqnlaYeo.js","assets/git-commit-SMAxcXsl.js","assets/diff-Eg5NxGYi.js","assets/git-rebase-3yOGJ52K.js","assets/glimmer-js-B4B76dDY.js","assets/glimmer-ts-DQpCtGkl.js","assets/hack-483kQD0h.js","assets/handlebars-BTt4M9z6.js","assets/http-XCrN_CGn.js","assets/hurl-CfAoEXjj.js","assets/csv-DkOKkcud.js","assets/hxml-BNnDhNNK.js","assets/haxe-BPFrQPtj.js","assets/jinja-CAumwAh3.js","assets/jison-DXiwFEpC.js","assets/julia-D_rxuOJz.js","assets/r-Bxdh_Vt4.js","assets/latex-D0WE8LAX.js","assets/tex-BJpc6dbv.js","assets/liquid-CBi5ZjV2.js","assets/marko-Wx-5ycuy.js","assets/less-BZZ-PLfd.js","assets/mdc-Cnw__bfS.js","assets/nginx-CSLtRIGs.js","assets/nim-Bl94tPNK.js","assets/perl-AQuNRAmj.js","assets/php-Bm5VHYVk.js","assets/pug-Qd0aeXah.js","assets/qml-DdPnfnAH.js","assets/razor-BIPGoiD9.js","assets/csharp-_SaU5MOa.js","assets/rst-C5Xv_6wF.js","assets/cmake-BHzgnx8G.js","assets/sas-DTaGstnC.js","assets/shaderlab-DhaYSNG2.js","assets/hlsl-g9gCsmqR.js","assets/shellsession-mh7kK8rm.js","assets/soy-Y4jbujLe.js","assets/sparql-CbwLv0Nv.js","assets/turtle-CrO-XU5O.js","assets/stata-DGls8UgY.js","assets/svelte-gQr6WDsc.js","assets/templ-CAmLeg1s.js","assets/go-qASC_aC8.js","assets/ts-tags-CTBvtuWV.js","assets/twig-BC4BZrit.js","assets/vue-CWweBK92.js","assets/vue-html-B29OwJ5K.js","assets/vue-vine-Caa--IjA.js","assets/stylus-DBx-JbUM.js","assets/xsl-CAbj-pad.js","assets/dist-DVFW0GyF.js","assets/dist-BGaHY1kO.js","assets/dist-QUHuPJsA.js","assets/dist-DltQmFDE.js","assets/dist-BHVRVW4G.js","assets/dist-CLKxKEQH.js","assets/dist-Bl-Yx_pv.js","assets/dist--FTL3P_Y.js","assets/dist-BiexWhMB.js","assets/dist-BrVgy81Q.js","assets/dist-CI8PS7VF.js","assets/dist-GfVlAkN6.js","assets/dist-VPeqJD5l.js","assets/dist-BKmYJegx.js","assets/dist-Bo9PZWYk.js","assets/dist-ExQdmG6u.js","assets/dist-BNF0fuPB.js","assets/dist-DcyfplO7.js","assets/dist-CRs-U2qz.js","assets/dist-CbIYKZT0.js","assets/dist-CM3Rniow.js","assets/dockerfile-Ci0-ApQC.js","assets/simple-mode-kdHrpFjq.js","assets/factor-DMvifS-k.js","assets/nsis-BbRIeGvl.js","assets/pug-D1ZtszdL.js","assets/javascript-BcqCeS4O.js","assets/dist-COdrA1_m.js","assets/dist-BA9W6ivS.js","assets/browserAll-BgTDhPwL.js","assets/Geometry-CNDxiJq_.js","assets/init-DSot5A37.js","assets/webworkerAll-DnUz-KLD.js","assets/WebGPURenderer-BevM1O4I.js","assets/WebGLRenderer-8qk8lSz6.js","assets/CanvasRenderer-C1h1JIPm.js"])))=>i.map(i=>d[i]);
2
2
  import{n as e,r as t,t as n}from"./chunk-DECur_0Z.js";import{$ as r,A as i,At as a,B as o,C as s,Ct as c,D as l,Dt as u,E as d,Et as f,F as p,Ft as m,G as h,H as g,I as _,It as v,K as y,L as b,Lt as x,M as S,Mt as C,Nt as w,O as T,Ot as E,P as D,Pt as O,Q as k,R as A,S as j,St as M,T as N,Tt as P,U as F,V as I,W as ee,X as L,Y as R,Z as z,_ as te,a as B,at as ne,b as re,bt as V,c as H,ct as ie,d as ae,dt as oe,et as se,f as ce,ft as le,g as ue,gt as de,h as fe,i as pe,it as me,j as he,jt as ge,k as _e,kt as ve,l as U,lt as ye,m as be,mt as xe,n as Se,nt as Ce,o as we,p as Te,pt as Ee,q as De,r as Oe,rt as ke,s as Ae,st as je,t as Me,u as Ne,ut as Pe,v as Fe,vt as Ie,w as Le,wt as Re,x as ze,xt as Be,z as Ve}from"./dist-QUHuPJsA.js";import{a as He,i as Ue,n as We,o as Ge,r as Ke}from"./dist--FTL3P_Y.js";import{i as qe,n as Je,o as Ye,r as Xe,t as Ze}from"./dist-BGaHY1kO.js";import{$ as Qe,A as $e,B as et,C as tt,E as nt,F as rt,G as it,H as at,I as ot,J as st,K as ct,L as lt,N as ut,O as dt,P as ft,Q as pt,R as mt,T as ht,U as gt,W as _t,X as vt,Y as yt,Z as bt,_ as xt,a as St,b as Ct,c as wt,d as Tt,et as Et,f as Dt,g as Ot,h as kt,i as At,it as jt,j as Mt,k as Nt,l as Pt,m as Ft,n as It,nt as Lt,o as Rt,q as zt,r as Bt,rt as W,s as Vt,t as Ht,tt as Ut,u as Wt,v as Gt,w as Kt,x as qt,y as Jt,z as Yt}from"./Geometry-CNDxiJq_.js";import{t as Xt}from"./ImageSource-DsthkIsU.js";import{C as Zt,D as Qt,E as $t,O as en,S as tn,T as nn,_ as rn,a as an,b as on,c as sn,d as cn,f as ln,g as un,h as dn,i as fn,k as pn,l as mn,m as hn,n as gn,o as _n,p as vn,r as yn,s as bn,t as xn,u as Sn,v as Cn,w as wn,x as Tn,y as En}from"./RenderTargetSystem-CLQIFvVz.js";import{t as Dn}from"./getTextureBatchBindGroup-CqvclRGr.js";import{a as On,c as kn,d as An,f as jn,i as Mn,l as Nn,n as Pn,o as Fn,p as In,r as Ln,s as Rn,t as zn,u as Bn}from"./BufferResource-DKNednNt.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Vn=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Hn=n(((e,t)=>{t.exports=Vn()})),Un=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ee={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ee,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.0`})),Wn=n(((e,t)=>{t.exports=Un()})),Gn=n((e=>{var t=Wn();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.0`})),Kn=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Gn()})),qn=n((e=>{var t=Hn(),n=Wn(),r=Kn();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?j(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var M=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},I=[],ee=-1;function L(e){return{current:e}}function R(e){0>ee||(e.current=I[ee],I[ee]=null,ee--)}function z(e,t){ee++,I[ee]=e.current,e.current=t}var te=L(null),B=L(null),ne=L(null),re=L(null);function V(e,t){switch(z(ne,t),z(B,e),z(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qd(t),e=Jd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}R(te),z(te,e)}function H(){R(te),R(B),R(ne)}function ie(e){e.memoizedState!==null&&z(re,e);var t=te.current,n=Jd(t,e.type);t!==n&&(z(B,e),z(te,n))}function ae(e){B.current===e&&(R(te),R(B)),re.current===e&&(R(re),ip._currentValue=F)}var oe,se;function ce(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``,se=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+oe+e+se}var le=!1;function ue(e,t){if(!e||le)return``;le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -43,7 +43,7 @@ Error generating stack: `+e.message+`
43
43
  .dark dialog.openspec-dialog::backdrop {
44
44
  background-color: rgba(255, 255, 255, 0.2);
45
45
  }
46
- `,[])),(0,K.jsx)(`dialog`,{ref:f,className:`openspec-dialog m-0 h-dvh w-screen max-w-none border-0 bg-transparent p-0 ${o}`,children:(0,K.jsx)(`div`,{className:`flex h-full w-full items-center justify-center px-4 py-4 ${s}`,children:(0,K.jsxs)(`div`,{ref:p,className:`bg-background text-foreground relative flex h-fit w-[calc(100%-0.5rem)] max-w-2xl flex-col overflow-hidden rounded-[var(--openspec-dialog-radius,0.75rem)] border shadow-xl ${m} ${c}`,style:{maxHeight:u},children:[(0,K.jsxs)(`div`,{className:`border-border flex flex-none shrink-0 items-center justify-between border-b px-4 py-3`,children:[(0,K.jsx)(`div`,{className:`flex items-center gap-2`,children:t}),(0,K.jsx)(`button`,{onClick:n,className:`hover:bg-muted rounded p-1`,"aria-label":`Close dialog`,children:(0,K.jsx)(bl,{className:`h-4 w-4`})})]}),(0,K.jsx)(`div`,{className:`scrollbar-thin scrollbar-track-transparent min-h-0 flex-1 overflow-auto px-4 py-3 ${l}`,children:i}),a&&(0,K.jsx)(`div`,{className:`border-border flex flex-none shrink-0 items-center justify-end gap-2 border-t px-4 py-3`,children:a})]})})})}var wl=/^\/versions\/[^/]+(?:\/|$)/;function Tl(e){let t=e.trim();if(!t)return null;let n;try{n=new URL(t)}catch{return null}n.hash=``,n.search=``;let r=n.pathname.replace(/\/+$/,``);return n.pathname=r.length>0?r:`/`,n.toString().replace(/\/$/,(n.pathname,``))}function El(e,t){return new URLSearchParams(e).get(t)?.trim()||null}function Dl(e){return wl.test(e)}function Ol(e){let t=Dl(e.pathname);return{hosted:t,apiBaseUrl:Tl(El(e.search,`api`)??``),sessionId:t?El(e.search,`session`):null}}function kl(e,t){let n=Ol(t);return n.hosted&&n.sessionId?`hosted-session:${n.sessionId}:${e}`:e}function Al(){return typeof window<`u`&&window.location!==void 0}function jl(){return Al()?Ol(window.location):{hosted:!1,apiBaseUrl:null,sessionId:null}}function Ml(){return Al()?jl().apiBaseUrl??``:``}function Nl(e){if(!Al())return``;let t=Ml();if(t){let n=new URL(t);return`${n.protocol===`https:`?`wss:`:`ws:`}//${n.host}${e}`}return`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}${e}`}function Pl(){return Nl(`/trpc`)}function Fl(){return Nl(`/ws/pty`)}function Il(){let e=Ml();return e?`${e}/trpc`:`/trpc`}function Ll(){let e=Ml();return e?`${e}/api/health`:`/api/health`}var Rl=null;typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0&&(Rl=!0,console.log(`[static-mode] Detected static export mode (via flag)`));function zl(){return Rl===!0}function Bl(e){Rl=e}var Vl=null;function Hl(){return Vl===null?typeof window<`u`&&window.__OPENSPEC_BASE_PATH__||`./`:Vl}function Ul(){return typeof window<`u`&&window.__INITIAL_DATA__?window.__INITIAL_DATA__:null}var Wl=`modulepreload`,Gl=function(e){return`/`+e},Kl={},q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Gl(t,n),t in Kl)return;Kl[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Wl,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ql=[`/dashboard`,`/config`,`/git`,`/specs`,`/changes`,`/archive`,`/settings`,`/terminal`],Jl=[`/dashboard`,`/config`,`/specs`,`/changes`,`/archive`,`/settings`],Yl=zl()?[]:[`/git`,`/terminal`],Xl=[`/search`,`/opsx-new`,`/opsx-propose`,`/opsx-verify`,`/opsx-compose`];function Zl(){return kl(`nav-layout`,window.location)}function Ql(e){return kl(`nav-layout:${encodeURIComponent(e)}`,window.location)}var $l=300;function eu(e){return ql.includes(e)}function tu(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&eu(e)):[]}function nu(e){if(typeof e!=`object`||!e)return null;let t=e;return!Array.isArray(t.mainTabs)||!Array.isArray(t.bottomTabs)?null:{mainTabs:tu(t.mainTabs),bottomTabs:tu(t.bottomTabs),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}function ru(e,t){if(typeof e!=`object`||!e)return{__TSR_index:0,key:t,__TSR_key:t};let n=e,r=typeof n.key==`string`?n.key:t,i=typeof n.__TSR_key==`string`?n.__TSR_key:r,a=typeof n.__TSR_index==`number`?n.__TSR_index:0;return{...n,key:r,__TSR_key:i,__TSR_index:a}}function iu(e,t){let n=new URL(e,`http://nav.local`),r=`${n.pathname}${n.search}${n.hash}`,i=Math.random().toString(36).slice(2);return{href:r,pathname:n.pathname||`/`,search:n.search,hash:n.hash,state:ru(t,i)}}function au(e){let t=e.trim();if(!t||t===`./`||t===`.`)return`/`;let n=t.startsWith(`/`)?t:`/${t}`;return(n.endsWith(`/`)?n:`${n}/`).replace(/\/+/g,`/`)}function ou(e,t){return t===`/`?e||`/`:e===t.slice(0,-1)?`/`:e.startsWith(t)?e.slice(t.length-1)||`/`:e||`/`}function su(e,t){if(t===`/`)return e||`/`;let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`?t.slice(0,-1)||`/`:`${t.slice(0,-1)}${n}`}function cu(e){if(typeof window>`u`)return e;let t=new URL(e,window.location.origin),n=au(Hl());return t.pathname=ou(t.pathname,n),`${t.pathname}${t.search}${t.hash}`}function lu(e,t){for(let n of[`api`,`session`]){let r=t.searchParams.get(n);r&&!e.searchParams.has(n)&&e.searchParams.set(n,r)}}function uu(e){for(let t of ql)if(e===t||e.startsWith(t+`/`))return t;return null}function du(e,t){if(t===`pop`)return null;let n=t===`main`?e.mainLocation:e.bottomLocation,r=t===`main`?e.mainTabs:e.bottomTabs,i=uu(n.pathname);return i&&r.includes(i)?i:null}function fu(e){return Xl.some(t=>e===t||e.startsWith(t+`/`))}function pu(e,t){if(fu(t))return`pop`;let n=uu(t);return n&&e.bottomTabs.includes(n)?`bottom`:`main`}function mu(e){let t=new Set,n=[],r=[];for(let r of e.mainTabs)t.has(r)||(n.push(r),t.add(r));for(let n of e.bottomTabs)t.has(n)||(r.push(n),t.add(n));for(let e of ql)t.has(e)||(Yl.includes(e)?r.push(e):n.push(e));return{mainTabs:n,bottomTabs:r}}function hu(e,t){if(t.length===0)return iu(`/`);let n=uu(e.pathname);return n&&!t.includes(n)?iu(`/`):e}function gu(e,t){if(t.length===0)return iu(`/`);if(e.pathname===`/`)return iu(`/`,e.state);let n=uu(e.pathname);return!n||!t.includes(n)?iu(`/`):e}function _u(e){return e.pathname===`/`?iu(`/`,e.state):fu(e.pathname)?e:iu(`/`)}function vu(e){let t=mu({mainTabs:e.mainTabs,bottomTabs:e.bottomTabs});return{...e,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,mainLocation:hu(e.mainLocation,t.mainTabs),bottomLocation:gu(e.bottomLocation,t.bottomTabs),popLocation:_u(e.popLocation)}}function yu(e,t){let n=new URL(e.href),r=au(Hl());n.pathname=ou(n.pathname,r);let i=n.searchParams.get(`_b`),a=n.searchParams.get(`_p`);n.searchParams.delete(`_b`),n.searchParams.delete(`_p`);let o=window.history.state,s=iu(`${n.pathname}${n.search}${n.hash}`,o?.main),c=iu(i??`/`,o?.bottom),l=iu(a??`/`,o?.pop);if(!i&&!a){let e=pu(t,s.pathname);e===`bottom`?(c=s,s=iu(`/`,o?.main)):e===`pop`&&(l=s,s=iu(`/`,o?.main))}return{main:hu(s,t.mainTabs),bottom:gu(c,t.bottomTabs),pop:_u(l)}}function bu(e){let t=new URL(window.location.href),n=new URL(e.mainLocation.href,window.location.origin),r=au(Hl());return n.pathname=su(n.pathname,r),lu(n,t),n.searchParams.delete(`_b`),n.searchParams.delete(`_p`),e.bottomTabs.length>0&&n.searchParams.set(`_b`,e.bottomLocation.href),e.popLocation.pathname!==`/`&&n.searchParams.set(`_p`,e.popLocation.href),`${n.pathname}${n.search}${n.hash}`}function xu(e,t){return e.length===t.length?e.every((e,n)=>e===t[n]):!1}function Su(){return{mainTabs:[...Jl],bottomTabs:[...Yl],updatedAt:0,mainLocation:iu(`/dashboard`),bottomLocation:iu(`/`),popLocation:iu(`/`)}}function Cu(){try{let e=localStorage.getItem(Zl());return e?nu(JSON.parse(e)):null}catch{return null}}function wu(e){try{let t=localStorage.getItem(e);return t?nu(JSON.parse(t)):null}catch{return null}}function Tu(e,t=Zl()){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function Eu(e){let t=uu(e.pathname);return!t||e.pathname===t?e:t===`/changes`||t===`/specs`||t===`/archive`?iu(t,e.state):e}var Du=[({prevState:e,nextState:t,event:n})=>{if(n.type!==`MOVE_TAB`)return t;let r=e.bottomTabs.includes(n.tabId)?`bottom`:`main`;if(du(e,r)!==n.tabId)return t;let i=r===`main`?e.mainLocation:e.bottomLocation,a=iu(i.href,i.state);return n.targetArea===`main`?{...t,mainLocation:a}:{...t,bottomLocation:a}},({nextState:e})=>e.mainTabs.length===0||du(e,`main`)!=null?e:{...e,mainLocation:iu(e.mainTabs[0])}];function Ou(e,t,n){let r=t;for(let t of Du)r=t({prevState:e,nextState:r,event:n});return r}function ku(e,t){switch(t.type){case`NAVIGATE`:{let n=t.sourceArea===`pop`?`pop`:pu(e,t.location.pathname);return{nextState:n===`main`?{...e,mainLocation:t.location}:n===`bottom`?{...e,bottomLocation:t.location}:{...e,popLocation:t.location},changed:!0,urlAction:t.action,notify:n===t.sourceArea?[]:[{area:n,type:t.action}],persist:`none`}}case`POPSTATE`:return{nextState:{...e,mainLocation:t.mainLocation,bottomLocation:t.bottomLocation,popLocation:t.popLocation},changed:!0,notify:[{area:`main`,type:`BACK`},{area:`bottom`,type:`BACK`},{area:`pop`,type:`BACK`}],persist:`none`};case`MOVE_TAB`:{let n=e.bottomTabs.includes(t.tabId)?`bottom`:`main`;if(n===t.targetArea)return{nextState:e,changed:!1,notify:[],persist:`none`};let r=e.mainTabs.filter(e=>e!==t.tabId),i=e.bottomTabs.filter(e=>e!==t.tabId),a=t.targetArea===`main`?[...r,t.tabId]:r,o=t.targetArea===`bottom`?[...i,t.tabId]:i,s=e.mainLocation,c=e.bottomLocation;return uu((n===`main`?e.mainLocation:e.bottomLocation).pathname)===t.tabId&&(n===`main`?s=iu(`/`):c=iu(`/`)),{nextState:{...e,mainTabs:a,bottomTabs:o,mainLocation:s,bottomLocation:c},changed:!0,urlAction:`REPLACE`,notify:[{area:`main`,type:`REPLACE`},{area:`bottom`,type:`REPLACE`}],persist:`local_and_remote`}}case`REORDER`:{let n=t.area===`main`?e.mainTabs:e.bottomTabs,r=new Set(n),i=t.tabIds.filter(e=>r.has(e));for(let e of n)i.includes(e)||i.push(e);return xu(n,i)?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:t.area===`main`?{...e,mainTabs:i}:{...e,bottomTabs:i},changed:!0,notify:[],persist:`local_and_remote`}}case`CLOSE_TAB`:{let n=e.bottomTabs.includes(t.tabId),r=e.mainTabs.includes(t.tabId);return!n&&!r?{nextState:e,changed:!1,notify:[],persist:`none`}:n?uu(e.bottomLocation.pathname)===t.tabId?{nextState:{...e,bottomLocation:iu(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}:uu(e.mainLocation.pathname)===t.tabId?{nextState:{...e,mainLocation:iu(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}}case`ACTIVATE_BOTTOM`:return pu(e,t.location.pathname)===`bottom`?{nextState:{...e,bottomLocation:t.location},changed:!0,urlAction:`PUSH`,notify:[{area:`bottom`,type:`PUSH`}],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`};case`DEACTIVATE_BOTTOM`:return e.bottomLocation.pathname===`/`?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:{...e,bottomLocation:iu(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`ACTIVATE_POP`:return pu(e,t.location.pathname)===`pop`?{nextState:{...e,popLocation:t.location},changed:!0,urlAction:`PUSH`,notify:[{area:`pop`,type:`PUSH`}],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`};case`DEACTIVATE_POP`:return e.popLocation.pathname===`/`?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:{...e,popLocation:iu(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`APPLY_LAYOUT`:{if(t.layout.updatedAt<=e.updatedAt)return{nextState:e,changed:!1,notify:[],persist:`none`};let n=mu(t.layout);return{nextState:{...e,mainTabs:n.mainTabs,bottomTabs:n.bottomTabs,updatedAt:t.layout.updatedAt},changed:!0,urlAction:`REPLACE`,notify:[{area:`main`,type:`REPLACE`},{area:`bottom`,type:`REPLACE`}],persist:`local_only`}}}}function Au(e,t,n){return n===`main`?e.mainLocation.href!==t.mainLocation.href:n===`bottom`?e.bottomLocation.href!==t.bottomLocation.href:e.popLocation.href!==t.popLocation.href}function ju(e,t,n){let r=[...e];for(let e of[`main`,`bottom`,`pop`])Au(t,n,e)&&(r.some(t=>t.area===e)||r.push({area:e,type:`REPLACE`}));return r}var Mu=new class{mainHistory=null;bottomHistory=null;popHistory=null;state=Su();listeners=new Set;snapshotCache=null;persistTimer=null;kvUnsubscribe=null;initialized=!1;storageKey=typeof window>`u`?`nav-layout`:kl(`nav-layout`,window.location);constructor(){if(typeof window>`u`)return;let e=zl()?null:Cu();if(e!=null){let t=mu(e);this.state={...this.state,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,updatedAt:e.updatedAt}}let t=yu(window.location,this.state),n=vu({...this.state,mainLocation:t.main,bottomLocation:t.bottom,popLocation:t.pop});n=vu(Ou(n,n,{type:`BOOTSTRAP`})),this.state=n,this.normalizeUrl(),window.addEventListener(`popstate`,this.handlePopState)}setHistoryRef(e,t){e===`main`?this.mainHistory=t:e===`bottom`?this.bottomHistory=t:this.popHistory=t}getLocation(e){return e===`main`?this.state.mainLocation:e===`bottom`?this.state.bottomLocation:this.state.popLocation}push(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:iu(cu(t),n)})}replace(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`REPLACE`,location:iu(cu(t),n)})}createHref(e,t,n){if(typeof window>`u`)return t;let{nextState:r}=this.computeTransition({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:iu(cu(t),n)});return bu(r)}get mainTabs(){return this.state.mainTabs}get bottomTabs(){return this.state.bottomTabs}getAreaForPath(e){return pu(this.state,e)}moveTab(e,t){this.dispatch({type:`MOVE_TAB`,tabId:e,targetArea:t})}reorder(e,t){this.dispatch({type:`REORDER`,area:e,tabIds:t})}closeTab(e){this.dispatch({type:`CLOSE_TAB`,tabId:e})}activateBottom(e){this.dispatch({type:`ACTIVATE_BOTTOM`,location:iu(e)})}deactivateBottom(){this.dispatch({type:`DEACTIVATE_BOTTOM`})}activatePop(e){this.dispatch({type:`ACTIVATE_POP`,location:iu(e)})}deactivatePop(){this.dispatch({type:`DEACTIVATE_POP`})}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}getSnapshot(){if(this.snapshotCache)return this.snapshotCache;let e=uu(this.state.bottomLocation.pathname);return this.snapshotCache={mainTabs:[...this.state.mainTabs],bottomTabs:[...this.state.bottomTabs],mainLocation:this.state.mainLocation,bottomLocation:this.state.bottomLocation,popLocation:this.state.popLocation,bottomActive:e!=null&&this.state.bottomTabs.includes(e),popActive:this.state.popLocation.pathname!==`/`},this.snapshotCache}async init(){if(!(this.initialized||zl())){this.initialized=!0;try{let e=await this.resolveProjectScopedStorageKey();e&&e!==this.storageKey&&(this.storageKey=e,this.rebindProjectScopedLayout(e));let{trpcClient:t}=await q(async()=>{let{trpcClient:e}=await import(`./trpc-Z2U-lHEj.js`);return{trpcClient:e}},[]),n=nu(await t.kv.get.query({key:this.storageKey}));n?n.updatedAt>this.state.updatedAt?this.dispatch({type:`APPLY_LAYOUT`,layout:n}):this.state.updatedAt>n.updatedAt&&t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt}}).catch(()=>{}):this.state.updatedAt>0&&t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt}}).catch(()=>{});let r=t.kv.subscribe.subscribe({key:this.storageKey},{onData:e=>{let t=nu(e);t&&this.dispatch({type:`APPLY_LAYOUT`,layout:t})}});this.kvUnsubscribe=()=>r.unsubscribe()}catch{}}}destroy(){typeof window<`u`&&window.removeEventListener(`popstate`,this.handlePopState),this.cancelPersistTimer(),this.kvUnsubscribe&&=(this.kvUnsubscribe(),null)}handlePopState=()=>{let e=yu(window.location,this.state);this.dispatch({type:`POPSTATE`,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})};computeTransition(e){let t=ku(this.state,e);if(!t.changed)return{transition:t,nextState:this.state};let n=Ou(this.state,t.nextState,e);return n=vu(n),{transition:t,nextState:n}}dispatch(e){if(typeof window<`u`&&e.type!==`POPSTATE`&&this.mainHistory==null){let e=yu(window.location,this.state);this.state=vu({...this.state,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})}let t=ku(this.state,e);if(!t.changed)return;let n=this.state,r=Ou(n,t.nextState,e);r=vu(r),this.state=r,t.persist===`local_and_remote`?this.persistLayout():t.persist===`local_only`&&(this.cancelPersistTimer(),Tu({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt},this.storageKey));let i=t.urlAction??(Au(n,this.state,`main`)||Au(n,this.state,`bottom`)||Au(n,this.state,`pop`)?`REPLACE`:void 0);i&&this.syncToUrl(i);let a=ju(t.notify,n,this.state);this.notifyRouters(a),this.notifyListeners()}notifyRouters(e){for(let t of e)(t.area===`main`?this.mainHistory:t.area===`bottom`?this.bottomHistory:this.popHistory)?.notify({type:t.type})}notifyListeners(){this.snapshotCache=null;for(let e of this.listeners)e()}syncToUrl(e){let t=bu(this.state),n=`${window.location.pathname}${window.location.search}${window.location.hash}`;if(e===`REPLACE`&&t===n)return;let r={main:this.state.mainLocation.state,bottom:this.state.bottomLocation.state,pop:this.state.popLocation.state};e===`PUSH`?window.history.pushState(r,``,t):window.history.replaceState(r,``,t)}normalizeUrl(){let e=bu(this.state);if(e===`${window.location.pathname}${window.location.search}${window.location.hash}`)return;let t={main:this.state.mainLocation.state,bottom:this.state.bottomLocation.state,pop:this.state.popLocation.state};window.history.replaceState(t,``,e)}cancelPersistTimer(){this.persistTimer&&=(clearTimeout(this.persistTimer),null)}persistLayout(){let e=Date.now();this.state={...this.state,updatedAt:e},Tu({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e},this.storageKey),this.cancelPersistTimer(),this.persistTimer=setTimeout(()=>{this.persistTimer=null,q(async()=>{let{trpcClient:e}=await import(`./trpc-Z2U-lHEj.js`);return{trpcClient:e}},[]).then(({trpcClient:t})=>t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e}})).catch(()=>{})},$l)}async resolveProjectScopedStorageKey(){try{let e=await fetch(Ll());if(!e.ok)return null;let t=await e.json();return typeof t.projectDir!=`string`||t.projectDir.length===0?null:Ql(t.projectDir)}catch{return null}}rebindProjectScopedLayout(e){let t=wu(e);if(t){let e=mu(t);this.state=vu({...this.state,mainTabs:e.mainTabs,bottomTabs:e.bottomTabs,updatedAt:t.updatedAt}),this.normalizeUrl();return}this.state=vu({...this.state,mainLocation:Eu(this.state.mainLocation),bottomLocation:Eu(this.state.bottomLocation),updatedAt:0}),this.normalizeUrl(),this.notifyListeners()}};typeof window<`u`&&!zl()&&Mu.init();function Nu(){return(0,G.useSyncExternalStore)(e=>Mu.subscribe(e),()=>Mu.getSnapshot(),()=>Mu.getSnapshot())}function Pu(e,t){return t.updatedAt-e.updatedAt||e.id.localeCompare(t.id)}function Fu(e){return[...e].sort(Pu)}function Iu(e,t=10){return Fu(e).slice(0,Math.max(0,Math.trunc(t)))}var Lu=`project`,Ru=/^[A-Za-z]:\//;function zu(e){return e.replace(/\\/g,`/`).replace(/\/+$/g,``)}function Bu(e){return e.startsWith(`/`)||Ru.test(e)}function Vu(e){return e.replace(/^\.?\//,``)}function Hu(e){return zu(e).split(`/`).filter(Boolean)}function Uu(e){let t=zu(e),n=/(?:^|\/)node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(@[^/]+\/[^/]+|[^/]+)(\/.*)?/.exec(t),r=n?.[1];return r?`npm:${r}${n[2]??``}`:null}function Wu(e){return`${Lu}:${Vu(e)}`}function Gu(e,t){let n=zu(e),r=zu(t),i=n.toLowerCase(),a=r.toLowerCase();return a===i||a.startsWith(`${i}/`)}function Ku(e,t){let n=Hu(e),r=Hu(t),i=0;for(;i<n.length&&i<r.length&&n[i]?.toLowerCase()===r[i]?.toLowerCase();)i+=1;return r.slice(i).join(`/`)}function qu(e){let t=Hu(e),n=t.lastIndexOf(`openspec`);return n<0?null:t.slice(n).join(`/`)}function Ju(e,t){let n=zu(e),r=Uu(n);return(t?.source===`package`||r)&&r?r:Bu(n)?t?.projectDir&&Gu(t.projectDir,n)?Wu(Ku(t.projectDir,n)):Wu(qu(n)||Hu(n).slice(-4).join(`/`)):Wu(n)}var Yu=Symbol.for(`yaml.alias`),Xu=Symbol.for(`yaml.document`),Zu=Symbol.for(`yaml.map`),Qu=Symbol.for(`yaml.pair`),$u=Symbol.for(`yaml.scalar`),ed=Symbol.for(`yaml.seq`),td=Symbol.for(`yaml.node.type`),nd=e=>!!e&&typeof e==`object`&&e[td]===Yu,rd=e=>!!e&&typeof e==`object`&&e[td]===Xu,id=e=>!!e&&typeof e==`object`&&e[td]===Zu,ad=e=>!!e&&typeof e==`object`&&e[td]===Qu,od=e=>!!e&&typeof e==`object`&&e[td]===$u,sd=e=>!!e&&typeof e==`object`&&e[td]===ed;function cd(e){if(e&&typeof e==`object`)switch(e[td]){case Zu:case ed:return!0}return!1}function ld(e){if(e&&typeof e==`object`)switch(e[td]){case Yu:case Zu:case $u:case ed:return!0}return!1}var ud=e=>(od(e)||cd(e))&&!!e.anchor,dd=Symbol(`break visit`),fd=Symbol(`skip children`),pd=Symbol(`remove node`);function md(e,t){let n=vd(t);rd(e)?hd(null,e.contents,n,Object.freeze([e]))===pd&&(e.contents=null):hd(null,e,n,Object.freeze([]))}md.BREAK=dd,md.SKIP=fd,md.REMOVE=pd;function hd(e,t,n,r){let i=yd(e,t,n,r);if(ld(i)||ad(i))return bd(e,r,i),hd(e,i,n,r);if(typeof i!=`symbol`){if(cd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=hd(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===dd)return dd;else i===pd&&(t.items.splice(e,1),--e)}}else if(ad(t)){r=Object.freeze(r.concat(t));let e=hd(`key`,t.key,n,r);if(e===dd)return dd;e===pd&&(t.key=null);let i=hd(`value`,t.value,n,r);if(i===dd)return dd;i===pd&&(t.value=null)}}return i}async function gd(e,t){let n=vd(t);rd(e)?await _d(null,e.contents,n,Object.freeze([e]))===pd&&(e.contents=null):await _d(null,e,n,Object.freeze([]))}gd.BREAK=dd,gd.SKIP=fd,gd.REMOVE=pd;async function _d(e,t,n,r){let i=await yd(e,t,n,r);if(ld(i)||ad(i))return bd(e,r,i),_d(e,i,n,r);if(typeof i!=`symbol`){if(cd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await _d(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===dd)return dd;else i===pd&&(t.items.splice(e,1),--e)}}else if(ad(t)){r=Object.freeze(r.concat(t));let e=await _d(`key`,t.key,n,r);if(e===dd)return dd;e===pd&&(t.key=null);let i=await _d(`value`,t.value,n,r);if(i===dd)return dd;i===pd&&(t.value=null)}}return i}function vd(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function yd(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(id(t))return n.Map?.(e,t,r);if(sd(t))return n.Seq?.(e,t,r);if(ad(t))return n.Pair?.(e,t,r);if(od(t))return n.Scalar?.(e,t,r);if(nd(t))return n.Alias?.(e,t,r)}function bd(e,t,n){let r=t[t.length-1];if(cd(r))r.items[e]=n;else if(ad(r))e===`key`?r.key=n:r.value=n;else if(rd(r))r.contents=n;else{let e=nd(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var xd={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Sd=e=>e.replace(/[!,[\]{}]/g,e=>xd[e]),Cd=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Sd(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&ld(e.contents)){let t={};md(e.contents,(e,n)=>{ld(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
46
+ `,[])),(0,K.jsx)(`dialog`,{ref:f,className:`openspec-dialog m-0 h-dvh w-screen max-w-none border-0 bg-transparent p-0 ${o}`,children:(0,K.jsx)(`div`,{className:`flex h-full w-full items-center justify-center px-4 py-4 ${s}`,children:(0,K.jsxs)(`div`,{ref:p,className:`bg-background text-foreground relative flex h-fit w-[calc(100%-0.5rem)] max-w-2xl flex-col overflow-hidden rounded-[var(--openspec-dialog-radius,0.75rem)] border shadow-xl ${m} ${c}`,style:{maxHeight:u},children:[(0,K.jsxs)(`div`,{className:`border-border flex flex-none shrink-0 items-center justify-between border-b px-4 py-3`,children:[(0,K.jsx)(`div`,{className:`flex items-center gap-2`,children:t}),(0,K.jsx)(`button`,{onClick:n,className:`hover:bg-muted rounded p-1`,"aria-label":`Close dialog`,children:(0,K.jsx)(bl,{className:`h-4 w-4`})})]}),(0,K.jsx)(`div`,{className:`scrollbar-thin scrollbar-track-transparent min-h-0 flex-1 overflow-auto px-4 py-3 ${l}`,children:i}),a&&(0,K.jsx)(`div`,{className:`border-border flex flex-none shrink-0 items-center justify-end gap-2 border-t px-4 py-3`,children:a})]})})})}var wl=/^\/versions\/[^/]+(?:\/|$)/;function Tl(e){let t=e.trim();if(!t)return null;let n;try{n=new URL(t)}catch{return null}n.hash=``,n.search=``;let r=n.pathname.replace(/\/+$/,``);return n.pathname=r.length>0?r:`/`,n.toString().replace(/\/$/,(n.pathname,``))}function El(e,t){return new URLSearchParams(e).get(t)?.trim()||null}function Dl(e){return wl.test(e)}function Ol(e){let t=Dl(e.pathname);return{hosted:t,apiBaseUrl:Tl(El(e.search,`api`)??``),sessionId:t?El(e.search,`session`):null}}function kl(e,t){let n=Ol(t);return n.hosted&&n.sessionId?`hosted-session:${n.sessionId}:${e}`:e}function Al(){return typeof window<`u`&&window.location!==void 0}function jl(){return Al()?Ol(window.location):{hosted:!1,apiBaseUrl:null,sessionId:null}}function Ml(){return Al()?jl().apiBaseUrl??``:``}function Nl(e){if(!Al())return``;let t=Ml();if(t){let n=new URL(t);return`${n.protocol===`https:`?`wss:`:`ws:`}//${n.host}${e}`}return`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}${e}`}function Pl(){return Nl(`/trpc`)}function Fl(){return Nl(`/ws/pty`)}function Il(){let e=Ml();return e?`${e}/trpc`:`/trpc`}function Ll(){let e=Ml();return e?`${e}/api/health`:`/api/health`}var Rl=null;typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0&&(Rl=!0,console.log(`[static-mode] Detected static export mode (via flag)`));function zl(){return Rl===!0}function Bl(e){Rl=e}var Vl=null;function Hl(){return Vl===null?typeof window<`u`&&window.__OPENSPEC_BASE_PATH__||`./`:Vl}function Ul(){return typeof window<`u`&&window.__INITIAL_DATA__?window.__INITIAL_DATA__:null}var Wl=`modulepreload`,Gl=function(e){return`/`+e},Kl={},q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Gl(t,n),t in Kl)return;Kl[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Wl,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ql=[`/dashboard`,`/config`,`/git`,`/specs`,`/changes`,`/archive`,`/settings`,`/terminal`],Jl=[`/dashboard`,`/config`,`/specs`,`/changes`,`/archive`,`/settings`],Yl=zl()?[]:[`/git`,`/terminal`],Xl=[`/search`,`/opsx-new`,`/opsx-propose`,`/opsx-verify`,`/opsx-compose`];function Zl(){return kl(`nav-layout`,window.location)}function Ql(e){return kl(`nav-layout:${encodeURIComponent(e)}`,window.location)}var $l=300;function eu(e){return ql.includes(e)}function tu(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&eu(e)):[]}function nu(e){if(typeof e!=`object`||!e)return null;let t=e;return!Array.isArray(t.mainTabs)||!Array.isArray(t.bottomTabs)?null:{mainTabs:tu(t.mainTabs),bottomTabs:tu(t.bottomTabs),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}function ru(e,t){if(typeof e!=`object`||!e)return{__TSR_index:0,key:t,__TSR_key:t};let n=e,r=typeof n.key==`string`?n.key:t,i=typeof n.__TSR_key==`string`?n.__TSR_key:r,a=typeof n.__TSR_index==`number`?n.__TSR_index:0;return{...n,key:r,__TSR_key:i,__TSR_index:a}}function iu(e,t){let n=new URL(e,`http://nav.local`),r=`${n.pathname}${n.search}${n.hash}`,i=Math.random().toString(36).slice(2);return{href:r,pathname:n.pathname||`/`,search:n.search,hash:n.hash,state:ru(t,i)}}function au(e){let t=e.trim();if(!t||t===`./`||t===`.`)return`/`;let n=t.startsWith(`/`)?t:`/${t}`;return(n.endsWith(`/`)?n:`${n}/`).replace(/\/+/g,`/`)}function ou(e,t){return t===`/`?e||`/`:e===t.slice(0,-1)?`/`:e.startsWith(t)?e.slice(t.length-1)||`/`:e||`/`}function su(e,t){if(t===`/`)return e||`/`;let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`?t.slice(0,-1)||`/`:`${t.slice(0,-1)}${n}`}function cu(e){if(typeof window>`u`)return e;let t=new URL(e,window.location.origin),n=au(Hl());return t.pathname=ou(t.pathname,n),`${t.pathname}${t.search}${t.hash}`}function lu(e,t){for(let n of[`api`,`session`]){let r=t.searchParams.get(n);r&&!e.searchParams.has(n)&&e.searchParams.set(n,r)}}function uu(e){for(let t of ql)if(e===t||e.startsWith(t+`/`))return t;return null}function du(e,t){if(t===`pop`)return null;let n=t===`main`?e.mainLocation:e.bottomLocation,r=t===`main`?e.mainTabs:e.bottomTabs,i=uu(n.pathname);return i&&r.includes(i)?i:null}function fu(e){return Xl.some(t=>e===t||e.startsWith(t+`/`))}function pu(e,t){if(fu(t))return`pop`;let n=uu(t);return n&&e.bottomTabs.includes(n)?`bottom`:`main`}function mu(e){let t=new Set,n=[],r=[];for(let r of e.mainTabs)t.has(r)||(n.push(r),t.add(r));for(let n of e.bottomTabs)t.has(n)||(r.push(n),t.add(n));for(let e of ql)t.has(e)||(Yl.includes(e)?r.push(e):n.push(e));return{mainTabs:n,bottomTabs:r}}function hu(e,t){if(t.length===0)return iu(`/`);let n=uu(e.pathname);return n&&!t.includes(n)?iu(`/`):e}function gu(e,t){if(t.length===0)return iu(`/`);if(e.pathname===`/`)return iu(`/`,e.state);let n=uu(e.pathname);return!n||!t.includes(n)?iu(`/`):e}function _u(e){return e.pathname===`/`?iu(`/`,e.state):fu(e.pathname)?e:iu(`/`)}function vu(e){let t=mu({mainTabs:e.mainTabs,bottomTabs:e.bottomTabs});return{...e,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,mainLocation:hu(e.mainLocation,t.mainTabs),bottomLocation:gu(e.bottomLocation,t.bottomTabs),popLocation:_u(e.popLocation)}}function yu(e,t){let n=new URL(e.href),r=au(Hl());n.pathname=ou(n.pathname,r);let i=n.searchParams.get(`_b`),a=n.searchParams.get(`_p`);n.searchParams.delete(`_b`),n.searchParams.delete(`_p`);let o=window.history.state,s=iu(`${n.pathname}${n.search}${n.hash}`,o?.main),c=iu(i??`/`,o?.bottom),l=iu(a??`/`,o?.pop);if(!i&&!a){let e=pu(t,s.pathname);e===`bottom`?(c=s,s=iu(`/`,o?.main)):e===`pop`&&(l=s,s=iu(`/`,o?.main))}return{main:hu(s,t.mainTabs),bottom:gu(c,t.bottomTabs),pop:_u(l)}}function bu(e){let t=new URL(window.location.href),n=new URL(e.mainLocation.href,window.location.origin),r=au(Hl());return n.pathname=su(n.pathname,r),lu(n,t),n.searchParams.delete(`_b`),n.searchParams.delete(`_p`),e.bottomTabs.length>0&&n.searchParams.set(`_b`,e.bottomLocation.href),e.popLocation.pathname!==`/`&&n.searchParams.set(`_p`,e.popLocation.href),`${n.pathname}${n.search}${n.hash}`}function xu(e,t){return e.length===t.length?e.every((e,n)=>e===t[n]):!1}function Su(){return{mainTabs:[...Jl],bottomTabs:[...Yl],updatedAt:0,mainLocation:iu(`/dashboard`),bottomLocation:iu(`/`),popLocation:iu(`/`)}}function Cu(){try{let e=localStorage.getItem(Zl());return e?nu(JSON.parse(e)):null}catch{return null}}function wu(e){try{let t=localStorage.getItem(e);return t?nu(JSON.parse(t)):null}catch{return null}}function Tu(e,t=Zl()){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function Eu(e){let t=uu(e.pathname);return!t||e.pathname===t?e:t===`/changes`||t===`/specs`||t===`/archive`?iu(t,e.state):e}var Du=[({prevState:e,nextState:t,event:n})=>{if(n.type!==`MOVE_TAB`)return t;let r=e.bottomTabs.includes(n.tabId)?`bottom`:`main`;if(du(e,r)!==n.tabId)return t;let i=r===`main`?e.mainLocation:e.bottomLocation,a=iu(i.href,i.state);return n.targetArea===`main`?{...t,mainLocation:a}:{...t,bottomLocation:a}},({nextState:e})=>e.mainTabs.length===0||du(e,`main`)!=null?e:{...e,mainLocation:iu(e.mainTabs[0])}];function Ou(e,t,n){let r=t;for(let t of Du)r=t({prevState:e,nextState:r,event:n});return r}function ku(e,t){switch(t.type){case`NAVIGATE`:{let n=t.sourceArea===`pop`?`pop`:pu(e,t.location.pathname);return{nextState:n===`main`?{...e,mainLocation:t.location}:n===`bottom`?{...e,bottomLocation:t.location}:{...e,popLocation:t.location},changed:!0,urlAction:t.action,notify:n===t.sourceArea?[]:[{area:n,type:t.action}],persist:`none`}}case`POPSTATE`:return{nextState:{...e,mainLocation:t.mainLocation,bottomLocation:t.bottomLocation,popLocation:t.popLocation},changed:!0,notify:[{area:`main`,type:`BACK`},{area:`bottom`,type:`BACK`},{area:`pop`,type:`BACK`}],persist:`none`};case`MOVE_TAB`:{let n=e.bottomTabs.includes(t.tabId)?`bottom`:`main`;if(n===t.targetArea)return{nextState:e,changed:!1,notify:[],persist:`none`};let r=e.mainTabs.filter(e=>e!==t.tabId),i=e.bottomTabs.filter(e=>e!==t.tabId),a=t.targetArea===`main`?[...r,t.tabId]:r,o=t.targetArea===`bottom`?[...i,t.tabId]:i,s=e.mainLocation,c=e.bottomLocation;return uu((n===`main`?e.mainLocation:e.bottomLocation).pathname)===t.tabId&&(n===`main`?s=iu(`/`):c=iu(`/`)),{nextState:{...e,mainTabs:a,bottomTabs:o,mainLocation:s,bottomLocation:c},changed:!0,urlAction:`REPLACE`,notify:[{area:`main`,type:`REPLACE`},{area:`bottom`,type:`REPLACE`}],persist:`local_and_remote`}}case`REORDER`:{let n=t.area===`main`?e.mainTabs:e.bottomTabs,r=new Set(n),i=t.tabIds.filter(e=>r.has(e));for(let e of n)i.includes(e)||i.push(e);return xu(n,i)?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:t.area===`main`?{...e,mainTabs:i}:{...e,bottomTabs:i},changed:!0,notify:[],persist:`local_and_remote`}}case`CLOSE_TAB`:{let n=e.bottomTabs.includes(t.tabId),r=e.mainTabs.includes(t.tabId);return!n&&!r?{nextState:e,changed:!1,notify:[],persist:`none`}:n?uu(e.bottomLocation.pathname)===t.tabId?{nextState:{...e,bottomLocation:iu(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}:uu(e.mainLocation.pathname)===t.tabId?{nextState:{...e,mainLocation:iu(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}}case`ACTIVATE_BOTTOM`:return pu(e,t.location.pathname)===`bottom`?{nextState:{...e,bottomLocation:t.location},changed:!0,urlAction:`PUSH`,notify:[{area:`bottom`,type:`PUSH`}],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`};case`DEACTIVATE_BOTTOM`:return e.bottomLocation.pathname===`/`?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:{...e,bottomLocation:iu(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`ACTIVATE_POP`:return pu(e,t.location.pathname)===`pop`?{nextState:{...e,popLocation:t.location},changed:!0,urlAction:`PUSH`,notify:[{area:`pop`,type:`PUSH`}],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`};case`DEACTIVATE_POP`:return e.popLocation.pathname===`/`?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:{...e,popLocation:iu(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`APPLY_LAYOUT`:{if(t.layout.updatedAt<=e.updatedAt)return{nextState:e,changed:!1,notify:[],persist:`none`};let n=mu(t.layout);return{nextState:{...e,mainTabs:n.mainTabs,bottomTabs:n.bottomTabs,updatedAt:t.layout.updatedAt},changed:!0,urlAction:`REPLACE`,notify:[{area:`main`,type:`REPLACE`},{area:`bottom`,type:`REPLACE`}],persist:`local_only`}}}}function Au(e,t,n){return n===`main`?e.mainLocation.href!==t.mainLocation.href:n===`bottom`?e.bottomLocation.href!==t.bottomLocation.href:e.popLocation.href!==t.popLocation.href}function ju(e,t,n){let r=[...e];for(let e of[`main`,`bottom`,`pop`])Au(t,n,e)&&(r.some(t=>t.area===e)||r.push({area:e,type:`REPLACE`}));return r}var Mu=new class{mainHistory=null;bottomHistory=null;popHistory=null;state=Su();listeners=new Set;snapshotCache=null;persistTimer=null;kvUnsubscribe=null;initialized=!1;storageKey=typeof window>`u`?`nav-layout`:kl(`nav-layout`,window.location);constructor(){if(typeof window>`u`)return;let e=zl()?null:Cu();if(e!=null){let t=mu(e);this.state={...this.state,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,updatedAt:e.updatedAt}}let t=yu(window.location,this.state),n=vu({...this.state,mainLocation:t.main,bottomLocation:t.bottom,popLocation:t.pop});n=vu(Ou(n,n,{type:`BOOTSTRAP`})),this.state=n,this.normalizeUrl(),window.addEventListener(`popstate`,this.handlePopState)}setHistoryRef(e,t){e===`main`?this.mainHistory=t:e===`bottom`?this.bottomHistory=t:this.popHistory=t}getLocation(e){return e===`main`?this.state.mainLocation:e===`bottom`?this.state.bottomLocation:this.state.popLocation}push(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:iu(cu(t),n)})}replace(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`REPLACE`,location:iu(cu(t),n)})}createHref(e,t,n){if(typeof window>`u`)return t;let{nextState:r}=this.computeTransition({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:iu(cu(t),n)});return bu(r)}get mainTabs(){return this.state.mainTabs}get bottomTabs(){return this.state.bottomTabs}getAreaForPath(e){return pu(this.state,e)}moveTab(e,t){this.dispatch({type:`MOVE_TAB`,tabId:e,targetArea:t})}reorder(e,t){this.dispatch({type:`REORDER`,area:e,tabIds:t})}closeTab(e){this.dispatch({type:`CLOSE_TAB`,tabId:e})}activateBottom(e){this.dispatch({type:`ACTIVATE_BOTTOM`,location:iu(e)})}deactivateBottom(){this.dispatch({type:`DEACTIVATE_BOTTOM`})}activatePop(e){this.dispatch({type:`ACTIVATE_POP`,location:iu(e)})}deactivatePop(){this.dispatch({type:`DEACTIVATE_POP`})}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}getSnapshot(){if(this.snapshotCache)return this.snapshotCache;let e=uu(this.state.bottomLocation.pathname);return this.snapshotCache={mainTabs:[...this.state.mainTabs],bottomTabs:[...this.state.bottomTabs],mainLocation:this.state.mainLocation,bottomLocation:this.state.bottomLocation,popLocation:this.state.popLocation,bottomActive:e!=null&&this.state.bottomTabs.includes(e),popActive:this.state.popLocation.pathname!==`/`},this.snapshotCache}async init(){if(!(this.initialized||zl())){this.initialized=!0;try{let e=await this.resolveProjectScopedStorageKey();e&&e!==this.storageKey&&(this.storageKey=e,this.rebindProjectScopedLayout(e));let{trpcClient:t}=await q(async()=>{let{trpcClient:e}=await import(`./trpc-T5xQ21pb.js`);return{trpcClient:e}},[]),n=nu(await t.kv.get.query({key:this.storageKey}));n?n.updatedAt>this.state.updatedAt?this.dispatch({type:`APPLY_LAYOUT`,layout:n}):this.state.updatedAt>n.updatedAt&&t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt}}).catch(()=>{}):this.state.updatedAt>0&&t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt}}).catch(()=>{});let r=t.kv.subscribe.subscribe({key:this.storageKey},{onData:e=>{let t=nu(e);t&&this.dispatch({type:`APPLY_LAYOUT`,layout:t})}});this.kvUnsubscribe=()=>r.unsubscribe()}catch{}}}destroy(){typeof window<`u`&&window.removeEventListener(`popstate`,this.handlePopState),this.cancelPersistTimer(),this.kvUnsubscribe&&=(this.kvUnsubscribe(),null)}handlePopState=()=>{let e=yu(window.location,this.state);this.dispatch({type:`POPSTATE`,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})};computeTransition(e){let t=ku(this.state,e);if(!t.changed)return{transition:t,nextState:this.state};let n=Ou(this.state,t.nextState,e);return n=vu(n),{transition:t,nextState:n}}dispatch(e){if(typeof window<`u`&&e.type!==`POPSTATE`&&this.mainHistory==null){let e=yu(window.location,this.state);this.state=vu({...this.state,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})}let t=ku(this.state,e);if(!t.changed)return;let n=this.state,r=Ou(n,t.nextState,e);r=vu(r),this.state=r,t.persist===`local_and_remote`?this.persistLayout():t.persist===`local_only`&&(this.cancelPersistTimer(),Tu({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt},this.storageKey));let i=t.urlAction??(Au(n,this.state,`main`)||Au(n,this.state,`bottom`)||Au(n,this.state,`pop`)?`REPLACE`:void 0);i&&this.syncToUrl(i);let a=ju(t.notify,n,this.state);this.notifyRouters(a),this.notifyListeners()}notifyRouters(e){for(let t of e)(t.area===`main`?this.mainHistory:t.area===`bottom`?this.bottomHistory:this.popHistory)?.notify({type:t.type})}notifyListeners(){this.snapshotCache=null;for(let e of this.listeners)e()}syncToUrl(e){let t=bu(this.state),n=`${window.location.pathname}${window.location.search}${window.location.hash}`;if(e===`REPLACE`&&t===n)return;let r={main:this.state.mainLocation.state,bottom:this.state.bottomLocation.state,pop:this.state.popLocation.state};e===`PUSH`?window.history.pushState(r,``,t):window.history.replaceState(r,``,t)}normalizeUrl(){let e=bu(this.state);if(e===`${window.location.pathname}${window.location.search}${window.location.hash}`)return;let t={main:this.state.mainLocation.state,bottom:this.state.bottomLocation.state,pop:this.state.popLocation.state};window.history.replaceState(t,``,e)}cancelPersistTimer(){this.persistTimer&&=(clearTimeout(this.persistTimer),null)}persistLayout(){let e=Date.now();this.state={...this.state,updatedAt:e},Tu({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e},this.storageKey),this.cancelPersistTimer(),this.persistTimer=setTimeout(()=>{this.persistTimer=null,q(async()=>{let{trpcClient:e}=await import(`./trpc-T5xQ21pb.js`);return{trpcClient:e}},[]).then(({trpcClient:t})=>t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e}})).catch(()=>{})},$l)}async resolveProjectScopedStorageKey(){try{let e=await fetch(Ll());if(!e.ok)return null;let t=await e.json();return typeof t.projectDir!=`string`||t.projectDir.length===0?null:Ql(t.projectDir)}catch{return null}}rebindProjectScopedLayout(e){let t=wu(e);if(t){let e=mu(t);this.state=vu({...this.state,mainTabs:e.mainTabs,bottomTabs:e.bottomTabs,updatedAt:t.updatedAt}),this.normalizeUrl();return}this.state=vu({...this.state,mainLocation:Eu(this.state.mainLocation),bottomLocation:Eu(this.state.bottomLocation),updatedAt:0}),this.normalizeUrl(),this.notifyListeners()}};typeof window<`u`&&!zl()&&Mu.init();function Nu(){return(0,G.useSyncExternalStore)(e=>Mu.subscribe(e),()=>Mu.getSnapshot(),()=>Mu.getSnapshot())}function Pu(e,t){return t.updatedAt-e.updatedAt||e.id.localeCompare(t.id)}function Fu(e){return[...e].sort(Pu)}function Iu(e,t=10){return Fu(e).slice(0,Math.max(0,Math.trunc(t)))}var Lu=`project`,Ru=/^[A-Za-z]:\//;function zu(e){return e.replace(/\\/g,`/`).replace(/\/+$/g,``)}function Bu(e){return e.startsWith(`/`)||Ru.test(e)}function Vu(e){return e.replace(/^\.?\//,``)}function Hu(e){return zu(e).split(`/`).filter(Boolean)}function Uu(e){let t=zu(e),n=/(?:^|\/)node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(@[^/]+\/[^/]+|[^/]+)(\/.*)?/.exec(t),r=n?.[1];return r?`npm:${r}${n[2]??``}`:null}function Wu(e){return`${Lu}:${Vu(e)}`}function Gu(e,t){let n=zu(e),r=zu(t),i=n.toLowerCase(),a=r.toLowerCase();return a===i||a.startsWith(`${i}/`)}function Ku(e,t){let n=Hu(e),r=Hu(t),i=0;for(;i<n.length&&i<r.length&&n[i]?.toLowerCase()===r[i]?.toLowerCase();)i+=1;return r.slice(i).join(`/`)}function qu(e){let t=Hu(e),n=t.lastIndexOf(`openspec`);return n<0?null:t.slice(n).join(`/`)}function Ju(e,t){let n=zu(e),r=Uu(n);return(t?.source===`package`||r)&&r?r:Bu(n)?t?.projectDir&&Gu(t.projectDir,n)?Wu(Ku(t.projectDir,n)):Wu(qu(n)||Hu(n).slice(-4).join(`/`)):Wu(n)}var Yu=Symbol.for(`yaml.alias`),Xu=Symbol.for(`yaml.document`),Zu=Symbol.for(`yaml.map`),Qu=Symbol.for(`yaml.pair`),$u=Symbol.for(`yaml.scalar`),ed=Symbol.for(`yaml.seq`),td=Symbol.for(`yaml.node.type`),nd=e=>!!e&&typeof e==`object`&&e[td]===Yu,rd=e=>!!e&&typeof e==`object`&&e[td]===Xu,id=e=>!!e&&typeof e==`object`&&e[td]===Zu,ad=e=>!!e&&typeof e==`object`&&e[td]===Qu,od=e=>!!e&&typeof e==`object`&&e[td]===$u,sd=e=>!!e&&typeof e==`object`&&e[td]===ed;function cd(e){if(e&&typeof e==`object`)switch(e[td]){case Zu:case ed:return!0}return!1}function ld(e){if(e&&typeof e==`object`)switch(e[td]){case Yu:case Zu:case $u:case ed:return!0}return!1}var ud=e=>(od(e)||cd(e))&&!!e.anchor,dd=Symbol(`break visit`),fd=Symbol(`skip children`),pd=Symbol(`remove node`);function md(e,t){let n=vd(t);rd(e)?hd(null,e.contents,n,Object.freeze([e]))===pd&&(e.contents=null):hd(null,e,n,Object.freeze([]))}md.BREAK=dd,md.SKIP=fd,md.REMOVE=pd;function hd(e,t,n,r){let i=yd(e,t,n,r);if(ld(i)||ad(i))return bd(e,r,i),hd(e,i,n,r);if(typeof i!=`symbol`){if(cd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=hd(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===dd)return dd;else i===pd&&(t.items.splice(e,1),--e)}}else if(ad(t)){r=Object.freeze(r.concat(t));let e=hd(`key`,t.key,n,r);if(e===dd)return dd;e===pd&&(t.key=null);let i=hd(`value`,t.value,n,r);if(i===dd)return dd;i===pd&&(t.value=null)}}return i}async function gd(e,t){let n=vd(t);rd(e)?await _d(null,e.contents,n,Object.freeze([e]))===pd&&(e.contents=null):await _d(null,e,n,Object.freeze([]))}gd.BREAK=dd,gd.SKIP=fd,gd.REMOVE=pd;async function _d(e,t,n,r){let i=await yd(e,t,n,r);if(ld(i)||ad(i))return bd(e,r,i),_d(e,i,n,r);if(typeof i!=`symbol`){if(cd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await _d(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===dd)return dd;else i===pd&&(t.items.splice(e,1),--e)}}else if(ad(t)){r=Object.freeze(r.concat(t));let e=await _d(`key`,t.key,n,r);if(e===dd)return dd;e===pd&&(t.key=null);let i=await _d(`value`,t.value,n,r);if(i===dd)return dd;i===pd&&(t.value=null)}}return i}function vd(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function yd(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(id(t))return n.Map?.(e,t,r);if(sd(t))return n.Seq?.(e,t,r);if(ad(t))return n.Pair?.(e,t,r);if(od(t))return n.Scalar?.(e,t,r);if(nd(t))return n.Alias?.(e,t,r)}function bd(e,t,n){let r=t[t.length-1];if(cd(r))r.items[e]=n;else if(ad(r))e===`key`?r.key=n:r.value=n;else if(rd(r))r.contents=n;else{let e=nd(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var xd={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Sd=e=>e.replace(/[!,[\]{}]/g,e=>xd[e]),Cd=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Sd(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&ld(e.contents)){let t={};md(e.contents,(e,n)=>{ld(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
47
47
  `)}};Cd.defaultYaml={explicit:!1,version:`1.2`},Cd.defaultTags={"!!":`tag:yaml.org,2002:`};function wd(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Td(e){let t=new Set;return md(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function Ed(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Dd(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=Td(e);let a=Ed(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(od(t.node)||cd(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function Od(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Od(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Od(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Od(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Od(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function kd(e,t,n){if(Array.isArray(e))return e.map((e,t)=>kd(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!ud(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Ad=class{constructor(e){Object.defineProperty(this,td,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!rd(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=kd(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Od(i,{"":o},``,o):o}},jd=class extends Ad{constructor(e){super(Yu),this.source=e,Object.defineProperty(this,`tag`,{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],md(e,{Node:(e,t)=>{(nd(t)||ud(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(kd(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Md(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(wd(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function Md(e,t,n){if(nd(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(cd(t)){let r=0;for(let i of t.items){let t=Md(e,i,n);t>r&&(r=t)}return r}else if(ad(t)){let r=Md(e,t.key,n),i=Md(e,t.value,n);return Math.max(r,i)}return 1}var Nd=e=>!e||typeof e!=`function`&&typeof e!=`object`,Pd=class extends Ad{constructor(e){super($u),this.value=e}toJSON(e,t){return t?.keep?this.value:kd(this.value,e,t)}toString(){return String(this.value)}};Pd.BLOCK_FOLDED=`BLOCK_FOLDED`,Pd.BLOCK_LITERAL=`BLOCK_LITERAL`,Pd.PLAIN=`PLAIN`,Pd.QUOTE_DOUBLE=`QUOTE_DOUBLE`,Pd.QUOTE_SINGLE=`QUOTE_SINGLE`;var Fd=`tag:yaml.org,2002:`;function Id(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Ld(e,t,n){if(rd(e)&&(e=e.contents),ld(e))return e;if(ad(e)){let t=n.schema[Zu].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??=i(e),new jd(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=Fd+t.slice(2));let l=Id(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new Pd(e);return c&&(c.node=t),t}l=e instanceof Map?o[Zu]:Symbol.iterator in Object(e)?o[ed]:o[Zu]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new Pd(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Rd(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Ld(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var zd=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Bd=class extends Ad{constructor(e,t){super(e),Object.defineProperty(this,`schema`,{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>ld(t)||ad(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(zd(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(cd(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Rd(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(cd(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&od(i)?i.value:i:cd(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!ad(t))return!1;let n=t.value;return n==null||e&&od(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return cd(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(cd(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Rd(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Vd=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Hd(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Ud=(e,t,n)=>e.endsWith(`
48
48
  `)?Hd(n,t):n.includes(`
49
49
  `)?`
@@ -186,7 +186,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
186
186
  transform: translateX(320%) scaleX(0.55);
187
187
  }
188
188
  }
189
- `,document.head.append(e)}function Qg(){let e=null,t=null,n=()=>{t!==null&&(window.clearTimeout(t),t=null),e?.remove(),e=null},r=()=>{if(typeof document>`u`||e)return;Zg();let t=document.createElement(`div`);t.setAttribute(Xg,``),t.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`span`);t.append(n),document.body.append(t),e=t};return{schedule(e){typeof window>`u`||t!==null||(t=window.setTimeout(()=>{t=null,r()},e))},hide:n}}var $g=2500,e_=140;function t_(e,t={}){let{timeoutMs:n=$g,indicatorDelayMs:r=e_}=t;if(typeof document>`u`||typeof window>`u`)return e().then(e=>({status:`ready`,value:e})).catch(e=>({status:`error`,error:e}));let i=Qg();return i.schedule(r),new Promise(t=>{let r=!1,a=e=>{r||(r=!0,s!==null&&window.clearTimeout(s),document.removeEventListener(`keydown`,o,!0),i.hide(),t(e))},o=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),a({status:`cancelled`}))};document.addEventListener(`keydown`,o,!0);let s=n>0?window.setTimeout(()=>{a({status:`timeout`})},n):null;e().then(e=>{a({status:`ready`,value:e})}).catch(e=>{a({status:`error`,error:e})})})}var n_=300*1e3;function r_(e){try{return decodeURIComponent(e)}catch{return e}}function i_(e){let t=/^\/specs\/([^/]+)$/.exec(e);if(t)return{kind:`spec`,specId:r_(t[1]??``)};let n=/^\/changes\/([^/]+)$/.exec(e);if(n)return{kind:`change`,changeId:r_(n[1]??``)};let r=/^\/archive\/([^/]+)$/.exec(e);if(r)return{kind:`archive`,changeId:r_(r[1]??``)};let i=/^\/git\/commit\/([^/]+)$/.exec(e);return i?{kind:`git`,selector:{type:`commit`,hash:r_(i[1]??``)}}:e===`/git/uncommitted`?{kind:`git`,selector:{type:`uncommitted`}}:null}async function a_(e){let t=zl()?await Rm(e):await jg.spec.get.query({id:e});Pg(Fg(e),t)}async function o_(e){let t=zl()?await Bm(e):await jg.opsx.status.query({change:e}),n=zg({change:e,refreshKey:0});n&&Pg(n,t)}async function s_(e){let t=zl()?await zm(e):await jg.archive.get.query({id:e});Pg(Ig(e),t)}function c_(e){return e.type===`commit`?[`git`,`meta`,`commit`,e.hash]:[`git`,`meta`,`uncommitted`]}async function l_(e){zl()||await Eg.fetchQuery({queryKey:c_(e),queryFn:()=>jg.git.getEntryMeta.query({selector:e}),staleTime:n_})}async function Tne(e){if(e.kind===`spec`){await a_(e.specId);return}if(e.kind===`change`){await o_(e.changeId);return}if(e.kind===`archive`){await s_(e.changeId);return}await l_(e.selector)}async function Ene(e){let{intent:t,pathname:n}=e;if(!t||t.kind!==`route-detail`||t.direction!==`forward`)return`ready`;let r=i_(n);if(!r)return`ready`;let i=await t_(()=>Tne(r));return i.status===`ready`?`ready`:i.status===`cancelled`?`cancelled`:(i.status===`error`&&console.error(`[VT] Failed to prepare route-detail transition:`,i.error),`skip-vt`)}var Dne=[{family:`search`,level:`pop`,pattern:/^\/search(?:\/|$)/},{family:`opsx-new`,level:`pop`,pattern:/^\/opsx-new(?:\/|$)/},{family:`opsx-propose`,level:`pop`,pattern:/^\/opsx-propose(?:\/|$)/},{family:`opsx-verify`,level:`pop`,pattern:/^\/opsx-verify(?:\/|$)/},{family:`opsx-compose`,level:`pop`,pattern:/^\/opsx-compose(?:\/|$)/},{family:`dashboard`,level:`top`,pattern:/^\/dashboard$/},{family:`config`,level:`top`,pattern:/^\/config$/},{family:`git`,level:`detail`,pattern:/^\/git\/(?:uncommitted|commit\/[^/]+)$/},{family:`git`,level:`top`,pattern:/^\/git$/},{family:`specs`,level:`detail`,pattern:/^\/specs\/[^/]+$/},{family:`specs`,level:`top`,pattern:/^\/specs$/},{family:`changes`,level:`detail`,pattern:/^\/changes\/[^/]+$/},{family:`changes`,level:`top`,pattern:/^\/changes$/},{family:`archive`,level:`detail`,pattern:/^\/archive\/[^/]+$/},{family:`archive`,level:`top`,pattern:/^\/archive$/},{family:`settings`,level:`top`,pattern:/^\/settings$/},{family:`terminal`,level:`top`,pattern:/^\/terminal$/}];function u_(e){if(!e)return`/`;let t=e.startsWith(`/`)?e:`/${e}`;return t===`/`?t:t.replace(/\/+$/,``)}function d_(e){let t=u_(e);for(let e of Dne)if(e.pattern.test(t))return e;return{family:t===`/`?`root`:`unknown`,level:t===`/`?`top`:`detail`}}function f_(e){let t=u_(e.fromPath),n=u_(e.toPath);if(t===n)return null;let r=d_(t),i=d_(n);if(e.area===`pop`){let t=r.level===`pop`,n=i.level===`pop`;return!t&&!n?null:{area:e.area,kind:`route-top`,direction:n?`forward`:`backward`}}if(r.level===`pop`||i.level===`pop`)return null;let a=r.family===i.family,o=r.level===`detail`||i.level===`detail`;return a&&o?{area:e.area,kind:`route-detail`,direction:i.level===`detail`?`forward`:`backward`}:{area:e.area,kind:`route-top`,direction:`forward`}}var p_={sameDocument:!!document.startViewTransition,types:`ViewTransitionTypeSet`in window,crossDocument:`CSSViewTransitionRule`in window,elementScoped:`startViewTransition`in Element.prototype,activeViewTransition:`activeViewTransition`in Document.prototype},One=async(e,t)=>{for(let[t,n]of e)t.style.viewTransitionName=n;try{await t}finally{for(let[t]of e)t.style.viewTransitionName=``}};function kne(e){if(!p_.sameDocument)return;let t=document.startViewTransition.bind(document);document.startViewTransition=function(n){let r=t(n);return e(r),r}}var Ane=e=>{if(p_.crossDocument)return e},jne=e=>{if(e===void 0&&(e=`both`),![`same-document`,`cross-document`,`both`].includes(e)){console.warn(`Tried to register the document.activeViewTransition tracker with an incorrect mode. Allowed modes are "same-document" or "cross-document". If you want both, leave the mode empty`);return}if(p_.activeViewTransition)return;let t=null;Object.defineProperty(document,`activeViewTransition`,{get:()=>t,configurable:!0,enumerable:!0});let n=e=>{t=e,e.finished.finally(()=>{t===e&&(t=null)})};if((e===`same-document`||e===`both`)&&kne(n),e===`cross-document`||e===`both`)return Ane(n)},Mne=1500,Nne=140;function m_(e,t){if(t.length===0)return!0;let n=new Set(e.map(([,e])=>e));return t.every(e=>n.has(e))}async function Pne({collectEntries:e,expectedNames:t,timeoutMs:n=Mne,indicatorDelayMs:r=Nne}){let i=e();if(m_(i,t)||typeof document>`u`||typeof window>`u`)return i;let a=Qg();return a.schedule(r),new Promise(r=>{let o=!1,s=i,c=e=>{o||(o=!0,f!==null&&window.clearTimeout(f),d?.disconnect(),document.removeEventListener(`keydown`,u,!0),a.hide(),r(e))},l=()=>{s=e(),m_(s,t)&&c(s)},u=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),c(s))},d=typeof MutationObserver>`u`?null:new MutationObserver(()=>{l()});d?.observe(document.body,{subtree:!0,childList:!0,attributes:!0}),document.addEventListener(`keydown`,u,!0);let f=n>0?window.setTimeout(()=>{c(s)},n):null;l()})}var h_=!1;function Fne(){return typeof document>`u`?null:document}function Ine(){h_||(h_=!0,jne())}function Lne(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function g_(e){for(let[t,n]of e)t.style.viewTransitionName=n}function __(e){for(let[t]of e)t.style.viewTransitionName=``}function Rne(){if(typeof MutationObserver>`u`||typeof document>`u`)return Promise.resolve();let e=document.body;return e?new Promise(t=>{let n=!1,r=()=>{n||(n=!0,i.disconnect(),t())},i=new MutationObserver(()=>{r()});i.observe(e,{subtree:!0,childList:!0,attributes:!0}),setTimeout(r,0)}):Promise.resolve()}function v_(e,t,n){if(t.length===0||n.kind===`tab-carousel`)return e;let r=new Set(t.map(([e])=>e));return e.filter(([e])=>!r.has(e))}async function zne(e,t,n){if(!t)return[];if(n.kind===`route-detail`&&e.length>0)return Pne({expectedNames:e.map(([,e])=>e),collectEntries:()=>v_(t(),e,n)});for(let r=0;r<4;r+=1){let r=v_(t(),e,n);if(r.length>0||e.length===0)return r;await Promise.resolve(),await Rne()}return v_(t(),e,n)}function Bne(e){let t=document.documentElement;return t.dataset.vtKind=e.kind,t.dataset.vtArea=e.area,e.direction?t.dataset.vtDirection=e.direction:delete t.dataset.vtDirection,()=>{delete t.dataset.vtKind,delete t.dataset.vtArea,delete t.dataset.vtDirection}}function y_(e,t){t.length!==0&&One(t,e.finished)}function b_(){p_.sameDocument&&Ine()}function x_(e){let t=Fne();if(!t||!e.intent||!p_.sameDocument||Lne())return(0,Ts.flushSync)(()=>e.update()),Promise.resolve();let n=e.intent;if(b_(),typeof t.startViewTransition!=`function`||t.activeViewTransition)return(0,Ts.flushSync)(()=>e.update()),Promise.resolve();let r=e.collectBeforeEntries?.()??[];g_(r);let i=Bne(n),a=[],o=()=>{},s=()=>{},c=new Promise((e,t)=>{o=e,s=t});try{let l=e.collectAfterEntries==null?()=>{try{(0,Ts.flushSync)(()=>{e.update()}),o(a)}catch(e){throw s(e),e}}:async()=>{try{return(0,Ts.flushSync)(()=>{e.update()}),__(r),a=await zne(r,e.collectAfterEntries,n),g_(a),o(a),a}catch(e){throw s(e),e}},u=t.startViewTransition(l);return y_(u,r),c.then(e=>{y_(u,e)}).catch(()=>{}),u.finished.catch(()=>{}).finally(()=>{__(r),__(a),i()})}catch{return s(Error(`startViewTransition failed`)),__(r),__(a),i(),(0,Ts.flushSync)(()=>e.update()),Promise.resolve()}}function S_(e){let t=e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,`-`).replace(/^-+/g,``).replace(/-+$/g,``);return t.length>0?t:`x`}function C_(e,t){return`vt-${S_(e.family)}-${S_(e.entityId)}-${t}`}function Vne(e){return(e.slots??[`container`,`icon`,`title`]).map(t=>[t,C_(e,t)])}function w_(e,t){return{"data-vt-shared":C_(e,t)}}function T_(e,t){return!e||!t?[]:Vne(t).map(([t,n])=>{let r=`[data-vt-shared="${n}"]`,i=[...e instanceof HTMLElement&&e.matches(r)?[e]:[],...e.querySelectorAll(r)].at(-1)??null;return i?[i,n]:null}).filter(e=>e!==null)}function Hne(e,t){return typeof e==`object`&&e?{...e,__vtHandoff:t}:{__vtHandoff:t}}function E_(e){if(typeof e!=`object`||!e)return null;let t=e.__vtHandoff;return typeof t!=`object`||!t||typeof t.family!=`string`||typeof t.entityId!=`string`?null:{family:t.family,entityId:t.entityId,title:typeof t.title==`string`?t.title:void 0,subtitle:typeof t.subtitle==`string`?t.subtitle:void 0}}function Une(e){return e===void 0||e===!0||typeof e==`function`?e:()=>e}function Wne(e){return e.button===0&&!e.defaultPrevented&&!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey}function Gne(e){let t=new URL(e,window.location.origin);return`${t.pathname}${t.search}${t.hash}`}function D_(e){return new URL(e,window.location.origin).pathname}function O_(e,t){return e?typeof e==`function`?e():`current`in e?e.current:e:t}async function k_(e){let t=await Ene({intent:e.intent,pathname:e.pathname});if(t!==`cancelled`){if(t===`skip-vt`){await x_({intent:null,update:e.update});return}await x_({intent:e.intent,collectBeforeEntries:e.collectBeforeEntries,collectAfterEntries:e.collectAfterEntries,update:e.update})}}function Kne(){let e=ws(),t=uc();return(0,G.useCallback)(({href:n,replace:r=!1,state:i,vt:a})=>{let o=Gne(n),s=D_(n),c=a?.area??Mu.getAreaForPath(s),l=O_(a?.source,null);return k_({intent:f_({area:c,fromPath:t.pathname,toPath:s}),pathname:s,collectBeforeEntries:()=>T_(l,a?.sharedElements),collectAfterEntries:()=>T_(document,a?.sharedElements),update:()=>{e({href:o,replace:r,state:Une(i)})}})},[t.pathname,e])}var A_=(0,G.forwardRef)(function({onClick:e,target:t,replace:n,state:r,viewTransition:i,vt:a,...o},s){let c=Kne(),l=(0,G.useCallback)(i=>{e?.(i),!(!Wne(i)||t===`_blank`)&&i.currentTarget.origin===window.location.origin&&(i.preventDefault(),c({href:i.currentTarget.href,replace:n,state:r,vt:{...a,source:a?.source??i.currentTarget}}))},[c,e,n,r,t,a]);return(0,K.jsx)(Fs,{ref:s,...o,replace:n,state:r,target:t,viewTransition:!1,onClick:l})});function j_(e){if(e.replace){Mu.replace(e.area,e.href,e.state);return}Mu.push(e.area,e.href,e.state)}function M_(e){if(typeof Mu.getLocation!=`function`)return j_(e),Promise.resolve();let t=D_(e.href),n=Mu.getLocation(e.area),r=O_(e.source,null);return k_({intent:f_({area:e.area,fromPath:n.pathname,toPath:t}),pathname:t,collectBeforeEntries:()=>T_(r,e.sharedElements),collectAfterEntries:()=>T_(document,e.sharedElements),update:()=>{j_(e)}})}var N_={push(e,t,n,r){return M_({area:e,href:t,state:n,source:r?.source,sharedElements:r?.sharedElements})},replace(e,t,n,r){return M_({area:e,href:t,state:n,replace:!0,source:r?.source,sharedElements:r?.sharedElements})},activateBottom(e){if(typeof Mu.getLocation!=`function`)return Mu.activateBottom(e),Promise.resolve();let t=`bottom`,n=D_(e);return x_({intent:f_({area:t,fromPath:Mu.getLocation(t).pathname,toPath:n}),update:()=>{Mu.activateBottom(e)}})},deactivateBottom(){Mu.deactivateBottom()},activatePop(e){if(typeof Mu.getLocation!=`function`)return Mu.activatePop(e),Promise.resolve();let t=D_(e);return x_({intent:f_({area:`pop`,fromPath:Mu.getLocation(`pop`).pathname,toPath:t}),update:()=>{Mu.activatePop(e)}})},deactivatePop(){return typeof Mu.getLocation==`function`?x_({intent:f_({area:`pop`,fromPath:Mu.getLocation(`pop`).pathname,toPath:`/`}),update:()=>{Mu.deactivatePop()}}):(Mu.deactivatePop(),Promise.resolve())},moveTab(...e){return Mu.moveTab(...e)},reorder(...e){return Mu.reorder(...e)},closeTab(...e){return Mu.closeTab(...e)},getAreaForPath(...e){return Mu.getAreaForPath(...e)},getLocation(...e){return Mu.getLocation(...e)}};function qne(){return(0,K.jsx)(rc,{})}var P_={layout:{alignY:`center`,width:`wide`,topGap:`comfortable`},dialogClassName:``,panelClassName:``,bodyClassName:`p-0`,maxHeight:`90vh`},F_=(0,G.createContext)(null),I_=(0,G.createContext)(null);function Jne({children:e}){let[t,n]=(0,G.useState)(P_),[r,i]=(0,G.useState)(0),a=(0,G.useCallback)(e=>{n(t=>({...t,...e}))},[]),o=(0,G.useCallback)(()=>{n(P_)},[]),s=(0,G.useCallback)(()=>{i(e=>e+1)},[]),c=(0,G.useMemo)(()=>({config:t,setConfig:a,resetConfig:o}),[t,o,a]),l=(0,G.useMemo)(()=>({requestClose:s,closeRequestVersion:r}),[r,s]);return(0,K.jsx)(F_.Provider,{value:c,children:(0,K.jsx)(I_.Provider,{value:l,children:e})})}function L_(){let e=(0,G.useContext)(F_);if(!e)throw Error(`usePopAreaConfigContext must be used within PopAreaConfigProvider`);return e}function R_(){let e=(0,G.useContext)(I_);if(!e)throw Error(`usePopAreaLifecycleContext must be used within PopAreaConfigProvider`);return e}var z_=null;function Yne(e){z_=e}function Xne(e){return e===`/search`?`Search`:e===`/opsx-new`?`OPSX New`:e===`/opsx-propose`?`OPSX Propose`:e===`/opsx-verify`?`OPSX Verify`:e===`/opsx-compose`?`OPSX Compose`:`Panel`}function Zne(){let e=Nu(),{config:t,resetConfig:n}=L_(),{requestClose:r,closeRequestVersion:i}=R_(),a=(0,G.useRef)(0),o=(0,G.useMemo)(()=>t.dialogClassName,[t.dialogClassName]),s=(0,G.useMemo)(()=>[t.layout.alignY===`start`?`items-start`:t.layout.alignY===`end`?`items-end`:`items-center`,t.layout.alignY===`start`?t.layout.topGap===`none`?`pt-[env(safe-area-inset-top)]`:t.layout.topGap===`compact`?`pt-[max(0.5rem,env(safe-area-inset-top))] sm:pt-3`:`pt-[max(0.75rem,env(safe-area-inset-top))] sm:pt-5`:``,t.layout.alignY===`end`?`pb-[max(1rem,env(safe-area-inset-bottom))]`:``].filter(e=>e.length>0).join(` `),[t.layout.alignY,t.layout.topGap]),c=(0,G.useMemo)(()=>t.layout.width===`narrow`?`max-w-2xl`:t.layout.width===`normal`?`max-w-3xl`:t.layout.width===`full`?`max-w-[min(96vw,1280px)]`:`max-w-4xl`,[t.layout.width]);(0,G.useEffect)(()=>{i<=a.current||(a.current=i,e.popActive&&N_.deactivatePop())},[i,e.popActive]);let l=(0,G.useCallback)(()=>{n()},[n]);return z_?(0,K.jsx)(Cl,{open:e.popActive,onClose:r,onClosed:l,title:(0,K.jsx)(`span`,{className:`font-nav tracking-[0.04em]`,children:Xne(e.popLocation.pathname)}),dialogClassName:o,contentClassName:s,className:[`pop-area-panel`,c,t.panelClassName].filter(e=>e.length>0).join(` `),bodyClassName:t.bodyClassName,maxHeight:t.maxHeight,children:(0,K.jsx)(lc,{router:z_})}):null}function Qne(){return z_?(0,K.jsx)(Jne,{children:(0,K.jsx)(Zne,{})}):null}function $ne(e){let t=new MutationObserver(t=>{for(let n of t)n.attributeName===`class`&&e()});return t.observe(document.documentElement,{attributes:!0}),()=>t.disconnect()}function ere(){return document.documentElement.classList.contains(`dark`)}function tre(){return!1}function B_(){return(0,G.useSyncExternalStore)($ne,ere,tre)}var V_=[{to:`/dashboard`,icon:Jc,label:`Dashboard`,defaultArea:`main`},{to:`/config`,icon:fl,label:`Config`,defaultArea:`main`},{to:`/git`,icon:Nc,label:`Git`,defaultArea:`bottom`},{to:`/specs`,icon:Fc,label:`Specs`,defaultArea:`main`},{to:`/changes`,icon:Hc,label:`Changes`,defaultArea:`main`},{to:`/archive`,icon:gc,label:`Archive`,defaultArea:`main`},{to:`/settings`,icon:ul,label:`Settings`,defaultArea:`main`},{to:`/terminal`,icon:gl,label:`Terminal`,defaultArea:`bottom`}],H_=V_.filter(e=>e.defaultArea===`main`&&e.to!==`/settings`),nre=V_.filter(e=>e.to!==`/settings`),U_=V_.find(e=>e.to===`/settings`),W_=null;function G_({area:e,tabs:t,className:n,useLinks:r,onNavigate:i}){let[a,o]=(0,G.useState)(!1),[s,c]=(0,G.useState)(null),l=(0,G.useRef)(null),{bottomLocation:u}=Nu(),d=e===`bottom`?t.find(e=>u.pathname===e||u.pathname.startsWith(e+`/`))??null:null,f=(0,G.useCallback)(e=>{l.current=e,c(e)},[]),p=(0,G.useCallback)((e,t)=>{e.dataTransfer&&(W_=t,e.dataTransfer.setData(`text/plain`,t),e.dataTransfer.effectAllowed=`move`)},[]),m=(0,G.useCallback)(()=>{W_=null},[]),h=(0,G.useCallback)(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`,o(!0)},[]),g=(0,G.useCallback)(e=>{e.currentTarget.contains(e.relatedTarget)||(o(!1),f(null))},[f]),_=(0,G.useCallback)((e,n)=>{if(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,t[n]===W_){f(null);return}let r=e.currentTarget.getBoundingClientRect(),i=r.top+r.height/2;f({index:n,position:e.clientY<i?`before`:`after`}),o(!0)},[t,f]),v=(0,G.useCallback)(n=>{n.preventDefault();let r=n.dataTransfer.getData(`text/plain`),i=l.current;if(o(!1),f(null),W_=null,!r)return;let a=t.includes(r),s=i==null?void 0:t[i.index];if(a||Mu.moveTab(r,e),s&&s!==r){let t=[...e===`main`?Mu.mainTabs:Mu.bottomTabs].filter(e=>e!==r),n=t.indexOf(s);if(n>=0){let a=i.position===`before`?n:n+1;t.splice(a,0,r),Mu.reorder(e,t)}}},[e,t,f]),y=t.map(e=>V_.find(t=>t.to===e)).filter(Boolean),b=e===`main`||r;return(0,K.jsx)(`ul`,{className:`min-h-[2rem] space-y-1 ${a?`bg-muted/50 rounded-md`:``} ${n??``}`,onDragOver:h,onDragLeave:g,onDrop:v,children:y.map((t,n)=>{let r=e===`bottom`&&t.to===d,a=s?.index===n&&s.position===`before`,o=s?.index===n&&s.position===`after`;return(0,K.jsxs)(`li`,{draggable:!0,onDragStart:e=>p(e,t.to),onDragEnd:m,onDragOver:e=>_(e,n),className:`group relative cursor-grab`,children:[a&&(0,K.jsx)(`div`,{className:`bg-border -top-0.25 pointer-events-none absolute left-4 right-4 h-0.5 -translate-y-0.5 rounded`}),b?(0,K.jsxs)(A_,{to:t.to,draggable:!1,onDragStart:e=>e.preventDefault(),onClick:i,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(Gc,{className:`-ml-2.5 -mr-1.5 h-3 w-3 shrink-0 opacity-0 group-hover:opacity-40`}),(0,K.jsx)(t.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:t.label})]}):(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{r?N_.deactivateBottom():N_.activateBottom(t.to),i?.()},className:`flex w-full items-center gap-2 rounded-md px-3 py-2 text-left ${r?`bg-primary text-primary-foreground`:`hover:bg-muted`}`,children:[(0,K.jsx)(Gc,{className:`-ml-2.5 -mr-1.5 h-3 w-3 shrink-0 opacity-0 group-hover:opacity-40`}),(0,K.jsx)(t.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:t.label})]}),o&&(0,K.jsx)(`div`,{className:`bg-border -bottom-0.25 pointer-events-none absolute left-4 right-4 h-0.5 translate-y-0.5 rounded`})]},t.to)})})}function rre(){let e=B_(),t=Nu(),n=Hl(),r=zl();return(0,K.jsxs)(`nav`,{className:`desktop-sidebar border-border bg-muted/30 flex w-64 shrink-0 flex-col border-r p-4`,children:[(0,K.jsx)(`div`,{className:`mb-6`,children:(0,K.jsx)(`img`,{src:e?`${n}openspec_pixel_dark.svg`:`${n}openspec_pixel_light.svg`,alt:`OpenSpec`,className:`h-6`})}),(0,K.jsxs)(`button`,{type:`button`,onClick:()=>N_.activatePop(`/search`),className:`hover:bg-muted border-primary mb-4 flex items-center gap-2 rounded-md border px-3 py-2 text-left`,children:[(0,K.jsx)(ll,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:`Search`})]}),r?(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,K.jsx)(`ul`,{className:`flex-1 space-y-1`,children:H_.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(A_,{to:e.to,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(e.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:e.label})]})},e.to))}),(0,K.jsx)(`div`,{className:`border-border space-y-1 border-t pt-4`,children:(0,K.jsxs)(A_,{to:U_.to,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(U_.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:U_.label})]})})]}):(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col gap-2`,children:[(0,K.jsx)(`div`,{className:`flex-1`,children:(0,K.jsx)(G_,{area:`main`,tabs:t.mainTabs,className:`h-full`})}),(0,K.jsx)(`div`,{className:`text-muted-foreground text-[10px] font-medium uppercase tracking-wider`,children:`Bottom`}),(0,K.jsx)(`div`,{className:`border-border border-t pt-2`,children:(0,K.jsx)(G_,{area:`bottom`,tabs:t.bottomTabs})})]})]})}function K_(){let[e,t]=(0,G.useState)({connected:!1,projectDir:null,dirName:null,watcherEnabled:!1,error:null,wsState:`idle`,reconnectCountdown:null}),n=(0,G.useRef)(null),r=(0,G.useRef)(null),i=(0,G.useCallback)(()=>{r.current=Date.now(),n.current&&clearInterval(n.current),t(e=>({...e,reconnectCountdown:Math.ceil(Dg/1e3)})),n.current=setInterval(()=>{if(r.current===null)return;let e=Date.now()-r.current,i=Math.max(0,Math.ceil((Dg-e)/1e3));t(e=>({...e,reconnectCountdown:i>0?i:null})),i<=0&&n.current&&(clearInterval(n.current),n.current=null,r.current=null)},200)},[]),a=(0,G.useCallback)(()=>{n.current&&=(clearInterval(n.current),null),r.current=null,t(e=>({...e,reconnectCountdown:null}))},[]);return(0,G.useEffect)(()=>{if(zl())return;let e=Ag();if(!e)return;let n=e.connectionState.subscribe({next:e=>{t(t=>({...t,wsState:e.state})),e.state===`connecting`&&e.error?i():a()}});return()=>{n.unsubscribe(),a()}},[i,a]),(0,G.useEffect)(()=>{if(zl()){t(e=>({...e,connected:!0,projectDir:`Static Export`,dirName:`Static Export`,watcherEnabled:!1,error:null})),document.title=`OpenSpec UI (Static)`;return}let e=jg.system.subscribe.subscribe(void 0,{onData:e=>{let n=e.projectDir,r=n.split(`/`).pop()||n;t(t=>({...t,connected:!0,projectDir:n,dirName:r,watcherEnabled:e.watcherEnabled,error:null})),document.title=`${r} - OpenSpec UI`},onError:e=>{t(t=>({...t,connected:!1,error:e.message})),document.title=`OpenSpec UI (Disconnected)`}});return()=>{e.unsubscribe()}},[]),e}function ire(){return(0,G.useCallback)(()=>{window.location.reload()},[])}function q_({children:e,maxWidth:t=300,duration:n=10,gap:r=20,className:i=``}){let[a,o]=(0,G.useState)(!1),[s,c]=(0,G.useState)(!1),l=(0,G.useRef)(null),u=(0,G.useRef)(null);(0,G.useEffect)(()=>{let e=()=>{if(l.current&&u.current){let e=l.current.offsetWidth,t=u.current.scrollWidth;c(t>e)}};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[e]);let d=(0,G.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy path:`,e)}},[e]),f=typeof t==`number`?`${t}px`:t;return(0,K.jsxs)(`button`,{onClick:d,className:`hover:bg-muted/50 group flex cursor-pointer items-center gap-1.5 rounded transition-colors ${i}`,title:`${e}\n\nClick to copy`,children:[(0,K.jsx)(`div`,{ref:l,className:`relative overflow-hidden whitespace-nowrap`,style:{maxWidth:f},children:(0,K.jsx)(`div`,{ref:u,"data-content":e,className:`relative inline-block ${s?`animate-marquee group-hover:[animation-play-state:paused]!`:``}`,style:s?{"--marquee-duration":`${n}s`,"--marquee-gap":`${r}px`}:void 0,children:e})}),(0,K.jsx)(`span`,{className:`text-muted-foreground group-hover:text-foreground shrink-0 transition-colors`,children:a?(0,K.jsx)(bc,{className:`h-3.5 w-3.5 text-green-500`}):(0,K.jsx)(jc,{className:`h-3.5 w-3.5`})})]})}function J_(){if(zl())return(0,K.jsxs)(`div`,{className:`status-indicator flex items-center gap-1.5 text-xs`,title:`Live features disabled (no file watching, task toggling, or AI integration)`,children:[(0,K.jsx)(yc,{className:`h-3.5 w-3.5 text-blue-500`}),(0,K.jsx)(`span`,{className:`status-text text-blue-600`,children:`Static`})]});let e=K_(),t=ire();return e.connected?(0,K.jsxs)(`div`,{className:`status-indicator flex items-center gap-1.5 text-xs`,children:[(0,K.jsx)(Yc,{className:`h-3.5 w-3.5 text-green-500`}),(0,K.jsx)(`span`,{className:`status-text text-green-600`,children:`Live`})]}):(0,K.jsxs)(`div`,{className:`status-indicator flex items-center gap-1.5 text-xs`,children:[(0,K.jsx)(yl,{className:`h-3.5 w-3.5 text-red-500`}),(0,K.jsx)(`span`,{className:`status-text text-red-600`,children:`Offline`}),e.reconnectCountdown!==null&&(0,K.jsxs)(`button`,{onClick:t,className:`text-muted-foreground hover:text-foreground flex cursor-pointer items-center gap-1 transition-colors`,title:`Click to reconnect now`,children:[(0,K.jsxs)(`span`,{className:`text-xs`,children:[`(`,e.reconnectCountdown,`s)`]}),(0,K.jsx)(ol,{className:`h-3 w-3`})]})]})}function are(){let e=zl(),[t,n]=(0,G.useState)(`Unknown`),[r,i]=(0,G.useState)(null);if((0,G.useEffect)(()=>{e&&Lm().then(e=>{e?.meta?.timestamp?n(new Date(e.meta.timestamp).toLocaleString()):n(`Unknown`),i(e?.git?.repositoryUrl??null)}).catch(()=>{n(`Unknown`),i(null)})},[e]),e)return(0,K.jsx)(`div`,{className:`desktop-status border-border bg-muted/30 text-muted-foreground flex h-8 items-center justify-between gap-4 border-t px-4 text-xs`,children:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-4`,children:[(0,K.jsx)(J_,{}),(0,K.jsxs)(`span`,{className:`truncate`,children:[`Generated: `,t]}),r&&(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,K.jsx)(Wc,{className:`h-3.5 w-3.5 shrink-0`}),(0,K.jsx)(q_,{children:r,maxWidth:280,duration:12,className:`text-xs`})]})]})});let a=K_();return(0,K.jsxs)(`div`,{className:`desktop-status border-border bg-muted/30 text-muted-foreground flex h-8 items-center justify-between gap-4 border-t px-4 text-xs`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,K.jsx)(J_,{}),a.projectDir&&(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(Rc,{className:`h-3.5 w-3.5 shrink-0`}),(0,K.jsx)(q_,{children:a.projectDir,maxWidth:300,duration:12,className:`text-xs`})]})]}),a.connected&&(0,K.jsx)(`div`,{className:`flex items-center gap-1.5`,children:a.watcherEnabled?(0,K.jsx)(`span`,{className:`text-green-600`,children:`Watching for changes`}):(0,K.jsx)(`span`,{className:`text-yellow-600`,children:`File watcher disabled`})})]})}function ore(){let[e,t]=(0,G.useState)(!1),n=B_(),r=K_(),i=Nu(),a=r.dirName??`OpenSpec`,o=Hl(),s=zl(),c=()=>t(!1);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`header`,{className:`mobile-header border-border bg-background flex h-12 items-center justify-between border-b px-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`button`,{onClick:()=>t(!0),className:`hover:bg-muted -ml-1.5 rounded-md p-1.5`,"aria-label":`Open menu`,children:(0,K.jsx)($c,{className:`h-5 w-5`})}),(0,K.jsx)(`span`,{className:`font-nav text-[12px] tracking-[0.04em]`,children:a})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>N_.activatePop(`/search`),className:`hover:bg-muted border-primary rounded-md border p-1.5`,"aria-label":`Open search`,children:(0,K.jsx)(ll,{className:`h-4 w-4`})}),(0,K.jsx)(J_,{})]})]}),e&&(0,K.jsxs)(`div`,{className:`fixed inset-0 z-50 flex`,children:[(0,K.jsx)(`div`,{className:`animate-in fade-in absolute inset-0 bg-black/50 duration-200`,onClick:c}),(0,K.jsxs)(`nav`,{className:`bg-background border-border animate-in slide-in-from-left relative flex h-full w-64 max-w-[80vw] flex-col border-r p-4 duration-200`,children:[(0,K.jsxs)(`div`,{className:`mb-6 flex items-center justify-between`,children:[(0,K.jsx)(`img`,{src:n?`${o}openspec_pixel_dark.svg`:`${o}openspec_pixel_light.svg`,alt:`OpenSpec`,className:`h-5`}),(0,K.jsx)(`button`,{onClick:c,className:`hover:bg-muted rounded-md p-1.5`,"aria-label":`Close menu`,children:(0,K.jsx)(bl,{className:`h-5 w-5`})})]}),s?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`ul`,{className:`flex-1 space-y-1`,children:H_.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(A_,{to:e.to,onClick:c,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(e.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:e.label})]})},e.to))}),(0,K.jsx)(`div`,{className:`border-border space-y-1 border-t pt-4`,children:(0,K.jsxs)(A_,{to:U_.to,onClick:c,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(U_.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:U_.label})]})})]}):(0,K.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2`,children:[(0,K.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,K.jsx)(G_,{area:`main`,tabs:i.mainTabs,className:`scrollbar-thin scrollbar-track-transparent h-full overflow-auto`,useLinks:!0,onNavigate:c})}),(0,K.jsx)(`div`,{className:`text-muted-foreground text-[10px] font-medium uppercase tracking-wider`,children:`Bottom`}),(0,K.jsx)(`div`,{className:`border-border border-t pt-2`,children:(0,K.jsx)(G_,{area:`bottom`,tabs:i.bottomTabs,onNavigate:c})})]})]})]})]})}function sre(){let e=Nu();return(0,K.jsx)(`nav`,{className:`mobile-tabbar border-border bg-background flex h-14 items-stretch border-t`,children:(zl()?nre:e.mainTabs.map(e=>V_.find(t=>t.to===e)).filter(e=>e!=null)).map(e=>(0,K.jsxs)(A_,{to:e.to,className:`text-muted-foreground hover:text-foreground [&.active]:text-primary flex flex-1 flex-col items-center justify-center gap-0.5`,children:[(0,K.jsx)(e.icon,{className:`h-5 w-5 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-[10px] tracking-[0.03em]`,children:e.label})]},e.to))})}function cre(){return(0,K.jsxs)(`div`,{className:`@container/app fixed inset-0`,style:{containerName:`app`},children:[(0,K.jsxs)(`div`,{className:`app-layout h-full`,children:[(0,K.jsx)(rre,{}),(0,K.jsxs)(`div`,{className:`app-body flex min-h-0 flex-1 flex-col`,children:[(0,K.jsx)(ore,{}),(0,K.jsx)(`main`,{className:`main-content scrollbar-thin scrollbar-track-transparent view-transition-route flex min-h-0 flex-1 flex-col`,children:(0,K.jsx)(rc,{})}),(0,K.jsx)(sre,{}),(0,K.jsx)(are,{})]})]}),(0,K.jsx)(Qne,{})]})}var lre=(0,G.createContext)(null);function ure({children:e}){let[t,n]=(0,G.useState)({open:!1,changeId:``,changeName:``}),r=(0,G.useCallback)((e,t)=>{n({open:!0,changeId:e,changeName:t})},[]),i=(0,G.useCallback)(()=>{n(e=>({...e,open:!1}))},[]);return(0,K.jsx)(lre.Provider,{value:{state:t,openArchiveModal:r,closeArchiveModal:i},children:e})}function dre(e,t){let n=Vi({getLocation(){return t.getLocation(e)},getLength(){return window.history.length},pushState(n,r){t.push(e,n,r)},replaceState(n,r){t.replace(e,n,r)},go(e){window.history.go(e)},back(){window.history.back()},forward(){window.history.forward()},createHref(n){return t.createHref(e,n)}});return t.setHistoryRef(e,n),n}function Y_(e){if(!e)return``;let t=Date.now()-e,n=Math.floor(t/1e3),r=Math.floor(n/60),i=Math.floor(r/60),a=Math.floor(i/24),o=Math.floor(a/7),s=Math.floor(a/30),c=Math.floor(a/365);return n<60?`just now`:r<60?`${r}m ago`:i<24?`${i}h ago`:a<7?`${a}d ago`:o<4?`${o}w ago`:s<12?`${s}mo ago`:`${c}y ago`}function fre(e){return e?new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`2-digit`,minute:`2-digit`}):``}function pre(){let{data:e,isLoading:t}=Sne(),[n,r]=(0,G.useState)(!0);return(0,G.useEffect)(()=>{let e=requestAnimationFrame(()=>r(!1));return()=>cancelAnimationFrame(e)},[]),n||t&&!e?(0,K.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading archived changes...`}):(0,K.jsxs)(`div`,{className:`space-y-6 p-4`,children:[(0,K.jsxs)(`h1`,{className:`font-nav flex items-center gap-2 text-2xl font-bold`,children:[(0,K.jsx)(gc,{className:`h-6 w-6 shrink-0`}),`Archive`]}),(0,K.jsx)(`p`,{className:`text-muted-foreground`,children:`Completed changes that have been archived after implementation.`}),(0,K.jsxs)(`div`,{className:`border-border divide-border divide-y rounded-lg border`,children:[e?.map(e=>{let t={family:`archive`,entityId:e.id};return(0,K.jsxs)(A_,{to:`/archive/$changeId`,params:{changeId:e.id},state:t=>({...t,__vtHandoff:{family:`archive`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:t},...w_(t,`container`),className:`hover:bg-muted/50 flex items-center justify-between p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(gc,{...w_(t,`icon`),className:`text-muted-foreground h-5 w-5`}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{...w_(t,`title`),className:`font-medium`,children:e.name}),(0,K.jsxs)(`div`,{className:`text-muted-foreground text-sm`,children:[e.id,e.updatedAt>0&&(0,K.jsxs)(K.Fragment,{children:[` · `,Y_(e.updatedAt)]})]})]})]}),(0,K.jsx)(Sc,{className:`text-muted-foreground h-4 w-4`})]},e.id)}),e?.length===0&&(0,K.jsxs)(`div`,{className:`text-muted-foreground p-8 text-center`,children:[(0,K.jsx)(gc,{className:`mx-auto mb-4 h-12 w-12 opacity-50`}),(0,K.jsx)(`p`,{children:`No archived changes yet.`}),(0,K.jsxs)(`p`,{className:`mt-2 text-sm`,children:[`Changes are archived after implementation using`,` `,(0,K.jsx)(`code`,{className:`bg-muted rounded px-1`,children:`openspec archive`})]})]})]})]})}function mre(e){return e.closest(`.viewer-scroll`)}function hre(e,t){let n=e.querySelectorAll(`[id]`);for(let e of n)if(e.id===t)return e;return null}function gre(e,t){let n=decodeURIComponent(t.replace(/^#/,``)),r=mre(e);if(!r)return{headingId:n,target:document.getElementById(n),contentContainer:null};let i=hre(r,n);return i?{headingId:n,target:i,contentContainer:r}:{headingId:n,target:document.getElementById(n),contentContainer:r}}function _re(e,t){if(!t){e.scrollIntoView({behavior:`smooth`,block:`start`});return}let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.scrollTop+(r.top-n.top)-8;t.scrollTo({top:Math.max(i,0),behavior:`smooth`})}function X_(e,t){let{headingId:n,target:r,contentContainer:i}=gre(e,t);return!r||!n?!1:(_re(r,i),window.location.hash!==`#${n}`&&window.history.replaceState(null,``,`#${n}`),!0)}function Z_(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var vre=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bre={};function Q_(e,t){return((t||bre).jsx?yre:vre).test(e)}var xre=/[ \t\n\f\r]/g;function $_(e){return typeof e==`object`?e.type===`text`?ev(e.value):!1:ev(e)}function ev(e){return e.replace(xre,``)===``}var tv=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};tv.prototype.normal={},tv.prototype.property={},tv.prototype.space=void 0;function nv(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new tv(n,r,t)}function rv(e){return e.toLowerCase()}var iv=class{constructor(e,t){this.attribute=t,this.property=e}};iv.prototype.attribute=``,iv.prototype.booleanish=!1,iv.prototype.boolean=!1,iv.prototype.commaOrSpaceSeparated=!1,iv.prototype.commaSeparated=!1,iv.prototype.defined=!1,iv.prototype.mustUseProperty=!1,iv.prototype.number=!1,iv.prototype.overloadedBoolean=!1,iv.prototype.property=``,iv.prototype.spaceSeparated=!1,iv.prototype.space=void 0;var av=e({boolean:()=>ov,booleanish:()=>sv,commaOrSpaceSeparated:()=>dv,commaSeparated:()=>uv,number:()=>J,overloadedBoolean:()=>cv,spaceSeparated:()=>lv}),Sre=0,ov=fv(),sv=fv(),cv=fv(),J=fv(),lv=fv(),uv=fv(),dv=fv();function fv(){return 2**++Sre}var pv=Object.keys(av),mv=class extends iv{constructor(e,t,n,r){let i=-1;if(super(e,t),hv(this,`space`,r),typeof n==`number`)for(;++i<pv.length;){let e=pv[i];hv(this,pv[i],(n&av[e])===av[e])}}};mv.prototype.defined=!0;function hv(e,t,n){n&&(e[t]=n)}function gv(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new mv(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[rv(r)]=r,n[rv(a.attribute)]=r}return new tv(t,n,e.space)}var _v=gv({properties:{ariaActiveDescendant:null,ariaAtomic:sv,ariaAutoComplete:null,ariaBusy:sv,ariaChecked:sv,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:lv,ariaCurrent:null,ariaDescribedBy:lv,ariaDetails:null,ariaDisabled:sv,ariaDropEffect:lv,ariaErrorMessage:null,ariaExpanded:sv,ariaFlowTo:lv,ariaGrabbed:sv,ariaHasPopup:null,ariaHidden:sv,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lv,ariaLevel:J,ariaLive:null,ariaModal:sv,ariaMultiLine:sv,ariaMultiSelectable:sv,ariaOrientation:null,ariaOwns:lv,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:sv,ariaReadOnly:sv,ariaRelevant:null,ariaRequired:sv,ariaRoleDescription:lv,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:sv,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function vv(e,t){return t in e?e[t]:t}function yv(e,t){return vv(e,t.toLowerCase())}var Cre=gv({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:uv,acceptCharset:lv,accessKey:lv,action:null,allow:null,allowFullScreen:ov,allowPaymentRequest:ov,allowUserMedia:ov,alt:null,as:null,async:ov,autoCapitalize:null,autoComplete:lv,autoFocus:ov,autoPlay:ov,blocking:lv,capture:null,charSet:null,checked:ov,cite:null,className:lv,cols:J,colSpan:null,content:null,contentEditable:sv,controls:ov,controlsList:lv,coords:J|uv,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ov,defer:ov,dir:null,dirName:null,disabled:ov,download:cv,draggable:sv,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ov,formTarget:null,headers:lv,height:J,hidden:cv,high:J,href:null,hrefLang:null,htmlFor:lv,httpEquiv:lv,id:null,imageSizes:null,imageSrcSet:null,inert:ov,inputMode:null,integrity:null,is:null,isMap:ov,itemId:null,itemProp:lv,itemRef:lv,itemScope:ov,itemType:lv,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ov,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:ov,muted:ov,name:null,nonce:null,noModule:ov,noValidate:ov,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:ov,optimum:J,pattern:null,ping:lv,placeholder:null,playsInline:ov,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ov,referrerPolicy:null,rel:lv,required:ov,reversed:ov,rows:J,rowSpan:J,sandbox:lv,scope:null,scoped:ov,seamless:ov,selected:ov,shadowRootClonable:ov,shadowRootDelegatesFocus:ov,shadowRootMode:null,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:sv,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:ov,useMap:null,value:sv,width:J,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lv,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ov,declare:ov,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:ov,noHref:ov,noShade:ov,noWrap:ov,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:sv,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ov,disableRemotePlayback:ov,prefix:null,property:null,results:J,security:null,unselectable:null},space:`html`,transform:yv}),wre=gv({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:dv,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:lv,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:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:ov,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,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:uv,g2:uv,glyphName:uv,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:dv,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:J,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:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lv,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:dv,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:dv,rev:dv,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:dv,requiredFeatures:dv,requiredFonts:dv,requiredFormats:dv,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:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:dv,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:dv,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:dv,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:vv}),bv=gv({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),xv=gv({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:yv}),Sv=gv({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Tre={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Ere=/[A-Z]/g,Cv=/-[a-z]/g,Dre=/^data[-\w.:]+$/i;function wv(e,t){let n=rv(t),r=t,i=iv;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Dre.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Cv,kre);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Cv.test(e)){let n=e.replace(Ere,Ore);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=mv}return new i(r,t)}function Ore(e){return`-`+e.toLowerCase()}function kre(e){return e.charAt(1).toUpperCase()}var Tv=nv([_v,Cre,bv,xv,Sv],`html`),Ev=nv([_v,wre,bv,xv,Sv],`svg`);function Dv(e){return e.join(` `).trim()}var Are=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
189
+ `,document.head.append(e)}function Qg(){let e=null,t=null,n=()=>{t!==null&&(window.clearTimeout(t),t=null),e?.remove(),e=null},r=()=>{if(typeof document>`u`||e)return;Zg();let t=document.createElement(`div`);t.setAttribute(Xg,``),t.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`span`);t.append(n),document.body.append(t),e=t};return{schedule(e){typeof window>`u`||t!==null||(t=window.setTimeout(()=>{t=null,r()},e))},hide:n}}var $g=2500,e_=140;function t_(e,t={}){let{timeoutMs:n=$g,indicatorDelayMs:r=e_}=t;if(typeof document>`u`||typeof window>`u`)return e().then(e=>({status:`ready`,value:e})).catch(e=>({status:`error`,error:e}));let i=Qg();return i.schedule(r),new Promise(t=>{let r=!1,a=e=>{r||(r=!0,s!==null&&window.clearTimeout(s),document.removeEventListener(`keydown`,o,!0),i.hide(),t(e))},o=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),a({status:`cancelled`}))};document.addEventListener(`keydown`,o,!0);let s=n>0?window.setTimeout(()=>{a({status:`timeout`})},n):null;e().then(e=>{a({status:`ready`,value:e})}).catch(e=>{a({status:`error`,error:e})})})}var n_=300*1e3;function r_(e){try{return decodeURIComponent(e)}catch{return e}}function i_(e){let t=/^\/specs\/([^/]+)$/.exec(e);if(t)return{kind:`spec`,specId:r_(t[1]??``)};let n=/^\/changes\/([^/]+)$/.exec(e);if(n)return{kind:`change`,changeId:r_(n[1]??``)};let r=/^\/archive\/([^/]+)$/.exec(e);if(r)return{kind:`archive`,changeId:r_(r[1]??``)};let i=/^\/git\/commit\/([^/]+)$/.exec(e);return i?{kind:`git`,selector:{type:`commit`,hash:r_(i[1]??``)}}:e===`/git/uncommitted`?{kind:`git`,selector:{type:`uncommitted`}}:null}async function a_(e){let t=zl()?await Rm(e):await jg.spec.get.query({id:e});Pg(Fg(e),t)}async function o_(e){let t=zl()?await Bm(e):await jg.opsx.status.query({change:e}),n=zg({change:e,refreshKey:0});n&&Pg(n,t)}async function s_(e){let t=zl()?await zm(e):await jg.archive.get.query({id:e});Pg(Ig(e),t)}function c_(e){return e.type===`commit`?[`git`,`meta`,`commit`,e.hash]:[`git`,`meta`,`uncommitted`]}async function l_(e){zl()||await Eg.fetchQuery({queryKey:c_(e),queryFn:()=>jg.git.getEntryMeta.query({selector:e}),staleTime:n_})}async function Tne(e){if(e.kind===`spec`){await a_(e.specId);return}if(e.kind===`change`){await o_(e.changeId);return}if(e.kind===`archive`){await s_(e.changeId);return}await l_(e.selector)}async function Ene(e){let{intent:t,pathname:n}=e;if(!t||t.kind!==`route-detail`||t.direction!==`forward`)return`ready`;let r=i_(n);if(!r)return`ready`;let i=await t_(()=>Tne(r));return i.status===`ready`?`ready`:i.status===`cancelled`?`cancelled`:(i.status===`error`&&console.error(`[VT] Failed to prepare route-detail transition:`,i.error),`skip-vt`)}var Dne=[{family:`search`,level:`pop`,pattern:/^\/search(?:\/|$)/},{family:`opsx-new`,level:`pop`,pattern:/^\/opsx-new(?:\/|$)/},{family:`opsx-propose`,level:`pop`,pattern:/^\/opsx-propose(?:\/|$)/},{family:`opsx-verify`,level:`pop`,pattern:/^\/opsx-verify(?:\/|$)/},{family:`opsx-compose`,level:`pop`,pattern:/^\/opsx-compose(?:\/|$)/},{family:`dashboard`,level:`top`,pattern:/^\/dashboard$/},{family:`config`,level:`top`,pattern:/^\/config$/},{family:`git`,level:`detail`,pattern:/^\/git\/(?:uncommitted|commit\/[^/]+)$/},{family:`git`,level:`top`,pattern:/^\/git$/},{family:`specs`,level:`detail`,pattern:/^\/specs\/[^/]+$/},{family:`specs`,level:`top`,pattern:/^\/specs$/},{family:`changes`,level:`detail`,pattern:/^\/changes\/[^/]+$/},{family:`changes`,level:`top`,pattern:/^\/changes$/},{family:`archive`,level:`detail`,pattern:/^\/archive\/[^/]+$/},{family:`archive`,level:`top`,pattern:/^\/archive$/},{family:`settings`,level:`top`,pattern:/^\/settings$/},{family:`terminal`,level:`top`,pattern:/^\/terminal$/}];function u_(e){if(!e)return`/`;let t=e.startsWith(`/`)?e:`/${e}`;return t===`/`?t:t.replace(/\/+$/,``)}function d_(e){let t=u_(e);for(let e of Dne)if(e.pattern.test(t))return e;return{family:t===`/`?`root`:`unknown`,level:t===`/`?`top`:`detail`}}function f_(e){let t=u_(e.fromPath),n=u_(e.toPath);if(t===n)return null;let r=d_(t),i=d_(n);if(e.area===`pop`){let t=r.level===`pop`,n=i.level===`pop`;return!t&&!n?null:{area:e.area,kind:`route-top`,direction:n?`forward`:`backward`}}if(r.level===`pop`||i.level===`pop`)return null;let a=r.family===i.family,o=r.level===`detail`||i.level===`detail`;return a&&o?{area:e.area,kind:`route-detail`,direction:i.level===`detail`?`forward`:`backward`}:{area:e.area,kind:`route-top`,direction:`forward`}}var p_={sameDocument:!!document.startViewTransition,types:`ViewTransitionTypeSet`in window,crossDocument:`CSSViewTransitionRule`in window,elementScoped:`startViewTransition`in Element.prototype,activeViewTransition:`activeViewTransition`in Document.prototype},One=async(e,t)=>{for(let[t,n]of e)t.style.viewTransitionName=n;try{await t}finally{for(let[t]of e)t.style.viewTransitionName=``}};function kne(e){if(!p_.sameDocument)return;let t=document.startViewTransition.bind(document);document.startViewTransition=function(n){let r=t(n);return e(r),r}}var Ane=e=>{if(p_.crossDocument)return e},jne=e=>{if(e===void 0&&(e=`both`),![`same-document`,`cross-document`,`both`].includes(e)){console.warn(`Tried to register the document.activeViewTransition tracker with an incorrect mode. Allowed modes are "same-document" or "cross-document". If you want both, leave the mode empty`);return}if(p_.activeViewTransition)return;let t=null;Object.defineProperty(document,`activeViewTransition`,{get:()=>t,configurable:!0,enumerable:!0});let n=e=>{t=e,e.finished.finally(()=>{t===e&&(t=null)})};if((e===`same-document`||e===`both`)&&kne(n),e===`cross-document`||e===`both`)return Ane(n)},Mne=1500,Nne=140;function m_(e,t){if(t.length===0)return!0;let n=new Set(e.map(([,e])=>e));return t.every(e=>n.has(e))}async function Pne({collectEntries:e,expectedNames:t,timeoutMs:n=Mne,indicatorDelayMs:r=Nne}){let i=e();if(m_(i,t)||typeof document>`u`||typeof window>`u`)return i;let a=Qg();return a.schedule(r),new Promise(r=>{let o=!1,s=i,c=e=>{o||(o=!0,f!==null&&window.clearTimeout(f),d?.disconnect(),document.removeEventListener(`keydown`,u,!0),a.hide(),r(e))},l=()=>{s=e(),m_(s,t)&&c(s)},u=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),c(s))},d=typeof MutationObserver>`u`?null:new MutationObserver(()=>{l()});d?.observe(document.body,{subtree:!0,childList:!0,attributes:!0}),document.addEventListener(`keydown`,u,!0);let f=n>0?window.setTimeout(()=>{c(s)},n):null;l()})}var h_=!1;function Fne(){return typeof document>`u`?null:document}function Ine(){h_||(h_=!0,jne())}function Lne(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function g_(e){for(let[t,n]of e)t.style.viewTransitionName=n}function __(e){for(let[t]of e)t.style.viewTransitionName=``}function Rne(){if(typeof MutationObserver>`u`||typeof document>`u`)return Promise.resolve();let e=document.body;return e?new Promise(t=>{let n=!1,r=()=>{n||(n=!0,i.disconnect(),t())},i=new MutationObserver(()=>{r()});i.observe(e,{subtree:!0,childList:!0,attributes:!0}),setTimeout(r,0)}):Promise.resolve()}function v_(e,t,n){if(t.length===0||n.kind===`tab-carousel`)return e;let r=new Set(t.map(([e])=>e));return e.filter(([e])=>!r.has(e))}async function zne(e,t,n){if(!t)return[];if(n.kind===`route-detail`&&e.length>0)return Pne({expectedNames:e.map(([,e])=>e),collectEntries:()=>v_(t(),e,n)});for(let r=0;r<4;r+=1){let r=v_(t(),e,n);if(r.length>0||e.length===0)return r;await Promise.resolve(),await Rne()}return v_(t(),e,n)}function Bne(e){let t=document.documentElement;return t.dataset.vtKind=e.kind,t.dataset.vtArea=e.area,e.direction?t.dataset.vtDirection=e.direction:delete t.dataset.vtDirection,()=>{delete t.dataset.vtKind,delete t.dataset.vtArea,delete t.dataset.vtDirection}}function y_(e,t){t.length!==0&&One(t,e.finished)}function b_(){p_.sameDocument&&Ine()}function x_(e){let t=Fne();if(!t||!e.intent||!p_.sameDocument||Lne())return(0,Ts.flushSync)(()=>e.update()),Promise.resolve();let n=e.intent;if(b_(),typeof t.startViewTransition!=`function`||t.activeViewTransition)return(0,Ts.flushSync)(()=>e.update()),Promise.resolve();let r=e.collectBeforeEntries?.()??[];g_(r);let i=Bne(n),a=[],o=()=>{},s=()=>{},c=new Promise((e,t)=>{o=e,s=t});try{let l=e.collectAfterEntries==null?()=>{try{(0,Ts.flushSync)(()=>{e.update()}),o(a)}catch(e){throw s(e),e}}:async()=>{try{return(0,Ts.flushSync)(()=>{e.update()}),__(r),a=await zne(r,e.collectAfterEntries,n),g_(a),o(a),a}catch(e){throw s(e),e}},u=t.startViewTransition(l);return y_(u,r),c.then(e=>{y_(u,e)}).catch(()=>{}),u.finished.catch(()=>{}).finally(()=>{__(r),__(a),i()})}catch{return s(Error(`startViewTransition failed`)),__(r),__(a),i(),(0,Ts.flushSync)(()=>e.update()),Promise.resolve()}}function S_(e){let t=e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,`-`).replace(/^-+/g,``).replace(/-+$/g,``);return t.length>0?t:`x`}function C_(e,t){return`vt-${S_(e.family)}-${S_(e.entityId)}-${t}`}function Vne(e){return(e.slots??[`container`,`icon`,`title`]).map(t=>[t,C_(e,t)])}function w_(e,t){return{"data-vt-shared":C_(e,t)}}function T_(e,t){return!e||!t?[]:Vne(t).map(([t,n])=>{let r=`[data-vt-shared="${n}"]`,i=[...e instanceof HTMLElement&&e.matches(r)?[e]:[],...e.querySelectorAll(r)].at(-1)??null;return i?[i,n]:null}).filter(e=>e!==null)}function Hne(e,t){return typeof e==`object`&&e?{...e,__vtHandoff:t}:{__vtHandoff:t}}function E_(e){if(typeof e!=`object`||!e)return null;let t=e.__vtHandoff;return typeof t!=`object`||!t||typeof t.family!=`string`||typeof t.entityId!=`string`?null:{family:t.family,entityId:t.entityId,title:typeof t.title==`string`?t.title:void 0,subtitle:typeof t.subtitle==`string`?t.subtitle:void 0}}function Une(e){return e===void 0||e===!0||typeof e==`function`?e:()=>e}function Wne(e){return e.button===0&&!e.defaultPrevented&&!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey}function Gne(e){let t=new URL(e,window.location.origin);return`${t.pathname}${t.search}${t.hash}`}function D_(e){return new URL(e,window.location.origin).pathname}function O_(e,t){return e?typeof e==`function`?e():`current`in e?e.current:e:t}async function k_(e){let t=await Ene({intent:e.intent,pathname:e.pathname});if(t!==`cancelled`){if(t===`skip-vt`){await x_({intent:null,update:e.update});return}await x_({intent:e.intent,collectBeforeEntries:e.collectBeforeEntries,collectAfterEntries:e.collectAfterEntries,update:e.update})}}function Kne(){let e=ws(),t=uc();return(0,G.useCallback)(({href:n,replace:r=!1,state:i,vt:a})=>{let o=Gne(n),s=D_(n),c=a?.area??Mu.getAreaForPath(s),l=O_(a?.source,null);return k_({intent:f_({area:c,fromPath:t.pathname,toPath:s}),pathname:s,collectBeforeEntries:()=>T_(l,a?.sharedElements),collectAfterEntries:()=>T_(document,a?.sharedElements),update:()=>{e({href:o,replace:r,state:Une(i)})}})},[t.pathname,e])}var A_=(0,G.forwardRef)(function({onClick:e,target:t,replace:n,state:r,viewTransition:i,vt:a,...o},s){let c=Kne(),l=(0,G.useCallback)(i=>{e?.(i),!(!Wne(i)||t===`_blank`)&&i.currentTarget.origin===window.location.origin&&(i.preventDefault(),c({href:i.currentTarget.href,replace:n,state:r,vt:{...a,source:a?.source??i.currentTarget}}))},[c,e,n,r,t,a]);return(0,K.jsx)(Fs,{ref:s,...o,replace:n,state:r,target:t,viewTransition:!1,onClick:l})});function j_(e){if(e.replace){Mu.replace(e.area,e.href,e.state);return}Mu.push(e.area,e.href,e.state)}function M_(e){if(typeof Mu.getLocation!=`function`)return j_(e),Promise.resolve();let t=D_(e.href),n=Mu.getLocation(e.area),r=O_(e.source,null);return k_({intent:f_({area:e.area,fromPath:n.pathname,toPath:t}),pathname:t,collectBeforeEntries:()=>T_(r,e.sharedElements),collectAfterEntries:()=>T_(document,e.sharedElements),update:()=>{j_(e)}})}var N_={push(e,t,n,r){return M_({area:e,href:t,state:n,source:r?.source,sharedElements:r?.sharedElements})},replace(e,t,n,r){return M_({area:e,href:t,state:n,replace:!0,source:r?.source,sharedElements:r?.sharedElements})},activateBottom(e){if(typeof Mu.getLocation!=`function`)return Mu.activateBottom(e),Promise.resolve();let t=`bottom`,n=D_(e);return x_({intent:f_({area:t,fromPath:Mu.getLocation(t).pathname,toPath:n}),update:()=>{Mu.activateBottom(e)}})},deactivateBottom(){Mu.deactivateBottom()},activatePop(e){if(typeof Mu.getLocation!=`function`)return Mu.activatePop(e),Promise.resolve();let t=D_(e);return x_({intent:f_({area:`pop`,fromPath:Mu.getLocation(`pop`).pathname,toPath:t}),update:()=>{Mu.activatePop(e)}})},deactivatePop(){return typeof Mu.getLocation==`function`?x_({intent:f_({area:`pop`,fromPath:Mu.getLocation(`pop`).pathname,toPath:`/`}),update:()=>{Mu.deactivatePop()}}):(Mu.deactivatePop(),Promise.resolve())},moveTab(...e){return Mu.moveTab(...e)},reorder(...e){return Mu.reorder(...e)},closeTab(...e){return Mu.closeTab(...e)},getAreaForPath(...e){return Mu.getAreaForPath(...e)},getLocation(...e){return Mu.getLocation(...e)}};function qne(){return(0,K.jsx)(rc,{})}var P_={layout:{alignY:`center`,width:`wide`,topGap:`comfortable`},dialogClassName:``,panelClassName:``,bodyClassName:`p-0`,maxHeight:`90vh`},F_=(0,G.createContext)(null),I_=(0,G.createContext)(null);function Jne({children:e}){let[t,n]=(0,G.useState)(P_),[r,i]=(0,G.useState)(0),a=(0,G.useCallback)(e=>{n(t=>({...t,...e}))},[]),o=(0,G.useCallback)(()=>{n(P_)},[]),s=(0,G.useCallback)(()=>{i(e=>e+1)},[]),c=(0,G.useMemo)(()=>({config:t,setConfig:a,resetConfig:o}),[t,o,a]),l=(0,G.useMemo)(()=>({requestClose:s,closeRequestVersion:r}),[r,s]);return(0,K.jsx)(F_.Provider,{value:c,children:(0,K.jsx)(I_.Provider,{value:l,children:e})})}function L_(){let e=(0,G.useContext)(F_);if(!e)throw Error(`usePopAreaConfigContext must be used within PopAreaConfigProvider`);return e}function R_(){let e=(0,G.useContext)(I_);if(!e)throw Error(`usePopAreaLifecycleContext must be used within PopAreaConfigProvider`);return e}var z_=null;function Yne(e){z_=e}function Xne(e){return e===`/search`?`Search`:e===`/opsx-new`?`OPSX New`:e===`/opsx-propose`?`OPSX Propose`:e===`/opsx-verify`?`OPSX Verify`:e===`/opsx-compose`?`OPSX Compose`:`Panel`}function Zne(){let e=Nu(),{config:t,resetConfig:n}=L_(),{requestClose:r,closeRequestVersion:i}=R_(),a=(0,G.useRef)(0),o=(0,G.useMemo)(()=>t.dialogClassName,[t.dialogClassName]),s=(0,G.useMemo)(()=>[t.layout.alignY===`start`?`items-start`:t.layout.alignY===`end`?`items-end`:`items-center`,t.layout.alignY===`start`?t.layout.topGap===`none`?`pt-[env(safe-area-inset-top)]`:t.layout.topGap===`compact`?`pt-[max(0.5rem,env(safe-area-inset-top))] sm:pt-3`:`pt-[max(0.75rem,env(safe-area-inset-top))] sm:pt-5`:``,t.layout.alignY===`end`?`pb-[max(1rem,env(safe-area-inset-bottom))]`:``].filter(e=>e.length>0).join(` `),[t.layout.alignY,t.layout.topGap]),c=(0,G.useMemo)(()=>t.layout.width===`narrow`?`max-w-2xl`:t.layout.width===`normal`?`max-w-3xl`:t.layout.width===`full`?`max-w-[min(96vw,1280px)]`:`max-w-4xl`,[t.layout.width]);(0,G.useEffect)(()=>{i<=a.current||(a.current=i,e.popActive&&N_.deactivatePop())},[i,e.popActive]);let l=(0,G.useCallback)(()=>{n()},[n]);return z_?(0,K.jsx)(Cl,{open:e.popActive,onClose:r,onClosed:l,title:(0,K.jsx)(`span`,{className:`font-nav tracking-[0.04em]`,children:Xne(e.popLocation.pathname)}),dialogClassName:o,contentClassName:s,className:[`pop-area-panel`,c,t.panelClassName].filter(e=>e.length>0).join(` `),bodyClassName:t.bodyClassName,maxHeight:t.maxHeight,children:(0,K.jsx)(lc,{router:z_})}):null}function Qne(){return z_?(0,K.jsx)(Jne,{children:(0,K.jsx)(Zne,{})}):null}function $ne(e){let t=new MutationObserver(t=>{for(let n of t)n.attributeName===`class`&&e()});return t.observe(document.documentElement,{attributes:!0}),()=>t.disconnect()}function ere(){return document.documentElement.classList.contains(`dark`)}function tre(){return!1}function B_(){return(0,G.useSyncExternalStore)($ne,ere,tre)}var V_=[{to:`/dashboard`,icon:Jc,label:`Dashboard`,defaultArea:`main`},{to:`/config`,icon:fl,label:`Config`,defaultArea:`main`},{to:`/git`,icon:Nc,label:`Git`,defaultArea:`bottom`},{to:`/specs`,icon:Fc,label:`Specs`,defaultArea:`main`},{to:`/changes`,icon:Hc,label:`Changes`,defaultArea:`main`},{to:`/archive`,icon:gc,label:`Archive`,defaultArea:`main`},{to:`/settings`,icon:ul,label:`Settings`,defaultArea:`main`},{to:`/terminal`,icon:gl,label:`Terminal`,defaultArea:`bottom`}],H_=V_.filter(e=>e.defaultArea===`main`&&e.to!==`/settings`),nre=V_.filter(e=>e.to!==`/settings`),U_=V_.find(e=>e.to===`/settings`),W_=null;function G_({area:e,tabs:t,className:n,useLinks:r,onNavigate:i}){let[a,o]=(0,G.useState)(!1),[s,c]=(0,G.useState)(null),l=(0,G.useRef)(null),{bottomLocation:u}=Nu(),d=e===`bottom`?t.find(e=>u.pathname===e||u.pathname.startsWith(e+`/`))??null:null,f=(0,G.useCallback)(e=>{l.current=e,c(e)},[]),p=(0,G.useCallback)((e,t)=>{e.dataTransfer&&(W_=t,e.dataTransfer.setData(`text/plain`,t),e.dataTransfer.effectAllowed=`move`)},[]),m=(0,G.useCallback)(()=>{W_=null},[]),h=(0,G.useCallback)(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`,o(!0)},[]),g=(0,G.useCallback)(e=>{e.currentTarget.contains(e.relatedTarget)||(o(!1),f(null))},[f]),_=(0,G.useCallback)((e,n)=>{if(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,t[n]===W_){f(null);return}let r=e.currentTarget.getBoundingClientRect(),i=r.top+r.height/2;f({index:n,position:e.clientY<i?`before`:`after`}),o(!0)},[t,f]),v=(0,G.useCallback)(n=>{n.preventDefault();let r=n.dataTransfer.getData(`text/plain`),i=l.current;if(o(!1),f(null),W_=null,!r)return;let a=t.includes(r),s=i==null?void 0:t[i.index];if(a||Mu.moveTab(r,e),s&&s!==r){let t=[...e===`main`?Mu.mainTabs:Mu.bottomTabs].filter(e=>e!==r),n=t.indexOf(s);if(n>=0){let a=i.position===`before`?n:n+1;t.splice(a,0,r),Mu.reorder(e,t)}}},[e,t,f]),y=t.map(e=>V_.find(t=>t.to===e)).filter(Boolean),b=e===`main`||r;return(0,K.jsx)(`ul`,{className:`min-h-[2rem] space-y-1 ${a?`bg-muted/50 rounded-md`:``} ${n??``}`,onDragOver:h,onDragLeave:g,onDrop:v,children:y.map((t,n)=>{let r=e===`bottom`&&t.to===d,a=s?.index===n&&s.position===`before`,o=s?.index===n&&s.position===`after`;return(0,K.jsxs)(`li`,{draggable:!0,onDragStart:e=>p(e,t.to),onDragEnd:m,onDragOver:e=>_(e,n),className:`group relative cursor-grab`,children:[a&&(0,K.jsx)(`div`,{className:`bg-border -top-0.25 pointer-events-none absolute left-4 right-4 h-0.5 -translate-y-0.5 rounded`}),b?(0,K.jsxs)(A_,{to:t.to,draggable:!1,onDragStart:e=>e.preventDefault(),onClick:i,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(Gc,{className:`-ml-2.5 -mr-1.5 h-3 w-3 shrink-0 opacity-0 group-hover:opacity-40`}),(0,K.jsx)(t.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:t.label})]}):(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{r?N_.deactivateBottom():N_.activateBottom(t.to),i?.()},className:`flex w-full items-center gap-2 rounded-md px-3 py-2 text-left ${r?`bg-primary text-primary-foreground`:`hover:bg-muted`}`,children:[(0,K.jsx)(Gc,{className:`-ml-2.5 -mr-1.5 h-3 w-3 shrink-0 opacity-0 group-hover:opacity-40`}),(0,K.jsx)(t.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:t.label})]}),o&&(0,K.jsx)(`div`,{className:`bg-border -bottom-0.25 pointer-events-none absolute left-4 right-4 h-0.5 translate-y-0.5 rounded`})]},t.to)})})}function rre(){let e=B_(),t=Nu(),n=Hl(),r=zl();return(0,K.jsxs)(`nav`,{className:`desktop-sidebar border-border bg-muted/30 flex w-64 shrink-0 flex-col border-r p-4`,children:[(0,K.jsx)(`div`,{className:`mb-6`,children:(0,K.jsx)(`img`,{src:e?`${n}openspec_pixel_dark.svg`:`${n}openspec_pixel_light.svg`,alt:`OpenSpec`,className:`h-6`})}),(0,K.jsxs)(`button`,{type:`button`,onClick:()=>N_.activatePop(`/search`),className:`hover:bg-muted border-primary mb-4 flex items-center gap-2 rounded-md border px-3 py-2 text-left`,children:[(0,K.jsx)(ll,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:`Search`})]}),r?(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,K.jsx)(`ul`,{className:`flex-1 space-y-1`,children:H_.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(A_,{to:e.to,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(e.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:e.label})]})},e.to))}),(0,K.jsx)(`div`,{className:`border-border space-y-1 border-t pt-4`,children:(0,K.jsxs)(A_,{to:U_.to,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(U_.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:U_.label})]})})]}):(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col gap-2`,children:[(0,K.jsx)(`div`,{className:`flex-1`,children:(0,K.jsx)(G_,{area:`main`,tabs:t.mainTabs,className:`h-full`})}),(0,K.jsx)(`div`,{className:`text-muted-foreground text-[10px] font-medium uppercase tracking-wider`,children:`Bottom`}),(0,K.jsx)(`div`,{className:`border-border border-t pt-2`,children:(0,K.jsx)(G_,{area:`bottom`,tabs:t.bottomTabs})})]})]})}function K_(){let[e,t]=(0,G.useState)({connected:!1,projectDir:null,dirName:null,watcherEnabled:!1,projectRecovery:{state:`idle`},error:null,wsState:`idle`,reconnectCountdown:null}),n=(0,G.useRef)(null),r=(0,G.useRef)(null),i=(0,G.useCallback)(()=>{r.current=Date.now(),n.current&&clearInterval(n.current),t(e=>({...e,reconnectCountdown:Math.ceil(Dg/1e3)})),n.current=setInterval(()=>{if(r.current===null)return;let e=Date.now()-r.current,i=Math.max(0,Math.ceil((Dg-e)/1e3));t(e=>({...e,reconnectCountdown:i>0?i:null})),i<=0&&n.current&&(clearInterval(n.current),n.current=null,r.current=null)},200)},[]),a=(0,G.useCallback)(()=>{n.current&&=(clearInterval(n.current),null),r.current=null,t(e=>({...e,reconnectCountdown:null}))},[]);return(0,G.useEffect)(()=>{if(zl())return;let e=Ag();if(!e)return;let n=e.connectionState.subscribe({next:e=>{t(t=>({...t,wsState:e.state})),e.state===`connecting`&&e.error?i():a()}});return()=>{n.unsubscribe(),a()}},[i,a]),(0,G.useEffect)(()=>{if(zl()){t(e=>({...e,connected:!0,projectDir:`Static Export`,dirName:`Static Export`,watcherEnabled:!1,projectRecovery:{state:`idle`},error:null})),document.title=`OpenSpec UI (Static)`;return}let e=jg.system.subscribe.subscribe(void 0,{onData:e=>{let n=e.projectDir,r=n.split(`/`).pop()||n;t(t=>({...t,connected:!0,projectDir:n,dirName:r,watcherEnabled:e.watcherEnabled,projectRecovery:e.projectRecovery,error:null})),document.title=`${r} - OpenSpec UI`},onError:e=>{t(t=>({...t,connected:!1,error:e.message})),document.title=`OpenSpec UI (Disconnected)`}});return()=>{e.unsubscribe()}},[]),e}function ire(){return(0,G.useCallback)(()=>{window.location.reload()},[])}function q_({children:e,maxWidth:t=300,duration:n=10,gap:r=20,className:i=``}){let[a,o]=(0,G.useState)(!1),[s,c]=(0,G.useState)(!1),l=(0,G.useRef)(null),u=(0,G.useRef)(null);(0,G.useEffect)(()=>{let e=()=>{if(l.current&&u.current){let e=l.current.offsetWidth,t=u.current.scrollWidth;c(t>e)}};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[e]);let d=(0,G.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy path:`,e)}},[e]),f=typeof t==`number`?`${t}px`:t;return(0,K.jsxs)(`button`,{onClick:d,className:`hover:bg-muted/50 group flex cursor-pointer items-center gap-1.5 rounded transition-colors ${i}`,title:`${e}\n\nClick to copy`,children:[(0,K.jsx)(`div`,{ref:l,className:`relative overflow-hidden whitespace-nowrap`,style:{maxWidth:f},children:(0,K.jsx)(`div`,{ref:u,"data-content":e,className:`relative inline-block ${s?`animate-marquee group-hover:[animation-play-state:paused]!`:``}`,style:s?{"--marquee-duration":`${n}s`,"--marquee-gap":`${r}px`}:void 0,children:e})}),(0,K.jsx)(`span`,{className:`text-muted-foreground group-hover:text-foreground shrink-0 transition-colors`,children:a?(0,K.jsx)(bc,{className:`h-3.5 w-3.5 text-green-500`}):(0,K.jsx)(jc,{className:`h-3.5 w-3.5`})})]})}function J_(){if(zl())return(0,K.jsxs)(`div`,{className:`status-indicator flex items-center gap-1.5 text-xs`,title:`Live features disabled (no file watching, task toggling, or AI integration)`,children:[(0,K.jsx)(yc,{className:`h-3.5 w-3.5 text-blue-500`}),(0,K.jsx)(`span`,{className:`status-text text-blue-600`,children:`Static`})]});let e=K_(),t=ire();return e.connected?(0,K.jsxs)(`div`,{className:`status-indicator flex items-center gap-1.5 text-xs`,children:[(0,K.jsx)(Yc,{className:`h-3.5 w-3.5 text-green-500`}),(0,K.jsx)(`span`,{className:`status-text text-green-600`,children:`Live`})]}):(0,K.jsxs)(`div`,{className:`status-indicator flex items-center gap-1.5 text-xs`,children:[(0,K.jsx)(yl,{className:`h-3.5 w-3.5 text-red-500`}),(0,K.jsx)(`span`,{className:`status-text text-red-600`,children:`Offline`}),e.reconnectCountdown!==null&&(0,K.jsxs)(`button`,{onClick:t,className:`text-muted-foreground hover:text-foreground flex cursor-pointer items-center gap-1 transition-colors`,title:`Click to reconnect now`,children:[(0,K.jsxs)(`span`,{className:`text-xs`,children:[`(`,e.reconnectCountdown,`s)`]}),(0,K.jsx)(ol,{className:`h-3 w-3`})]})]})}function are(){let e=zl(),[t,n]=(0,G.useState)(`Unknown`),[r,i]=(0,G.useState)(null);if((0,G.useEffect)(()=>{e&&Lm().then(e=>{e?.meta?.timestamp?n(new Date(e.meta.timestamp).toLocaleString()):n(`Unknown`),i(e?.git?.repositoryUrl??null)}).catch(()=>{n(`Unknown`),i(null)})},[e]),e)return(0,K.jsx)(`div`,{className:`desktop-status border-border bg-muted/30 text-muted-foreground flex h-8 items-center justify-between gap-4 border-t px-4 text-xs`,children:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-4`,children:[(0,K.jsx)(J_,{}),(0,K.jsxs)(`span`,{className:`truncate`,children:[`Generated: `,t]}),r&&(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,K.jsx)(Wc,{className:`h-3.5 w-3.5 shrink-0`}),(0,K.jsx)(q_,{children:r,maxWidth:280,duration:12,className:`text-xs`})]})]})});let a=K_();return(0,K.jsxs)(`div`,{className:`desktop-status border-border bg-muted/30 text-muted-foreground flex h-8 items-center justify-between gap-4 border-t px-4 text-xs`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,K.jsx)(J_,{}),a.projectDir&&(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(Rc,{className:`h-3.5 w-3.5 shrink-0`}),(0,K.jsx)(q_,{children:a.projectDir,maxWidth:300,duration:12,className:`text-xs`})]})]}),a.connected&&(0,K.jsx)(`div`,{className:`flex items-center gap-1.5`,children:a.watcherEnabled?(0,K.jsx)(`span`,{className:`text-green-600`,children:`Watching for changes`}):(0,K.jsx)(`span`,{className:`text-yellow-600`,children:`File watcher disabled`})})]})}function ore(){let[e,t]=(0,G.useState)(!1),n=B_(),r=K_(),i=Nu(),a=r.dirName??`OpenSpec`,o=Hl(),s=zl(),c=()=>t(!1);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`header`,{className:`mobile-header border-border bg-background flex h-12 items-center justify-between border-b px-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`button`,{onClick:()=>t(!0),className:`hover:bg-muted -ml-1.5 rounded-md p-1.5`,"aria-label":`Open menu`,children:(0,K.jsx)($c,{className:`h-5 w-5`})}),(0,K.jsx)(`span`,{className:`font-nav text-[12px] tracking-[0.04em]`,children:a})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>N_.activatePop(`/search`),className:`hover:bg-muted border-primary rounded-md border p-1.5`,"aria-label":`Open search`,children:(0,K.jsx)(ll,{className:`h-4 w-4`})}),(0,K.jsx)(J_,{})]})]}),e&&(0,K.jsxs)(`div`,{className:`fixed inset-0 z-50 flex`,children:[(0,K.jsx)(`div`,{className:`animate-in fade-in absolute inset-0 bg-black/50 duration-200`,onClick:c}),(0,K.jsxs)(`nav`,{className:`bg-background border-border animate-in slide-in-from-left relative flex h-full w-64 max-w-[80vw] flex-col border-r p-4 duration-200`,children:[(0,K.jsxs)(`div`,{className:`mb-6 flex items-center justify-between`,children:[(0,K.jsx)(`img`,{src:n?`${o}openspec_pixel_dark.svg`:`${o}openspec_pixel_light.svg`,alt:`OpenSpec`,className:`h-5`}),(0,K.jsx)(`button`,{onClick:c,className:`hover:bg-muted rounded-md p-1.5`,"aria-label":`Close menu`,children:(0,K.jsx)(bl,{className:`h-5 w-5`})})]}),s?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`ul`,{className:`flex-1 space-y-1`,children:H_.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(A_,{to:e.to,onClick:c,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(e.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:e.label})]})},e.to))}),(0,K.jsx)(`div`,{className:`border-border space-y-1 border-t pt-4`,children:(0,K.jsxs)(A_,{to:U_.to,onClick:c,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,K.jsx)(U_.icon,{className:`h-4 w-4 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:U_.label})]})})]}):(0,K.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2`,children:[(0,K.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,K.jsx)(G_,{area:`main`,tabs:i.mainTabs,className:`scrollbar-thin scrollbar-track-transparent h-full overflow-auto`,useLinks:!0,onNavigate:c})}),(0,K.jsx)(`div`,{className:`text-muted-foreground text-[10px] font-medium uppercase tracking-wider`,children:`Bottom`}),(0,K.jsx)(`div`,{className:`border-border border-t pt-2`,children:(0,K.jsx)(G_,{area:`bottom`,tabs:i.bottomTabs,onNavigate:c})})]})]})]})]})}function sre(){let e=Nu();return(0,K.jsx)(`nav`,{className:`mobile-tabbar border-border bg-background flex h-14 items-stretch border-t`,children:(zl()?nre:e.mainTabs.map(e=>V_.find(t=>t.to===e)).filter(e=>e!=null)).map(e=>(0,K.jsxs)(A_,{to:e.to,className:`text-muted-foreground hover:text-foreground [&.active]:text-primary flex flex-1 flex-col items-center justify-center gap-0.5`,children:[(0,K.jsx)(e.icon,{className:`h-5 w-5 shrink-0`}),(0,K.jsx)(`span`,{className:`font-nav text-[10px] tracking-[0.03em]`,children:e.label})]},e.to))})}function cre(){return(0,K.jsxs)(`div`,{className:`@container/app fixed inset-0`,style:{containerName:`app`},children:[(0,K.jsxs)(`div`,{className:`app-layout h-full`,children:[(0,K.jsx)(rre,{}),(0,K.jsxs)(`div`,{className:`app-body flex min-h-0 flex-1 flex-col`,children:[(0,K.jsx)(ore,{}),(0,K.jsx)(`main`,{className:`main-content scrollbar-thin scrollbar-track-transparent view-transition-route flex min-h-0 flex-1 flex-col`,children:(0,K.jsx)(rc,{})}),(0,K.jsx)(sre,{}),(0,K.jsx)(are,{})]})]}),(0,K.jsx)(Qne,{})]})}var lre=(0,G.createContext)(null);function ure({children:e}){let[t,n]=(0,G.useState)({open:!1,changeId:``,changeName:``}),r=(0,G.useCallback)((e,t)=>{n({open:!0,changeId:e,changeName:t})},[]),i=(0,G.useCallback)(()=>{n(e=>({...e,open:!1}))},[]);return(0,K.jsx)(lre.Provider,{value:{state:t,openArchiveModal:r,closeArchiveModal:i},children:e})}function dre(e,t){let n=Vi({getLocation(){return t.getLocation(e)},getLength(){return window.history.length},pushState(n,r){t.push(e,n,r)},replaceState(n,r){t.replace(e,n,r)},go(e){window.history.go(e)},back(){window.history.back()},forward(){window.history.forward()},createHref(n){return t.createHref(e,n)}});return t.setHistoryRef(e,n),n}function Y_(e){if(!e)return``;let t=Date.now()-e,n=Math.floor(t/1e3),r=Math.floor(n/60),i=Math.floor(r/60),a=Math.floor(i/24),o=Math.floor(a/7),s=Math.floor(a/30),c=Math.floor(a/365);return n<60?`just now`:r<60?`${r}m ago`:i<24?`${i}h ago`:a<7?`${a}d ago`:o<4?`${o}w ago`:s<12?`${s}mo ago`:`${c}y ago`}function fre(e){return e?new Date(e).toLocaleString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`2-digit`,minute:`2-digit`}):``}function pre(){let{data:e,isLoading:t}=Sne(),[n,r]=(0,G.useState)(!0);return(0,G.useEffect)(()=>{let e=requestAnimationFrame(()=>r(!1));return()=>cancelAnimationFrame(e)},[]),n||t&&!e?(0,K.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading archived changes...`}):(0,K.jsxs)(`div`,{className:`space-y-6 p-4`,children:[(0,K.jsxs)(`h1`,{className:`font-nav flex items-center gap-2 text-2xl font-bold`,children:[(0,K.jsx)(gc,{className:`h-6 w-6 shrink-0`}),`Archive`]}),(0,K.jsx)(`p`,{className:`text-muted-foreground`,children:`Completed changes that have been archived after implementation.`}),(0,K.jsxs)(`div`,{className:`border-border divide-border divide-y rounded-lg border`,children:[e?.map(e=>{let t={family:`archive`,entityId:e.id};return(0,K.jsxs)(A_,{to:`/archive/$changeId`,params:{changeId:e.id},state:t=>({...t,__vtHandoff:{family:`archive`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:t},...w_(t,`container`),className:`hover:bg-muted/50 flex items-center justify-between p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(gc,{...w_(t,`icon`),className:`text-muted-foreground h-5 w-5`}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{...w_(t,`title`),className:`font-medium`,children:e.name}),(0,K.jsxs)(`div`,{className:`text-muted-foreground text-sm`,children:[e.id,e.updatedAt>0&&(0,K.jsxs)(K.Fragment,{children:[` · `,Y_(e.updatedAt)]})]})]})]}),(0,K.jsx)(Sc,{className:`text-muted-foreground h-4 w-4`})]},e.id)}),e?.length===0&&(0,K.jsxs)(`div`,{className:`text-muted-foreground p-8 text-center`,children:[(0,K.jsx)(gc,{className:`mx-auto mb-4 h-12 w-12 opacity-50`}),(0,K.jsx)(`p`,{children:`No archived changes yet.`}),(0,K.jsxs)(`p`,{className:`mt-2 text-sm`,children:[`Changes are archived after implementation using`,` `,(0,K.jsx)(`code`,{className:`bg-muted rounded px-1`,children:`openspec archive`})]})]})]})]})}function mre(e){return e.closest(`.viewer-scroll`)}function hre(e,t){let n=e.querySelectorAll(`[id]`);for(let e of n)if(e.id===t)return e;return null}function gre(e,t){let n=decodeURIComponent(t.replace(/^#/,``)),r=mre(e);if(!r)return{headingId:n,target:document.getElementById(n),contentContainer:null};let i=hre(r,n);return i?{headingId:n,target:i,contentContainer:r}:{headingId:n,target:document.getElementById(n),contentContainer:r}}function _re(e,t){if(!t){e.scrollIntoView({behavior:`smooth`,block:`start`});return}let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.scrollTop+(r.top-n.top)-8;t.scrollTo({top:Math.max(i,0),behavior:`smooth`})}function X_(e,t){let{headingId:n,target:r,contentContainer:i}=gre(e,t);return!r||!n?!1:(_re(r,i),window.location.hash!==`#${n}`&&window.history.replaceState(null,``,`#${n}`),!0)}function Z_(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var vre=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bre={};function Q_(e,t){return((t||bre).jsx?yre:vre).test(e)}var xre=/[ \t\n\f\r]/g;function $_(e){return typeof e==`object`?e.type===`text`?ev(e.value):!1:ev(e)}function ev(e){return e.replace(xre,``)===``}var tv=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};tv.prototype.normal={},tv.prototype.property={},tv.prototype.space=void 0;function nv(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new tv(n,r,t)}function rv(e){return e.toLowerCase()}var iv=class{constructor(e,t){this.attribute=t,this.property=e}};iv.prototype.attribute=``,iv.prototype.booleanish=!1,iv.prototype.boolean=!1,iv.prototype.commaOrSpaceSeparated=!1,iv.prototype.commaSeparated=!1,iv.prototype.defined=!1,iv.prototype.mustUseProperty=!1,iv.prototype.number=!1,iv.prototype.overloadedBoolean=!1,iv.prototype.property=``,iv.prototype.spaceSeparated=!1,iv.prototype.space=void 0;var av=e({boolean:()=>ov,booleanish:()=>sv,commaOrSpaceSeparated:()=>dv,commaSeparated:()=>uv,number:()=>J,overloadedBoolean:()=>cv,spaceSeparated:()=>lv}),Sre=0,ov=fv(),sv=fv(),cv=fv(),J=fv(),lv=fv(),uv=fv(),dv=fv();function fv(){return 2**++Sre}var pv=Object.keys(av),mv=class extends iv{constructor(e,t,n,r){let i=-1;if(super(e,t),hv(this,`space`,r),typeof n==`number`)for(;++i<pv.length;){let e=pv[i];hv(this,pv[i],(n&av[e])===av[e])}}};mv.prototype.defined=!0;function hv(e,t,n){n&&(e[t]=n)}function gv(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new mv(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[rv(r)]=r,n[rv(a.attribute)]=r}return new tv(t,n,e.space)}var _v=gv({properties:{ariaActiveDescendant:null,ariaAtomic:sv,ariaAutoComplete:null,ariaBusy:sv,ariaChecked:sv,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:lv,ariaCurrent:null,ariaDescribedBy:lv,ariaDetails:null,ariaDisabled:sv,ariaDropEffect:lv,ariaErrorMessage:null,ariaExpanded:sv,ariaFlowTo:lv,ariaGrabbed:sv,ariaHasPopup:null,ariaHidden:sv,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lv,ariaLevel:J,ariaLive:null,ariaModal:sv,ariaMultiLine:sv,ariaMultiSelectable:sv,ariaOrientation:null,ariaOwns:lv,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:sv,ariaReadOnly:sv,ariaRelevant:null,ariaRequired:sv,ariaRoleDescription:lv,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:sv,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function vv(e,t){return t in e?e[t]:t}function yv(e,t){return vv(e,t.toLowerCase())}var Cre=gv({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:uv,acceptCharset:lv,accessKey:lv,action:null,allow:null,allowFullScreen:ov,allowPaymentRequest:ov,allowUserMedia:ov,alt:null,as:null,async:ov,autoCapitalize:null,autoComplete:lv,autoFocus:ov,autoPlay:ov,blocking:lv,capture:null,charSet:null,checked:ov,cite:null,className:lv,cols:J,colSpan:null,content:null,contentEditable:sv,controls:ov,controlsList:lv,coords:J|uv,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ov,defer:ov,dir:null,dirName:null,disabled:ov,download:cv,draggable:sv,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ov,formTarget:null,headers:lv,height:J,hidden:cv,high:J,href:null,hrefLang:null,htmlFor:lv,httpEquiv:lv,id:null,imageSizes:null,imageSrcSet:null,inert:ov,inputMode:null,integrity:null,is:null,isMap:ov,itemId:null,itemProp:lv,itemRef:lv,itemScope:ov,itemType:lv,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ov,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:ov,muted:ov,name:null,nonce:null,noModule:ov,noValidate:ov,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:ov,optimum:J,pattern:null,ping:lv,placeholder:null,playsInline:ov,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ov,referrerPolicy:null,rel:lv,required:ov,reversed:ov,rows:J,rowSpan:J,sandbox:lv,scope:null,scoped:ov,seamless:ov,selected:ov,shadowRootClonable:ov,shadowRootDelegatesFocus:ov,shadowRootMode:null,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:sv,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:ov,useMap:null,value:sv,width:J,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lv,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ov,declare:ov,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:ov,noHref:ov,noShade:ov,noWrap:ov,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:sv,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ov,disableRemotePlayback:ov,prefix:null,property:null,results:J,security:null,unselectable:null},space:`html`,transform:yv}),wre=gv({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:dv,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:lv,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:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:ov,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,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:uv,g2:uv,glyphName:uv,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:dv,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:J,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:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lv,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:dv,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:dv,rev:dv,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:dv,requiredFeatures:dv,requiredFonts:dv,requiredFormats:dv,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:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:dv,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:dv,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:dv,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:vv}),bv=gv({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),xv=gv({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:yv}),Sv=gv({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Tre={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Ere=/[A-Z]/g,Cv=/-[a-z]/g,Dre=/^data[-\w.:]+$/i;function wv(e,t){let n=rv(t),r=t,i=iv;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Dre.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Cv,kre);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Cv.test(e)){let n=e.replace(Ere,Ore);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=mv}return new i(r,t)}function Ore(e){return`-`+e.toLowerCase()}function kre(e){return e.charAt(1).toUpperCase()}var Tv=nv([_v,Cre,bv,xv,Sv],`html`),Ev=nv([_v,wre,bv,xv,Sv],`svg`);function Dv(e){return e.join(` `).trim()}var Are=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
190
190
  `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),jre=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Are());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Mre=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Nre=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(jre()),r=Mre();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Ov=Av(`end`),kv=Av(`start`);function Av(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Pre(e){let t=kv(e),n=Ov(e);if(t&&n)return{start:t,end:n}}function jv(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Nv(e.position):`start`in e||`end`in e?Nv(e):`line`in e||`column`in e?Mv(e):``}function Mv(e){return Pv(e&&e.line)+`:`+Pv(e&&e.column)}function Nv(e){return Mv(e&&e.start)+`-`+Mv(e&&e.end)}function Pv(e){return e&&typeof e==`number`?e:1}var Fv=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=jv(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Fv.prototype.file=``,Fv.prototype.name=``,Fv.prototype.reason=``,Fv.prototype.message=``,Fv.prototype.stack=``,Fv.prototype.column=void 0,Fv.prototype.line=void 0,Fv.prototype.ancestors=void 0,Fv.prototype.cause=void 0,Fv.prototype.fatal=void 0,Fv.prototype.place=void 0,Fv.prototype.ruleId=void 0,Fv.prototype.source=void 0;var Fre=t(Nre(),1),Iv={}.hasOwnProperty,Ire=new Map,Lre=/[A-Z]/g,Rre=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),zre=new Set([`td`,`th`]),Lv=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Bre(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Jre(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=qre(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Ev:Tv,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Rv(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Rv(e,t,n){if(t.type===`element`)return Vre(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Hre(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Wre(e,t,n);if(t.type===`mdxjsEsm`)return Ure(e,t);if(t.type===`root`)return Gre(e,t,n);if(t.type===`text`)return Kre(e,t)}function Vre(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ev,e.schema=i),e.ancestors.push(t);let a=Hv(e,t.tagName,!1),o=Yre(e,t),s=Vv(e,t);return Rre.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!$_(e):!0})),zv(e,o,a,t),Bv(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Hre(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Uv(e,t.position)}function Ure(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Uv(e,t.position)}function Wre(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ev,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Hv(e,t.name,!0),o=Xre(e,t),s=Vv(e,t);return zv(e,o,a,t),Bv(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Gre(e,t,n){let r={};return Bv(r,Vv(e,t)),e.create(t,e.Fragment,r,n)}function Kre(e,t){return t.value}function zv(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bv(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function qre(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Jre(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=kv(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Yre(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Iv.call(t.properties,i)){let a=Zre(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&zre.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Xre(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Uv(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Uv(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Vv(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ire;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Rv(e,a,o);s!==void 0&&n.push(s)}return n}function Zre(e,t,n){let r=wv(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Z_(n):Dv(n)),r.property===`style`){let t=typeof n==`object`?n:Qre(e,String(n));return e.stylePropertyNameCase===`css`&&(t=$re(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Tre[r.property]||r.property:r.attribute,n]}}function Qre(e,t){try{return(0,Fre.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Fv("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Lv+`#cannot-parse-style-attribute`,r}}function Hv(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Q_(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Q_(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Iv.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Uv(e)}function Uv(e,t){let n=new Fv("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Lv+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function $re(e){let t={},n;for(n in e)Iv.call(e,n)&&(t[eie(n)]=e[n]);return t}function eie(e){let t=e.replace(Lre,tie);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function tie(e){return`-`+e.toLowerCase()}var Wv={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},nie={};function Gv(e,t){let n=t||nie;return Kv(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Kv(e,t,n){if(rie(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return qv(e.children,t,n)}return Array.isArray(e)?qv(e,t,n):``}function qv(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Kv(e[i],t,n);return r.join(``)}function rie(e){return!!(e&&typeof e==`object`)}var Jv=document.createElement(`i`);function Yv(e){let t=`&`+e+`;`;Jv.innerHTML=t;let n=Jv.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Xv(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Zv(e,t){return e.length>0?(Xv(e,e.length,0,t),e):t}var Qv={}.hasOwnProperty;function $v(e){let t={},n=-1;for(;++n<e.length;)iie(t,e[n]);return t}function iie(e,t){let n;for(n in t){let r=(Qv.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Qv.call(r,a)||(r[a]=[]);let e=i[a];aie(r[a],Array.isArray(e)?e:e?[e]:[])}}}function aie(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Xv(e,0,0,r)}function ey(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function ty(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var ny=dy(/[A-Za-z]/),ry=dy(/[\dA-Za-z]/),oie=dy(/[#-'*+\--9=?A-Z^-~]/);function iy(e){return e!==null&&(e<32||e===127)}var ay=dy(/\d/),sie=dy(/[\dA-Fa-f]/),cie=dy(/[!-/:-@[-`{-~]/);function oy(e){return e!==null&&e<-2}function sy(e){return e!==null&&(e<0||e===32)}function cy(e){return e===-2||e===-1||e===32}var ly=dy(/\p{P}|\p{S}/u),uy=dy(/\s/);function dy(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function fy(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&ry(e.charCodeAt(n+1))&&ry(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function py(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return cy(r)?(e.enter(n),s(r)):t(r)}function s(r){return cy(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var lie={tokenize:uie};function uie(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),py(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return oy(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var die={tokenize:fie},my={tokenize:pie};function fie(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Xv(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(my,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(my,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return oy(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Xv(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function pie(e,t,n){return py(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function hy(e){if(e===null||sy(e)||uy(e))return 1;if(ly(e))return 2}function gy(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var _y={name:`attention`,resolveAll:mie,tokenize:hie};function mie(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};vy(d,-c),vy(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Zv(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Zv(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Zv(l,gy(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Zv(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Zv(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Xv(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function hie(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=hy(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=hy(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function vy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var gie={name:`autolink`,tokenize:_ie};function _ie(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return ny(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||ry(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||ry(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||iy(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):oie(t)?(e.consume(t),l):n(t)}function u(e){return ry(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||ry(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var yy={partial:!0,tokenize:vie};function vie(e,t,n){return r;function r(t){return cy(t)?py(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||oy(e)?t(e):n(e)}}var by={continuation:{tokenize:bie},exit:xie,name:`blockQuote`,tokenize:yie};function yie(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return cy(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function bie(e,t,n){let r=this;return i;function i(t){return cy(t)?py(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(by,t,n)(r)}}function xie(e){e.exit(`blockQuote`)}var xy={name:`characterEscape`,tokenize:Sie};function Sie(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return cie(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Sy={name:`characterReference`,tokenize:Cie};function Cie(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=ry,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=sie,u):(e.enter(`characterReferenceValue`),a=7,o=ay,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===ry&&!Yv(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Cy={partial:!0,tokenize:Tie},wy={concrete:!0,name:`codeFenced`,tokenize:wie};function wie(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),cy(t)?py(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||oy(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Cy,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||oy(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):cy(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),py(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||oy(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||oy(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&cy(t)?py(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||oy(t)?e.check(Cy,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||oy(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),cy(t)?py(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),cy(t)?py(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||oy(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Tie(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Ty={name:`codeIndented`,tokenize:Die},Eie={partial:!0,tokenize:Oie};function Die(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),py(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):oy(t)?e.attempt(Eie,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||oy(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Oie(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):oy(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):py(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):oy(e)?i(e):n(e)}}var kie={name:`codeText`,previous:jie,resolve:Aie,tokenize:Mie};function Aie(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function jie(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Mie(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):oy(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||oy(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Nie=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Ey(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Ey(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ey(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Ey(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Ey(this.left,t.reverse())}}};function Ey(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Dy(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Nie(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Pie(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Xv(e,0,1/0,u.slice(0)),!l}function Pie(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Fie={resolve:Lie,tokenize:Rie},Iie={partial:!0,tokenize:zie};function Lie(e){return Dy(e),e}function Rie(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):oy(t)?e.check(Iie,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function zie(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),py(e,a,`linePrefix`)}function a(i){if(i===null||oy(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Oy(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||iy(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||oy(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||sy(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||iy(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function ky(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):oy(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||oy(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!cy(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Ay(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):oy(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),py(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||oy(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function jy(e,t){let n;return r;function r(i){return oy(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):cy(i)?py(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Bie={name:`definition`,tokenize:Hie},Vie={partial:!0,tokenize:Uie};function Hie(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return ky.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ty(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return sy(t)?jy(e,l)(t):l(t)}function l(t){return Oy(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Vie,d,d)(t)}function d(t){return cy(t)?py(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||oy(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Uie(e,t,n){return r;function r(t){return sy(t)?jy(e,i)(t):n(t)}function i(t){return Ay(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return cy(t)?py(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||oy(e)?t(e):n(e)}}var Wie={name:`hardBreakEscape`,tokenize:Gie};function Gie(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return oy(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Kie={name:`headingAtx`,resolve:qie,tokenize:Jie};function qie(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Xv(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Jie(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||sy(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||oy(n)?(e.exit(`atxHeading`),t(n)):cy(n)?py(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||sy(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Yie=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),My=[`pre`,`script`,`style`,`textarea`],Xie={concrete:!0,name:`htmlFlow`,resolveTo:$ie,tokenize:eae},Zie={partial:!0,tokenize:nae},Qie={partial:!0,tokenize:tae};function $ie(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function eae(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):ny(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):ny(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return ny(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||sy(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&My.includes(l)?(i=1,r.interrupt?t(s):O(s)):Yie.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||ry(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return cy(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||ny(t)?(e.consume(t),b):cy(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||ry(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):cy(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):cy(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||oy(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||sy(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||cy(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||oy(t)?O(t):cy(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),ee):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):oy(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Zie,L,k)(t)):t===null||oy(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Qie,A,L)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||oy(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return My.includes(n)?(e.consume(t),ee):O(t)}return ny(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),ee):t===45&&i===2?(e.consume(t),I):O(t)}function ee(t){return t===null||oy(t)?(e.exit(`htmlFlowData`),L(t)):(e.consume(t),ee)}function L(n){return e.exit(`htmlFlow`),t(n)}}function tae(e,t,n){let r=this;return i;function i(t){return oy(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function nae(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(yy,t,n)}}var rae={name:`htmlText`,tokenize:iae};function iae(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):ny(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):ny(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):oy(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):oy(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):oy(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):oy(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return ny(t)?(e.consume(t),S):n(t)}function S(t){return t===45||ry(t)?(e.consume(t),S):C(t)}function C(t){return oy(t)?(o=C,N(t)):cy(t)?(e.consume(t),C):M(t)}function w(t){return t===45||ry(t)?(e.consume(t),w):t===47||t===62||sy(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||ny(t)?(e.consume(t),E):oy(t)?(o=T,N(t)):cy(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||ry(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):oy(t)?(o=D,N(t)):cy(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):oy(t)?(o=O,N(t)):cy(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):oy(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||sy(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||sy(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return cy(t)?py(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var Ny={name:`labelEnd`,resolveAll:cae,resolveTo:lae,tokenize:uae},aae={tokenize:dae},oae={tokenize:fae},sae={tokenize:pae};function cae(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Xv(e,0,e.length,n),e}function lae(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Zv(s,e.slice(a+1,a+r+3)),s=Zv(s,[[`enter`,u,t]]),s=Zv(s,gy(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Zv(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Zv(s,e.slice(o+1)),s=Zv(s,[[`exit`,c,t]]),Xv(e,a,e.length,s),e}function uae(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(ty(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(aae,u,o?u:d)(t):t===91?e.attempt(oae,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(sae,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function dae(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return sy(t)?jy(e,a)(t):a(t)}function a(t){return t===41?u(t):Oy(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return sy(t)?jy(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Ay(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return sy(t)?jy(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function fae(e,t,n){let r=this;return i;function i(t){return ky.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(ty(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function pae(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var mae={name:`labelStartImage`,resolveAll:Ny.resolveAll,tokenize:hae};function hae(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var gae={name:`labelStartLink`,resolveAll:Ny.resolveAll,tokenize:_ae};function _ae(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Py={name:`lineEnding`,tokenize:vae};function vae(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),py(e,t,`linePrefix`)}}var Fy={name:`thematicBreak`,tokenize:yae};function yae(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||oy(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),cy(t)?py(e,s,`whitespace`)(t):s(t))}}var Iy={continuation:{tokenize:Cae},exit:Tae,name:`list`,tokenize:Sae},bae={partial:!0,tokenize:Eae},xae={partial:!0,tokenize:wae};function Sae(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:ay(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Fy,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return ay(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(yy,r.interrupt?n:u,e.attempt(bae,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return cy(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Cae(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(yy,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,py(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!cy(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xae,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,py(e,e.attempt(Iy,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function wae(e,t,n){let r=this;return py(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Tae(e){e.exit(this.containerState.type)}function Eae(e,t,n){let r=this;return py(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!cy(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Ly={name:`setextUnderline`,resolveTo:Ry,tokenize:zy};function Ry(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function zy(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),cy(t)?py(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||oy(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var By={tokenize:Vy};function Vy(e){let t=this,n=e.attempt(yy,r,e.attempt(this.parser.constructs.flowInitial,i,py(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Fie,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Hy={resolveAll:Ky()},Uy=Gy(`string`),Wy=Gy(`text`);function Gy(e){return{resolveAll:Ky(e===`text`?qy:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Ky(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function qy(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Jy=e({attentionMarkers:()=>nb,contentInitial:()=>Xy,disable:()=>rb,document:()=>Yy,flow:()=>Qy,flowInitial:()=>Zy,insideSpan:()=>tb,string:()=>$y,text:()=>eb}),Yy={42:Iy,43:Iy,45:Iy,48:Iy,49:Iy,50:Iy,51:Iy,52:Iy,53:Iy,54:Iy,55:Iy,56:Iy,57:Iy,62:by},Xy={91:Bie},Zy={[-2]:Ty,[-1]:Ty,32:Ty},Qy={35:Kie,42:Fy,45:[Ly,Fy],60:Xie,61:Ly,95:Fy,96:wy,126:wy},$y={38:Sy,92:xy},eb={[-5]:Py,[-4]:Py,[-3]:Py,33:mae,38:Sy,42:_y,60:[gie,rae],91:gae,92:[Wie,xy],93:Ny,95:_y,96:kie},tb={null:[_y,Hy]},nb={null:[42,95]},rb={null:[]};function ib(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Zv(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=gy(a,l.events,l),l.events):[]}function f(e,t){return ob(p(e),t)}function p(e){return ab(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){oy(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Xv(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ab(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function ob(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
191
191
  `;break;case-3:o=`\r
192
192
  `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function sb(e){let t={constructs:$v([Jy,...(e||{}).extensions||[]]),content:n(lie),defined:[],document:n(die),flow:n(By),lazy:{},string:n(Uy),text:n(Wy)};return t;function n(e){return n;function n(n){return ib(t,e,n)}}}function cb(e){for(;!Dy(e););return e}var lb=/[\0\t\n\r]/g;function ub(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(lb.lastIndex=u,c=lb.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var db=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fb(e){return e.replace(db,pb)}function pb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return ey(n.slice(t?2:1),t?16:10)}return Yv(n)||e}var mb={}.hasOwnProperty;function hb(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),gb(n)(cb(sb(n).document().write(ub()(e,t,!0))))}function gb(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(fe),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ce),blockQuote:a(H),characterEscape:T,characterReference:T,codeFenced:a(ie),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ie,o),codeText:a(ae,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(oe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(se),hardBreakEscape:a(le),hardBreakTrailing:a(le),htmlFlow:a(ue,o),htmlFlowData:T,htmlText:a(ue,o),htmlTextData:T,image:a(de),label:o,link:a(fe),listItem:a(me),listItemValue:f,listOrdered:a(pe,d),listUnordered:a(pe),paragraph:a(he),reference:R,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ce),strong:a(ge),thematicBreak:a(ve)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:V,autolinkProtocol:re,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:B,characterReference:ne,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:z,resourceDestinationString:I,resourceTitleString:ee,resource:L,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};vb(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];mb.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||bb).call(a,void 0,e[0])}for(r.position={start:_b(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:_b(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:_b(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||bb).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+jv({start:e.start,end:e.end})+`): it’s not open`);n.position.end=_b(e.end)}function u(){return Gv(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ty(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=_e(),n.position={start:_b(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=_b(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=_b(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=fb(t),n.identifier=ty(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function L(){this.data.inReference=void 0}function R(){this.data.referenceType=`collapsed`}function z(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ty(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function te(e){this.data.characterReferenceType=e.type}function B(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=ey(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Yv(t);let i=this.stack[this.stack.length-1];i.value+=r}function ne(e){let t=this.stack.pop();t.position.end=_b(e.end)}function re(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function V(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function H(){return{type:`blockquote`,children:[]}}function ie(){return{type:`code`,lang:null,meta:null,value:``}}function ae(){return{type:`inlineCode`,value:``}}function oe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function se(){return{type:`emphasis`,children:[]}}function ce(){return{type:`heading`,depth:0,children:[]}}function le(){return{type:`break`}}function ue(){return{type:`html`,value:``}}function de(){return{type:`image`,title:null,url:``,alt:null}}function fe(){return{type:`link`,title:null,url:``,children:[]}}function pe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function me(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function he(){return{type:`paragraph`,children:[]}}function ge(){return{type:`strong`,children:[]}}function _e(){return{type:`text`,value:``}}function ve(){return{type:`thematicBreak`}}}function _b(e){return{line:e.line,column:e.column,offset:e.offset}}function vb(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?vb(e,r):yb(e,r)}}function yb(e,t){let n;for(n in t)if(mb.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function bb(e,t){throw e?Error("Cannot close `"+e.type+"` ("+jv({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+jv({start:t.start,end:t.end})+`) is open`):Error("Cannot close document, a token (`"+t.type+"`, "+jv({start:t.start,end:t.end})+`) is still open`)}function xb(e){let t=this;t.parser=n;function n(n){return hb(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Sb(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Cb(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
@@ -350,7 +350,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
350
350
  `+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=Ak(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=dfe;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+Y[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to);break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
351
351
  `?``:t;else{let e=t.indexOf(`
352
352
  `);n=e<0?t:t.slice(0,e)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=LO.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e==`number`&&(e=new v(this.parser.nodeSet.types[e],pk,pk,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(kk(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?sk(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=kk(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Y.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e==`string`?_k(this.parser.getNodeType(e),t,n,r):new gk(e,t)}get buffer(){return new mk(this.parser.nodeSet)}};function sk(e,t,n,r,i){let a=e[t].to,o=[],s=[],c=n.from+r;function l(n,i){for(;i?n>=a:n>a;){let i=e[t+1].from-a;r+=i,n+=i,t++,a=e[t].to}}for(let u=n.firstChild;u;u=u.nextSibling){l(u.from+r,!0);let n=u.from+r,d,f=i.get(u.tree);f?d=f:u.to+r>a?(d=sk(e,t,u,r,i),l(u.to+r,!1)):d=u.toTree(),o.push(d),s.push(n-c)}return l(n.to+r,!1),new v(n.type,o,s,n.to+r-c,n.tree?n.tree.propValues:void 0)}var ck=class e extends m{constructor(e,t,n,r,i,a,o,s,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=i,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=s,this.wrappers=c,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let r=new ffe(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let n=uk(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),s=this.blockNames.slice(),c=this.inlineParsers.slice(),l=this.inlineNames.slice(),u=this.endLeafBlock.slice(),d=this.wrappers;if(lk(n.defineNodes)){i=Object.assign({},i);let e=r.types.slice(),t;for(let r of n.defineNodes){let{name:n,block:a,composite:o,style:s}=typeof r==`string`?{name:r}:r;if(e.some(e=>e.name==n))continue;o&&(i[e.length]=(e,t,n)=>o(t,n,e.value));let c=e.length,l=o?[`Block`,`BlockContext`]:a?c>=Y.ATXHeading1&&c<=Y.SetextHeading2?[`Block`,`LeafBlock`,`Heading`]:[`Block`,`LeafBlock`]:void 0;e.push(w.define({id:c,name:n,props:l&&[[ge.group,l]]})),s&&(t||={},Array.isArray(s)||s instanceof _?t[n]=s:Object.assign(t,s))}r=new C(e),t&&(r=r.extend(b(t)))}if(lk(n.props)&&(r=r.extend(...n.props)),lk(n.remove))for(let e of n.remove){let t=this.blockNames.indexOf(e),n=this.inlineNames.indexOf(e);t>-1&&(a[t]=o[t]=void 0),n>-1&&(c[n]=void 0)}if(lk(n.parseBlock))for(let e of n.parseBlock){let t=s.indexOf(e.name);if(t>-1)a[t]=e.parse,o[t]=e.leaf;else{let t=e.before?dk(s,e.before):e.after?dk(s,e.after)+1:s.length-1;a.splice(t,0,e.parse),o.splice(t,0,e.leaf),s.splice(t,0,e.name)}e.endLeaf&&u.push(e.endLeaf)}if(lk(n.parseInline))for(let e of n.parseInline){let t=l.indexOf(e.name);if(t>-1)c[t]=e.parse;else{let t=e.before?dk(l,e.before):e.after?dk(l,e.after)+1:l.length-1;c.splice(t,0,e.parse),l.splice(t,0,e.name)}}return n.wrap&&(d=d.concat(n.wrap)),new e(r,a,o,s,u,i,c,l,d)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new Ok(this,e,t);outer:for(let e=t;e<n.end;){let t=n.char(e);for(let r of this.inlineParsers)if(r){let i=r(n,t,e);if(i>=0){e=i;continue outer}}e++}return n.resolveMarkers(0)}};function lk(e){return e!=null&&e.length>0}function uk(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=uk(e[0]);if(e.length==1)return t;let n=uk(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||pk).concat(t||pk),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(e,t,n,r)=>i(a(e,t,n,r),t,n,r):i:a}}function dk(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var fk=[w.none];for(let e=1,t;t=Y[e];e++)fk[e]=w.define({id:e,name:t,props:e>=Y.Escape?[]:[[ge.group,e in zO?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var pk=[],mk=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,r=0){return this.content.push(e,t,n,4+r*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return v.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},hk=class{constructor(e,t,n,r=pk){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new mk(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},gk=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return pk}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function _k(e,t,n,r){return new hk(e,t,n,r)}var vk={resolve:`Emphasis`,mark:`EmphasisMark`},yk={resolve:`Emphasis`,mark:`EmphasisMark`},bk={},xk={},Sk=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},pfe=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,Ck=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Ck=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var wk={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let t=0;t<32;t++)if(pfe.charCodeAt(t)==r)return e.append(_k(Y.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(_k(Y.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(_k(Y.InlineCode,n,r+1,[_k(Y.CodeMark,n,n+i),_k(Y.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(_k(Y.Autolink,n,n+1+i[0].length,[_k(Y.LinkMark,n,n+1),_k(Y.URL,n+1,n+i[0].length),_k(Y.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(_k(Y.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(_k(Y.ProcessingInstruction,n,n+1+o[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return s?e.append(_k(Y.HTMLTag,n,n+1+s[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),o=Ck.test(i),s=Ck.test(a),c=/\s|^$/.test(i),l=/\s|^$/.test(a),u=!l&&(!s||c||o),d=!c&&(!o||l||s),f=u&&(t==42||!d||o),p=d&&(t==42||!u||s);return e.append(new Sk(t==95?vk:yk,n,r,(f?1:0)|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(_k(Y.HardBreak,n,n+2));if(t==32){let t=n+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=n+2)return e.append(_k(Y.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new Sk(bk,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new Sk(xk,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let t=e.parts.length-1;t>=0;t--){let r=e.parts[t];if(r instanceof Sk&&(r.type==bk||r.type==xk)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[t]=null,-1;let i=e.takeContent(t),a=e.parts[t]=mfe(e,i,r.type==bk?Y.Link:Y.Image,r.from,n+1);if(r.type==bk)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof Sk&&t.type==bk&&(t.side=0)}return a.to}}return-1}};function mfe(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(_k(Y.LinkMark,r,r+(n==Y.Image?2:1))),t.push(_k(Y.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=Tk(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=Ek(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(_k(Y.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(_k(Y.LinkMark,n,s)))}else if(o==91){let n=Dk(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return _k(n,r,s,t)}function Tk(e,t,n){if(e.charCodeAt(t)==60){for(let r=t+1;r<e.length;r++){let i=e.charCodeAt(r);if(i==62)return _k(Y.URL,t+n,r+1+n);if(i==60||i==10)return!1}return null}else{let r=0,i=t;for(let t=!1;i<e.length;i++){let n=e.charCodeAt(i);if(BO(n))break;if(t)t=!1;else if(n==40)r++;else if(n==41){if(!r)break;r--}else n==92&&(t=!0)}return i>t?_k(Y.URL,t+n,i+n):i==e.length?null:!1}}function Ek(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let r=t+1,a=!1;r<e.length;r++){let o=e.charCodeAt(r);if(a)a=!1;else if(o==i)return _k(Y.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function Dk(e,t,n,r){for(let i=!1,a=t+1,o=Math.min(e.length,a+999);a<o;a++){let o=e.charCodeAt(a);if(i)i=!1;else if(o==93)return r?!1:_k(Y.LinkLabel,t+n,a+1+n);else{if(r&&!BO(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var Ok=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new Sk(e,t,n,(r?1:0)|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Sk&&(t.type==bk||t.type==xk))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let n=this.parts[t];if(!(n instanceof Sk&&n.type.resolve&&n.side&2))continue;let r=n.type==vk||n.type==yk,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof Sk&&e.side&1&&e.type==n.type&&!(r&&(n.side&1||e.side&2)&&(e.to-e.from+i)%3==0&&((e.to-e.from)%3||i%3))){a=e;break}}if(!a)continue;let s=n.type.resolve,c=[],l=a.from,u=n.to;if(r){let e=Math.min(2,a.to-a.from,i);l=a.to-e,u=n.from+e,s=e==1?`Emphasis`:`StrongEmphasis`}a.type.mark&&c.push(this.elt(a.type.mark,l,a.to));for(let e=o+1;e<t;e++)this.parts[e]instanceof hk&&c.push(this.parts[e]),this.parts[e]=null;n.type.mark&&c.push(this.elt(n.type.mark,n.from,u));let d=this.elt(s,l,u,c);this.parts[o]=r&&a.from!=l?new Sk(a.type,a.from,l,a.side):null,(this.parts[t]=r&&n.to!=u?new Sk(n.type,u,n.to,n.side):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let n=e;n<this.parts.length;n++){let e=this.parts[n];e instanceof hk&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof Sk&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Sk?t:null}skipSpace(e){return VO(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?_k(this.parser.getNodeType(e),t,n,r):new gk(e,t)}};Ok.linkStart=bk,Ok.imageStart=xk;function kk(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let e of t){for(;r<n.length&&n[r].to<e.to;)r++;if(r<n.length&&n[r].from<e.from){let t=n[r];t instanceof hk&&(n[r]=new hk(t.type,t.from,t.to,kk(t.children,[e])))}else n.splice(r++,0,e)}return n}var hfe=[Y.CodeBlock,Y.ListItem,Y.OrderedList,Y.BulletList],gfe=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=`
353
- `;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ge.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=Ak(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new v(e.parser.nodeSet.types[Y.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(hfe.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c,s=t.to-n,c=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function Ak(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var _fe=b({"Blockquote/...":A.quote,HorizontalRule:A.contentSeparator,"ATXHeading1/... SetextHeading1/...":A.heading1,"ATXHeading2/... SetextHeading2/...":A.heading2,"ATXHeading3/...":A.heading3,"ATXHeading4/...":A.heading4,"ATXHeading5/...":A.heading5,"ATXHeading6/...":A.heading6,"Comment CommentBlock":A.comment,Escape:A.escape,Entity:A.character,"Emphasis/...":A.emphasis,"StrongEmphasis/...":A.strong,"Link/... Image/...":A.link,"OrderedList/... BulletList/...":A.list,"BlockQuote/...":A.quote,"InlineCode CodeText":A.monospace,"URL Autolink":A.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":A.processingInstruction,"CodeInfo LinkLabel":A.labelName,LinkTitle:A.string,Paragraph:A.content}),vfe=new ck(new C(fk).extend(_fe),Object.keys(ik).map(e=>ik[e]),Object.keys(ik).map(e=>ok[e]),Object.keys(ik),ufe,zO,Object.keys(wk).map(e=>wk[e]),Object.keys(wk),[]);function yfe(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function bfe(e){let{codeParser:t,htmlParser:n}=e;return{wrap:x((e,r)=>{let i=e.type.id;if(t&&(i==Y.CodeBlock||i==Y.FencedCode)){let n=``;if(i==Y.FencedCode){let t=e.node.getChild(Y.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==Y.CodeText}}else if(n&&(i==Y.HTMLBlock||i==Y.HTMLTag||i==Y.CommentBlock))return{parser:n,overlay:yfe(e.node,e.from,e.to)};return null})}}var xfe={resolve:`Strikethrough`,mark:`StrikethroughMark`},Sfe={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":A.strikethrough}},{name:`StrikethroughMark`,style:A.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=Ck.test(r),c=Ck.test(i);return e.addDelimiter(xfe,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function jk(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function Mk(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var Nk=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Pk=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&Nk.test(r=t.text.slice(t.pos))){let i=[];jk(e,n.content,0,i,n.start)==jk(e,r,t.pos)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];jk(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},Cfe={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":A.heading}},`TableRow`,{name:`TableCell`,style:A.content},{name:`TableDelimiter`,style:A.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return Mk(t.content,0)?new Pk:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof Pk)||!Mk(t.text,t.basePos))return!1;let r=e.peekLine();return Nk.test(r)&&jk(e,t.text,t.basePos)==jk(e,r,t.basePos)},before:`SetextHeading`}]},wfe=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},Tfe={defineNodes:[{name:`Task`,block:!0,style:A.list},{name:`TaskMarker`,style:A.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new wfe:null},after:`SetextHeading`}]},Fk=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Ik=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Efe=/[\w-]+\.[\w-]+($|\/)/,Lk=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Rk=/\/[a-zA-Z\d@.]+/gy;function zk(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Dfe(e,t){Ik.lastIndex=t;let n=Ik.exec(e);if(!n||Efe.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&zk(e,t,r,`)`)>zk(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function Bk(e,t){Lk.lastIndex=t;let n=Lk.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-(r==`.`?1:0)}var Ofe=[Cfe,Tfe,Sfe,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Fk.lastIndex=r;let i=Fk.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Dfe(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Bk(e.text,r):(a=Bk(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Rk.lastIndex=a,i=Rk.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function Vk(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),BO(s))break}return-1}}var kfe={defineNodes:[{name:`Superscript`,style:A.special(A.content)},{name:`SuperscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Superscript`,parse:Vk(94,`Superscript`,`SuperscriptMark`)}]},Afe={defineNodes:[{name:`Subscript`,style:A.special(A.content)},{name:`SubscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Subscript`,parse:Vk(126,`Subscript`,`SubscriptMark`)}]},jfe={defineNodes:[{name:`Emoji`,style:A.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},Mfe=55,Nfe=1,Pfe=56,Ffe=2,Ife=57,Lfe=3,Hk=4,Rfe=5,Uk=6,Wk=7,Gk=8,Kk=9,qk=10,zfe=11,Bfe=12,Vfe=13,Jk=58,Hfe=14,Ufe=15,Yk=59,Xk=21,Wfe=23,Zk=24,Gfe=25,Qk=27,$k=28,Kfe=29,qfe=32,Jfe=35,Yfe=37,Xfe=38,Zfe=0,Qfe=1,$fe={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},epe={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},eA={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function tpe(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var tA=null,nA=null,rA=0;function iA(e,t){let n=e.pos+t;if(rA==n&&nA==e)return tA;let r=e.peek(t),i=``;for(;tpe(r);)i+=String.fromCharCode(r),r=e.peek(++t);return nA=e,rA=n,tA=i?i.toLowerCase():r==npe||r==rpe?void 0:null}var aA=60,oA=62,sA=47,npe=63,rpe=33,ipe=45;function cA(e,t){this.name=e,this.parent=t}var ape=[Uk,qk,Wk,Gk,Kk],ope=new Me({start:null,shift(e,t,n,r){return ape.indexOf(t)>-1?new cA(iA(r,1)||``,e):e},reduce(e,t){return t==Xk&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Uk||i==Yfe?new cA(iA(r,1)||``,e):e},strict:!1}),spe=new Se((e,t)=>{if(e.next!=aA){e.next<0&&t.context&&e.acceptToken(Jk);return}e.advance();let n=e.next==sA;n&&e.advance();let r=iA(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?Ufe:Hfe);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(zfe);if(i&&epe[i])return e.acceptToken(Jk,-2);if(t.dialectEnabled(Zfe))return e.acceptToken(Bfe);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(Vfe)}else{if(r==`script`)return e.acceptToken(Wk);if(r==`style`)return e.acceptToken(Gk);if(r==`textarea`)return e.acceptToken(Kk);if($fe.hasOwnProperty(r))return e.acceptToken(qk);i&&eA[i]&&eA[i][r]?e.acceptToken(Jk,-1):e.acceptToken(Uk)}},{contextual:!0}),cpe=new Se(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(Yk);break}if(e.next==ipe)t++;else if(e.next==oA&&t>=2){n>=3&&e.acceptToken(Yk,-2);break}else t=0;e.advance()}});function lpe(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var upe=new Se((e,t)=>{if(e.next==sA&&e.peek(1)==oA){let n=t.dialectEnabled(Qfe)||lpe(t.context);e.acceptToken(n?Rfe:Hk,2)}else e.next==oA&&e.acceptToken(Hk,1)});function lA(e,t,n){let r=2+e.length;return new Se(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==aA||a==1&&i.next==sA||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==oA){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var dpe=lA(`script`,Mfe,Nfe),fpe=lA(`style`,Pfe,Ffe),ppe=lA(`textarea`,Ife,Lfe),mpe=b({"Text RawText IncompleteTag IncompleteCloseTag":A.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":A.angleBracket,TagName:A.tagName,"MismatchedCloseTag/TagName":[A.tagName,A.invalid],AttributeName:A.attributeName,"AttributeValue UnquotedAttributeValue":A.attributeValue,Is:A.definitionOperator,"EntityReference CharacterReference":A.character,Comment:A.blockComment,ProcessingInst:A.processingInstruction,DoctypeDecl:A.documentMeta}),hpe=Oe.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:`,c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~`,goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:ope,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`StartTag`,-4,30,33,36,38,`OpenTag`],[`group`,-10,14,15,18,19,20,21,40,41,42,43,`Entity`,17,`Entity TextContent`,-3,29,32,35,`TextContent Entity`],[`isolate`,-11,22,30,31,33,34,36,37,38,39,42,43,`ltr`,-3,27,28,40,``]],propSources:[mpe],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[dpe,fpe,ppe,upe,spe,cpe,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function uA(e,t){let n=Object.create(null);for(let r of e.getChildren(Zk)){let e=r.getChild(Gfe),i=r.getChild(Qk)||r.getChild($k);e&&(n[t.read(e.from,e.to)]=i?i.type.id==Qk?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function dA(e,t){let n=e.getChild(Wfe);return n?t.read(n.from,n.to):` `}function fA(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=uA(e.node.parent.firstChild,t)))return{parser:i.parser};return null}function pA(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return x((e,t)=>{let s=e.type.id;if(s==Kfe)return fA(e,t,n);if(s==qfe)return fA(e,t,r);if(s==Jfe)return fA(e,t,i);if(s==Xk&&a.length){let n=e.node,r=n.firstChild,i=r&&dA(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=uA(r,t)))){let t=n.lastChild,i=t.type.id==Xfe?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==Zk){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=dA(n.parent,t))continue;let e=n.lastChild;if(e.type.id==Qk){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}]}}else if(e.type.id==$k)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var gpe=122,mA=1,_pe=123,vpe=124,hA=2,ype=125,bpe=3,xpe=4,gA=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Spe=58,Cpe=40,_A=95,vA=91,yA=45,bA=46,xA=35,SA=37,CA=38,wA=92,TA=10,EA=42;function DA(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function OA(e){return e>=48&&e<=57}function kA(e){return OA(e)||e>=97&&e<=102||e>=65&&e<=70}var AA=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(DA(c)||c==yA||c==_A||a&&OA(c))!a&&(c!=yA||s>0)&&(a=!0),o===s&&c==yA&&o++,r.advance();else if(c==wA&&r.peek(1)!=TA){if(r.advance(),kA(r.next)){do r.advance();while(kA(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(hA)?t:c==Cpe?n:e);break}}},jA=new Se(AA(_pe,hA,vpe)),MA=new Se(AA(ype,bpe,xpe)),NA=new Se(e=>{if(gA.includes(e.peek(-1))){let{next:t}=e;(DA(t)||t==_A||t==xA||t==bA||t==EA||t==vA||t==Spe&&DA(e.peek(1))||t==yA||t==CA)&&e.acceptToken(gpe)}}),PA=new Se(e=>{if(!gA.includes(e.peek(-1))){let{next:t}=e;if(t==SA&&(e.advance(),e.acceptToken(mA)),DA(t)){do e.advance();while(DA(e.next)||OA(e.next));e.acceptToken(mA)}}}),FA=b({"AtKeyword import charset namespace keyframes media supports":A.definitionKeyword,"from to selector":A.keyword,NamespaceName:A.namespace,KeyframeName:A.labelName,KeyframeRangeName:A.operatorKeyword,TagName:A.tagName,ClassName:A.className,PseudoClassName:A.constant(A.className),IdName:A.labelName,"FeatureName PropertyName":A.propertyName,AttributeName:A.attributeName,NumberLiteral:A.number,KeywordQuery:A.keyword,UnaryQueryOp:A.operatorKeyword,"CallTag ValueName":A.atom,VariableName:A.variableName,Callee:A.operatorKeyword,Unit:A.unit,"UniversalSelector NestingSelector":A.definitionOperator,"MatchOp CompareOp":A.compareOperator,"ChildOp SiblingOp, LogicOp":A.logicOperator,BinOp:A.arithmeticOperator,Important:A.modifier,Comment:A.blockComment,ColorLiteral:A.color,"ParenthesizedContent StringLiteral":A.string,":":A.punctuation,"PseudoOp #":A.derefOperator,"; ,":A.separator,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace}),IA={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},LA={__proto__:null,or:98,and:98,not:106,only:106,layer:170},RA={__proto__:null,selector:112,layer:166},zA={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},BA={__proto__:null,to:207},VA=Oe.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:`⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles`,maxTerm:143,nodeProps:[[`isolate`,-2,5,36,``],[`openedBy`,20,`(`,28,`[`,31,`{`],[`closedBy`,21,`)`,29,`]`,32,`}`]],propSources:[FA],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[NA,PA,jA,MA,1,2,3,4,new pe(`m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~`,28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:e=>IA[e]||-1},{term:125,get:e=>LA[e]||-1},{term:4,get:e=>RA[e]||-1},{term:25,get:e=>zA[e]||-1},{term:123,get:e=>BA[e]||-1}],tokenPrec:1963}),HA=null;function UA(){if(!HA&&typeof document==`object`&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!=`cssText`&&r!=`cssFloat`&&typeof e[r]==`string`&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));HA=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return HA||[]}var WA=`active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where`.split(`.`).map(e=>({type:`class`,label:e})),GA=`above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`).map(e=>({type:`keyword`,label:e})).concat(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`).map(e=>({type:`constant`,label:e}))),KA=`a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul`.split(`.`).map(e=>({type:`type`,label:e})),qA=[`@charset`,`@color-profile`,`@container`,`@counter-style`,`@font-face`,`@font-feature-values`,`@font-palette-values`,`@import`,`@keyframes`,`@layer`,`@media`,`@namespace`,`@page`,`@position-try`,`@property`,`@scope`,`@starting-style`,`@supports`,`@view-transition`].map(e=>({type:`keyword`,label:e})),JA=/^(\w[\w-]*|-\w[\w-]*|)$/,YA=/^-(-[\w-]*)?$/;function XA(e,t){if((e.name==`(`||e.type.isError)&&(e=e.parent||e),e.name!=`ArgList`)return!1;let n=e.parent?.firstChild;return n?.name==`Callee`?t.sliceString(n.from,n.to)==`var`:!1}var ZA=new O,QA=[`Declaration`];function $A(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function ej(e,t,n){if(t.to-t.from>4096){let r=ZA.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(a.IncludeAnonymous);if(s.firstChild())do for(let t of ej(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t));while(s.nextSibling());return ZA.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(QA)&&t.node.nextSibling?.name==`:`){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:`variable`}))}}),r}}var tj=e=>t=>{let{state:n,pos:r}=t,i=p(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)==`-`;if(i.name==`PropertyName`||(a||i.name==`TagName`)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:UA(),validFor:JA};if(i.name==`ValueName`)return{from:i.from,options:GA,validFor:JA};if(i.name==`PseudoClassName`)return{from:i.from,options:WA,validFor:JA};if(e(i)||(t.explicit||a)&&XA(i,n.doc))return{from:e(i)||a?i.from:r,options:ej(n.doc,$A(i),e),validFor:YA};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:UA(),validFor:JA};return{from:i.from,options:KA,validFor:JA}}if(i.name==`AtKeyword`)return{from:i.from,options:qA,validFor:JA};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:WA,validFor:JA}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:GA,validFor:JA}:o.name==`Block`||o.name==`Styles`?{from:r,options:UA(),validFor:JA}:null},nj=tj(e=>e.name==`VariableName`),rj=Ae.define({name:`css`,parser:VA.configure({props:[l.add({Declaration:fe()}),s.add({"Block KeyframeList":ze})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function ij(){return new Ne(rj,rj.data.of({autocomplete:nj}))}var aj=[`_blank`,`_self`,`_top`,`_parent`],oj=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],sj=[`get`,`post`,`put`,`delete`],cj=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],lj=[`true`,`false`],uj={},dj={a:{attrs:{href:null,ping:null,type:null,media:null,target:aj,hreflang:null}},abbr:uj,address:uj,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:uj,aside:uj,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:uj,base:{attrs:{href:null,target:aj}},bdi:uj,bdo:uj,blockquote:{attrs:{cite:null}},body:uj,br:uj,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:cj,formmethod:sj,formnovalidate:[`novalidate`],formtarget:aj,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:uj,center:uj,cite:uj,code:uj,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:uj,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:uj,div:uj,dl:uj,dt:uj,em:uj,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:uj,figure:uj,footer:uj,form:{attrs:{action:null,name:null,"accept-charset":oj,autocomplete:[`on`,`off`],enctype:cj,method:sj,novalidate:[`novalidate`],target:aj}},h1:uj,h2:uj,h3:uj,h4:uj,h5:uj,h6:uj,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:uj,hgroup:uj,hr:uj,html:{attrs:{manifest:null}},i:uj,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:cj,formmethod:sj,formnovalidate:[`novalidate`],formtarget:aj,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:uj,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:uj,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:uj,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:oj,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:uj,noscript:uj,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:uj,param:{attrs:{name:null,value:null}},pre:uj,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:uj,rt:uj,ruby:uj,samp:uj,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:oj}},section:uj,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:uj,source:{attrs:{src:null,type:null,media:null}},span:uj,strong:uj,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:uj,summary:uj,sup:uj,table:uj,tbody:uj,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:uj,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:uj,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:uj,time:{attrs:{datetime:null}},title:uj,tr:uj,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:uj,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:uj},fj={accesskey:null,class:null,contenteditable:lj,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:lj,autocorrect:lj,autocapitalize:lj,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":lj,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":lj,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":lj,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":lj,"aria-hidden":lj,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":lj,"aria-multiselectable":lj,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":lj,"aria-relevant":null,"aria-required":lj,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},pj=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of pj)fj[e]=null;var mj=class{constructor(e,t){this.tags={...dj,...e},this.globalAttrs={...fj,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};mj.default=new mj;function hj(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function gj(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function _j(e,t,n){return n.tags[hj(e,gj(t))]?.children||n.allTags}function vj(e,t){let n=[];for(let r=gj(t);r&&!r.type.isTop;r=gj(r.parent)){let i=hj(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var yj=/^[:\-\.\w\u00b7-\uffff]*$/;function bj(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=gj(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:_j(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(vj(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function xj(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:vj(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:yj}}function Sj(e,t,n,r){let i=[],a=0;for(let r of _j(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of vj(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Cj(e,t,n,r,i){let a=gj(n),o=a?t.tags[hj(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:yj}}function wj(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=gj(n),i=r?t.tags[hj(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function Tj(e,t){let{state:n,pos:r}=t,i=p(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?xj(n,i,i.from,r):bj(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?bj(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?xj(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?Cj(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?wj(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?Sj(n,e,i,r):null}function Ej(e){return Tj(mj.default,e)}function Dj(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new mj(t,n):mj.default;return e=>Tj(r,e)}var Oj=Ke.parser.configure({top:`SingleExpression`}),kj=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:Ge.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:Ue.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:He.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:Oj},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Ke.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:rj.parser}],Aj=[{name:`style`,parser:rj.parser.configure({top:`Styles`})}].concat(pj.map(e=>({name:e,parser:Ke.parser}))),jj=Ae.define({name:`html`,parser:hpe.configure({props:[l.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),s.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),be.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),Mj=jj.configure({wrap:pA(kj,Aj)});function Nj(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=pA((e.nestedLanguages||[]).concat(kj),(e.nestedAttributes||[]).concat(Aj))),new Ne(n?jj.configure({wrap:n,dialect:t}):t?Mj.configure({dialect:t}):Mj,[Mj.data.of({autocomplete:Dj(e)}),e.autoCloseTags===!1?[]:Fj,We().support,ij().support])}var Pj=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),Fj=I.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!Mj.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=p(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(a=hj(o.doc,t.parent,n))&&!Pj.has(a))return{range:e,changes:{from:n,to:n+(o.doc.sliceString(n,n+1)===`>`?1:0),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=hj(o.doc,e,n))&&!Pj.has(a)){let e=n+(o.doc.sliceString(n,n+1)===`>`?1:0),t=`${a}>`;return{range:le.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),Ij=te({commentTokens:{block:{open:`<!--`,close:`-->`}}}),Lj=new ge,Rj=vfe.configure({props:[s.add(e=>!e.is(`Block`)||e.is(`Document`)||zj(e)!=null||Bj(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),Lj.add(zj),l.add({Document:()=>null}),he.add({Document:Ij})]});function zj(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Bj(e){return e.name==`OrderedList`||e.name==`BulletList`}function Vj(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=zj(e.type))!=null&&r<=t)break;n=e}return n.to}var Hj=Le.of((e,t,n)=>{for(let r=p(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(Lj);if(e==null)continue;let t=Vj(r,e);if(t>n)return{from:n,to:t}}return null});function Uj(e){return new H(Ij,e,[],`markdown`)}var Wj=Uj(Rj),Gj=Uj(Rj.configure([Ofe,Afe,kfe,jfe,{props:[s.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function Kj(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):U.matchLanguageName(e,n,!0),t instanceof U)return t.support?t.support.language.parser:ae.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var qj=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}else{for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}}marker(e,t){let n=this.node.name==`OrderedList`?String(+Yj(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function Jj(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new qj(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new qj(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new qj(i.parent,s,s+t,a[1],e,n,i))}}return r}function Yj(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function Xj(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=Yj(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function Zj(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(i)!=` `)return e;let r=u(e,4,n),a=``;for(let e=r;e>0;)e>=4?(a+=` `,e-=4):(a+=` `,e--);return a+e.slice(n)}var Qj=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!Gj.isActiveAt(t,n.from,-1)&&!Gj.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=Jj(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let d=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&d){let n=l.node.firstChild,r=l.node.getChild(`ListItem`,`ListItem`);if(n.to>=o||r&&r.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&Xj(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&Xj(e.item,i,r),{range:le.cursor(t+n.length),changes:r}}else{let e=nM(c,t,s);return{range:le.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&d&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let f=[];l.node.name==`OrderedList`&&Xj(l.item,i,f);let p=l.item&&l.item.from<s.from,m=``;if(!p||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)m+=e==t&&!p?c[e].marker(i,1):c[e].blank(e<t?u(s.text,4,c[e+1].from)-m.length:null);let h=o;for(;h>s.from&&/\s/.test(s.text.charAt(h-s.from-1));)h--;return m=Zj(m,t),tM(l.node,t.doc)&&(m=nM(c,t,s)+t.lineBreak+m),f.push({from:h,to:o,insert:t.lineBreak+m}),{range:le.cursor(h+m.length+1),changes:f}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},$j=Qj();function eM(e){return e.name==`QuoteMark`||e.name==`ListMark`}function tM(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<a.number}function nM(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?u(n.text,4,e[t+1].from)-r.length:null,t<i);return Zj(r,t)}function rM(e,t){let n=e.resolveInner(t,-1),r=t;eM(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(eM(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var iM=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&Gj.isActiveAt(e,t.from)){let t=a.lineAt(i),r=Jj(rM(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+(n.spaceAfter?1:0);if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:le.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(!n.item||t.from<=n.item.from||!/\S/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(u(t.text,4,n.to)-u(t.text,4,n.from));return r==t.from&&(i=Zj(i,e)),{range:le.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:le.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},aM=[{key:`Enter`,run:$j},{key:`Backspace`,run:iM}],oM=Nj({matchClosingTags:!1});function sM(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=Wj,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=oM}=e;if(!(a instanceof ck))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],u=[c.support,Hj],d;s&&u.push(fM),n instanceof Ne?(u.push(n.support),d=n.language):n&&(d=n);let f=t||d?Kj(t,d):void 0;l.push(bfe({codeParser:f,htmlParser:c.language.parser})),i&&u.push(de.high(r.of(aM)));let p=Uj(a.configure(l));return o&&u.push(p.data.of({autocomplete:cM})),new Ne(p,u)}function cM(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=p(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:uM(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var lM=null;function uM(){if(lM)return lM;let e=Ej(new Ze(Ee.create({extensions:oM}),0,!0));return lM=e?e.options:[]}var dM=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,fM=I.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!Gj.isActiveAt(t.state,n.from,1)))return!1;let i=p(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||dM.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),a?!1:(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}}),pM=63,mM=64,hM=1,gM=2,_M=3,vM=4,yM=5,bM=6,xM=7,SM=65,CM=66,wM=8,TM=9,EM=10,DM=11,OM=12,kM=13,AM=19,jM=20,MM=29,NM=33,wpe=34,Tpe=47,Epe=0,PM=1,FM=2,IM=3,LM=4,RM=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};RM.top=new RM(null,-1,Epe);function zM(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(VM(t)||t==-1)return n}}function BM(e){return e==32||e==9}function VM(e){return e==10||e==13}function HM(e){return BM(e)||VM(e)}function UM(e){return e<0||HM(e)}var Dpe=new Me({start:RM.top,reduce(e,t){return e.type==IM&&(t==jM||t==wpe)?e.parent:e},shift(e,t,n,r){if(t==_M)return new RM(e,zM(r,r.pos),PM);if(t==SM||t==yM)return new RM(e,zM(r,r.pos),FM);if(t==pM)return e.parent;if(t==AM||t==NM)return new RM(e,0,IM);if(t==kM&&e.type==LM)return e.parent;if(t==Tpe){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new RM(e,e.depth+ +t[0],LM)}return e},hash(e){return e.hash}});function WM(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&UM(e.peek(n+3))}var Ope=new Se((e,t)=>{if(e.next==-1&&t.canShift(mM))return e.acceptToken(mM);let n=e.peek(-1);if((VM(n)||n<0)&&t.context.type!=IM){if(WM(e,45))if(t.canShift(pM))e.acceptToken(pM);else return e.acceptToken(hM,3);if(WM(e,46))if(t.canShift(pM))e.acceptToken(pM);else return e.acceptToken(gM,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==PM&&(e.next!=45||!UM(e.peek(1))))&&e.next!=-1&&!VM(e.next)&&e.next!=35&&e.acceptToken(pM,-n)}},{contextual:!0}),kpe=new Se((e,t)=>{if(t.context.type==IM){e.next==63&&(e.advance(),UM(e.next)&&e.acceptToken(xM));return}if(e.next==45)e.advance(),UM(e.next)&&e.acceptToken(t.context.type==PM&&t.context.depth==zM(e,e.pos-1)?vM:_M);else if(e.next==63)e.advance(),UM(e.next)&&e.acceptToken(t.context.type==FM&&t.context.depth==zM(e,e.pos-1)?bM:yM);else{let n=e.pos;for(;;)if(BM(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)qM(e);else if(e.next==38)JM(e);else if(e.next==42){JM(e);break}else if(e.next==39||e.next==34){if(YM(e,!0))break;return}else if(e.next==91||e.next==123){if(!jpe(e))return;break}else{QM(e,!0,!1,0);break}for(;BM(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(MM))return;UM(e.peek(1))&&e.acceptTokenTo(t.context.type==FM&&t.context.depth==zM(e,n)?CM:SM,n)}}},{contextual:!0});function Ape(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function GM(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function KM(e,t){return e.next==37?(e.advance(),GM(e.next)&&e.advance(),GM(e.next)&&e.advance(),!0):Ape(e.next)||t&&e.next==44?(e.advance(),!0):!1}function qM(e){if(e.advance(),e.next==60){for(e.advance();;)if(!KM(e,!0)){e.next==62&&e.advance();break}}else for(;KM(e,!1););}function JM(e){for(e.advance();!UM(e.next)&&XM(e.tag)!=`f`;)e.advance()}function YM(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n)if(a==39)if(e.next==39)e.advance();else break;else break;else if(a==92&&n==34)e.next>=0&&e.advance();else if(VM(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function jpe(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!YM(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||VM(e.next))return!1;else e.advance()}var Mpe=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function XM(e){return e<33?`u`:e>125?`s`:Mpe[e-33]}function ZM(e,t){let n=XM(e);return n!=`u`&&!(t&&n==`f`)}function QM(e,t,n,r){if(XM(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&ZM(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;HM(a);){if(VM(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?ZM(e.peek(o+1),n):a==35?e.peek(o-1)!=32:ZM(a,n)))||!n&&s<=r||s==0&&!n&&(WM(e,45,o)||WM(e,46,o)))break;if(t&&XM(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var Npe=new Se((e,t)=>{if(e.next==33)qM(e),e.acceptToken(OM);else if(e.next==38||e.next==42){let t=e.next==38?EM:DM;JM(e),e.acceptToken(t)}else e.next==39||e.next==34?(YM(e,!1),e.acceptToken(TM)):QM(e,!1,t.context.type==IM,t.context.depth)&&e.acceptToken(wM)}),Ppe=new Se((e,t)=>{let n=t.context.type==LM?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(WM(e,45,i)||WM(e,46,i))||!VM(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=VM(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(kM,r)}),Fpe=b({DirectiveName:A.keyword,DirectiveContent:A.attributeValue,"DirectiveEnd DocEnd":A.meta,QuotedLiteral:A.string,BlockLiteralHeader:A.special(A.string),BlockLiteralContent:A.content,Literal:A.content,"Key/Literal Key/QuotedLiteral":A.definition(A.propertyName),"Anchor Alias":A.labelName,Tag:A.typeName,Comment:A.lineComment,": , -":A.separator,"?":A.punctuation,"[ ]":A.squareBracket,"{ }":A.brace}),Ipe=Oe.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:Dpe,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[Fpe],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[Ope,kpe,Npe,Ppe,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),Lpe=Oe.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:`!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~`,goto:`vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS`,nodeNames:`⚠ Document Frontmatter DashLine FrontmatterContent Body`,maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),$M=Ae.define({name:`yaml`,parser:Ipe.configure({props:[l.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:Fe({closing:`}`}),FlowSequence:Fe({closing:`]`})}),s.add({"FlowMapping FlowSequence":ze,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function eN(){return new Ne($M)}Ae.define({name:`yaml-frontmatter`,parser:Lpe.configure({props:[b({DashLine:A.meta})]})});function X(e){return new Ne(ce.define(e))}function tN(e){return q(()=>import(`./dist-DVFW0GyF.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([98,99,100]))}var Rpe=[U.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return q(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),U.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return q(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),U.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return tN(`Cassandra`)}}),U.of({name:`CSS`,extensions:[`css`],load(){return q(()=>import(`./dist-y9aZTMms.js`).then(e=>e.css()),__vite__mapDeps([102,100]))}}),U.of({name:`Go`,extensions:[`go`],load(){return q(()=>import(`./dist-CLKxKEQH.js`).then(e=>e.go()),__vite__mapDeps([103,99,100]))}}),U.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return q(()=>import(`./dist-BNNep2NV.js`).then(e=>e.html()),__vite__mapDeps([104,105,1,99,100]))}}),U.of({name:`Java`,extensions:[`java`],load(){return q(()=>import(`./dist-BiexWhMB.js`).then(e=>e.java()),__vite__mapDeps([106,100]))}}),U.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return q(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([105,1,99,100]))}}),U.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return q(()=>import(`./dist-DKZbBcYn.js`).then(e=>e.jinja()),__vite__mapDeps([107,105,1,99,100]))}}),U.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return q(()=>import(`./dist-Ky-fb63H.js`).then(e=>e.json()),__vite__mapDeps([108,100]))}}),U.of({name:`JSX`,extensions:[`jsx`],load(){return q(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([105,1,99,100]))}}),U.of({name:`LESS`,extensions:[`less`],load(){return q(()=>import(`./dist-CXGBVAg6.js`).then(e=>e.less()),__vite__mapDeps([109,100]))}}),U.of({name:`Liquid`,extensions:[`liquid`],load(){return q(()=>import(`./dist-DBjExBIn.js`).then(e=>e.liquid()),__vite__mapDeps([110,105,1,99,100]))}}),U.of({name:`MariaDB SQL`,load(){return tN(`MariaSQL`)}}),U.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return q(()=>import(`./dist-B_u-l1Yw.js`).then(e=>e.markdown()),__vite__mapDeps([111,105,1,99,100]))}}),U.of({name:`MS SQL`,load(){return tN(`MSSQL`)}}),U.of({name:`MySQL`,load(){return tN(`MySQL`)}}),U.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return q(()=>import(`./dist-BFqpuvkT.js`).then(e=>e.php()),__vite__mapDeps([112,105,1,99,100]))}}),U.of({name:`PLSQL`,extensions:[`pls`],load(){return tN(`PLSQL`)}}),U.of({name:`PostgreSQL`,load(){return tN(`PostgreSQL`)}}),U.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return q(()=>import(`./dist-ExQdmG6u.js`).then(e=>e.python()),__vite__mapDeps([113,99,100]))}}),U.of({name:`Rust`,extensions:[`rs`],load(){return q(()=>import(`./dist-BNF0fuPB.js`).then(e=>e.rust()),__vite__mapDeps([114,100]))}}),U.of({name:`Sass`,extensions:[`sass`],load(){return q(()=>import(`./dist-CmH6Ad9e.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([115,100]))}}),U.of({name:`SCSS`,extensions:[`scss`],load(){return q(()=>import(`./dist-CmH6Ad9e.js`).then(e=>e.sass()),__vite__mapDeps([115,100]))}}),U.of({name:`SQL`,extensions:[`sql`],load(){return tN(`StandardSQL`)}}),U.of({name:`SQLite`,load(){return tN(`SQLite`)}}),U.of({name:`TSX`,extensions:[`tsx`],load(){return q(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),U.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return q(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),U.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return q(()=>import(`./dist-CRs-U2qz.js`).then(e=>e.wast()),__vite__mapDeps([116,100]))}}),U.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return q(()=>import(`./dist-CbIYKZT0.js`).then(e=>e.xml()),__vite__mapDeps([117,100]))}}),U.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return q(()=>import(`./dist-tjvftgmy.js`).then(e=>e.yaml()),__vite__mapDeps([118,100]))}}),U.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return q(()=>import(`./apl-CJPt5sW7.js`).then(e=>X(e.apl)),[])}}),U.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return q(()=>import(`./asciiarmor-D0oCypDs.js`).then(e=>X(e.asciiArmor)),[])}}),U.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return q(()=>import(`./asn1-8xgVfRoq.js`).then(e=>X(e.asn1({}))),[])}}),U.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return q(()=>import(`./asterisk-B5kv5AQp.js`).then(e=>X(e.asterisk)),[])}}),U.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return q(()=>import(`./brainfuck-Dh7M1Ucz.js`).then(e=>X(e.brainfuck)),[])}}),U.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return q(()=>import(`./cobol-D3WLbLVy.js`).then(e=>X(e.cobol)),[])}}),U.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.csharp)),[])}}),U.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return q(()=>import(`./clojure-CdWlIeQh.js`).then(e=>X(e.clojure)),[])}}),U.of({name:`ClojureScript`,extensions:[`cljs`],load(){return q(()=>import(`./clojure-CdWlIeQh.js`).then(e=>X(e.clojure)),[])}}),U.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return q(()=>import(`./css-_6KgQwpu.js`).then(e=>X(e.gss)),[])}}),U.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return q(()=>import(`./cmake-wWuF5ifR.js`).then(e=>X(e.cmake)),[])}}),U.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return q(()=>import(`./coffeescript-DRtt-5a2.js`).then(e=>X(e.coffeeScript)),[])}}),U.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return q(()=>import(`./commonlisp-DJV75lsU.js`).then(e=>X(e.commonLisp)),[])}}),U.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return q(()=>import(`./cypher-B3uWx7jm.js`).then(e=>X(e.cypher)),[])}}),U.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return q(()=>import(`./python-2pwcWoy7.js`).then(e=>X(e.cython)),[])}}),U.of({name:`Crystal`,extensions:[`cr`],load(){return q(()=>import(`./crystal-C7mEw92C.js`).then(e=>X(e.crystal)),[])}}),U.of({name:`D`,extensions:[`d`],load(){return q(()=>import(`./d-D3kOh3JF.js`).then(e=>X(e.d)),[])}}),U.of({name:`Dart`,extensions:[`dart`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.dart)),[])}}),U.of({name:`diff`,extensions:[`diff`,`patch`],load(){return q(()=>import(`./diff-CoamybWh.js`).then(e=>X(e.diff)),[])}}),U.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return q(()=>import(`./dockerfile-Ci0-ApQC.js`).then(e=>X(e.dockerFile)),__vite__mapDeps([119,120]))}}),U.of({name:`DTD`,extensions:[`dtd`],load(){return q(()=>import(`./dtd-BjGQwMWL.js`).then(e=>X(e.dtd)),[])}}),U.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return q(()=>import(`./dylan-B9W3X2GI.js`).then(e=>X(e.dylan)),[])}}),U.of({name:`EBNF`,load(){return q(()=>import(`./ebnf-d5D0otVn.js`).then(e=>X(e.ebnf)),[])}}),U.of({name:`ECL`,extensions:[`ecl`],load(){return q(()=>import(`./ecl-C5Q_IBPt.js`).then(e=>X(e.ecl)),[])}}),U.of({name:`edn`,extensions:[`edn`],load(){return q(()=>import(`./clojure-CdWlIeQh.js`).then(e=>X(e.clojure)),[])}}),U.of({name:`Eiffel`,extensions:[`e`],load(){return q(()=>import(`./eiffel-BQA_6I3b.js`).then(e=>X(e.eiffel)),[])}}),U.of({name:`Elm`,extensions:[`elm`],load(){return q(()=>import(`./elm-unPS17vB.js`).then(e=>X(e.elm)),[])}}),U.of({name:`Erlang`,extensions:[`erl`],load(){return q(()=>import(`./erlang-R8nOsUTx.js`).then(e=>X(e.erlang)),[])}}),U.of({name:`Esper`,load(){return q(()=>import(`./sql-CwA10oIk.js`).then(e=>X(e.esper)),[])}}),U.of({name:`Factor`,extensions:[`factor`],load(){return q(()=>import(`./factor-DMvifS-k.js`).then(e=>X(e.factor)),__vite__mapDeps([121,120]))}}),U.of({name:`FCL`,load(){return q(()=>import(`./fcl-CVAfW9wK.js`).then(e=>X(e.fcl)),[])}}),U.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return q(()=>import(`./forth-DHbsK8X8.js`).then(e=>X(e.forth)),[])}}),U.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return q(()=>import(`./fortran-4jMwxW9-.js`).then(e=>X(e.fortran)),[])}}),U.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return q(()=>import(`./mllike-iZXopbca.js`).then(e=>X(e.fSharp)),[])}}),U.of({name:`Gas`,extensions:[`s`],load(){return q(()=>import(`./gas-zC_XGrQT.js`).then(e=>X(e.gas)),[])}}),U.of({name:`Gherkin`,extensions:[`feature`],load(){return q(()=>import(`./gherkin-CPBQou3u.js`).then(e=>X(e.gherkin)),[])}}),U.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return q(()=>import(`./groovy-Cqopym0q.js`).then(e=>X(e.groovy)),[])}}),U.of({name:`Haskell`,extensions:[`hs`],load(){return q(()=>import(`./haskell-imzbNPgF.js`).then(e=>X(e.haskell)),[])}}),U.of({name:`Haxe`,extensions:[`hx`],load(){return q(()=>import(`./haxe-Doh225Ku.js`).then(e=>X(e.haxe)),[])}}),U.of({name:`HXML`,extensions:[`hxml`],load(){return q(()=>import(`./haxe-Doh225Ku.js`).then(e=>X(e.hxml)),[])}}),U.of({name:`HTTP`,load(){return q(()=>import(`./http-j4R5uEso.js`).then(e=>X(e.http)),[])}}),U.of({name:`IDL`,extensions:[`pro`],load(){return q(()=>import(`./idl-l9d1__Hj.js`).then(e=>X(e.idl)),[])}}),U.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return q(()=>import(`./javascript-BcqCeS4O.js`).then(e=>X(e.jsonld)),[])}}),U.of({name:`Julia`,extensions:[`jl`],load(){return q(()=>import(`./julia-BU0qBb1w.js`).then(e=>X(e.julia)),[])}}),U.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.kotlin)),[])}}),U.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return q(()=>import(`./livescript-uk34VDGK.js`).then(e=>X(e.liveScript)),[])}}),U.of({name:`Lua`,extensions:[`lua`],load(){return q(()=>import(`./lua-ClQGOv84.js`).then(e=>X(e.lua)),[])}}),U.of({name:`mIRC`,extensions:[`mrc`],load(){return q(()=>import(`./mirc-DRRKKkcJ.js`).then(e=>X(e.mirc)),[])}}),U.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return q(()=>import(`./mathematica-BDmKpvRN.js`).then(e=>X(e.mathematica)),[])}}),U.of({name:`Modelica`,extensions:[`mo`],load(){return q(()=>import(`./modelica-DP8T2DKM.js`).then(e=>X(e.modelica)),[])}}),U.of({name:`MUMPS`,extensions:[`mps`],load(){return q(()=>import(`./mumps-BKUS05-y.js`).then(e=>X(e.mumps)),[])}}),U.of({name:`Mbox`,extensions:[`mbox`],load(){return q(()=>import(`./mbox-T5kA6jAQ.js`).then(e=>X(e.mbox)),[])}}),U.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return q(()=>import(`./nginx-CzYOtr2G.js`).then(e=>X(e.nginx)),[])}}),U.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return q(()=>import(`./nsis-BbRIeGvl.js`).then(e=>X(e.nsis)),__vite__mapDeps([122,120]))}}),U.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return q(()=>import(`./ntriples-ZgZuaYbW.js`).then(e=>X(e.ntriples)),[])}}),U.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.objectiveC)),[])}}),U.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.objectiveCpp)),[])}}),U.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return q(()=>import(`./mllike-iZXopbca.js`).then(e=>X(e.oCaml)),[])}}),U.of({name:`Octave`,extensions:[`m`],load(){return q(()=>import(`./octave-CnOndUN3.js`).then(e=>X(e.octave)),[])}}),U.of({name:`Oz`,extensions:[`oz`],load(){return q(()=>import(`./oz-DjW322Rn.js`).then(e=>X(e.oz)),[])}}),U.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return q(()=>import(`./pascal-BdeW5uRX.js`).then(e=>X(e.pascal)),[])}}),U.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return q(()=>import(`./perl-_CDvIe1D.js`).then(e=>X(e.perl)),[])}}),U.of({name:`Pig`,extensions:[`pig`],load(){return q(()=>import(`./pig-inWo_B4W.js`).then(e=>X(e.pig)),[])}}),U.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return q(()=>import(`./powershell-CO5KWJsy.js`).then(e=>X(e.powerShell)),[])}}),U.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return q(()=>import(`./properties-CjVp4a6M.js`).then(e=>X(e.properties)),[])}}),U.of({name:`ProtoBuf`,extensions:[`proto`],load(){return q(()=>import(`./protobuf-DybFT2KT.js`).then(e=>X(e.protobuf)),[])}}),U.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return q(()=>import(`./pug-D1ZtszdL.js`).then(e=>X(e.pug)),__vite__mapDeps([123,124]))}}),U.of({name:`Puppet`,extensions:[`pp`],load(){return q(()=>import(`./puppet-Dw_NDgko.js`).then(e=>X(e.puppet)),[])}}),U.of({name:`Q`,extensions:[`q`],load(){return q(()=>import(`./q-C47l8kdS.js`).then(e=>X(e.q)),[])}}),U.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return q(()=>import(`./r-BmcXGVZ5.js`).then(e=>X(e.r)),[])}}),U.of({name:`RPM Changes`,load(){return q(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>X(e.rpmChanges)),[])}}),U.of({name:`RPM Spec`,extensions:[`spec`],load(){return q(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>X(e.rpmSpec)),[])}}),U.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return q(()=>import(`./ruby-Dl-I4pxG.js`).then(e=>X(e.ruby)),[])}}),U.of({name:`SAS`,extensions:[`sas`],load(){return q(()=>import(`./sas-Bxkg4GVX.js`).then(e=>X(e.sas)),[])}}),U.of({name:`Scala`,extensions:[`scala`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.scala)),[])}}),U.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return q(()=>import(`./scheme-CO3zogua.js`).then(e=>X(e.scheme)),[])}}),U.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return q(()=>import(`./shell-gYrTvBTP.js`).then(e=>X(e.shell)),[])}}),U.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return q(()=>import(`./sieve-COX4Kn1X.js`).then(e=>X(e.sieve)),[])}}),U.of({name:`Smalltalk`,extensions:[`st`],load(){return q(()=>import(`./smalltalk-Dma1z5eE.js`).then(e=>X(e.smalltalk)),[])}}),U.of({name:`Solr`,load(){return q(()=>import(`./solr-BvhcdkNH.js`).then(e=>X(e.solr)),[])}}),U.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return q(()=>import(`./mllike-iZXopbca.js`).then(e=>X(e.sml)),[])}}),U.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return q(()=>import(`./sparql-gX7W9xeh.js`).then(e=>X(e.sparql)),[])}}),U.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return q(()=>import(`./spreadsheet-BnlQRxWz.js`).then(e=>X(e.spreadsheet)),[])}}),U.of({name:`Squirrel`,extensions:[`nut`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.squirrel)),[])}}),U.of({name:`Stylus`,extensions:[`styl`],load(){return q(()=>import(`./stylus-9ZGSp3KB.js`).then(e=>X(e.stylus)),[])}}),U.of({name:`Swift`,extensions:[`swift`],load(){return q(()=>import(`./swift-CurfpLXH.js`).then(e=>X(e.swift)),[])}}),U.of({name:`sTeX`,load(){return q(()=>import(`./stex-DhLUylSV.js`).then(e=>X(e.stex)),[])}}),U.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return q(()=>import(`./stex-DhLUylSV.js`).then(e=>X(e.stex)),[])}}),U.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return q(()=>import(`./verilog-BFxB5RAN.js`).then(e=>X(e.verilog)),[])}}),U.of({name:`Tcl`,extensions:[`tcl`],load(){return q(()=>import(`./tcl-BPvzXR-t.js`).then(e=>X(e.tcl)),[])}}),U.of({name:`Textile`,extensions:[`textile`],load(){return q(()=>import(`./textile-BUq3vgBH.js`).then(e=>X(e.textile)),[])}}),U.of({name:`TiddlyWiki`,load(){return q(()=>import(`./tiddlywiki-DRR6E4hS.js`).then(e=>X(e.tiddlyWiki)),[])}}),U.of({name:`Tiki wiki`,load(){return q(()=>import(`./tiki-C1XMixgx.js`).then(e=>X(e.tiki)),[])}}),U.of({name:`TOML`,extensions:[`toml`],load(){return q(()=>import(`./toml-BQjoWSzq.js`).then(e=>X(e.toml)),[])}}),U.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return q(()=>import(`./troff-DbgTp3Cj.js`).then(e=>X(e.troff)),[])}}),U.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return q(()=>import(`./ttcn-1OxchGWH.js`).then(e=>X(e.ttcn)),[])}}),U.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return q(()=>import(`./ttcn-cfg-CC8OhyHu.js`).then(e=>X(e.ttcnCfg)),[])}}),U.of({name:`Turtle`,extensions:[`ttl`],load(){return q(()=>import(`./turtle-D1WjVU4-.js`).then(e=>X(e.turtle)),[])}}),U.of({name:`Web IDL`,extensions:[`webidl`],load(){return q(()=>import(`./webidl-advQMGTP.js`).then(e=>X(e.webIDL)),[])}}),U.of({name:`VB.NET`,extensions:[`vb`],load(){return q(()=>import(`./vb-Bf-XXYNJ.js`).then(e=>X(e.vb)),[])}}),U.of({name:`VBScript`,extensions:[`vbs`],load(){return q(()=>import(`./vbscript-HeSyWuOi.js`).then(e=>X(e.vbScript)),[])}}),U.of({name:`Velocity`,extensions:[`vtl`],load(){return q(()=>import(`./velocity-CUkiDsJQ.js`).then(e=>X(e.velocity)),[])}}),U.of({name:`Verilog`,extensions:[`v`],load(){return q(()=>import(`./verilog-BFxB5RAN.js`).then(e=>X(e.verilog)),[])}}),U.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return q(()=>import(`./vhdl-BJUXQE-6.js`).then(e=>X(e.vhdl)),[])}}),U.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return q(()=>import(`./xquery-CNzoFgd7.js`).then(e=>X(e.xQuery)),[])}}),U.of({name:`Yacas`,extensions:[`ys`],load(){return q(()=>import(`./yacas-BsmlDKac.js`).then(e=>X(e.yacas)),[])}}),U.of({name:`Z80`,extensions:[`z80`],load(){return q(()=>import(`./z80-Bnez4vZ_.js`).then(e=>X(e.z80)),[])}}),U.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return q(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>X(e.mscgen)),[])}}),U.of({name:`Xù`,extensions:[`xu`],load(){return q(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>X(e.xu)),[])}}),U.of({name:`MsGenny`,extensions:[`msgenny`],load(){return q(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>X(e.msgenny)),[])}}),U.of({name:`Vue`,extensions:[`vue`],load(){return q(()=>import(`./dist-ClTBYSyP.js`).then(e=>e.vue()),__vite__mapDeps([125,105,1,99,100]))}}),U.of({name:`Angular Template`,load(){return q(()=>import(`./dist-CRvuTuq9.js`).then(e=>e.angular()),__vite__mapDeps([126,105,1,99,100]))}})],nN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},zpe={borderLeftWidth:`2px`},rN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},iN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},aN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Bpe={borderRadius:`2px`},oN={borderRadius:`2px`},sN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},cN={width:`12px`,height:`12px`,borderRadius:`6px`},lN={borderRadius:`4px`,padding:`2px 6px`},uN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},dN=`#0d1117`,fN=`#c9d1d9`,pN=`#264F78`,mN=`#8b949e`,hN=`#ffffff`,gN=`#7ee787`,_N=`#d2a8ff`,vN=`#79c0ff`,yN=`#ff7b72`,bN=`#a5d6ff`,Vpe=`#2c333a`,Hpe=`#3c444d`,xN=`#ffab70`,SN=`#161b22`,CN=`#30363d`,Upe=`#21262d`,wN=`#f97583`,Wpe=`#2d333b1a`,TN=`#21262d`,EN=hN,DN=pN,Gpe=`#3a587a75`,ON=`#4d90fe`,kN=`#d29922`,Kpe=`#3a587a55`,AN=`#58a6ff`,qpe=`#bc8cff`,jN=`#2ea04350`,MN=`#f8514940`,NN=`#7ee787`,PN=`#ff7b72`,FN=[I.theme({"&":{color:fN,backgroundColor:dN,fontSize:nN.fontSize,fontFamily:nN.fontFamily},".cm-content":{caretColor:EN,lineHeight:nN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:EN,borderLeftWidth:zpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${EN}99`,color:dN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:DN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#3a587a`,outline:`1px solid ${vN}`,color:fN,borderRadius:lN.borderRadius,"& span":{color:fN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ON,color:hN,padding:lN.padding,"& span":{color:hN}},".cm-search.cm-panel.cm-textfield":{color:fN,borderRadius:lN.borderRadius,padding:lN.padding},".cm-panels":{backgroundColor:TN,color:fN,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${CN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${CN}`},".cm-panel button":{backgroundColor:TN,color:fN,border:aN.border,borderRadius:aN.borderRadius,padding:aN.padding},".cm-panel button:hover":{backgroundColor:Vpe},".cm-activeLine":{backgroundColor:Wpe,borderRadius:Bpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:SN,color:mN,border:iN.border,borderRight:`1px solid #30363d`,paddingRight:iN.paddingRight},".cm-activeLineGutter":{backgroundColor:Upe,color:fN,fontWeight:iN.fontWeight},".cm-lineNumbers":{fontSize:iN.fontSize,lineHeight:iN.lineHeight},".cm-foldGutter":{fontSize:iN.fontSize,lineHeight:iN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:mN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:fN},".cm-insertedLine":{textDecoration:rN.insertedTextDecoration,backgroundColor:jN,color:NN,padding:rN.insertedLinePadding,borderRadius:rN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:rN.insertedTextDecoration,backgroundColor:`${jN} !important`,color:NN,padding:rN.insertedLinePadding,borderRadius:rN.borderRadious,border:`1px solid ${NN}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:rN.deletedTextDecoration,backgroundColor:MN,color:PN,padding:rN.insertedLinePadding,borderRadius:rN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:rN.deletedTextDecoration,backgroundColor:`${MN} !important`,color:PN,padding:rN.insertedLinePadding,borderRadius:rN.borderRadious,border:`1px solid ${PN}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:TN,border:`1px solid ${CN}`,borderRadius:uN.borderRadius,padding:uN.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:TN,border:`none`},"& > ul > li":{padding:uN.padding,lineHeight:uN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:DN,color:hN,borderRadius:uN.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:mN,paddingRight:uN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:mN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:TN,borderBottomColor:TN},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${wN}`},"&-warning":{borderLeft:`3px solid ${kN}`},"&-info":{borderLeft:`3px solid ${AN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${wN}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${kN}`},".cm-matchingBracket":{backgroundColor:Gpe,outline:`1px solid ${ON}`,borderRadius:oN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9758340`,outline:`1px solid ${wN}`,borderRadius:oN.borderRadius},".cm-selectionMatch":{backgroundColor:Kpe,outline:`1px solid ${pN}50`,borderRadius:oN.borderRadius},".cm-foldPlaceholder":{backgroundColor:TN,color:mN,border:`1px dotted ${CN}70`,borderRadius:sN.borderRadius,padding:sN.padding,margin:sN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${dN}, 0 0 0 3px ${AN}40`},"& .cm-scroller::-webkit-scrollbar":{width:cN.width,height:cN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:SN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:CN,borderRadius:cN.borderRadius,border:`3px solid ${SN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Hpe},".cm-ghostText":{opacity:`0.5`,color:mN}},{dark:!0}),D(B.define([{tag:A.keyword,color:yN,fontWeight:`bold`},{tag:A.controlKeyword,color:yN,fontWeight:`bold`},{tag:A.moduleKeyword,color:yN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:vN},{tag:[A.variableName],color:vN},{tag:[A.propertyName],color:_N,fontStyle:`normal`},{tag:[A.typeName],color:yN},{tag:[A.className],color:_N,fontStyle:`italic`},{tag:[A.namespace],color:vN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:fN},{tag:[A.bracket],color:mN},{tag:[A.brace],color:mN},{tag:[A.punctuation],color:mN},{tag:[A.function(A.variableName),A.labelName],color:gN},{tag:[A.definition(A.variableName)],color:vN},{tag:A.number,color:xN},{tag:A.changed,color:xN},{tag:A.annotation,color:wN,fontStyle:`italic`},{tag:A.modifier,color:xN,fontStyle:`italic`},{tag:A.self,color:xN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:xN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:xN},{tag:[A.processingInstruction,A.inserted],color:gN},{tag:[A.special(A.string),A.regexp],color:bN},{tag:A.string,color:bN},{tag:A.definition(A.typeName),color:yN,fontWeight:`bold`},{tag:A.meta,color:mN},{tag:A.comment,fontStyle:`italic`,color:mN},{tag:A.docComment,fontStyle:`italic`,color:mN},{tag:[A.tagName],color:gN},{tag:[A.attributeName],color:_N},{tag:[A.heading],fontWeight:`bold`,color:vN},{tag:[A.strong],fontWeight:`bold`,color:vN},{tag:[A.emphasis],fontStyle:`italic`,color:bN},{tag:[A.link],color:qpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:AN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:fN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${wN}`},{tag:[A.strikethrough],color:wN,textDecoration:`line-through`},{tag:A.constant(A.name),color:xN},{tag:A.deleted,color:wN},{tag:A.squareBracket,color:mN},{tag:A.angleBracket,color:mN},{tag:A.monospace,color:fN},{tag:[A.contentSeparator],color:vN},{tag:A.quote,color:mN}]))],IN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Jpe={borderLeftWidth:`2px`},LN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},RN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},zN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Ype={borderRadius:`2px`},BN={borderRadius:`2px`},VN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},HN={width:`12px`,height:`12px`,borderRadius:`6px`},UN={borderRadius:`4px`,padding:`2px 6px`},WN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},GN=`#ffffff`,KN=`#24292e`,qN=`#BBDFFF`,JN=`#6e7781`,YN=`#f6f8fa`,Xpe=`#116329`,XN=`#6a737d`,ZN=`#6f42c1`,QN=`#005cc5`,$N=`#d73a49`,eP=`#032f62`,tP=`#22863a`,nP=`#e36209`,Zpe=`#f1f8ff`,rP=`#e1e4e8`,Qpe=`#f8f9fa`,iP=`#cb2431`,$pe=`#BBDFFF20`,aP=Qpe,oP=KN,eme=qN,tme=`#e8f0fe`,nme=`#0366d6`,sP=`#b08800`,cP=`#79b8ff40`,lP=`#0969da`,rme=`#8250df`,uP=`#e6ffec80`,dP=`#ffebe980`,fP=`#0f6d31`,pP=`#cf222e`,mP=[I.theme({"&":{color:KN,backgroundColor:GN,fontSize:IN.fontSize,fontFamily:IN.fontFamily},".cm-content":{caretColor:oP,lineHeight:IN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:oP,borderLeftWidth:Jpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${oP}99`,color:GN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:eme,color:KN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#daebff`,outline:`1px solid ${QN}`,color:KN,borderRadius:UN.borderRadius,"& span":{color:KN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#79b8ff`,color:GN,padding:UN.padding,"& span":{color:GN}},".cm-search.cm-panel.cm-textfield":{color:KN,borderRadius:UN.borderRadius,padding:UN.padding},".cm-panels":{backgroundColor:YN,color:JN,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${rP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${rP}`},".cm-panel button":{backgroundColor:GN,color:KN,border:zN.border,borderRadius:zN.borderRadius,padding:zN.padding},".cm-panel button:hover":{backgroundColor:`#f5f5f5`},".cm-activeLine":{backgroundColor:$pe,borderRadius:Ype.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:YN,color:JN,border:RN.border,borderRight:`1px solid ${rP}`,paddingRight:RN.paddingRight},".cm-activeLineGutter":{backgroundColor:Zpe,color:KN,fontWeight:RN.fontWeight},".cm-lineNumbers":{fontSize:RN.fontSize,lineHeight:RN.lineHeight},".cm-foldGutter":{fontSize:RN.fontSize,lineHeight:RN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:JN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:KN},".cm-insertedLine":{textDecoration:LN.insertedTextDecoration,backgroundColor:uP,color:fP,padding:LN.insertedLinePadding,borderRadius:LN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:LN.insertedTextDecoration,backgroundColor:`${uP} !important`,color:fP,padding:LN.insertedLinePadding,borderRadius:LN.borderRadious,border:`1px solid ${fP}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:LN.deletedTextDecoration,backgroundColor:dP,color:pP,padding:LN.insertedLinePadding,borderRadius:LN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:LN.deletedTextDecoration,backgroundColor:`${dP} !important`,color:pP,padding:LN.insertedLinePadding,borderRadius:LN.borderRadious,border:`1px solid ${pP}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:aP,border:`1px solid ${rP}`,borderRadius:WN.borderRadius,padding:WN.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:aP,border:`none`},"& > ul > li":{padding:WN.padding,lineHeight:WN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#0366d630`,color:KN,borderRadius:WN.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:`#0366d615`},"& > ul > li > span.cm-completionIcon":{color:JN,paddingRight:WN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:JN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:aP,borderBottomColor:aP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${iP}`},"&-warning":{borderLeft:`3px solid ${sP}`},"&-info":{borderLeft:`3px solid ${lP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${iP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${sP}`},".cm-matchingBracket":{backgroundColor:tme,outline:`1px solid ${nme}80`,borderRadius:BN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ffeef080`,outline:`1px solid ${iP}`,borderRadius:BN.borderRadius},".cm-selectionMatch":{backgroundColor:cP,outline:`1px solid ${qN}50`,borderRadius:BN.borderRadius},".cm-foldPlaceholder":{backgroundColor:cP,color:JN,border:`1px dotted ${rP}70`,borderRadius:VN.borderRadius,padding:VN.padding,margin:VN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${GN}, 0 0 0 3px ${lP}40`},"& .cm-scroller::-webkit-scrollbar":{width:HN.width,height:HN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:rP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:KN,borderRadius:HN.borderRadius,border:`3px solid ${rP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:XN},".cm-ghostText":{opacity:`0.5`,color:`#959da5`}},{dark:!1}),D(B.define([{tag:A.keyword,color:$N,fontWeight:`bold`},{tag:A.controlKeyword,color:$N,fontWeight:`bold`},{tag:A.moduleKeyword,color:$N,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:QN},{tag:[A.variableName],color:QN},{tag:[A.propertyName],color:ZN,fontStyle:`normal`},{tag:[A.typeName],color:$N},{tag:[A.className],color:ZN,fontStyle:`italic`},{tag:[A.namespace],color:QN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:KN},{tag:[A.bracket],color:XN},{tag:[A.brace],color:XN},{tag:[A.punctuation],color:XN},{tag:[A.function(A.variableName),A.labelName],color:tP},{tag:[A.definition(A.variableName)],color:QN},{tag:A.number,color:nP},{tag:A.changed,color:nP},{tag:A.annotation,color:iP,fontStyle:`italic`},{tag:A.modifier,color:nP,fontStyle:`italic`},{tag:A.self,color:nP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:nP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:nP},{tag:[A.processingInstruction,A.inserted],color:tP},{tag:[A.special(A.string),A.regexp],color:eP},{tag:A.string,color:eP},{tag:A.definition(A.typeName),color:$N,fontWeight:`bold`},{tag:A.meta,color:XN},{tag:A.comment,fontStyle:`italic`,color:XN},{tag:A.docComment,fontStyle:`italic`,color:XN},{tag:[A.tagName],color:Xpe},{tag:[A.attributeName],color:ZN},{tag:[A.heading],fontWeight:`bold`,color:QN},{tag:[A.strong],fontWeight:`bold`,color:QN},{tag:[A.emphasis],fontStyle:`italic`,color:eP},{tag:[A.link],color:rme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:lP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:KN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${iP}`},{tag:[A.strikethrough],color:iP,textDecoration:`line-through`},{tag:A.constant(A.name),color:nP},{tag:A.deleted,color:iP},{tag:A.squareBracket,color:XN},{tag:A.angleBracket,color:XN},{tag:A.monospace,color:KN},{tag:[A.contentSeparator],color:QN},{tag:A.quote,color:XN}]))],hP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},ime={borderLeftWidth:`2px`},gP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},_P={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},vP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ame={borderRadius:`2px`},yP={borderRadius:`2px`},bP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},xP={width:`12px`,height:`12px`,borderRadius:`6px`},SP={borderRadius:`4px`,padding:`2px 6px`},CP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},wP=`#282828`,TP=`#3c3836`,EP=`#504945`,DP=`#665c54`,ome=`#7c6f64`,OP=`#928374`,kP=`#fbf1c7`,AP=`#ebdbb2`,jP=`#fb4934`,MP=`#b8bb26`,NP=`#fabd2f`,PP=`#83a598`,FP=`#d3869b`,IP=`#8ec07c`,LP=`#fe8019`,RP=jP,sme=TP,cme=`#3c383660`,lme=wP,zP=TP,BP=EP,ume=`#665c5480`,VP=LP,dme=`#504945cc`,fme=NP,HP=NP,UP=PP,pme=FP,WP=`#32361a80`,GP=`#3c1f1e80`,KP=`#b8bb26`,qP=`#fb4934`,mme=[I.theme({"&":{color:AP,backgroundColor:lme,fontSize:hP.fontSize,fontFamily:hP.fontFamily},".cm-content":{caretColor:VP,lineHeight:hP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:VP,borderLeftWidth:ime.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${VP}99`,color:wP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:BP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#b57614cc`,outline:`1px solid ${NP}`,color:kP,borderRadius:SP.borderRadius,"& span":{color:kP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:LP,color:wP,padding:SP.padding,"& span":{color:wP}},".cm-search.cm-panel.cm-textfield":{color:AP,borderRadius:SP.borderRadius,padding:SP.padding},".cm-panels":{backgroundColor:zP,color:AP,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${DP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${DP}`},".cm-panel button":{backgroundColor:zP,color:AP,border:vP.border,borderRadius:vP.borderRadius,padding:vP.padding},".cm-panel button:hover":{backgroundColor:EP},".cm-activeLine":{backgroundColor:cme,borderRadius:ame.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:TP,color:OP,border:_P.border,borderRight:`1px solid ${EP}`,paddingRight:_P.paddingRight},".cm-activeLineGutter":{backgroundColor:sme,color:AP,fontWeight:_P.fontWeight},".cm-lineNumbers":{fontSize:_P.fontSize,lineHeight:_P.lineHeight},".cm-foldGutter":{fontSize:_P.fontSize,lineHeight:_P.lineHeight},".cm-foldGutter .cm-gutterElement":{color:OP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:AP},".cm-insertedLine":{textDecoration:gP.insertedTextDecoration,backgroundColor:WP,color:KP,padding:gP.insertedLinePadding,borderRadius:gP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:gP.insertedTextDecoration,backgroundColor:`${WP} !important`,color:KP,padding:gP.insertedLinePadding,borderRadius:gP.borderRadious,border:`1px solid ${KP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:gP.deletedTextDecoration,backgroundColor:GP,color:qP,padding:gP.insertedLinePadding,borderRadius:gP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:gP.deletedTextDecoration,backgroundColor:`${GP} !important`,color:qP,padding:gP.insertedLinePadding,borderRadius:gP.borderRadious,border:`1px solid ${qP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:zP,border:`1px solid ${DP}`,borderRadius:CP.borderRadius,padding:CP.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:zP,border:`none`},"& > ul > li":{padding:CP.padding,lineHeight:CP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:BP,color:kP,borderRadius:CP.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:OP,paddingRight:CP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:OP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:zP,borderBottomColor:zP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${RP}`},"&-warning":{borderLeft:`3px solid ${HP}`},"&-info":{borderLeft:`3px solid ${UP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${RP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${HP}`},".cm-matchingBracket":{backgroundColor:dme,outline:`1px solid ${fme}`,borderRadius:yP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#cc241d55`,outline:`1px solid ${RP}`,borderRadius:yP.borderRadius},".cm-selectionMatch":{backgroundColor:ume,outline:`1px solid ${DP}`,borderRadius:yP.borderRadius},".cm-foldPlaceholder":{backgroundColor:zP,color:OP,border:`1px dotted ${DP}`,borderRadius:bP.borderRadius,padding:bP.padding,margin:bP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${wP}, 0 0 0 3px ${LP}40`},"& .cm-scroller::-webkit-scrollbar":{width:xP.width,height:xP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:TP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:DP,borderRadius:xP.borderRadius,border:`3px solid ${TP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:ome},".cm-ghostText":{opacity:`0.5`,color:OP}},{dark:!0}),D(B.define([{tag:A.keyword,color:jP,fontWeight:`bold`},{tag:A.controlKeyword,color:jP,fontWeight:`bold`},{tag:A.moduleKeyword,color:jP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:PP},{tag:[A.variableName],color:PP},{tag:[A.propertyName],color:IP,fontStyle:`normal`},{tag:[A.typeName],color:IP},{tag:[A.className],color:NP,fontStyle:`italic`},{tag:[A.namespace],color:PP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:AP},{tag:[A.bracket],color:OP},{tag:[A.brace],color:OP},{tag:[A.punctuation],color:OP},{tag:[A.function(A.variableName),A.labelName],color:NP},{tag:[A.definition(A.variableName)],color:PP},{tag:A.number,color:FP},{tag:A.changed,color:FP},{tag:A.annotation,color:RP,fontStyle:`italic`},{tag:A.modifier,color:FP,fontStyle:`italic`},{tag:A.self,color:FP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:LP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:LP},{tag:[A.processingInstruction,A.inserted],color:MP},{tag:[A.special(A.string),A.regexp],color:MP},{tag:A.string,color:MP},{tag:A.definition(A.typeName),color:IP,fontWeight:`bold`},{tag:A.meta,color:OP},{tag:A.comment,fontStyle:`italic`,color:OP},{tag:A.docComment,fontStyle:`italic`,color:OP},{tag:[A.tagName],color:jP},{tag:[A.attributeName],color:NP},{tag:[A.heading],fontWeight:`bold`,color:NP},{tag:[A.strong],fontWeight:`bold`,color:NP},{tag:[A.emphasis],fontStyle:`italic`,color:MP},{tag:[A.link],color:pme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:UP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:AP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${RP}`},{tag:[A.strikethrough],color:RP,textDecoration:`line-through`},{tag:A.constant(A.name),color:LP},{tag:A.deleted,color:RP},{tag:A.squareBracket,color:OP},{tag:A.angleBracket,color:OP},{tag:A.monospace,color:AP},{tag:[A.contentSeparator],color:PP},{tag:A.quote,color:OP}]))],JP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},hme={borderLeftWidth:`2px`},YP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},XP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},ZP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},gme={borderRadius:`2px`},QP={borderRadius:`2px`},$P={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},eF={width:`12px`,height:`12px`,borderRadius:`6px`},tF={borderRadius:`4px`,padding:`2px 6px`},nF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},rF=`#3c3836`,_me=`#504945`,vme=`#665c54`,iF=`#7c6f64`,aF=`#928374`,oF=`#fbf1c7`,sF=`#ebdbb2`,cF=`#d5c4a1`,lF=`#bdae93`,yme=`#a89984`,uF=`#9d0006`,dF=`#79740e`,fF=`#b57614`,pF=`#076678`,mF=`#8f3f71`,hF=`#427b58`,gF=`#af3a03`,_F=uF,bme=sF,xme=`#ffc42e25`,Sme=oF,vF=sF,Cme=bme,wme=`#ffc42e40`,yF=gF,Tme=`#d5c4a180`,Eme=gF,bF=fF,xF=pF,Dme=mF,SF=`#d8e5bc80`,CF=`#f7cfcf80`,wF=`#79740e`,TF=`#9d0006`,Ome=[I.theme({"&":{color:rF,backgroundColor:Sme,fontSize:JP.fontSize,fontFamily:JP.fontFamily},".cm-content":{caretColor:yF,lineHeight:JP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:yF,borderLeftWidth:hme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${yF}99`,color:oF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Cme,color:rF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#ffc42e80`,outline:`1px solid ${gF}`,color:rF,borderRadius:tF.borderRadius,"& span":{color:rF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:gF,color:oF,padding:tF.padding,"& span":{color:oF}},".cm-search.cm-panel.cm-textfield":{color:rF,borderRadius:tF.borderRadius,padding:tF.padding},".cm-panels":{backgroundColor:sF,color:_me,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${lF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${lF}`},".cm-panel button":{backgroundColor:oF,color:rF,border:ZP.border,borderRadius:ZP.borderRadius,padding:ZP.padding},".cm-panel button:hover":{backgroundColor:cF},".cm-activeLine":{backgroundColor:xme,borderRadius:gme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:sF,color:iF,border:XP.border,borderRight:`1px solid ${lF}`,paddingRight:XP.paddingRight},".cm-activeLineGutter":{backgroundColor:cF,color:rF,fontWeight:XP.fontWeight},".cm-lineNumbers":{fontSize:XP.fontSize,lineHeight:XP.lineHeight},".cm-foldGutter":{fontSize:XP.fontSize,lineHeight:XP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:iF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:rF},".cm-insertedLine":{textDecoration:YP.insertedTextDecoration,backgroundColor:SF,color:wF,padding:YP.insertedLinePadding,borderRadius:YP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:YP.insertedTextDecoration,backgroundColor:`${SF} !important`,color:wF,padding:YP.insertedLinePadding,borderRadius:YP.borderRadious,border:`1px solid ${wF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:YP.deletedTextDecoration,backgroundColor:CF,color:TF,padding:YP.insertedLinePadding,borderRadius:YP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:YP.deletedTextDecoration,backgroundColor:`${CF} !important`,color:TF,padding:YP.insertedLinePadding,borderRadius:YP.borderRadious,border:`1px solid ${TF}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:vF,border:`1px solid ${lF}`,borderRadius:nF.borderRadius,padding:nF.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:vF,border:`none`},"& > ul > li":{padding:nF.padding,lineHeight:nF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:gF+`30`,color:rF,borderRadius:nF.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:gF+`15`},"& > ul > li > span.cm-completionIcon":{color:iF,paddingRight:nF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:iF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:vF,borderBottomColor:vF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${_F}`},"&-warning":{borderLeft:`3px solid ${bF}`},"&-info":{borderLeft:`3px solid ${xF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${_F}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${bF}`},".cm-matchingBracket":{backgroundColor:Tme,outline:`1px solid ${Eme}`,borderRadius:QP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#fb492740`,outline:`1px solid ${_F}`,borderRadius:QP.borderRadius},".cm-selectionMatch":{backgroundColor:wme,outline:`1px solid ${lF}`,borderRadius:QP.borderRadius},".cm-foldPlaceholder":{backgroundColor:`transparent`,color:vme,border:`1px dotted ${lF}`,borderRadius:$P.borderRadius,padding:$P.padding,margin:$P.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${oF}, 0 0 0 3px ${gF}40`},"& .cm-scroller::-webkit-scrollbar":{width:eF.width,height:eF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:oF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:lF,borderRadius:eF.borderRadius,border:`3px solid ${oF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:yme},".cm-ghostText":{opacity:`0.5`,color:aF}},{dark:!1}),D(B.define([{tag:A.keyword,color:uF,fontWeight:`bold`},{tag:A.controlKeyword,color:uF,fontWeight:`bold`},{tag:A.moduleKeyword,color:uF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:pF},{tag:[A.variableName],color:pF},{tag:[A.propertyName],color:hF,fontStyle:`normal`},{tag:[A.typeName],color:hF},{tag:[A.className],color:fF,fontStyle:`italic`},{tag:[A.namespace],color:pF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:rF},{tag:[A.bracket],color:aF},{tag:[A.brace],color:aF},{tag:[A.punctuation],color:aF},{tag:[A.function(A.variableName),A.labelName],color:fF},{tag:[A.definition(A.variableName)],color:pF},{tag:A.number,color:mF},{tag:A.changed,color:mF},{tag:A.annotation,color:_F,fontStyle:`italic`},{tag:A.modifier,color:mF,fontStyle:`italic`},{tag:A.self,color:mF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:gF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:gF},{tag:[A.processingInstruction,A.inserted],color:dF},{tag:[A.special(A.string),A.regexp],color:dF},{tag:A.string,color:dF},{tag:A.definition(A.typeName),color:hF,fontWeight:`bold`},{tag:A.meta,color:aF},{tag:A.comment,fontStyle:`italic`,color:aF},{tag:A.docComment,fontStyle:`italic`,color:aF},{tag:[A.tagName],color:uF},{tag:[A.attributeName],color:fF},{tag:[A.heading],fontWeight:`bold`,color:fF},{tag:[A.strong],fontWeight:`bold`,color:fF},{tag:[A.emphasis],fontStyle:`italic`,color:dF},{tag:[A.link],color:Dme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:xF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:rF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${_F}`},{tag:[A.strikethrough],color:_F,textDecoration:`line-through`},{tag:A.constant(A.name),color:gF},{tag:A.deleted,color:_F},{tag:A.squareBracket,color:aF},{tag:A.angleBracket,color:aF},{tag:A.monospace,color:rF},{tag:[A.contentSeparator],color:pF},{tag:A.quote,color:aF}]))],EF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},kme={borderLeftWidth:`2px`},DF={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},OF={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},kF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Ame={borderRadius:`2px`},AF={borderRadius:`2px`},jF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},MF={width:`12px`,height:`12px`,borderRadius:`6px`},NF={borderRadius:`4px`,padding:`2px 6px`},PF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},FF=`#212121`,IF=`#505d64`,LF=`#606f7a`,RF=`#707d8b`,jme=`#a0a4ae`,zF=`#bdbdbd`,BF=`#e0e0e0`,Mme=`#202325`,VF=`#ff5f52`,HF=`#ff6e40`,Nme=`#fa5788`,UF=`#facf4e`,WF=`#ffad42`,GF=`#56c8d8`,KF=`#7186f0`,qF=`#cf6edf`,Pme=`#6abf69`,Fme=`#99d066`,Ime=`#4ebaaa`,JF=VF,YF=Mme,Lme=`#2d333b30`,XF=FF,ZF=IF,QF=`#ffffff1f`,Rme=`#4A707A80`,$F=jme,zme=`#39496650`,Bme=GF,eI=WF,tI=GF,Vme=qF,nI=`#1e3d2780`,rI=`#4e282880`,iI=`#6abf69`,aI=`#ff5f52`,Hme=[I.theme({"&":{color:zF,backgroundColor:XF,fontSize:EF.fontSize,fontFamily:EF.fontFamily},".cm-content":{caretColor:$F,lineHeight:EF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:$F,borderLeftWidth:kme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${$F}99`,color:XF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:QF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#394966cc`,outline:`1px solid ${GF}`,color:BF,borderRadius:NF.borderRadius,"& span":{color:BF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:GF,color:XF,padding:NF.padding,"& span":{color:XF}},".cm-search.cm-panel.cm-textfield":{color:zF,borderRadius:NF.borderRadius,padding:NF.padding},".cm-panels":{backgroundColor:FF,color:zF,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${RF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${RF}`},".cm-panel button":{backgroundColor:ZF,color:zF,border:kF.border,borderRadius:kF.borderRadius,padding:kF.padding},".cm-panel button:hover":{backgroundColor:LF},".cm-activeLine":{backgroundColor:Lme,borderRadius:Ame.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:YF,color:RF,border:OF.border,borderRight:`1px solid ${IF}`,paddingRight:OF.paddingRight},".cm-activeLineGutter":{backgroundColor:`#252a2c`,color:zF,fontWeight:OF.fontWeight},".cm-lineNumbers":{fontSize:OF.fontSize,lineHeight:OF.lineHeight},".cm-foldGutter":{fontSize:OF.fontSize,lineHeight:OF.lineHeight},".cm-foldGutter .cm-gutterElement":{color:RF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:zF},".cm-insertedLine":{textDecoration:DF.insertedTextDecoration,backgroundColor:nI,color:iI,padding:DF.insertedLinePadding,borderRadius:DF.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:DF.insertedTextDecoration,backgroundColor:`${nI} !important`,color:iI,padding:DF.insertedLinePadding,borderRadius:DF.borderRadious,border:`1px solid ${iI}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:DF.deletedTextDecoration,backgroundColor:rI,color:aI,padding:DF.insertedLinePadding,borderRadius:DF.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:DF.deletedTextDecoration,backgroundColor:`${rI} !important`,color:aI,padding:DF.insertedLinePadding,borderRadius:DF.borderRadious,border:`1px solid ${aI}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:ZF,border:`1px solid ${RF}`,borderRadius:PF.borderRadius,padding:PF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:ZF,border:`none`},"& > ul > li":{padding:PF.padding,lineHeight:PF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:QF,color:BF,borderRadius:PF.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:RF,paddingRight:PF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:RF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ZF,borderBottomColor:ZF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${JF}`},"&-warning":{borderLeft:`3px solid ${eI}`},"&-info":{borderLeft:`3px solid ${tI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${JF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${eI}`},".cm-matchingBracket":{backgroundColor:zme,outline:`1px solid ${Bme}`,borderRadius:AF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ff5f5240`,outline:`1px solid ${JF}`,borderRadius:AF.borderRadius},".cm-selectionMatch":{backgroundColor:Rme,outline:`1px solid ${LF}50`,borderRadius:AF.borderRadius},".cm-foldPlaceholder":{backgroundColor:ZF,color:RF,border:`1px dotted ${RF}70`,borderRadius:jF.borderRadius,padding:jF.padding,margin:jF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${XF}, 0 0 0 3px ${GF}40`},"& .cm-scroller::-webkit-scrollbar":{width:MF.width,height:MF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:YF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:LF,borderRadius:MF.borderRadius,border:`3px solid ${YF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:RF},".cm-ghostText":{opacity:`0.5`,color:RF}},{dark:!0}),D(B.define([{tag:A.keyword,color:VF,fontWeight:`bold`},{tag:A.controlKeyword,color:VF,fontWeight:`bold`},{tag:A.moduleKeyword,color:VF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:KF},{tag:[A.variableName],color:Fme},{tag:[A.propertyName],color:qF,fontStyle:`normal`},{tag:[A.typeName],color:VF},{tag:[A.className],color:UF,fontStyle:`italic`},{tag:[A.namespace],color:KF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:zF},{tag:[A.bracket],color:RF},{tag:[A.brace],color:RF},{tag:[A.punctuation],color:RF},{tag:[A.function(A.variableName)],color:GF},{tag:[A.labelName],color:GF,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:GF},{tag:[A.definition(A.variableName)],color:KF},{tag:A.number,color:UF},{tag:A.changed,color:UF},{tag:A.annotation,color:JF,fontStyle:`italic`},{tag:A.modifier,color:HF,fontStyle:`italic`},{tag:A.self,color:HF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:HF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:HF},{tag:[A.processingInstruction,A.inserted],color:Pme},{tag:[A.special(A.string),A.regexp],color:Nme},{tag:A.string,color:WF},{tag:A.definition(A.typeName),color:VF,fontWeight:`bold`},{tag:A.meta,color:RF},{tag:A.comment,fontStyle:`italic`,color:RF},{tag:A.docComment,fontStyle:`italic`,color:RF},{tag:[A.tagName],color:qF},{tag:[A.attributeName],color:UF},{tag:[A.heading],fontWeight:`bold`,color:Ime},{tag:A.heading1,color:UF},{tag:A.heading2,color:WF},{tag:A.heading3,color:GF},{tag:A.heading4,color:KF},{tag:A.heading5,color:qF},{tag:A.heading6,color:VF},{tag:[A.strong],fontWeight:`bold`,color:KF},{tag:[A.emphasis],fontStyle:`italic`,color:WF},{tag:[A.link],color:Vme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:tI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:zF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${JF}`},{tag:[A.strikethrough],color:JF,textDecoration:`line-through`},{tag:A.constant(A.name),color:HF},{tag:A.deleted,color:JF},{tag:A.squareBracket,color:RF},{tag:A.angleBracket,color:RF},{tag:A.monospace,color:zF},{tag:[A.contentSeparator],color:KF},{tag:A.quote,color:RF}]))],oI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Ume={borderLeftWidth:`2px`},sI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},cI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},lI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Wme={borderRadius:`2px`},uI={borderRadius:`2px`},dI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},fI={width:`12px`,height:`12px`,borderRadius:`6px`},pI={borderRadius:`4px`,padding:`2px 6px`},mI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Gme=`#ffffff`,hI=`#f5f5f5`,gI=`#212121`,_I=`#757575`,vI=`#9e9e9e`,yI=`#424242`,Kme=`#eeeeee`,bI=`#fafafa`,xI=`#f44336`,SI=`#ff3e00`,CI=`#FF00E9FF`,qme=`#ffc107`,wI=`#ff9800`,TI=`#00acc1`,EI=`#3949ab`,DI=`#8e24aa`,OI=`#43a047`,kI=`#00897b`,AI=`#1e88e5`,jI=xI,Jme=`#00000008`,MI=Gme,NI=hI,Yme=`#DDEEFF`,Xme=`#90a4ae26`,PI=vI,Zme=`#DDEEFF80`,Qme=TI,FI=wI,II=TI,$me=DI,LI=`#ECEFF180`,RI=`#e6ffed80`,zI=`#ffebe980`,BI=`#28a745`,VI=`#d73a49`,ehe=[I.theme({"&":{color:gI,backgroundColor:MI,fontSize:oI.fontSize,fontFamily:oI.fontFamily},".cm-content":{caretColor:PI,lineHeight:oI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:PI,borderLeftWidth:Ume.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${gI}99`,color:MI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Yme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#FFA72680`,outline:`1px solid ${qme}`,color:gI,borderRadius:pI.borderRadius,"& span":{color:gI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:TI,color:MI,padding:pI.padding,"& span":{color:MI}},".cm-search.cm-panel.cm-textfield":{color:gI,borderRadius:pI.borderRadius,padding:pI.padding},".cm-panels":{backgroundColor:Kme,color:gI,borderRadius:`4px`,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${vI}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${vI}`},".cm-panel button":{backgroundColor:NI,color:gI,border:lI.border,borderRadius:lI.borderRadius,padding:lI.padding},".cm-panel button:hover":{backgroundColor:`#CFD8DC`},".cm-activeLine":{backgroundColor:Jme,borderRadius:Wme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:bI,color:_I,border:cI.border,borderRight:`1px solid ${vI}`,paddingRight:cI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#E0E0E0`,color:gI,fontWeight:cI.fontWeight},".cm-lineNumbers":{fontSize:cI.fontSize,lineHeight:cI.lineHeight},".cm-foldGutter":{fontSize:cI.fontSize,lineHeight:cI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:_I,cursor:`pointer`,transition:`color 0.15s ease`},".cm-foldGutter .cm-gutterElement:hover":{color:gI},".cm-insertedLine":{textDecoration:sI.insertedTextDecoration,backgroundColor:RI,color:BI,padding:sI.insertedLinePadding,borderRadius:sI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:sI.insertedTextDecoration,backgroundColor:`${RI} !important`,color:BI,padding:sI.insertedLinePadding,borderRadius:sI.borderRadious,border:`1px solid ${BI}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:sI.deletedTextDecoration,backgroundColor:zI,color:VI,padding:sI.insertedLinePadding,borderRadius:sI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:sI.deletedTextDecoration,backgroundColor:`${zI} !important`,color:VI,padding:sI.insertedLinePadding,borderRadius:sI.borderRadious,border:`1px solid ${VI}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:NI,border:`1px solid ${vI}`,borderRadius:mI.borderRadius,padding:mI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:NI,border:`none`},"& > ul > li":{padding:mI.padding,lineHeight:mI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:LI,color:gI,borderRadius:mI.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:LI},"& > ul > li > span.cm-completionIcon":{color:_I,paddingRight:mI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:_I,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:NI,borderBottomColor:NI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${jI}`},"&-warning":{borderLeft:`3px solid ${FI}`},"&-info":{borderLeft:`3px solid ${II}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${jI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${FI}`},".cm-matchingBracket":{backgroundColor:Zme,outline:`1px solid ${Qme}`,borderRadius:uI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${jI}20`,outline:`1px solid ${jI}`,borderRadius:uI.borderRadius},".cm-selectionMatch":{backgroundColor:Xme,outline:`1px solid ${_I}30`,borderRadius:uI.borderRadius},".cm-foldPlaceholder":{backgroundColor:hI,color:_I,border:`1px dotted ${_I}70`,borderRadius:dI.borderRadius,padding:dI.padding,margin:dI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${MI}, 0 0 0 3px ${TI}40`},"& .cm-scroller::-webkit-scrollbar":{width:fI.width,height:fI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:bI},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:_I,borderRadius:fI.borderRadius,border:`3px solid ${bI}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:gI},".cm-ghostText":{opacity:`0.5`,color:_I}},{dark:!1}),D(B.define([{tag:A.keyword,color:TI,fontWeight:`bold`},{tag:A.controlKeyword,color:TI,fontWeight:`bold`},{tag:A.moduleKeyword,color:TI,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:yI},{tag:[A.variableName],color:yI},{tag:[A.propertyName],color:kI,fontStyle:`normal`},{tag:[A.typeName],color:wI},{tag:[A.className],color:wI,fontStyle:`italic`},{tag:[A.namespace],color:EI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:EI},{tag:[A.bracket],color:DI},{tag:[A.brace],color:DI},{tag:[A.punctuation],color:_I},{tag:[A.function(A.variableName)],color:SI},{tag:[A.labelName],color:AI,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:SI},{tag:[A.definition(A.variableName)],color:CI},{tag:A.number,color:wI},{tag:A.changed,color:wI},{tag:A.annotation,color:jI,fontStyle:`italic`},{tag:A.modifier,color:wI,fontStyle:`italic`},{tag:A.self,color:wI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:wI},{tag:[A.atom,A.bool],color:DI},{tag:[A.processingInstruction,A.inserted],color:OI},{tag:A.string,color:OI},{tag:[A.special(A.string),A.regexp],color:CI},{tag:A.definition(A.typeName),color:CI,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:CI},{tag:A.meta,color:_I},{tag:A.comment,fontStyle:`italic`,color:_I},{tag:A.docComment,fontStyle:`italic`,color:_I},{tag:[A.tagName],color:SI},{tag:[A.attributeName],color:yI},{tag:[A.heading],fontWeight:`bold`,color:kI},{tag:A.heading1,color:AI},{tag:A.heading2,color:wI},{tag:A.heading3,color:TI},{tag:A.heading4,color:EI},{tag:A.heading5,color:DI},{tag:A.heading6,color:OI},{tag:[A.strong],fontWeight:`bold`,color:EI},{tag:[A.emphasis],fontStyle:`italic`,color:wI},{tag:[A.link],color:$me,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:II,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:gI,textDecoration:`underline wavy`,borderBottom:`1px dotted ${xI}`},{tag:[A.strikethrough],color:jI,textDecoration:`line-through`},{tag:A.constant(A.name),color:SI},{tag:A.deleted,color:jI},{tag:A.squareBracket,color:xI},{tag:A.angleBracket,color:gI},{tag:A.monospace,color:gI},{tag:[A.contentSeparator],color:TI},{tag:A.quote,color:OI}]))],HI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},the={borderLeftWidth:`2px`},UI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},WI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},GI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},nhe={borderRadius:`2px`},KI={borderRadius:`2px`},qI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},JI={width:`12px`,height:`12px`,borderRadius:`6px`},YI={borderRadius:`4px`,padding:`2px 6px`},XI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},ZI=`#272822`,QI=`#f8f8f2`,$I=`#88846f`,rhe=`#f8f8f0`,eL=`#F92672`,tL=`#FD971F`,nL=`#66D9EF`,rL=`#E6DB74`,iL=`#AE81FF`,aL=`#A6E22E`,oL=`#F44747`,sL=`#414339`,ihe=`#3e3d3257`,cL=`#34352f`,lL=`#49483E`,ahe=`#75715e70`,uL=rhe,ohe=`#75715E55`,she=nL,dL=tL,fL=nL,che=iL,pL=`#3d4d3880`,mL=`#4d393980`,hL=`#A6E22E`,gL=`#F92672`,lhe=[I.theme({"&":{color:QI,backgroundColor:ZI,fontSize:HI.fontSize,fontFamily:HI.fontFamily},".cm-content":{caretColor:uL,lineHeight:HI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:uL,borderLeftWidth:the.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${uL}99`,color:ZI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lL},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#49483E99`,outline:`1px solid ${rL}`,color:QI,borderRadius:YI.borderRadius,"& span":{color:QI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:eL,color:ZI,padding:YI.padding,"& span":{color:ZI}},".cm-search.cm-panel.cm-textfield":{color:QI,borderRadius:YI.borderRadius,padding:YI.padding},".cm-panels":{backgroundColor:sL,color:QI,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${$I}80`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${$I}80`},".cm-panel button":{backgroundColor:cL,color:QI,border:GI.border,borderRadius:GI.borderRadius,padding:GI.padding},".cm-panel button:hover":{backgroundColor:`#49483E`},".cm-activeLine":{backgroundColor:ihe,borderRadius:nhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:sL,color:$I,border:WI.border,borderRight:`1px solid #3e3d32`,paddingRight:WI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#35352c`,color:QI,fontWeight:WI.fontWeight},".cm-lineNumbers":{fontSize:WI.fontSize,lineHeight:WI.lineHeight},".cm-foldGutter":{fontSize:WI.fontSize,lineHeight:WI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:$I,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:QI},".cm-insertedLine":{textDecoration:UI.insertedTextDecoration,backgroundColor:pL,color:hL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:UI.insertedTextDecoration,backgroundColor:`${pL} !important`,color:hL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious,border:`1px solid ${hL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:UI.deletedTextDecoration,backgroundColor:mL,color:gL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:UI.deletedTextDecoration,backgroundColor:`${mL} !important`,color:gL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious,border:`1px solid ${gL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:cL,border:`1px solid #49483E`,borderRadius:XI.borderRadius,padding:XI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.4)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:cL,border:`none`},"& > ul > li":{padding:XI.padding,lineHeight:XI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:lL,color:QI,borderRadius:XI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:$I,paddingRight:XI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:$I,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:cL,borderBottomColor:cL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${oL}`},"&-warning":{borderLeft:`3px solid ${dL}`},"&-info":{borderLeft:`3px solid ${fL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${oL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${dL}`},".cm-matchingBracket":{backgroundColor:ohe,outline:`1px solid ${she}`,borderRadius:KI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9267240`,outline:`1px solid ${oL}`,borderRadius:KI.borderRadius},".cm-selectionMatch":{backgroundColor:ahe,outline:`1px solid ${$I}50`,borderRadius:KI.borderRadius},".cm-foldPlaceholder":{backgroundColor:cL,color:$I,border:`1px dotted ${$I}70`,borderRadius:qI.borderRadius,padding:qI.padding,margin:qI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${ZI}, 0 0 0 3px ${nL}40`},"& .cm-scroller::-webkit-scrollbar":{width:JI.width,height:JI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:sL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#49483E`,borderRadius:JI.borderRadius,border:`3px solid ${sL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#5a594d`},".cm-ghostText":{opacity:`0.5`,color:$I}},{dark:!0}),D(B.define([{tag:A.keyword,color:eL,fontWeight:`bold`},{tag:A.controlKeyword,color:eL,fontWeight:`bold`},{tag:A.moduleKeyword,color:eL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:tL},{tag:[A.variableName],color:tL},{tag:[A.propertyName],color:aL,fontStyle:`normal`},{tag:[A.typeName],color:nL,fontStyle:`italic`},{tag:[A.className],color:aL,fontStyle:`italic`},{tag:[A.namespace],color:tL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:eL},{tag:[A.bracket],color:QI},{tag:[A.brace],color:QI},{tag:[A.punctuation],color:QI},{tag:[A.function(A.variableName),A.labelName],color:nL},{tag:[A.definition(A.function(A.variableName))],color:nL},{tag:[A.definition(A.variableName)],color:tL},{tag:A.number,color:iL},{tag:A.changed,color:iL},{tag:A.annotation,color:oL,fontStyle:`italic`},{tag:A.modifier,color:iL,fontStyle:`italic`},{tag:A.self,color:iL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:iL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:iL},{tag:[A.processingInstruction,A.inserted],color:aL},{tag:[A.special(A.string),A.regexp],color:rL},{tag:A.string,color:rL},{tag:A.definition(A.typeName),color:nL,fontWeight:`bold`},{tag:A.meta,color:$I},{tag:A.comment,fontStyle:`italic`,color:$I},{tag:A.docComment,fontStyle:`italic`,color:$I},{tag:[A.tagName],color:eL},{tag:[A.attributeName],color:aL},{tag:[A.heading],fontWeight:`bold`,color:aL},{tag:[A.strong],fontWeight:`bold`,color:tL},{tag:[A.emphasis],fontStyle:`italic`,color:tL},{tag:[A.link],color:che,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:fL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:QI,textDecoration:`underline wavy`,borderBottom:`1px wavy ${oL}`},{tag:[A.strikethrough],color:oL,textDecoration:`line-through`},{tag:A.constant(A.name),color:iL},{tag:A.deleted,color:oL},{tag:A.squareBracket,color:QI},{tag:A.angleBracket,color:QI},{tag:A.monospace,color:QI},{tag:[A.contentSeparator],color:tL},{tag:A.quote,color:$I}]))],_L={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},uhe={borderLeftWidth:`2px`},vL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},yL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},bL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},dhe={borderRadius:`2px`},xL={borderRadius:`2px`},SL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},CL={width:`12px`,height:`12px`,borderRadius:`6px`},wL={borderRadius:`4px`,padding:`2px 6px`},TL={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},fhe=`#2e3440`,EL=`#3b4252`,DL=`#434c5e`,OL=`#4c566a`,kL=`#d8dee9`,AL=`#eceff4`,jL=`#8fbcbb`,ML=`#88c0d0`,NL=`#81a1c1`,PL=`#5e81ac`,FL=`#bf616a`,IL=`#d08770`,LL=`#ebcb8b`,RL=`#a3be8c`,zL=`#b48ead`,phe=`#d30102`,BL=`#252a33`,mhe=`#3b425277`,VL=fhe,HL=EL,hhe=DL,ghe=`#4c566a80`,UL=kL,_he=`#4c566a55`,vhe=ML,WL=LL,GL=NL,yhe=zL,KL=`#3b4a3880`,qL=`#4a393a80`,JL=`#a3be8c`,YL=`#bf616a`,bhe=[I.theme({"&":{color:kL,backgroundColor:VL,fontSize:_L.fontSize,fontFamily:_L.fontFamily},".cm-content":{caretColor:UL,lineHeight:_L.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:UL,borderLeftWidth:uhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${UL}99`,color:VL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:hhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#5e81ac80`,outline:`1px solid ${jL}`,color:kL,borderRadius:wL.borderRadius,"& span":{color:kL}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:NL,color:AL,padding:wL.padding,"& span":{color:AL}},".cm-search.cm-panel.cm-textfield":{color:kL,borderRadius:wL.borderRadius,padding:wL.padding},".cm-panels":{backgroundColor:BL,color:kL,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${OL}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${OL}`},".cm-panel button":{backgroundColor:HL,color:kL,border:bL.border,borderRadius:bL.borderRadius,padding:bL.padding},".cm-panel button:hover":{backgroundColor:DL},".cm-activeLine":{backgroundColor:mhe,borderRadius:dhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:BL,color:OL,border:yL.border,borderRight:`1px solid ${DL}`,paddingRight:yL.paddingRight},".cm-activeLineGutter":{backgroundColor:EL,color:kL,fontWeight:yL.fontWeight},".cm-lineNumbers":{fontSize:yL.fontSize,lineHeight:yL.lineHeight},".cm-foldGutter":{fontSize:yL.fontSize,lineHeight:yL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:OL,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:kL},".cm-insertedLine":{textDecoration:vL.insertedTextDecoration,backgroundColor:KL,color:JL,padding:vL.insertedLinePadding,borderRadius:vL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:vL.insertedTextDecoration,backgroundColor:`${KL} !important`,color:JL,padding:vL.insertedLinePadding,borderRadius:vL.borderRadious,border:`1px solid ${JL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:vL.deletedTextDecoration,backgroundColor:qL,color:YL,padding:vL.insertedLinePadding,borderRadius:vL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:vL.deletedTextDecoration,backgroundColor:`${qL} !important`,color:YL,padding:vL.insertedLinePadding,borderRadius:vL.borderRadious,border:`1px solid ${YL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:HL,border:`1px solid ${OL}`,borderRadius:TL.borderRadius,padding:TL.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:HL,border:`none`},"& > ul > li":{padding:TL.padding,lineHeight:TL.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:DL,color:AL,borderRadius:TL.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:OL,paddingRight:TL.paddingRight},"& > ul > li > span.cm-completionDetail":{color:OL,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:HL,borderBottomColor:HL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${FL}`},"&-warning":{borderLeft:`3px solid ${WL}`},"&-info":{borderLeft:`3px solid ${GL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${FL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${WL}`},".cm-matchingBracket":{backgroundColor:_he,outline:`1px solid ${vhe}`,borderRadius:xL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${FL}40`,outline:`1px solid ${phe}`,borderRadius:xL.borderRadius},".cm-selectionMatch":{backgroundColor:ghe,outline:`1px solid ${DL}50`,borderRadius:xL.borderRadius},".cm-foldPlaceholder":{backgroundColor:HL,color:OL,border:`1px dotted ${OL}70`,borderRadius:SL.borderRadius,padding:SL.padding,margin:SL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${VL}, 0 0 0 3px ${ML}40`},"& .cm-scroller::-webkit-scrollbar":{width:CL.width,height:CL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:BL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:DL,borderRadius:CL.borderRadius,border:`3px solid ${BL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:OL},".cm-ghostText":{opacity:`0.5`,color:OL}},{dark:!0}),D(B.define([{tag:A.keyword,color:PL,fontWeight:`bold`},{tag:A.controlKeyword,color:PL,fontWeight:`bold`},{tag:A.moduleKeyword,color:PL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:ML},{tag:[A.variableName],color:kL},{tag:[A.propertyName],color:ML,fontStyle:`normal`},{tag:[A.typeName],color:LL},{tag:[A.className],color:LL,fontStyle:`italic`},{tag:[A.namespace],color:NL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:zL},{tag:[A.bracket],color:kL},{tag:[A.brace],color:jL},{tag:[A.punctuation],color:kL},{tag:[A.function(A.variableName),A.labelName],color:jL},{tag:[A.definition(A.function(A.variableName))],color:jL},{tag:[A.definition(A.variableName)],color:IL},{tag:A.number,color:IL},{tag:A.changed,color:zL},{tag:A.annotation,color:FL,fontStyle:`italic`},{tag:A.modifier,color:zL,fontStyle:`italic`},{tag:A.self,color:zL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:IL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:zL},{tag:[A.processingInstruction,A.inserted],color:jL},{tag:[A.special(A.string),A.regexp],color:zL},{tag:A.string,color:RL},{tag:A.definition(A.typeName),color:LL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:RL},{tag:A.meta,color:OL},{tag:A.comment,fontStyle:`italic`,color:OL},{tag:A.docComment,fontStyle:`italic`,color:OL},{tag:[A.tagName],color:FL},{tag:[A.attributeName],color:LL},{tag:[A.heading],fontWeight:`bold`,color:NL},{tag:[A.strong],fontWeight:`bold`,color:ML},{tag:[A.emphasis],fontStyle:`italic`,color:LL},{tag:[A.link],color:yhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:GL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:kL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${FL}`},{tag:[A.strikethrough],color:FL,textDecoration:`line-through`},{tag:A.constant(A.name),color:IL},{tag:A.deleted,color:FL},{tag:A.squareBracket,color:FL},{tag:A.angleBracket,color:IL},{tag:A.monospace,color:kL,fontStyle:`italic`},{tag:[A.contentSeparator],color:NL},{tag:A.quote,color:zL}]))],XL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},xhe={borderLeftWidth:`2px`},ZL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},QL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},$L={border:`none`,borderRadius:`4px`,padding:`2px 10px`},She={borderRadius:`2px`},eR={borderRadius:`2px`},tR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},nR={width:`12px`,height:`12px`,borderRadius:`6px`},rR={borderRadius:`4px`,padding:`2px 6px`},iR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Che=`#e1e2e7`,aR=`#3760bf`,oR=`#99a7df`,sR=`#848cb5`,whe=`#8c91a8`,cR=`#3760bf`,lR=`#e9e9ec`,uR=`#d5d6db`,dR=`#f52a65`,fR=`#b15c00`,pR=`#8c6c3e`,mR=`#587539`,hR=`#007197`,gR=`#2e7de9`,_R=`#7847bd`,The=`#9854f1`,vR=dR,yR=uR,Ehe=`#5F5FAF5A`,bR=Che,xR=lR,SR=`#99a7df40`,Dhe=`#99a7df60`,CR=aR,Ohe=`#0e639c20`,khe=hR,wR=fR,TR=hR,Ahe=_R,ER=`#58753920`,DR=`#f52a6520`,OR=`#587539`,kR=`#f52a65`,jhe=[I.theme({"&":{color:cR,backgroundColor:bR,fontSize:XL.fontSize,fontFamily:XL.fontFamily},".cm-content":{caretColor:CR,lineHeight:XL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:CR,borderLeftWidth:xhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${CR}99`,color:bR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:SR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#0e639c40`,outline:`1px solid ${hR}`,color:cR,borderRadius:rR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:hR,color:bR,padding:rR.padding,"& span":{color:bR}},".cm-search.cm-panel.cm-textfield":{color:cR,borderRadius:rR.borderRadius,padding:rR.padding},".cm-panels":{backgroundColor:lR,color:cR,borderRadius:`4px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.1)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${sR}30`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${sR}30`},".cm-panel button":{backgroundColor:xR,color:cR,border:$L.border,borderRadius:$L.borderRadius,padding:$L.padding},".cm-panel button:hover":{backgroundColor:uR,border:`1px solid ${oR}`},".cm-activeLine":{backgroundColor:Ehe,borderRadius:She.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yR,color:sR,border:QL.border,borderRight:`1px solid ${uR}`,paddingRight:QL.paddingRight},".cm-activeLineGutter":{color:aR,fontWeight:QL.fontWeight},".cm-lineNumbers":{fontSize:QL.fontSize,lineHeight:QL.lineHeight},".cm-foldGutter":{fontSize:QL.fontSize,lineHeight:QL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:sR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:aR},".cm-insertedLine":{textDecoration:ZL.insertedTextDecoration,backgroundColor:ER,color:OR,padding:ZL.insertedLinePadding,borderRadius:ZL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:ZL.insertedTextDecoration,backgroundColor:`${ER} !important`,color:OR,padding:ZL.insertedLinePadding,borderRadius:ZL.borderRadious,border:`1px solid ${OR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:ZL.deletedTextDecoration,backgroundColor:DR,color:kR,padding:ZL.insertedLinePadding,borderRadius:ZL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:ZL.deletedTextDecoration,backgroundColor:`${DR} !important`,color:kR,padding:ZL.insertedLinePadding,borderRadius:ZL.borderRadious,border:`1px solid ${kR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:xR,border:`1px solid ${whe}40`,borderRadius:iR.borderRadius,padding:iR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:xR,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:iR.padding,lineHeight:iR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:SR,color:aR,borderRadius:iR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:sR,paddingRight:iR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:sR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:xR,borderBottomColor:xR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${vR}`},"&-warning":{borderLeft:`3px solid ${wR}`},"&-info":{borderLeft:`3px solid ${TR}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${vR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${wR}`},".cm-matchingBracket":{backgroundColor:Ohe,outline:`1px solid ${khe}`,borderRadius:eR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${dR}20`,outline:`1px solid ${vR}`,borderRadius:eR.borderRadius},".cm-selectionMatch":{backgroundColor:Dhe,outline:`1px solid ${oR}50`,borderRadius:eR.borderRadius},".cm-foldPlaceholder":{backgroundColor:xR,color:sR,border:`1px dotted ${sR}70`,borderRadius:tR.borderRadius,padding:tR.padding,margin:tR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${bR}, 0 0 0 3px ${hR}40`},"& .cm-scroller::-webkit-scrollbar":{width:nR.width,height:nR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:yR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:sR,borderRadius:nR.borderRadius,border:`3px solid ${yR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:oR},".cm-ghostText":{opacity:`0.5`,color:sR}},{dark:!1}),D(B.define([{tag:A.keyword,color:hR,fontWeight:`bold`},{tag:A.controlKeyword,color:hR,fontWeight:`bold`},{tag:A.moduleKeyword,color:hR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:gR},{tag:[A.variableName],color:aR},{tag:[A.propertyName],color:gR,fontStyle:`normal`},{tag:[A.typeName],color:hR},{tag:[A.className],color:pR,fontStyle:`italic`},{tag:[A.namespace],color:_R,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:_R},{tag:[A.bracket],color:sR},{tag:[A.brace],color:sR},{tag:[A.punctuation],color:sR},{tag:[A.function(A.variableName)],color:hR},{tag:[A.labelName],color:_R,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:hR},{tag:[A.definition(A.variableName)],color:gR},{tag:A.number,color:fR},{tag:A.changed,color:fR},{tag:A.annotation,color:vR,fontStyle:`italic`},{tag:A.modifier,color:fR,fontStyle:`italic`},{tag:A.self,color:fR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:fR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:fR},{tag:[A.processingInstruction,A.inserted],color:mR},{tag:[A.special(A.string),A.regexp],color:The},{tag:A.string,color:mR},{tag:A.definition(A.typeName),color:hR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:gR},{tag:A.meta,color:sR},{tag:A.comment,fontStyle:`italic`,color:sR},{tag:A.docComment,fontStyle:`italic`,color:sR},{tag:[A.tagName],color:_R},{tag:[A.attributeName],color:pR},{tag:[A.heading],fontWeight:`bold`,color:fR},{tag:A.heading1,color:fR,fontWeight:`bold`},{tag:A.heading2,color:fR},{tag:A.heading3,color:fR},{tag:A.heading4,color:hR},{tag:A.heading5,color:hR},{tag:A.heading6,color:hR},{tag:[A.strong],fontWeight:`bold`,color:aR},{tag:[A.emphasis],fontStyle:`italic`,color:mR},{tag:[A.link],color:Ahe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:TR,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:aR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${vR}`},{tag:[A.strikethrough],color:vR,textDecoration:`line-through`},{tag:A.constant(A.name),color:fR},{tag:A.deleted,color:vR},{tag:A.squareBracket,color:sR},{tag:A.angleBracket,color:sR},{tag:A.monospace,color:aR},{tag:[A.contentSeparator],color:gR},{tag:A.quote,color:sR}]))],AR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Mhe={borderLeftWidth:`2px`},jR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},MR={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},NR={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Nhe={borderRadius:`2px`},PR={borderRadius:`2px`},FR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},IR={width:`12px`,height:`12px`,borderRadius:`6px`},LR={borderRadius:`4px`,padding:`2px 6px`},RR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Phe=`#24283b`,zR=`#414868`,BR=`#565f89`,VR=`#c0caf5`,HR=`#282e44`,UR=`#1f2335`,Fhe=`#f7768e`,WR=`#ff9e64`,GR=`#e0af68`,KR=`#9ece6a`,qR=`#2ac3de`,JR=`#7aa2f7`,YR=`#bb9af7`,XR=`#f7768e`,ZR=UR,Ihe=`#292e427a`,QR=Phe,$R=HR,ez=`#6f7bb630`,Lhe=`#6f7bb650`,tz=VR,Rhe=`#3d59a150`,zhe=JR,nz=WR,rz=qR,Bhe=YR,iz=`#3b4a3880`,az=`#4a393a80`,oz=`#9ece6a`,sz=`#f7768e`,Vhe=[I.theme({"&":{color:VR,backgroundColor:QR,fontSize:AR.fontSize,fontFamily:AR.fontFamily},".cm-content":{caretColor:tz,lineHeight:AR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:tz,borderLeftWidth:Mhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${tz}99`,color:QR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ez},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#7aa2f740`,outline:`1px solid ${JR}`,color:VR,borderRadius:LR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:JR,color:QR,padding:LR.padding,"& span":{color:QR}},".cm-search.cm-panel.cm-textfield":{color:VR,borderRadius:LR.borderRadius,padding:LR.padding},".cm-panels":{backgroundColor:HR,color:VR,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${BR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${BR}`},".cm-panel button":{backgroundColor:$R,color:VR,border:NR.border,borderRadius:NR.borderRadius,padding:NR.padding},".cm-panel button:hover":{backgroundColor:UR},".cm-activeLine":{backgroundColor:Ihe,borderRadius:Nhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:ZR,color:BR,border:MR.border,borderRight:`1px solid ${UR}`,paddingRight:MR.paddingRight},".cm-activeLineGutter":{backgroundColor:UR,color:VR,fontWeight:MR.fontWeight},".cm-lineNumbers":{fontSize:MR.fontSize,lineHeight:MR.lineHeight},".cm-foldGutter":{fontSize:MR.fontSize,lineHeight:MR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:BR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:VR},".cm-insertedLine":{textDecoration:jR.insertedTextDecoration,backgroundColor:iz,color:oz,padding:jR.insertedLinePadding,borderRadius:jR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:jR.insertedTextDecoration,backgroundColor:`${iz} !important`,color:oz,padding:jR.insertedLinePadding,borderRadius:jR.borderRadious,border:`1px solid ${oz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:jR.deletedTextDecoration,backgroundColor:az,color:sz,padding:jR.insertedLinePadding,borderRadius:jR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:jR.deletedTextDecoration,backgroundColor:`${az} !important`,color:sz,padding:jR.insertedLinePadding,borderRadius:jR.borderRadious,border:`1px solid ${sz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:$R,border:`1px solid ${BR}`,borderRadius:RR.borderRadius,padding:RR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:$R,border:`none`},"& > ul > li":{padding:RR.padding,lineHeight:RR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:ez,color:VR,borderRadius:RR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:BR,paddingRight:RR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:BR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:$R,borderBottomColor:$R},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${XR}`},"&-warning":{borderLeft:`3px solid ${nz}`},"&-info":{borderLeft:`3px solid ${rz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${XR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${nz}`},".cm-matchingBracket":{backgroundColor:Rhe,outline:`1px solid ${zhe}`,borderRadius:PR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${Fhe}20`,outline:`1px solid ${XR}`,borderRadius:PR.borderRadius},".cm-selectionMatch":{backgroundColor:Lhe,outline:`1px solid ${zR}50`,borderRadius:PR.borderRadius},".cm-foldPlaceholder":{backgroundColor:$R,color:BR,border:`1px dotted ${BR}70`,borderRadius:FR.borderRadius,padding:FR.padding,margin:FR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${QR}, 0 0 0 3px ${JR}40`},"& .cm-scroller::-webkit-scrollbar":{width:IR.width,height:IR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:ZR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:zR,borderRadius:IR.borderRadius,border:`3px solid ${ZR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:BR},".cm-ghostText":{opacity:`0.5`,color:BR}},{dark:!0}),D(B.define([{tag:A.keyword,color:YR,fontWeight:`bold`},{tag:A.controlKeyword,color:YR,fontWeight:`bold`},{tag:A.moduleKeyword,color:YR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:VR},{tag:[A.variableName],color:VR},{tag:[A.propertyName],color:JR,fontStyle:`normal`},{tag:[A.typeName],color:qR},{tag:[A.className],color:GR,fontStyle:`italic`},{tag:[A.namespace],color:JR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:YR},{tag:[A.bracket],color:BR},{tag:[A.brace],color:BR},{tag:[A.punctuation],color:BR},{tag:[A.function(A.variableName)],color:JR},{tag:[A.labelName],color:JR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:JR},{tag:[A.definition(A.variableName)],color:VR},{tag:A.number,color:WR},{tag:A.changed,color:WR},{tag:A.annotation,color:XR,fontStyle:`italic`},{tag:A.modifier,color:WR,fontStyle:`italic`},{tag:A.self,color:WR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:YR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:WR},{tag:[A.processingInstruction,A.inserted],color:KR},{tag:[A.special(A.string),A.regexp],color:`#b4f9f8`},{tag:A.string,color:KR},{tag:A.definition(A.typeName),color:qR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:VR},{tag:A.meta,color:BR},{tag:A.comment,fontStyle:`italic`,color:BR},{tag:A.docComment,fontStyle:`italic`,color:BR},{tag:[A.tagName],color:YR},{tag:[A.attributeName],color:GR},{tag:[A.heading],fontWeight:`bold`,color:`#89ddff`},{tag:A.heading1,color:`#89ddff`,fontWeight:`bold`},{tag:A.heading2,color:`#89ddff`},{tag:A.heading3,color:`#89ddff`},{tag:A.heading4,color:`#89ddff`},{tag:A.heading5,color:`#89ddff`},{tag:A.heading6,color:`#89ddff`},{tag:[A.strong],fontWeight:`bold`,color:VR},{tag:[A.emphasis],fontStyle:`italic`,color:qR},{tag:[A.link],color:Bhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:rz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:VR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${XR}`},{tag:[A.strikethrough],color:XR,textDecoration:`line-through`},{tag:A.constant(A.name),color:WR},{tag:A.deleted,color:XR},{tag:A.squareBracket,color:BR},{tag:A.angleBracket,color:BR},{tag:A.monospace,color:VR},{tag:[A.contentSeparator],color:JR},{tag:A.quote,color:BR}]))],cz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Hhe={borderLeftWidth:`2px`},lz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},uz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},dz={borderRadius:`4px`,padding:`2px 10px`},Uhe={borderRadius:`2px`},fz={borderRadius:`2px`},pz={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},mz={width:`12px`,height:`12px`,borderRadius:`6px`},hz={borderRadius:`4px`,padding:`2px 6px`},gz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Whe=`#1e1e1e`,_z=`#252526`,vz=`#2d2d30`,yz=`#838383`,Ghe=`#c6c6c6`,bz=`#d4d4d4`,xz=`#e9e9e9`,Khe=`#1c1c1c`,Sz=`#569cd6`,qhe=`#c586c0`,Cz=`#9cdcfe`,wz=`#4ec9b0`,Tz=`#dcdcaa`,Jhe=`#b5cea8`,Ez=`#ce9178`,Dz=`#f44747`,Oz=`#d7ba7d`,kz=`#6a9955`,Az=Dz,jz=`#FFFFFF08`,Mz=Whe,Nz=_z,Yhe=`#264F7899`,Xhe=`#72a1ff59`,Pz=Ghe,Zhe=`#ffffff15`,Qhe=Sz,Fz=Oz,Iz=`#3794ff`,$he=`#c586c0`,Lz=`#1e3f1e80`,Rz=`#4b1c1c80`,zz=`#6cc26f`,Bz=`#f14c4c`,Vz=[I.theme({"&":{color:bz,backgroundColor:Mz,fontSize:cz.fontSize,fontFamily:cz.fontFamily},".cm-content":{caretColor:Pz,lineHeight:cz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:Pz,borderLeftWidth:Hhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${Pz}99`,color:Mz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Yhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#72a1ff40`,outline:`1px solid ${Sz}90`,color:xz,borderRadius:hz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#3794ff90`,color:xz,padding:hz.padding,"& span":{color:xz}},".cm-search.cm-panel.cm-textfield":{color:bz,borderRadius:hz.borderRadius,padding:hz.padding},".cm-panels":{backgroundColor:_z,color:bz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.45)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${vz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${vz}`},".cm-panel button":{backgroundColor:vz,color:bz,border:`1px solid ${vz}`,borderRadius:dz.borderRadius,padding:dz.padding},".cm-panel button:hover":{backgroundColor:`#3a3a3a`,border:`1px solid ${yz}80`},".cm-activeLine":{backgroundColor:jz,borderRadius:Uhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:Khe,color:yz,border:`none`,borderRight:`1px solid ${vz}`,paddingRight:uz.paddingRight},".cm-activeLineGutter":{backgroundColor:jz,color:xz,fontWeight:uz.fontWeight},".cm-lineNumbers":{fontSize:uz.fontSize,lineHeight:uz.lineHeight},".cm-foldGutter":{fontSize:uz.fontSize,lineHeight:uz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:yz,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:xz},".cm-insertedLine":{textDecoration:lz.insertedTextDecoration,backgroundColor:Lz,color:zz,padding:lz.insertedLinePadding,borderRadius:lz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:lz.insertedTextDecoration,backgroundColor:`${Lz} !important`,color:zz,padding:lz.insertedLinePadding,borderRadius:lz.borderRadious,border:`1px solid ${zz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:lz.deletedTextDecoration,backgroundColor:Rz,color:Bz,padding:lz.insertedLinePadding,borderRadius:lz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:lz.deletedTextDecoration,backgroundColor:`${Rz} !important`,color:Bz,padding:lz.insertedLinePadding,borderRadius:lz.borderRadious,border:`1px solid ${Bz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:Nz,border:`1px solid ${vz}`,borderRadius:gz.borderRadius,padding:gz.padding,boxShadow:`0 3px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:Nz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:gz.padding,lineHeight:gz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#04395e`,color:xz,borderRadius:gz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:yz,paddingRight:gz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:yz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Nz,borderBottomColor:Nz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${Az}`},"&-warning":{borderLeft:`3px solid ${Fz}`},"&-info":{borderLeft:`3px solid ${Iz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${Az}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${Fz}`},".cm-matchingBracket":{backgroundColor:Zhe,outline:`1px solid ${Qhe}80`,borderRadius:fz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${Dz}40`,outline:`1px solid ${Az}`,borderRadius:fz.borderRadius},".cm-selectionMatch":{backgroundColor:Xhe,outline:`1px solid ${vz}70`,borderRadius:fz.borderRadius},".cm-foldPlaceholder":{backgroundColor:Nz,color:yz,border:`1px dotted ${yz}70`,borderRadius:pz.borderRadius,padding:pz.padding,margin:pz.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${vz}`},"& .cm-scroller::-webkit-scrollbar":{width:mz.width,height:mz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:Mz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#424242`,borderRadius:mz.borderRadius,border:`3px solid ${Mz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#525252`},".cm-ghostText":{opacity:`0.5`,color:yz}},{dark:!0}),D(B.define([{tag:A.keyword,color:Sz,fontWeight:`bold`},{tag:A.controlKeyword,color:qhe,fontWeight:`bold`},{tag:A.moduleKeyword,color:Sz,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:bz},{tag:[A.variableName],color:Cz},{tag:[A.propertyName],color:Cz,fontStyle:`normal`},{tag:[A.typeName],color:wz},{tag:[A.className],color:wz,fontStyle:`normal`},{tag:[A.namespace],color:bz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:bz},{tag:[A.bracket],color:bz},{tag:[A.brace],color:bz},{tag:[A.punctuation],color:bz},{tag:[A.function(A.variableName)],color:Tz},{tag:[A.labelName],color:Tz,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:Tz},{tag:[A.definition(A.variableName)],color:Cz},{tag:A.number,color:Jhe},{tag:A.changed,color:Oz},{tag:A.annotation,color:Oz,fontStyle:`italic`},{tag:A.modifier,color:Sz,fontStyle:`normal`},{tag:A.self,color:Sz},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:Cz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:Sz},{tag:[A.processingInstruction,A.inserted],color:Ez},{tag:[A.special(A.string),A.regexp],color:`#d16969`},{tag:A.string,color:Ez},{tag:A.definition(A.typeName),color:wz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:bz},{tag:A.meta,color:yz},{tag:A.comment,fontStyle:`italic`,color:kz},{tag:A.docComment,fontStyle:`italic`,color:kz},{tag:[A.tagName],color:Sz},{tag:[A.attributeName],color:Cz},{tag:[A.heading],fontWeight:`bold`,color:Sz},{tag:A.heading1,color:Sz,fontWeight:`bold`},{tag:A.heading2,color:Sz},{tag:A.heading3,color:Sz},{tag:A.heading4,color:Sz},{tag:A.heading5,color:Sz},{tag:A.heading6,color:Sz},{tag:[A.strong],fontWeight:`bold`,color:Sz},{tag:[A.emphasis],fontStyle:`italic`,color:wz},{tag:[A.link],color:$he,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:Iz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:bz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${Az}`},{tag:[A.strikethrough],color:Az,textDecoration:`line-through`},{tag:A.constant(A.name),color:Cz},{tag:A.deleted,color:Az},{tag:A.squareBracket,color:bz},{tag:A.angleBracket,color:bz},{tag:A.monospace,color:bz},{tag:[A.contentSeparator],color:bz},{tag:A.quote,color:kz}]))],Hz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Uz={borderLeftWidth:`2px`},Wz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},Gz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},Kz={borderRadius:`4px`,padding:`2px 10px`},qz={borderRadius:`2px`},Jz={borderRadius:`2px`},Yz={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},Xz={width:`12px`,height:`12px`,borderRadius:`6px`},Zz={borderRadius:`4px`,padding:`2px 6px`},Qz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},$z=`#ffffff`,eB=`#f3f3f3`,tB=`#d6d6d6`,nB=`#6b6b6b`,rB=`#000000`,iB=`#383a42`,aB=`#1f1f1f`,oB=`#f5f5f5`,sB=`#0064ff`,cB=`#af00db`,lB=`#0070c1`,uB=`#267f99`,dB=`#795e26`,fB=`#098658`,pB=`#a31515`,mB=`#e51400`,hB=`#795e26`,gB=`#008000`,_B=mB,vB=`#99999926`,yB=$z,bB=eB,xB=`#add6ff`,SB=`#a8ac9480`,CB=rB,wB=`#007acc20`,TB=`#007acc`,EB=`#bf8803`,DB=`#006ab1`,OB=`#9e46d0`,kB=`#ddfbe0`,AB=`#ffebec`,jB=`#22863a`,MB=`#e51400`,NB=[I.theme({"&":{color:iB,backgroundColor:yB,fontSize:Hz.fontSize,fontFamily:Hz.fontFamily},".cm-content":{caretColor:CB,lineHeight:Hz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:CB,borderLeftWidth:Uz.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${CB}99`,color:yB},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:xB},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#bbdefb`,outline:`1px solid ${lB}90`,color:aB,borderRadius:Zz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#90caf9`,color:aB,padding:Zz.padding,"& span":{color:aB}},".cm-search.cm-panel.cm-textfield":{color:iB,borderRadius:Zz.borderRadius,padding:Zz.padding},".cm-panels":{backgroundColor:eB,color:iB,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${tB}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${tB}`},".cm-panel button":{backgroundColor:yB,color:iB,border:`1px solid ${tB}`,borderRadius:Kz.borderRadius,padding:Kz.padding},".cm-panel button:hover":{backgroundColor:`#e8e8e8`,border:`1px solid ${nB}80`},".cm-activeLine":{backgroundColor:vB,borderRadius:qz.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:oB,color:`#237893`,border:`none`,borderRight:`1px solid ${tB}`,paddingRight:Gz.paddingRight},".cm-activeLineGutter":{backgroundColor:vB,color:`#0b216f`,fontWeight:Gz.fontWeight},".cm-lineNumbers":{fontSize:Gz.fontSize,lineHeight:Gz.lineHeight},".cm-foldGutter":{fontSize:Gz.fontSize,lineHeight:Gz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:`#237893`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`#0b216f`},".cm-insertedLine":{textDecoration:Wz.insertedTextDecoration,backgroundColor:kB,color:jB,padding:Wz.insertedLinePadding,borderRadius:Wz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:Wz.insertedTextDecoration,backgroundColor:`${kB} !important`,color:jB,padding:Wz.insertedLinePadding,borderRadius:Wz.borderRadious,border:`1px solid ${jB}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:Wz.deletedTextDecoration,backgroundColor:AB,color:MB,padding:Wz.insertedLinePadding,borderRadius:Wz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:Wz.deletedTextDecoration,backgroundColor:`${AB} !important`,color:MB,padding:Wz.insertedLinePadding,borderRadius:Wz.borderRadious,border:`1px solid ${MB}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:bB,border:`1px solid ${tB}`,borderRadius:Qz.borderRadius,padding:Qz.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:bB,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:Qz.padding,lineHeight:Qz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#dcebfc`,color:aB,borderRadius:Qz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:nB,paddingRight:Qz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:nB,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:bB,borderBottomColor:bB},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${_B}`},"&-warning":{borderLeft:`3px solid ${EB}`},"&-info":{borderLeft:`3px solid ${DB}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${_B}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${EB}`},".cm-matchingBracket":{backgroundColor:wB,outline:`1px solid ${TB}80`,borderRadius:Jz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${mB}20`,outline:`1px solid ${_B}`,borderRadius:Jz.borderRadius},".cm-selectionMatch":{backgroundColor:SB,outline:`1px solid ${tB}70`,borderRadius:Jz.borderRadius},".cm-foldPlaceholder":{backgroundColor:bB,color:nB,border:`1px dotted ${nB}70`,borderRadius:Yz.borderRadius,padding:Yz.padding,margin:Yz.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${tB}`},"& .cm-scroller::-webkit-scrollbar":{width:Xz.width,height:Xz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:yB},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#dadada`,borderRadius:Xz.borderRadius,border:`3px solid ${yB}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#cccccc`},".cm-ghostText":{opacity:`0.5`,color:nB}},{dark:!1}),D(B.define([{tag:A.keyword,color:sB,fontWeight:`bold`},{tag:A.controlKeyword,color:cB,fontWeight:`bold`},{tag:A.moduleKeyword,color:sB,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:iB},{tag:[A.variableName],color:lB},{tag:[A.propertyName],color:lB,fontStyle:`normal`},{tag:[A.typeName],color:uB},{tag:[A.className],color:uB,fontStyle:`normal`},{tag:[A.namespace],color:iB,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:iB},{tag:[A.bracket],color:iB},{tag:[A.brace],color:iB},{tag:[A.punctuation],color:iB},{tag:[A.function(A.variableName)],color:dB},{tag:[A.labelName],color:dB,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:dB},{tag:[A.definition(A.variableName)],color:lB},{tag:A.number,color:fB},{tag:A.changed,color:hB},{tag:A.annotation,color:hB,fontStyle:`italic`},{tag:A.modifier,color:sB,fontStyle:`normal`},{tag:A.self,color:sB},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:lB},{tag:[A.atom,A.bool,A.special(A.variableName)],color:sB},{tag:[A.processingInstruction,A.inserted],color:pB},{tag:[A.special(A.string),A.regexp],color:cB},{tag:A.string,color:pB},{tag:A.definition(A.typeName),color:uB,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:iB},{tag:A.meta,color:nB},{tag:A.comment,fontStyle:`italic`,color:gB},{tag:A.docComment,fontStyle:`italic`,color:gB},{tag:[A.tagName],color:sB},{tag:[A.attributeName],color:lB},{tag:[A.heading],fontWeight:`bold`,color:sB},{tag:A.heading1,color:sB,fontWeight:`bold`},{tag:A.heading2,color:sB},{tag:A.heading3,color:sB},{tag:A.heading4,color:sB},{tag:A.heading5,color:sB},{tag:A.heading6,color:sB},{tag:[A.strong],fontWeight:`bold`,color:sB},{tag:[A.emphasis],fontStyle:`italic`,color:lB},{tag:[A.link],color:OB,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:DB,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:iB,textDecoration:`underline wavy`,borderBottom:`1px wavy ${_B}`},{tag:[A.strikethrough],color:_B,textDecoration:`line-through`},{tag:A.constant(A.name),color:lB},{tag:A.deleted,color:_B},{tag:A.squareBracket,color:iB},{tag:A.angleBracket,color:iB},{tag:A.monospace,color:iB},{tag:[A.contentSeparator],color:iB},{tag:A.quote,color:gB}]))];function PB(){return PB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PB.apply(null,arguments)}function FB(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var IB=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,LB=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(IB(e)):IB,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Re(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=ve(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=P(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let a=r.charCodeAt(e),o=this.match(a,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==a&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],a=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,a=!0)),a||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<`u`&&(LB.prototype[Symbol.iterator]=function(){return this});var RB={from:-1,to:-1,match:/.*/.exec(``)},zB=`gm`+(/x/.unicode==null?``:`u`),BB=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=RB,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new UB(e,t,n,r,i);this.re=new RegExp(t,zB+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=GB(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=GB(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},VB=new WeakMap,HB=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=VB.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return VB.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),VB.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},UB=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=RB,this.matchPos=GB(e,r),this.re=new RegExp(t,zB+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=HB.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=GB(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=HB.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(BB.prototype[Symbol.iterator]=UB.prototype[Symbol.iterator]=function(){return this});function WB(e){try{return new RegExp(e,zB),!0}catch{return!1}}function GB(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}function KB(e){let t=je(`input`,{class:`cm-textfield`,name:`line`,value:String(e.state.doc.lineAt(e.state.selection.main.head).number)}),n=je(`form`,{class:`cm-gotoLine`,onkeydown:t=>{t.keyCode==27?(t.preventDefault(),e.dispatch({effects:qB.of(!1)}),e.focus()):t.keyCode==13&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},je(`label`,e.state.phrase(`Go to line`),`: `,t),` `,je(`button`,{class:`cm-button`,type:`submit`},e.state.phrase(`go`)),je(`button`,{name:`close`,onclick:()=>{e.dispatch({effects:qB.of(!1)}),e.focus()},"aria-label":e.state.phrase(`close`),type:`button`},[`×`]));function r(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,a,o,s,c]=n,l=s?+s.slice(1):0,u=o?+o:i.number;if(o&&c){let e=u/100;a&&(e=e*(a==`-`?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else o&&a&&(u=u*(a==`-`?-1:1)+i.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),f=le.cursor(d.from+Math.max(0,Math.min(l,d.length)));e.dispatch({effects:[qB.of(!1),I.scrollIntoView(f.from,{y:`center`})],selection:f}),e.focus()}return{dom:n}}var qB=V.define(),JB=Be.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(qB)&&(e=n.value);return e},provide:e=>ne.from(e,e=>e?KB:null)}),YB=e=>{let t=De(e,KB);if(!t){let n=[qB.of(!0)];e.state.field(JB,!1)??n.push(V.appendConfig.of([JB,XB])),e.dispatch({effects:n}),t=De(e,KB)}return t&&t.dom.querySelector(`input`).select(),!0},XB=I.baseTheme({".cm-panel.cm-gotoLine":{padding:`2px 6px 4px`,position:`relative`,"& label":{fontSize:`80%`},"& [name=close]":{position:`absolute`,top:`0`,bottom:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:`0`}}}),ZB={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},QB=xe.define({combine(e){return f(e,ZB,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function $B(e){let t=[aV,iV];return e&&t.push(QB.of(e)),t}var eV=Ve.mark({class:`cm-selectionMatch`}),tV=Ve.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function nV(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=oe.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=oe.Word)}function rV(e,t,n,r){return e(t.sliceDoc(n,n+1))==oe.Word&&e(t.sliceDoc(r-1,r))==oe.Word}var iV=g.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(QB),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Ve.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return Ve.none;let e=n.wordAt(i.head);if(!e)return Ve.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return Ve.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(nV(o,n,i.from,i.to)&&rV(o,n,i.from,i.to)))return Ve.none}else if(a=n.sliceDoc(i.from,i.to),!a)return Ve.none}let s=[];for(let r of e.visibleRanges){let e=new LB(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||nV(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(tV.range(r,a)):(r>=i.to||a<=i.from)&&s.push(eV.range(r,a)),s.length>t.maxMatches))return Ve.none}}return Ve.set(s)}},{decorations:e=>e.decorations}),aV=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),oV=({state:e,dispatch:t})=>{let{selection:n}=e,r=le.create(n.ranges.map(t=>e.wordAt(t.head)||le.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function sV(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new LB(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new LB(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var cV=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return oV({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=sV(e,r);return i?(t(e.update({selection:e.selection.addRange(le.range(i.from,i.to),!1),effects:I.scrollIntoView(i.to)})),!0):!1},lV=xe.define({combine(e){return f(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new VV(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),uV=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||WB(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
353
+ `;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ge.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=Ak(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new v(e.parser.nodeSet.types[Y.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(hfe.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c,s=t.to-n,c=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function Ak(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var _fe=b({"Blockquote/...":A.quote,HorizontalRule:A.contentSeparator,"ATXHeading1/... SetextHeading1/...":A.heading1,"ATXHeading2/... SetextHeading2/...":A.heading2,"ATXHeading3/...":A.heading3,"ATXHeading4/...":A.heading4,"ATXHeading5/...":A.heading5,"ATXHeading6/...":A.heading6,"Comment CommentBlock":A.comment,Escape:A.escape,Entity:A.character,"Emphasis/...":A.emphasis,"StrongEmphasis/...":A.strong,"Link/... Image/...":A.link,"OrderedList/... BulletList/...":A.list,"BlockQuote/...":A.quote,"InlineCode CodeText":A.monospace,"URL Autolink":A.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":A.processingInstruction,"CodeInfo LinkLabel":A.labelName,LinkTitle:A.string,Paragraph:A.content}),vfe=new ck(new C(fk).extend(_fe),Object.keys(ik).map(e=>ik[e]),Object.keys(ik).map(e=>ok[e]),Object.keys(ik),ufe,zO,Object.keys(wk).map(e=>wk[e]),Object.keys(wk),[]);function yfe(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function bfe(e){let{codeParser:t,htmlParser:n}=e;return{wrap:x((e,r)=>{let i=e.type.id;if(t&&(i==Y.CodeBlock||i==Y.FencedCode)){let n=``;if(i==Y.FencedCode){let t=e.node.getChild(Y.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==Y.CodeText}}else if(n&&(i==Y.HTMLBlock||i==Y.HTMLTag||i==Y.CommentBlock))return{parser:n,overlay:yfe(e.node,e.from,e.to)};return null})}}var xfe={resolve:`Strikethrough`,mark:`StrikethroughMark`},Sfe={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":A.strikethrough}},{name:`StrikethroughMark`,style:A.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=Ck.test(r),c=Ck.test(i);return e.addDelimiter(xfe,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function jk(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function Mk(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var Nk=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Pk=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&Nk.test(r=t.text.slice(t.pos))){let i=[];jk(e,n.content,0,i,n.start)==jk(e,r,t.pos)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];jk(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},Cfe={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":A.heading}},`TableRow`,{name:`TableCell`,style:A.content},{name:`TableDelimiter`,style:A.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return Mk(t.content,0)?new Pk:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof Pk)||!Mk(t.text,t.basePos))return!1;let r=e.peekLine();return Nk.test(r)&&jk(e,t.text,t.basePos)==jk(e,r,t.basePos)},before:`SetextHeading`}]},wfe=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},Tfe={defineNodes:[{name:`Task`,block:!0,style:A.list},{name:`TaskMarker`,style:A.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new wfe:null},after:`SetextHeading`}]},Fk=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Ik=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Efe=/[\w-]+\.[\w-]+($|\/)/,Lk=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Rk=/\/[a-zA-Z\d@.]+/gy;function zk(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Dfe(e,t){Ik.lastIndex=t;let n=Ik.exec(e);if(!n||Efe.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&zk(e,t,r,`)`)>zk(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function Bk(e,t){Lk.lastIndex=t;let n=Lk.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-(r==`.`?1:0)}var Ofe=[Cfe,Tfe,Sfe,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Fk.lastIndex=r;let i=Fk.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Dfe(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Bk(e.text,r):(a=Bk(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Rk.lastIndex=a,i=Rk.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function Vk(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),BO(s))break}return-1}}var kfe={defineNodes:[{name:`Superscript`,style:A.special(A.content)},{name:`SuperscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Superscript`,parse:Vk(94,`Superscript`,`SuperscriptMark`)}]},Afe={defineNodes:[{name:`Subscript`,style:A.special(A.content)},{name:`SubscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Subscript`,parse:Vk(126,`Subscript`,`SubscriptMark`)}]},jfe={defineNodes:[{name:`Emoji`,style:A.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},Mfe=55,Nfe=1,Pfe=56,Ffe=2,Ife=57,Lfe=3,Hk=4,Rfe=5,Uk=6,Wk=7,Gk=8,Kk=9,qk=10,zfe=11,Bfe=12,Vfe=13,Jk=58,Hfe=14,Ufe=15,Yk=59,Xk=21,Wfe=23,Zk=24,Gfe=25,Qk=27,$k=28,Kfe=29,qfe=32,Jfe=35,Yfe=37,Xfe=38,Zfe=0,Qfe=1,$fe={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},epe={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},eA={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function tpe(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var tA=null,nA=null,rA=0;function iA(e,t){let n=e.pos+t;if(rA==n&&nA==e)return tA;let r=e.peek(t),i=``;for(;tpe(r);)i+=String.fromCharCode(r),r=e.peek(++t);return nA=e,rA=n,tA=i?i.toLowerCase():r==npe||r==rpe?void 0:null}var aA=60,oA=62,sA=47,npe=63,rpe=33,ipe=45;function cA(e,t){this.name=e,this.parent=t}var ape=[Uk,qk,Wk,Gk,Kk],ope=new Me({start:null,shift(e,t,n,r){return ape.indexOf(t)>-1?new cA(iA(r,1)||``,e):e},reduce(e,t){return t==Xk&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Uk||i==Yfe?new cA(iA(r,1)||``,e):e},strict:!1}),spe=new Se((e,t)=>{if(e.next!=aA){e.next<0&&t.context&&e.acceptToken(Jk);return}e.advance();let n=e.next==sA;n&&e.advance();let r=iA(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?Ufe:Hfe);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(zfe);if(i&&epe[i])return e.acceptToken(Jk,-2);if(t.dialectEnabled(Zfe))return e.acceptToken(Bfe);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(Vfe)}else{if(r==`script`)return e.acceptToken(Wk);if(r==`style`)return e.acceptToken(Gk);if(r==`textarea`)return e.acceptToken(Kk);if($fe.hasOwnProperty(r))return e.acceptToken(qk);i&&eA[i]&&eA[i][r]?e.acceptToken(Jk,-1):e.acceptToken(Uk)}},{contextual:!0}),cpe=new Se(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(Yk);break}if(e.next==ipe)t++;else if(e.next==oA&&t>=2){n>=3&&e.acceptToken(Yk,-2);break}else t=0;e.advance()}});function lpe(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var upe=new Se((e,t)=>{if(e.next==sA&&e.peek(1)==oA){let n=t.dialectEnabled(Qfe)||lpe(t.context);e.acceptToken(n?Rfe:Hk,2)}else e.next==oA&&e.acceptToken(Hk,1)});function lA(e,t,n){let r=2+e.length;return new Se(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==aA||a==1&&i.next==sA||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==oA){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var dpe=lA(`script`,Mfe,Nfe),fpe=lA(`style`,Pfe,Ffe),ppe=lA(`textarea`,Ife,Lfe),mpe=b({"Text RawText IncompleteTag IncompleteCloseTag":A.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":A.angleBracket,TagName:A.tagName,"MismatchedCloseTag/TagName":[A.tagName,A.invalid],AttributeName:A.attributeName,"AttributeValue UnquotedAttributeValue":A.attributeValue,Is:A.definitionOperator,"EntityReference CharacterReference":A.character,Comment:A.blockComment,ProcessingInst:A.processingInstruction,DoctypeDecl:A.documentMeta}),hpe=Oe.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:`,c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~`,goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:ope,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`StartTag`,-4,30,33,36,38,`OpenTag`],[`group`,-10,14,15,18,19,20,21,40,41,42,43,`Entity`,17,`Entity TextContent`,-3,29,32,35,`TextContent Entity`],[`isolate`,-11,22,30,31,33,34,36,37,38,39,42,43,`ltr`,-3,27,28,40,``]],propSources:[mpe],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[dpe,fpe,ppe,upe,spe,cpe,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function uA(e,t){let n=Object.create(null);for(let r of e.getChildren(Zk)){let e=r.getChild(Gfe),i=r.getChild(Qk)||r.getChild($k);e&&(n[t.read(e.from,e.to)]=i?i.type.id==Qk?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function dA(e,t){let n=e.getChild(Wfe);return n?t.read(n.from,n.to):` `}function fA(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=uA(e.node.parent.firstChild,t)))return{parser:i.parser};return null}function pA(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return x((e,t)=>{let s=e.type.id;if(s==Kfe)return fA(e,t,n);if(s==qfe)return fA(e,t,r);if(s==Jfe)return fA(e,t,i);if(s==Xk&&a.length){let n=e.node,r=n.firstChild,i=r&&dA(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=uA(r,t)))){let t=n.lastChild,i=t.type.id==Xfe?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==Zk){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=dA(n.parent,t))continue;let e=n.lastChild;if(e.type.id==Qk){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}]}}else if(e.type.id==$k)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var gpe=122,mA=1,_pe=123,vpe=124,hA=2,ype=125,bpe=3,xpe=4,gA=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Spe=58,Cpe=40,_A=95,vA=91,yA=45,bA=46,xA=35,SA=37,CA=38,wA=92,TA=10,EA=42;function DA(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function OA(e){return e>=48&&e<=57}function kA(e){return OA(e)||e>=97&&e<=102||e>=65&&e<=70}var AA=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(DA(c)||c==yA||c==_A||a&&OA(c))!a&&(c!=yA||s>0)&&(a=!0),o===s&&c==yA&&o++,r.advance();else if(c==wA&&r.peek(1)!=TA){if(r.advance(),kA(r.next)){do r.advance();while(kA(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(hA)?t:c==Cpe?n:e);break}}},jA=new Se(AA(_pe,hA,vpe)),MA=new Se(AA(ype,bpe,xpe)),NA=new Se(e=>{if(gA.includes(e.peek(-1))){let{next:t}=e;(DA(t)||t==_A||t==xA||t==bA||t==EA||t==vA||t==Spe&&DA(e.peek(1))||t==yA||t==CA)&&e.acceptToken(gpe)}}),PA=new Se(e=>{if(!gA.includes(e.peek(-1))){let{next:t}=e;if(t==SA&&(e.advance(),e.acceptToken(mA)),DA(t)){do e.advance();while(DA(e.next)||OA(e.next));e.acceptToken(mA)}}}),FA=b({"AtKeyword import charset namespace keyframes media supports":A.definitionKeyword,"from to selector":A.keyword,NamespaceName:A.namespace,KeyframeName:A.labelName,KeyframeRangeName:A.operatorKeyword,TagName:A.tagName,ClassName:A.className,PseudoClassName:A.constant(A.className),IdName:A.labelName,"FeatureName PropertyName":A.propertyName,AttributeName:A.attributeName,NumberLiteral:A.number,KeywordQuery:A.keyword,UnaryQueryOp:A.operatorKeyword,"CallTag ValueName":A.atom,VariableName:A.variableName,Callee:A.operatorKeyword,Unit:A.unit,"UniversalSelector NestingSelector":A.definitionOperator,"MatchOp CompareOp":A.compareOperator,"ChildOp SiblingOp, LogicOp":A.logicOperator,BinOp:A.arithmeticOperator,Important:A.modifier,Comment:A.blockComment,ColorLiteral:A.color,"ParenthesizedContent StringLiteral":A.string,":":A.punctuation,"PseudoOp #":A.derefOperator,"; ,":A.separator,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace}),IA={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},LA={__proto__:null,or:98,and:98,not:106,only:106,layer:170},RA={__proto__:null,selector:112,layer:166},zA={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},BA={__proto__:null,to:207},VA=Oe.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:`⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles`,maxTerm:143,nodeProps:[[`isolate`,-2,5,36,``],[`openedBy`,20,`(`,28,`[`,31,`{`],[`closedBy`,21,`)`,29,`]`,32,`}`]],propSources:[FA],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[NA,PA,jA,MA,1,2,3,4,new pe(`m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~`,28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:e=>IA[e]||-1},{term:125,get:e=>LA[e]||-1},{term:4,get:e=>RA[e]||-1},{term:25,get:e=>zA[e]||-1},{term:123,get:e=>BA[e]||-1}],tokenPrec:1963}),HA=null;function UA(){if(!HA&&typeof document==`object`&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!=`cssText`&&r!=`cssFloat`&&typeof e[r]==`string`&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));HA=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return HA||[]}var WA=`active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where`.split(`.`).map(e=>({type:`class`,label:e})),GA=`above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`).map(e=>({type:`keyword`,label:e})).concat(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`).map(e=>({type:`constant`,label:e}))),KA=`a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul`.split(`.`).map(e=>({type:`type`,label:e})),qA=[`@charset`,`@color-profile`,`@container`,`@counter-style`,`@font-face`,`@font-feature-values`,`@font-palette-values`,`@import`,`@keyframes`,`@layer`,`@media`,`@namespace`,`@page`,`@position-try`,`@property`,`@scope`,`@starting-style`,`@supports`,`@view-transition`].map(e=>({type:`keyword`,label:e})),JA=/^(\w[\w-]*|-\w[\w-]*|)$/,YA=/^-(-[\w-]*)?$/;function XA(e,t){if((e.name==`(`||e.type.isError)&&(e=e.parent||e),e.name!=`ArgList`)return!1;let n=e.parent?.firstChild;return n?.name==`Callee`?t.sliceString(n.from,n.to)==`var`:!1}var ZA=new O,QA=[`Declaration`];function $A(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function ej(e,t,n){if(t.to-t.from>4096){let r=ZA.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(a.IncludeAnonymous);if(s.firstChild())do for(let t of ej(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t));while(s.nextSibling());return ZA.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(QA)&&t.node.nextSibling?.name==`:`){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:`variable`}))}}),r}}var tj=e=>t=>{let{state:n,pos:r}=t,i=p(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)==`-`;if(i.name==`PropertyName`||(a||i.name==`TagName`)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:UA(),validFor:JA};if(i.name==`ValueName`)return{from:i.from,options:GA,validFor:JA};if(i.name==`PseudoClassName`)return{from:i.from,options:WA,validFor:JA};if(e(i)||(t.explicit||a)&&XA(i,n.doc))return{from:e(i)||a?i.from:r,options:ej(n.doc,$A(i),e),validFor:YA};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:UA(),validFor:JA};return{from:i.from,options:KA,validFor:JA}}if(i.name==`AtKeyword`)return{from:i.from,options:qA,validFor:JA};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:WA,validFor:JA}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:GA,validFor:JA}:o.name==`Block`||o.name==`Styles`?{from:r,options:UA(),validFor:JA}:null},nj=tj(e=>e.name==`VariableName`),rj=Ae.define({name:`css`,parser:VA.configure({props:[l.add({Declaration:fe()}),s.add({"Block KeyframeList":ze})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function ij(){return new Ne(rj,rj.data.of({autocomplete:nj}))}var aj=[`_blank`,`_self`,`_top`,`_parent`],oj=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],sj=[`get`,`post`,`put`,`delete`],cj=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],lj=[`true`,`false`],uj={},dj={a:{attrs:{href:null,ping:null,type:null,media:null,target:aj,hreflang:null}},abbr:uj,address:uj,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:uj,aside:uj,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:uj,base:{attrs:{href:null,target:aj}},bdi:uj,bdo:uj,blockquote:{attrs:{cite:null}},body:uj,br:uj,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:cj,formmethod:sj,formnovalidate:[`novalidate`],formtarget:aj,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:uj,center:uj,cite:uj,code:uj,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:uj,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:uj,div:uj,dl:uj,dt:uj,em:uj,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:uj,figure:uj,footer:uj,form:{attrs:{action:null,name:null,"accept-charset":oj,autocomplete:[`on`,`off`],enctype:cj,method:sj,novalidate:[`novalidate`],target:aj}},h1:uj,h2:uj,h3:uj,h4:uj,h5:uj,h6:uj,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:uj,hgroup:uj,hr:uj,html:{attrs:{manifest:null}},i:uj,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:cj,formmethod:sj,formnovalidate:[`novalidate`],formtarget:aj,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:uj,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:uj,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:uj,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:oj,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:uj,noscript:uj,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:uj,param:{attrs:{name:null,value:null}},pre:uj,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:uj,rt:uj,ruby:uj,samp:uj,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:oj}},section:uj,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:uj,source:{attrs:{src:null,type:null,media:null}},span:uj,strong:uj,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:uj,summary:uj,sup:uj,table:uj,tbody:uj,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:uj,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:uj,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:uj,time:{attrs:{datetime:null}},title:uj,tr:uj,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:uj,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:uj},fj={accesskey:null,class:null,contenteditable:lj,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:lj,autocorrect:lj,autocapitalize:lj,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":lj,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":lj,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":lj,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":lj,"aria-hidden":lj,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":lj,"aria-multiselectable":lj,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":lj,"aria-relevant":null,"aria-required":lj,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},pj=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of pj)fj[e]=null;var mj=class{constructor(e,t){this.tags={...dj,...e},this.globalAttrs={...fj,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};mj.default=new mj;function hj(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function gj(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function _j(e,t,n){return n.tags[hj(e,gj(t))]?.children||n.allTags}function vj(e,t){let n=[];for(let r=gj(t);r&&!r.type.isTop;r=gj(r.parent)){let i=hj(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var yj=/^[:\-\.\w\u00b7-\uffff]*$/;function bj(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=gj(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:_j(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(vj(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function xj(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:vj(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:yj}}function Sj(e,t,n,r){let i=[],a=0;for(let r of _j(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of vj(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Cj(e,t,n,r,i){let a=gj(n),o=a?t.tags[hj(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:yj}}function wj(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=gj(n),i=r?t.tags[hj(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function Tj(e,t){let{state:n,pos:r}=t,i=p(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?xj(n,i,i.from,r):bj(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?bj(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?xj(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?Cj(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?wj(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?Sj(n,e,i,r):null}function Ej(e){return Tj(mj.default,e)}function Dj(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new mj(t,n):mj.default;return e=>Tj(r,e)}var Oj=Ke.parser.configure({top:`SingleExpression`}),kj=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:Ge.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:Ue.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:He.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:Oj},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Ke.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:rj.parser}],Aj=[{name:`style`,parser:rj.parser.configure({top:`Styles`})}].concat(pj.map(e=>({name:e,parser:Ke.parser}))),jj=Ae.define({name:`html`,parser:hpe.configure({props:[l.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),s.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),be.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),Mj=jj.configure({wrap:pA(kj,Aj)});function Nj(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=pA((e.nestedLanguages||[]).concat(kj),(e.nestedAttributes||[]).concat(Aj))),new Ne(n?jj.configure({wrap:n,dialect:t}):t?Mj.configure({dialect:t}):Mj,[Mj.data.of({autocomplete:Dj(e)}),e.autoCloseTags===!1?[]:Fj,We().support,ij().support])}var Pj=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),Fj=I.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!Mj.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=p(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(a=hj(o.doc,t.parent,n))&&!Pj.has(a))return{range:e,changes:{from:n,to:n+(o.doc.sliceString(n,n+1)===`>`?1:0),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=hj(o.doc,e,n))&&!Pj.has(a)){let e=n+(o.doc.sliceString(n,n+1)===`>`?1:0),t=`${a}>`;return{range:le.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),Ij=te({commentTokens:{block:{open:`<!--`,close:`-->`}}}),Lj=new ge,Rj=vfe.configure({props:[s.add(e=>!e.is(`Block`)||e.is(`Document`)||zj(e)!=null||Bj(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),Lj.add(zj),l.add({Document:()=>null}),he.add({Document:Ij})]});function zj(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Bj(e){return e.name==`OrderedList`||e.name==`BulletList`}function Vj(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=zj(e.type))!=null&&r<=t)break;n=e}return n.to}var Hj=Le.of((e,t,n)=>{for(let r=p(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(Lj);if(e==null)continue;let t=Vj(r,e);if(t>n)return{from:n,to:t}}return null});function Uj(e){return new H(Ij,e,[],`markdown`)}var Wj=Uj(Rj),Gj=Uj(Rj.configure([Ofe,Afe,kfe,jfe,{props:[s.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function Kj(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):U.matchLanguageName(e,n,!0),t instanceof U)return t.support?t.support.language.parser:ae.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var qj=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}else{for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}}marker(e,t){let n=this.node.name==`OrderedList`?String(+Yj(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function Jj(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new qj(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new qj(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new qj(i.parent,s,s+t,a[1],e,n,i))}}return r}function Yj(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function Xj(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=Yj(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function Zj(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(i)!=` `)return e;let r=u(e,4,n),a=``;for(let e=r;e>0;)e>=4?(a+=` `,e-=4):(a+=` `,e--);return a+e.slice(n)}var Qj=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!Gj.isActiveAt(t,n.from,-1)&&!Gj.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=Jj(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let d=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&d){let n=l.node.firstChild,r=l.node.getChild(`ListItem`,`ListItem`);if(n.to>=o||r&&r.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&Xj(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&Xj(e.item,i,r),{range:le.cursor(t+n.length),changes:r}}else{let e=nM(c,t,s);return{range:le.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&d&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let f=[];l.node.name==`OrderedList`&&Xj(l.item,i,f);let p=l.item&&l.item.from<s.from,m=``;if(!p||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)m+=e==t&&!p?c[e].marker(i,1):c[e].blank(e<t?u(s.text,4,c[e+1].from)-m.length:null);let h=o;for(;h>s.from&&/\s/.test(s.text.charAt(h-s.from-1));)h--;return m=Zj(m,t),tM(l.node,t.doc)&&(m=nM(c,t,s)+t.lineBreak+m),f.push({from:h,to:o,insert:t.lineBreak+m}),{range:le.cursor(h+m.length+1),changes:f}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},$j=Qj();function eM(e){return e.name==`QuoteMark`||e.name==`ListMark`}function tM(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<a.number}function nM(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?u(n.text,4,e[t+1].from)-r.length:null,t<i);return Zj(r,t)}function rM(e,t){let n=e.resolveInner(t,-1),r=t;eM(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(eM(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var iM=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&Gj.isActiveAt(e,t.from)){let t=a.lineAt(i),r=Jj(rM(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+(n.spaceAfter?1:0);if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:le.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(!n.item||t.from<=n.item.from||!/\S/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(u(t.text,4,n.to)-u(t.text,4,n.from));return r==t.from&&(i=Zj(i,e)),{range:le.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:le.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},aM=[{key:`Enter`,run:$j},{key:`Backspace`,run:iM}],oM=Nj({matchClosingTags:!1});function sM(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=Wj,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=oM}=e;if(!(a instanceof ck))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],u=[c.support,Hj],d;s&&u.push(fM),n instanceof Ne?(u.push(n.support),d=n.language):n&&(d=n);let f=t||d?Kj(t,d):void 0;l.push(bfe({codeParser:f,htmlParser:c.language.parser})),i&&u.push(de.high(r.of(aM)));let p=Uj(a.configure(l));return o&&u.push(p.data.of({autocomplete:cM})),new Ne(p,u)}function cM(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=p(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:uM(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var lM=null;function uM(){if(lM)return lM;let e=Ej(new Ze(Ee.create({extensions:oM}),0,!0));return lM=e?e.options:[]}var dM=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,fM=I.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!Gj.isActiveAt(t.state,n.from,1)))return!1;let i=p(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||dM.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),a?!1:(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}}),pM=63,mM=64,hM=1,gM=2,_M=3,vM=4,yM=5,bM=6,xM=7,SM=65,CM=66,wM=8,TM=9,EM=10,DM=11,OM=12,kM=13,AM=19,jM=20,MM=29,NM=33,wpe=34,Tpe=47,Epe=0,PM=1,FM=2,IM=3,LM=4,RM=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};RM.top=new RM(null,-1,Epe);function zM(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(VM(t)||t==-1)return n}}function BM(e){return e==32||e==9}function VM(e){return e==10||e==13}function HM(e){return BM(e)||VM(e)}function UM(e){return e<0||HM(e)}var Dpe=new Me({start:RM.top,reduce(e,t){return e.type==IM&&(t==jM||t==wpe)?e.parent:e},shift(e,t,n,r){if(t==_M)return new RM(e,zM(r,r.pos),PM);if(t==SM||t==yM)return new RM(e,zM(r,r.pos),FM);if(t==pM)return e.parent;if(t==AM||t==NM)return new RM(e,0,IM);if(t==kM&&e.type==LM)return e.parent;if(t==Tpe){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new RM(e,e.depth+ +t[0],LM)}return e},hash(e){return e.hash}});function WM(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&UM(e.peek(n+3))}var Ope=new Se((e,t)=>{if(e.next==-1&&t.canShift(mM))return e.acceptToken(mM);let n=e.peek(-1);if((VM(n)||n<0)&&t.context.type!=IM){if(WM(e,45))if(t.canShift(pM))e.acceptToken(pM);else return e.acceptToken(hM,3);if(WM(e,46))if(t.canShift(pM))e.acceptToken(pM);else return e.acceptToken(gM,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==PM&&(e.next!=45||!UM(e.peek(1))))&&e.next!=-1&&!VM(e.next)&&e.next!=35&&e.acceptToken(pM,-n)}},{contextual:!0}),kpe=new Se((e,t)=>{if(t.context.type==IM){e.next==63&&(e.advance(),UM(e.next)&&e.acceptToken(xM));return}if(e.next==45)e.advance(),UM(e.next)&&e.acceptToken(t.context.type==PM&&t.context.depth==zM(e,e.pos-1)?vM:_M);else if(e.next==63)e.advance(),UM(e.next)&&e.acceptToken(t.context.type==FM&&t.context.depth==zM(e,e.pos-1)?bM:yM);else{let n=e.pos;for(;;)if(BM(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)qM(e);else if(e.next==38)JM(e);else if(e.next==42){JM(e);break}else if(e.next==39||e.next==34){if(YM(e,!0))break;return}else if(e.next==91||e.next==123){if(!jpe(e))return;break}else{QM(e,!0,!1,0);break}for(;BM(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(MM))return;UM(e.peek(1))&&e.acceptTokenTo(t.context.type==FM&&t.context.depth==zM(e,n)?CM:SM,n)}}},{contextual:!0});function Ape(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function GM(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function KM(e,t){return e.next==37?(e.advance(),GM(e.next)&&e.advance(),GM(e.next)&&e.advance(),!0):Ape(e.next)||t&&e.next==44?(e.advance(),!0):!1}function qM(e){if(e.advance(),e.next==60){for(e.advance();;)if(!KM(e,!0)){e.next==62&&e.advance();break}}else for(;KM(e,!1););}function JM(e){for(e.advance();!UM(e.next)&&XM(e.tag)!=`f`;)e.advance()}function YM(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n)if(a==39)if(e.next==39)e.advance();else break;else break;else if(a==92&&n==34)e.next>=0&&e.advance();else if(VM(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function jpe(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!YM(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||VM(e.next))return!1;else e.advance()}var Mpe=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function XM(e){return e<33?`u`:e>125?`s`:Mpe[e-33]}function ZM(e,t){let n=XM(e);return n!=`u`&&!(t&&n==`f`)}function QM(e,t,n,r){if(XM(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&ZM(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;HM(a);){if(VM(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?ZM(e.peek(o+1),n):a==35?e.peek(o-1)!=32:ZM(a,n)))||!n&&s<=r||s==0&&!n&&(WM(e,45,o)||WM(e,46,o)))break;if(t&&XM(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var Npe=new Se((e,t)=>{if(e.next==33)qM(e),e.acceptToken(OM);else if(e.next==38||e.next==42){let t=e.next==38?EM:DM;JM(e),e.acceptToken(t)}else e.next==39||e.next==34?(YM(e,!1),e.acceptToken(TM)):QM(e,!1,t.context.type==IM,t.context.depth)&&e.acceptToken(wM)}),Ppe=new Se((e,t)=>{let n=t.context.type==LM?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(WM(e,45,i)||WM(e,46,i))||!VM(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=VM(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(kM,r)}),Fpe=b({DirectiveName:A.keyword,DirectiveContent:A.attributeValue,"DirectiveEnd DocEnd":A.meta,QuotedLiteral:A.string,BlockLiteralHeader:A.special(A.string),BlockLiteralContent:A.content,Literal:A.content,"Key/Literal Key/QuotedLiteral":A.definition(A.propertyName),"Anchor Alias":A.labelName,Tag:A.typeName,Comment:A.lineComment,": , -":A.separator,"?":A.punctuation,"[ ]":A.squareBracket,"{ }":A.brace}),Ipe=Oe.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:Dpe,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[Fpe],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[Ope,kpe,Npe,Ppe,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),Lpe=Oe.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:`!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~`,goto:`vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS`,nodeNames:`⚠ Document Frontmatter DashLine FrontmatterContent Body`,maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),$M=Ae.define({name:`yaml`,parser:Ipe.configure({props:[l.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:Fe({closing:`}`}),FlowSequence:Fe({closing:`]`})}),s.add({"FlowMapping FlowSequence":ze,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function eN(){return new Ne($M)}Ae.define({name:`yaml-frontmatter`,parser:Lpe.configure({props:[b({DashLine:A.meta})]})});function X(e){return new Ne(ce.define(e))}function tN(e){return q(()=>import(`./dist-DVFW0GyF.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([98,99,100]))}var Rpe=[U.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return q(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),U.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return q(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),U.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return tN(`Cassandra`)}}),U.of({name:`CSS`,extensions:[`css`],load(){return q(()=>import(`./dist-BHVRVW4G.js`).then(e=>e.css()),__vite__mapDeps([102,100]))}}),U.of({name:`Go`,extensions:[`go`],load(){return q(()=>import(`./dist-CLKxKEQH.js`).then(e=>e.go()),__vite__mapDeps([103,99,100]))}}),U.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return q(()=>import(`./dist-Bl-Yx_pv.js`).then(e=>e.html()),__vite__mapDeps([104,105,1,99,100]))}}),U.of({name:`Java`,extensions:[`java`],load(){return q(()=>import(`./dist-BiexWhMB.js`).then(e=>e.java()),__vite__mapDeps([106,100]))}}),U.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return q(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([105,1,99,100]))}}),U.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return q(()=>import(`./dist-BrVgy81Q.js`).then(e=>e.jinja()),__vite__mapDeps([107,105,1,99,100]))}}),U.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return q(()=>import(`./dist-CI8PS7VF.js`).then(e=>e.json()),__vite__mapDeps([108,100]))}}),U.of({name:`JSX`,extensions:[`jsx`],load(){return q(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([105,1,99,100]))}}),U.of({name:`LESS`,extensions:[`less`],load(){return q(()=>import(`./dist-GfVlAkN6.js`).then(e=>e.less()),__vite__mapDeps([109,100]))}}),U.of({name:`Liquid`,extensions:[`liquid`],load(){return q(()=>import(`./dist-VPeqJD5l.js`).then(e=>e.liquid()),__vite__mapDeps([110,105,1,99,100]))}}),U.of({name:`MariaDB SQL`,load(){return tN(`MariaSQL`)}}),U.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return q(()=>import(`./dist-BKmYJegx.js`).then(e=>e.markdown()),__vite__mapDeps([111,105,1,99,100]))}}),U.of({name:`MS SQL`,load(){return tN(`MSSQL`)}}),U.of({name:`MySQL`,load(){return tN(`MySQL`)}}),U.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return q(()=>import(`./dist-Bo9PZWYk.js`).then(e=>e.php()),__vite__mapDeps([112,105,1,99,100]))}}),U.of({name:`PLSQL`,extensions:[`pls`],load(){return tN(`PLSQL`)}}),U.of({name:`PostgreSQL`,load(){return tN(`PostgreSQL`)}}),U.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return q(()=>import(`./dist-ExQdmG6u.js`).then(e=>e.python()),__vite__mapDeps([113,99,100]))}}),U.of({name:`Rust`,extensions:[`rs`],load(){return q(()=>import(`./dist-BNF0fuPB.js`).then(e=>e.rust()),__vite__mapDeps([114,100]))}}),U.of({name:`Sass`,extensions:[`sass`],load(){return q(()=>import(`./dist-DcyfplO7.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([115,100]))}}),U.of({name:`SCSS`,extensions:[`scss`],load(){return q(()=>import(`./dist-DcyfplO7.js`).then(e=>e.sass()),__vite__mapDeps([115,100]))}}),U.of({name:`SQL`,extensions:[`sql`],load(){return tN(`StandardSQL`)}}),U.of({name:`SQLite`,load(){return tN(`SQLite`)}}),U.of({name:`TSX`,extensions:[`tsx`],load(){return q(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),U.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return q(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),U.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return q(()=>import(`./dist-CRs-U2qz.js`).then(e=>e.wast()),__vite__mapDeps([116,100]))}}),U.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return q(()=>import(`./dist-CbIYKZT0.js`).then(e=>e.xml()),__vite__mapDeps([117,100]))}}),U.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return q(()=>import(`./dist-CM3Rniow.js`).then(e=>e.yaml()),__vite__mapDeps([118,100]))}}),U.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return q(()=>import(`./apl-CJPt5sW7.js`).then(e=>X(e.apl)),[])}}),U.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return q(()=>import(`./asciiarmor-D0oCypDs.js`).then(e=>X(e.asciiArmor)),[])}}),U.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return q(()=>import(`./asn1-8xgVfRoq.js`).then(e=>X(e.asn1({}))),[])}}),U.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return q(()=>import(`./asterisk-B5kv5AQp.js`).then(e=>X(e.asterisk)),[])}}),U.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return q(()=>import(`./brainfuck-Dh7M1Ucz.js`).then(e=>X(e.brainfuck)),[])}}),U.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return q(()=>import(`./cobol-D3WLbLVy.js`).then(e=>X(e.cobol)),[])}}),U.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.csharp)),[])}}),U.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return q(()=>import(`./clojure-CdWlIeQh.js`).then(e=>X(e.clojure)),[])}}),U.of({name:`ClojureScript`,extensions:[`cljs`],load(){return q(()=>import(`./clojure-CdWlIeQh.js`).then(e=>X(e.clojure)),[])}}),U.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return q(()=>import(`./css-_6KgQwpu.js`).then(e=>X(e.gss)),[])}}),U.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return q(()=>import(`./cmake-wWuF5ifR.js`).then(e=>X(e.cmake)),[])}}),U.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return q(()=>import(`./coffeescript-DRtt-5a2.js`).then(e=>X(e.coffeeScript)),[])}}),U.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return q(()=>import(`./commonlisp-DJV75lsU.js`).then(e=>X(e.commonLisp)),[])}}),U.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return q(()=>import(`./cypher-B3uWx7jm.js`).then(e=>X(e.cypher)),[])}}),U.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return q(()=>import(`./python-2pwcWoy7.js`).then(e=>X(e.cython)),[])}}),U.of({name:`Crystal`,extensions:[`cr`],load(){return q(()=>import(`./crystal-C7mEw92C.js`).then(e=>X(e.crystal)),[])}}),U.of({name:`D`,extensions:[`d`],load(){return q(()=>import(`./d-D3kOh3JF.js`).then(e=>X(e.d)),[])}}),U.of({name:`Dart`,extensions:[`dart`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.dart)),[])}}),U.of({name:`diff`,extensions:[`diff`,`patch`],load(){return q(()=>import(`./diff-CoamybWh.js`).then(e=>X(e.diff)),[])}}),U.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return q(()=>import(`./dockerfile-Ci0-ApQC.js`).then(e=>X(e.dockerFile)),__vite__mapDeps([119,120]))}}),U.of({name:`DTD`,extensions:[`dtd`],load(){return q(()=>import(`./dtd-BjGQwMWL.js`).then(e=>X(e.dtd)),[])}}),U.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return q(()=>import(`./dylan-B9W3X2GI.js`).then(e=>X(e.dylan)),[])}}),U.of({name:`EBNF`,load(){return q(()=>import(`./ebnf-d5D0otVn.js`).then(e=>X(e.ebnf)),[])}}),U.of({name:`ECL`,extensions:[`ecl`],load(){return q(()=>import(`./ecl-C5Q_IBPt.js`).then(e=>X(e.ecl)),[])}}),U.of({name:`edn`,extensions:[`edn`],load(){return q(()=>import(`./clojure-CdWlIeQh.js`).then(e=>X(e.clojure)),[])}}),U.of({name:`Eiffel`,extensions:[`e`],load(){return q(()=>import(`./eiffel-BQA_6I3b.js`).then(e=>X(e.eiffel)),[])}}),U.of({name:`Elm`,extensions:[`elm`],load(){return q(()=>import(`./elm-unPS17vB.js`).then(e=>X(e.elm)),[])}}),U.of({name:`Erlang`,extensions:[`erl`],load(){return q(()=>import(`./erlang-R8nOsUTx.js`).then(e=>X(e.erlang)),[])}}),U.of({name:`Esper`,load(){return q(()=>import(`./sql-CwA10oIk.js`).then(e=>X(e.esper)),[])}}),U.of({name:`Factor`,extensions:[`factor`],load(){return q(()=>import(`./factor-DMvifS-k.js`).then(e=>X(e.factor)),__vite__mapDeps([121,120]))}}),U.of({name:`FCL`,load(){return q(()=>import(`./fcl-CVAfW9wK.js`).then(e=>X(e.fcl)),[])}}),U.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return q(()=>import(`./forth-DHbsK8X8.js`).then(e=>X(e.forth)),[])}}),U.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return q(()=>import(`./fortran-4jMwxW9-.js`).then(e=>X(e.fortran)),[])}}),U.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return q(()=>import(`./mllike-iZXopbca.js`).then(e=>X(e.fSharp)),[])}}),U.of({name:`Gas`,extensions:[`s`],load(){return q(()=>import(`./gas-zC_XGrQT.js`).then(e=>X(e.gas)),[])}}),U.of({name:`Gherkin`,extensions:[`feature`],load(){return q(()=>import(`./gherkin-CPBQou3u.js`).then(e=>X(e.gherkin)),[])}}),U.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return q(()=>import(`./groovy-Cqopym0q.js`).then(e=>X(e.groovy)),[])}}),U.of({name:`Haskell`,extensions:[`hs`],load(){return q(()=>import(`./haskell-imzbNPgF.js`).then(e=>X(e.haskell)),[])}}),U.of({name:`Haxe`,extensions:[`hx`],load(){return q(()=>import(`./haxe-Doh225Ku.js`).then(e=>X(e.haxe)),[])}}),U.of({name:`HXML`,extensions:[`hxml`],load(){return q(()=>import(`./haxe-Doh225Ku.js`).then(e=>X(e.hxml)),[])}}),U.of({name:`HTTP`,load(){return q(()=>import(`./http-j4R5uEso.js`).then(e=>X(e.http)),[])}}),U.of({name:`IDL`,extensions:[`pro`],load(){return q(()=>import(`./idl-l9d1__Hj.js`).then(e=>X(e.idl)),[])}}),U.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return q(()=>import(`./javascript-BcqCeS4O.js`).then(e=>X(e.jsonld)),[])}}),U.of({name:`Julia`,extensions:[`jl`],load(){return q(()=>import(`./julia-BU0qBb1w.js`).then(e=>X(e.julia)),[])}}),U.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.kotlin)),[])}}),U.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return q(()=>import(`./livescript-uk34VDGK.js`).then(e=>X(e.liveScript)),[])}}),U.of({name:`Lua`,extensions:[`lua`],load(){return q(()=>import(`./lua-ClQGOv84.js`).then(e=>X(e.lua)),[])}}),U.of({name:`mIRC`,extensions:[`mrc`],load(){return q(()=>import(`./mirc-DRRKKkcJ.js`).then(e=>X(e.mirc)),[])}}),U.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return q(()=>import(`./mathematica-BDmKpvRN.js`).then(e=>X(e.mathematica)),[])}}),U.of({name:`Modelica`,extensions:[`mo`],load(){return q(()=>import(`./modelica-DP8T2DKM.js`).then(e=>X(e.modelica)),[])}}),U.of({name:`MUMPS`,extensions:[`mps`],load(){return q(()=>import(`./mumps-BKUS05-y.js`).then(e=>X(e.mumps)),[])}}),U.of({name:`Mbox`,extensions:[`mbox`],load(){return q(()=>import(`./mbox-T5kA6jAQ.js`).then(e=>X(e.mbox)),[])}}),U.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return q(()=>import(`./nginx-CzYOtr2G.js`).then(e=>X(e.nginx)),[])}}),U.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return q(()=>import(`./nsis-BbRIeGvl.js`).then(e=>X(e.nsis)),__vite__mapDeps([122,120]))}}),U.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return q(()=>import(`./ntriples-ZgZuaYbW.js`).then(e=>X(e.ntriples)),[])}}),U.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.objectiveC)),[])}}),U.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.objectiveCpp)),[])}}),U.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return q(()=>import(`./mllike-iZXopbca.js`).then(e=>X(e.oCaml)),[])}}),U.of({name:`Octave`,extensions:[`m`],load(){return q(()=>import(`./octave-CnOndUN3.js`).then(e=>X(e.octave)),[])}}),U.of({name:`Oz`,extensions:[`oz`],load(){return q(()=>import(`./oz-DjW322Rn.js`).then(e=>X(e.oz)),[])}}),U.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return q(()=>import(`./pascal-BdeW5uRX.js`).then(e=>X(e.pascal)),[])}}),U.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return q(()=>import(`./perl-_CDvIe1D.js`).then(e=>X(e.perl)),[])}}),U.of({name:`Pig`,extensions:[`pig`],load(){return q(()=>import(`./pig-inWo_B4W.js`).then(e=>X(e.pig)),[])}}),U.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return q(()=>import(`./powershell-CO5KWJsy.js`).then(e=>X(e.powerShell)),[])}}),U.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return q(()=>import(`./properties-CjVp4a6M.js`).then(e=>X(e.properties)),[])}}),U.of({name:`ProtoBuf`,extensions:[`proto`],load(){return q(()=>import(`./protobuf-DybFT2KT.js`).then(e=>X(e.protobuf)),[])}}),U.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return q(()=>import(`./pug-D1ZtszdL.js`).then(e=>X(e.pug)),__vite__mapDeps([123,124]))}}),U.of({name:`Puppet`,extensions:[`pp`],load(){return q(()=>import(`./puppet-Dw_NDgko.js`).then(e=>X(e.puppet)),[])}}),U.of({name:`Q`,extensions:[`q`],load(){return q(()=>import(`./q-C47l8kdS.js`).then(e=>X(e.q)),[])}}),U.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return q(()=>import(`./r-BmcXGVZ5.js`).then(e=>X(e.r)),[])}}),U.of({name:`RPM Changes`,load(){return q(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>X(e.rpmChanges)),[])}}),U.of({name:`RPM Spec`,extensions:[`spec`],load(){return q(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>X(e.rpmSpec)),[])}}),U.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return q(()=>import(`./ruby-Dl-I4pxG.js`).then(e=>X(e.ruby)),[])}}),U.of({name:`SAS`,extensions:[`sas`],load(){return q(()=>import(`./sas-Bxkg4GVX.js`).then(e=>X(e.sas)),[])}}),U.of({name:`Scala`,extensions:[`scala`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.scala)),[])}}),U.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return q(()=>import(`./scheme-CO3zogua.js`).then(e=>X(e.scheme)),[])}}),U.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return q(()=>import(`./shell-gYrTvBTP.js`).then(e=>X(e.shell)),[])}}),U.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return q(()=>import(`./sieve-COX4Kn1X.js`).then(e=>X(e.sieve)),[])}}),U.of({name:`Smalltalk`,extensions:[`st`],load(){return q(()=>import(`./smalltalk-Dma1z5eE.js`).then(e=>X(e.smalltalk)),[])}}),U.of({name:`Solr`,load(){return q(()=>import(`./solr-BvhcdkNH.js`).then(e=>X(e.solr)),[])}}),U.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return q(()=>import(`./mllike-iZXopbca.js`).then(e=>X(e.sml)),[])}}),U.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return q(()=>import(`./sparql-gX7W9xeh.js`).then(e=>X(e.sparql)),[])}}),U.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return q(()=>import(`./spreadsheet-BnlQRxWz.js`).then(e=>X(e.spreadsheet)),[])}}),U.of({name:`Squirrel`,extensions:[`nut`],load(){return q(()=>import(`./clike-zYz_LEkw.js`).then(e=>X(e.squirrel)),[])}}),U.of({name:`Stylus`,extensions:[`styl`],load(){return q(()=>import(`./stylus-9ZGSp3KB.js`).then(e=>X(e.stylus)),[])}}),U.of({name:`Swift`,extensions:[`swift`],load(){return q(()=>import(`./swift-CurfpLXH.js`).then(e=>X(e.swift)),[])}}),U.of({name:`sTeX`,load(){return q(()=>import(`./stex-DhLUylSV.js`).then(e=>X(e.stex)),[])}}),U.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return q(()=>import(`./stex-DhLUylSV.js`).then(e=>X(e.stex)),[])}}),U.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return q(()=>import(`./verilog-BFxB5RAN.js`).then(e=>X(e.verilog)),[])}}),U.of({name:`Tcl`,extensions:[`tcl`],load(){return q(()=>import(`./tcl-BPvzXR-t.js`).then(e=>X(e.tcl)),[])}}),U.of({name:`Textile`,extensions:[`textile`],load(){return q(()=>import(`./textile-BUq3vgBH.js`).then(e=>X(e.textile)),[])}}),U.of({name:`TiddlyWiki`,load(){return q(()=>import(`./tiddlywiki-DRR6E4hS.js`).then(e=>X(e.tiddlyWiki)),[])}}),U.of({name:`Tiki wiki`,load(){return q(()=>import(`./tiki-C1XMixgx.js`).then(e=>X(e.tiki)),[])}}),U.of({name:`TOML`,extensions:[`toml`],load(){return q(()=>import(`./toml-BQjoWSzq.js`).then(e=>X(e.toml)),[])}}),U.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return q(()=>import(`./troff-DbgTp3Cj.js`).then(e=>X(e.troff)),[])}}),U.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return q(()=>import(`./ttcn-1OxchGWH.js`).then(e=>X(e.ttcn)),[])}}),U.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return q(()=>import(`./ttcn-cfg-CC8OhyHu.js`).then(e=>X(e.ttcnCfg)),[])}}),U.of({name:`Turtle`,extensions:[`ttl`],load(){return q(()=>import(`./turtle-D1WjVU4-.js`).then(e=>X(e.turtle)),[])}}),U.of({name:`Web IDL`,extensions:[`webidl`],load(){return q(()=>import(`./webidl-advQMGTP.js`).then(e=>X(e.webIDL)),[])}}),U.of({name:`VB.NET`,extensions:[`vb`],load(){return q(()=>import(`./vb-Bf-XXYNJ.js`).then(e=>X(e.vb)),[])}}),U.of({name:`VBScript`,extensions:[`vbs`],load(){return q(()=>import(`./vbscript-HeSyWuOi.js`).then(e=>X(e.vbScript)),[])}}),U.of({name:`Velocity`,extensions:[`vtl`],load(){return q(()=>import(`./velocity-CUkiDsJQ.js`).then(e=>X(e.velocity)),[])}}),U.of({name:`Verilog`,extensions:[`v`],load(){return q(()=>import(`./verilog-BFxB5RAN.js`).then(e=>X(e.verilog)),[])}}),U.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return q(()=>import(`./vhdl-BJUXQE-6.js`).then(e=>X(e.vhdl)),[])}}),U.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return q(()=>import(`./xquery-CNzoFgd7.js`).then(e=>X(e.xQuery)),[])}}),U.of({name:`Yacas`,extensions:[`ys`],load(){return q(()=>import(`./yacas-BsmlDKac.js`).then(e=>X(e.yacas)),[])}}),U.of({name:`Z80`,extensions:[`z80`],load(){return q(()=>import(`./z80-Bnez4vZ_.js`).then(e=>X(e.z80)),[])}}),U.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return q(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>X(e.mscgen)),[])}}),U.of({name:`Xù`,extensions:[`xu`],load(){return q(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>X(e.xu)),[])}}),U.of({name:`MsGenny`,extensions:[`msgenny`],load(){return q(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>X(e.msgenny)),[])}}),U.of({name:`Vue`,extensions:[`vue`],load(){return q(()=>import(`./dist-COdrA1_m.js`).then(e=>e.vue()),__vite__mapDeps([125,105,1,99,100]))}}),U.of({name:`Angular Template`,load(){return q(()=>import(`./dist-BA9W6ivS.js`).then(e=>e.angular()),__vite__mapDeps([126,105,1,99,100]))}})],nN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},zpe={borderLeftWidth:`2px`},rN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},iN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},aN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Bpe={borderRadius:`2px`},oN={borderRadius:`2px`},sN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},cN={width:`12px`,height:`12px`,borderRadius:`6px`},lN={borderRadius:`4px`,padding:`2px 6px`},uN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},dN=`#0d1117`,fN=`#c9d1d9`,pN=`#264F78`,mN=`#8b949e`,hN=`#ffffff`,gN=`#7ee787`,_N=`#d2a8ff`,vN=`#79c0ff`,yN=`#ff7b72`,bN=`#a5d6ff`,Vpe=`#2c333a`,Hpe=`#3c444d`,xN=`#ffab70`,SN=`#161b22`,CN=`#30363d`,Upe=`#21262d`,wN=`#f97583`,Wpe=`#2d333b1a`,TN=`#21262d`,EN=hN,DN=pN,Gpe=`#3a587a75`,ON=`#4d90fe`,kN=`#d29922`,Kpe=`#3a587a55`,AN=`#58a6ff`,qpe=`#bc8cff`,jN=`#2ea04350`,MN=`#f8514940`,NN=`#7ee787`,PN=`#ff7b72`,FN=[I.theme({"&":{color:fN,backgroundColor:dN,fontSize:nN.fontSize,fontFamily:nN.fontFamily},".cm-content":{caretColor:EN,lineHeight:nN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:EN,borderLeftWidth:zpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${EN}99`,color:dN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:DN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#3a587a`,outline:`1px solid ${vN}`,color:fN,borderRadius:lN.borderRadius,"& span":{color:fN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ON,color:hN,padding:lN.padding,"& span":{color:hN}},".cm-search.cm-panel.cm-textfield":{color:fN,borderRadius:lN.borderRadius,padding:lN.padding},".cm-panels":{backgroundColor:TN,color:fN,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${CN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${CN}`},".cm-panel button":{backgroundColor:TN,color:fN,border:aN.border,borderRadius:aN.borderRadius,padding:aN.padding},".cm-panel button:hover":{backgroundColor:Vpe},".cm-activeLine":{backgroundColor:Wpe,borderRadius:Bpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:SN,color:mN,border:iN.border,borderRight:`1px solid #30363d`,paddingRight:iN.paddingRight},".cm-activeLineGutter":{backgroundColor:Upe,color:fN,fontWeight:iN.fontWeight},".cm-lineNumbers":{fontSize:iN.fontSize,lineHeight:iN.lineHeight},".cm-foldGutter":{fontSize:iN.fontSize,lineHeight:iN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:mN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:fN},".cm-insertedLine":{textDecoration:rN.insertedTextDecoration,backgroundColor:jN,color:NN,padding:rN.insertedLinePadding,borderRadius:rN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:rN.insertedTextDecoration,backgroundColor:`${jN} !important`,color:NN,padding:rN.insertedLinePadding,borderRadius:rN.borderRadious,border:`1px solid ${NN}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:rN.deletedTextDecoration,backgroundColor:MN,color:PN,padding:rN.insertedLinePadding,borderRadius:rN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:rN.deletedTextDecoration,backgroundColor:`${MN} !important`,color:PN,padding:rN.insertedLinePadding,borderRadius:rN.borderRadious,border:`1px solid ${PN}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:TN,border:`1px solid ${CN}`,borderRadius:uN.borderRadius,padding:uN.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:TN,border:`none`},"& > ul > li":{padding:uN.padding,lineHeight:uN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:DN,color:hN,borderRadius:uN.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:mN,paddingRight:uN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:mN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:TN,borderBottomColor:TN},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${wN}`},"&-warning":{borderLeft:`3px solid ${kN}`},"&-info":{borderLeft:`3px solid ${AN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${wN}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${kN}`},".cm-matchingBracket":{backgroundColor:Gpe,outline:`1px solid ${ON}`,borderRadius:oN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9758340`,outline:`1px solid ${wN}`,borderRadius:oN.borderRadius},".cm-selectionMatch":{backgroundColor:Kpe,outline:`1px solid ${pN}50`,borderRadius:oN.borderRadius},".cm-foldPlaceholder":{backgroundColor:TN,color:mN,border:`1px dotted ${CN}70`,borderRadius:sN.borderRadius,padding:sN.padding,margin:sN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${dN}, 0 0 0 3px ${AN}40`},"& .cm-scroller::-webkit-scrollbar":{width:cN.width,height:cN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:SN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:CN,borderRadius:cN.borderRadius,border:`3px solid ${SN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Hpe},".cm-ghostText":{opacity:`0.5`,color:mN}},{dark:!0}),D(B.define([{tag:A.keyword,color:yN,fontWeight:`bold`},{tag:A.controlKeyword,color:yN,fontWeight:`bold`},{tag:A.moduleKeyword,color:yN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:vN},{tag:[A.variableName],color:vN},{tag:[A.propertyName],color:_N,fontStyle:`normal`},{tag:[A.typeName],color:yN},{tag:[A.className],color:_N,fontStyle:`italic`},{tag:[A.namespace],color:vN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:fN},{tag:[A.bracket],color:mN},{tag:[A.brace],color:mN},{tag:[A.punctuation],color:mN},{tag:[A.function(A.variableName),A.labelName],color:gN},{tag:[A.definition(A.variableName)],color:vN},{tag:A.number,color:xN},{tag:A.changed,color:xN},{tag:A.annotation,color:wN,fontStyle:`italic`},{tag:A.modifier,color:xN,fontStyle:`italic`},{tag:A.self,color:xN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:xN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:xN},{tag:[A.processingInstruction,A.inserted],color:gN},{tag:[A.special(A.string),A.regexp],color:bN},{tag:A.string,color:bN},{tag:A.definition(A.typeName),color:yN,fontWeight:`bold`},{tag:A.meta,color:mN},{tag:A.comment,fontStyle:`italic`,color:mN},{tag:A.docComment,fontStyle:`italic`,color:mN},{tag:[A.tagName],color:gN},{tag:[A.attributeName],color:_N},{tag:[A.heading],fontWeight:`bold`,color:vN},{tag:[A.strong],fontWeight:`bold`,color:vN},{tag:[A.emphasis],fontStyle:`italic`,color:bN},{tag:[A.link],color:qpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:AN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:fN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${wN}`},{tag:[A.strikethrough],color:wN,textDecoration:`line-through`},{tag:A.constant(A.name),color:xN},{tag:A.deleted,color:wN},{tag:A.squareBracket,color:mN},{tag:A.angleBracket,color:mN},{tag:A.monospace,color:fN},{tag:[A.contentSeparator],color:vN},{tag:A.quote,color:mN}]))],IN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Jpe={borderLeftWidth:`2px`},LN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},RN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},zN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Ype={borderRadius:`2px`},BN={borderRadius:`2px`},VN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},HN={width:`12px`,height:`12px`,borderRadius:`6px`},UN={borderRadius:`4px`,padding:`2px 6px`},WN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},GN=`#ffffff`,KN=`#24292e`,qN=`#BBDFFF`,JN=`#6e7781`,YN=`#f6f8fa`,Xpe=`#116329`,XN=`#6a737d`,ZN=`#6f42c1`,QN=`#005cc5`,$N=`#d73a49`,eP=`#032f62`,tP=`#22863a`,nP=`#e36209`,Zpe=`#f1f8ff`,rP=`#e1e4e8`,Qpe=`#f8f9fa`,iP=`#cb2431`,$pe=`#BBDFFF20`,aP=Qpe,oP=KN,eme=qN,tme=`#e8f0fe`,nme=`#0366d6`,sP=`#b08800`,cP=`#79b8ff40`,lP=`#0969da`,rme=`#8250df`,uP=`#e6ffec80`,dP=`#ffebe980`,fP=`#0f6d31`,pP=`#cf222e`,mP=[I.theme({"&":{color:KN,backgroundColor:GN,fontSize:IN.fontSize,fontFamily:IN.fontFamily},".cm-content":{caretColor:oP,lineHeight:IN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:oP,borderLeftWidth:Jpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${oP}99`,color:GN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:eme,color:KN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#daebff`,outline:`1px solid ${QN}`,color:KN,borderRadius:UN.borderRadius,"& span":{color:KN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#79b8ff`,color:GN,padding:UN.padding,"& span":{color:GN}},".cm-search.cm-panel.cm-textfield":{color:KN,borderRadius:UN.borderRadius,padding:UN.padding},".cm-panels":{backgroundColor:YN,color:JN,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${rP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${rP}`},".cm-panel button":{backgroundColor:GN,color:KN,border:zN.border,borderRadius:zN.borderRadius,padding:zN.padding},".cm-panel button:hover":{backgroundColor:`#f5f5f5`},".cm-activeLine":{backgroundColor:$pe,borderRadius:Ype.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:YN,color:JN,border:RN.border,borderRight:`1px solid ${rP}`,paddingRight:RN.paddingRight},".cm-activeLineGutter":{backgroundColor:Zpe,color:KN,fontWeight:RN.fontWeight},".cm-lineNumbers":{fontSize:RN.fontSize,lineHeight:RN.lineHeight},".cm-foldGutter":{fontSize:RN.fontSize,lineHeight:RN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:JN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:KN},".cm-insertedLine":{textDecoration:LN.insertedTextDecoration,backgroundColor:uP,color:fP,padding:LN.insertedLinePadding,borderRadius:LN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:LN.insertedTextDecoration,backgroundColor:`${uP} !important`,color:fP,padding:LN.insertedLinePadding,borderRadius:LN.borderRadious,border:`1px solid ${fP}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:LN.deletedTextDecoration,backgroundColor:dP,color:pP,padding:LN.insertedLinePadding,borderRadius:LN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:LN.deletedTextDecoration,backgroundColor:`${dP} !important`,color:pP,padding:LN.insertedLinePadding,borderRadius:LN.borderRadious,border:`1px solid ${pP}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:aP,border:`1px solid ${rP}`,borderRadius:WN.borderRadius,padding:WN.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:aP,border:`none`},"& > ul > li":{padding:WN.padding,lineHeight:WN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#0366d630`,color:KN,borderRadius:WN.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:`#0366d615`},"& > ul > li > span.cm-completionIcon":{color:JN,paddingRight:WN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:JN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:aP,borderBottomColor:aP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${iP}`},"&-warning":{borderLeft:`3px solid ${sP}`},"&-info":{borderLeft:`3px solid ${lP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${iP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${sP}`},".cm-matchingBracket":{backgroundColor:tme,outline:`1px solid ${nme}80`,borderRadius:BN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ffeef080`,outline:`1px solid ${iP}`,borderRadius:BN.borderRadius},".cm-selectionMatch":{backgroundColor:cP,outline:`1px solid ${qN}50`,borderRadius:BN.borderRadius},".cm-foldPlaceholder":{backgroundColor:cP,color:JN,border:`1px dotted ${rP}70`,borderRadius:VN.borderRadius,padding:VN.padding,margin:VN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${GN}, 0 0 0 3px ${lP}40`},"& .cm-scroller::-webkit-scrollbar":{width:HN.width,height:HN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:rP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:KN,borderRadius:HN.borderRadius,border:`3px solid ${rP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:XN},".cm-ghostText":{opacity:`0.5`,color:`#959da5`}},{dark:!1}),D(B.define([{tag:A.keyword,color:$N,fontWeight:`bold`},{tag:A.controlKeyword,color:$N,fontWeight:`bold`},{tag:A.moduleKeyword,color:$N,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:QN},{tag:[A.variableName],color:QN},{tag:[A.propertyName],color:ZN,fontStyle:`normal`},{tag:[A.typeName],color:$N},{tag:[A.className],color:ZN,fontStyle:`italic`},{tag:[A.namespace],color:QN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:KN},{tag:[A.bracket],color:XN},{tag:[A.brace],color:XN},{tag:[A.punctuation],color:XN},{tag:[A.function(A.variableName),A.labelName],color:tP},{tag:[A.definition(A.variableName)],color:QN},{tag:A.number,color:nP},{tag:A.changed,color:nP},{tag:A.annotation,color:iP,fontStyle:`italic`},{tag:A.modifier,color:nP,fontStyle:`italic`},{tag:A.self,color:nP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:nP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:nP},{tag:[A.processingInstruction,A.inserted],color:tP},{tag:[A.special(A.string),A.regexp],color:eP},{tag:A.string,color:eP},{tag:A.definition(A.typeName),color:$N,fontWeight:`bold`},{tag:A.meta,color:XN},{tag:A.comment,fontStyle:`italic`,color:XN},{tag:A.docComment,fontStyle:`italic`,color:XN},{tag:[A.tagName],color:Xpe},{tag:[A.attributeName],color:ZN},{tag:[A.heading],fontWeight:`bold`,color:QN},{tag:[A.strong],fontWeight:`bold`,color:QN},{tag:[A.emphasis],fontStyle:`italic`,color:eP},{tag:[A.link],color:rme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:lP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:KN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${iP}`},{tag:[A.strikethrough],color:iP,textDecoration:`line-through`},{tag:A.constant(A.name),color:nP},{tag:A.deleted,color:iP},{tag:A.squareBracket,color:XN},{tag:A.angleBracket,color:XN},{tag:A.monospace,color:KN},{tag:[A.contentSeparator],color:QN},{tag:A.quote,color:XN}]))],hP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},ime={borderLeftWidth:`2px`},gP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},_P={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},vP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ame={borderRadius:`2px`},yP={borderRadius:`2px`},bP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},xP={width:`12px`,height:`12px`,borderRadius:`6px`},SP={borderRadius:`4px`,padding:`2px 6px`},CP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},wP=`#282828`,TP=`#3c3836`,EP=`#504945`,DP=`#665c54`,ome=`#7c6f64`,OP=`#928374`,kP=`#fbf1c7`,AP=`#ebdbb2`,jP=`#fb4934`,MP=`#b8bb26`,NP=`#fabd2f`,PP=`#83a598`,FP=`#d3869b`,IP=`#8ec07c`,LP=`#fe8019`,RP=jP,sme=TP,cme=`#3c383660`,lme=wP,zP=TP,BP=EP,ume=`#665c5480`,VP=LP,dme=`#504945cc`,fme=NP,HP=NP,UP=PP,pme=FP,WP=`#32361a80`,GP=`#3c1f1e80`,KP=`#b8bb26`,qP=`#fb4934`,mme=[I.theme({"&":{color:AP,backgroundColor:lme,fontSize:hP.fontSize,fontFamily:hP.fontFamily},".cm-content":{caretColor:VP,lineHeight:hP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:VP,borderLeftWidth:ime.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${VP}99`,color:wP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:BP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#b57614cc`,outline:`1px solid ${NP}`,color:kP,borderRadius:SP.borderRadius,"& span":{color:kP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:LP,color:wP,padding:SP.padding,"& span":{color:wP}},".cm-search.cm-panel.cm-textfield":{color:AP,borderRadius:SP.borderRadius,padding:SP.padding},".cm-panels":{backgroundColor:zP,color:AP,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${DP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${DP}`},".cm-panel button":{backgroundColor:zP,color:AP,border:vP.border,borderRadius:vP.borderRadius,padding:vP.padding},".cm-panel button:hover":{backgroundColor:EP},".cm-activeLine":{backgroundColor:cme,borderRadius:ame.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:TP,color:OP,border:_P.border,borderRight:`1px solid ${EP}`,paddingRight:_P.paddingRight},".cm-activeLineGutter":{backgroundColor:sme,color:AP,fontWeight:_P.fontWeight},".cm-lineNumbers":{fontSize:_P.fontSize,lineHeight:_P.lineHeight},".cm-foldGutter":{fontSize:_P.fontSize,lineHeight:_P.lineHeight},".cm-foldGutter .cm-gutterElement":{color:OP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:AP},".cm-insertedLine":{textDecoration:gP.insertedTextDecoration,backgroundColor:WP,color:KP,padding:gP.insertedLinePadding,borderRadius:gP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:gP.insertedTextDecoration,backgroundColor:`${WP} !important`,color:KP,padding:gP.insertedLinePadding,borderRadius:gP.borderRadious,border:`1px solid ${KP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:gP.deletedTextDecoration,backgroundColor:GP,color:qP,padding:gP.insertedLinePadding,borderRadius:gP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:gP.deletedTextDecoration,backgroundColor:`${GP} !important`,color:qP,padding:gP.insertedLinePadding,borderRadius:gP.borderRadious,border:`1px solid ${qP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:zP,border:`1px solid ${DP}`,borderRadius:CP.borderRadius,padding:CP.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:zP,border:`none`},"& > ul > li":{padding:CP.padding,lineHeight:CP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:BP,color:kP,borderRadius:CP.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:OP,paddingRight:CP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:OP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:zP,borderBottomColor:zP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${RP}`},"&-warning":{borderLeft:`3px solid ${HP}`},"&-info":{borderLeft:`3px solid ${UP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${RP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${HP}`},".cm-matchingBracket":{backgroundColor:dme,outline:`1px solid ${fme}`,borderRadius:yP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#cc241d55`,outline:`1px solid ${RP}`,borderRadius:yP.borderRadius},".cm-selectionMatch":{backgroundColor:ume,outline:`1px solid ${DP}`,borderRadius:yP.borderRadius},".cm-foldPlaceholder":{backgroundColor:zP,color:OP,border:`1px dotted ${DP}`,borderRadius:bP.borderRadius,padding:bP.padding,margin:bP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${wP}, 0 0 0 3px ${LP}40`},"& .cm-scroller::-webkit-scrollbar":{width:xP.width,height:xP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:TP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:DP,borderRadius:xP.borderRadius,border:`3px solid ${TP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:ome},".cm-ghostText":{opacity:`0.5`,color:OP}},{dark:!0}),D(B.define([{tag:A.keyword,color:jP,fontWeight:`bold`},{tag:A.controlKeyword,color:jP,fontWeight:`bold`},{tag:A.moduleKeyword,color:jP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:PP},{tag:[A.variableName],color:PP},{tag:[A.propertyName],color:IP,fontStyle:`normal`},{tag:[A.typeName],color:IP},{tag:[A.className],color:NP,fontStyle:`italic`},{tag:[A.namespace],color:PP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:AP},{tag:[A.bracket],color:OP},{tag:[A.brace],color:OP},{tag:[A.punctuation],color:OP},{tag:[A.function(A.variableName),A.labelName],color:NP},{tag:[A.definition(A.variableName)],color:PP},{tag:A.number,color:FP},{tag:A.changed,color:FP},{tag:A.annotation,color:RP,fontStyle:`italic`},{tag:A.modifier,color:FP,fontStyle:`italic`},{tag:A.self,color:FP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:LP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:LP},{tag:[A.processingInstruction,A.inserted],color:MP},{tag:[A.special(A.string),A.regexp],color:MP},{tag:A.string,color:MP},{tag:A.definition(A.typeName),color:IP,fontWeight:`bold`},{tag:A.meta,color:OP},{tag:A.comment,fontStyle:`italic`,color:OP},{tag:A.docComment,fontStyle:`italic`,color:OP},{tag:[A.tagName],color:jP},{tag:[A.attributeName],color:NP},{tag:[A.heading],fontWeight:`bold`,color:NP},{tag:[A.strong],fontWeight:`bold`,color:NP},{tag:[A.emphasis],fontStyle:`italic`,color:MP},{tag:[A.link],color:pme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:UP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:AP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${RP}`},{tag:[A.strikethrough],color:RP,textDecoration:`line-through`},{tag:A.constant(A.name),color:LP},{tag:A.deleted,color:RP},{tag:A.squareBracket,color:OP},{tag:A.angleBracket,color:OP},{tag:A.monospace,color:AP},{tag:[A.contentSeparator],color:PP},{tag:A.quote,color:OP}]))],JP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},hme={borderLeftWidth:`2px`},YP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},XP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},ZP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},gme={borderRadius:`2px`},QP={borderRadius:`2px`},$P={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},eF={width:`12px`,height:`12px`,borderRadius:`6px`},tF={borderRadius:`4px`,padding:`2px 6px`},nF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},rF=`#3c3836`,_me=`#504945`,vme=`#665c54`,iF=`#7c6f64`,aF=`#928374`,oF=`#fbf1c7`,sF=`#ebdbb2`,cF=`#d5c4a1`,lF=`#bdae93`,yme=`#a89984`,uF=`#9d0006`,dF=`#79740e`,fF=`#b57614`,pF=`#076678`,mF=`#8f3f71`,hF=`#427b58`,gF=`#af3a03`,_F=uF,bme=sF,xme=`#ffc42e25`,Sme=oF,vF=sF,Cme=bme,wme=`#ffc42e40`,yF=gF,Tme=`#d5c4a180`,Eme=gF,bF=fF,xF=pF,Dme=mF,SF=`#d8e5bc80`,CF=`#f7cfcf80`,wF=`#79740e`,TF=`#9d0006`,Ome=[I.theme({"&":{color:rF,backgroundColor:Sme,fontSize:JP.fontSize,fontFamily:JP.fontFamily},".cm-content":{caretColor:yF,lineHeight:JP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:yF,borderLeftWidth:hme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${yF}99`,color:oF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Cme,color:rF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#ffc42e80`,outline:`1px solid ${gF}`,color:rF,borderRadius:tF.borderRadius,"& span":{color:rF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:gF,color:oF,padding:tF.padding,"& span":{color:oF}},".cm-search.cm-panel.cm-textfield":{color:rF,borderRadius:tF.borderRadius,padding:tF.padding},".cm-panels":{backgroundColor:sF,color:_me,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${lF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${lF}`},".cm-panel button":{backgroundColor:oF,color:rF,border:ZP.border,borderRadius:ZP.borderRadius,padding:ZP.padding},".cm-panel button:hover":{backgroundColor:cF},".cm-activeLine":{backgroundColor:xme,borderRadius:gme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:sF,color:iF,border:XP.border,borderRight:`1px solid ${lF}`,paddingRight:XP.paddingRight},".cm-activeLineGutter":{backgroundColor:cF,color:rF,fontWeight:XP.fontWeight},".cm-lineNumbers":{fontSize:XP.fontSize,lineHeight:XP.lineHeight},".cm-foldGutter":{fontSize:XP.fontSize,lineHeight:XP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:iF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:rF},".cm-insertedLine":{textDecoration:YP.insertedTextDecoration,backgroundColor:SF,color:wF,padding:YP.insertedLinePadding,borderRadius:YP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:YP.insertedTextDecoration,backgroundColor:`${SF} !important`,color:wF,padding:YP.insertedLinePadding,borderRadius:YP.borderRadious,border:`1px solid ${wF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:YP.deletedTextDecoration,backgroundColor:CF,color:TF,padding:YP.insertedLinePadding,borderRadius:YP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:YP.deletedTextDecoration,backgroundColor:`${CF} !important`,color:TF,padding:YP.insertedLinePadding,borderRadius:YP.borderRadious,border:`1px solid ${TF}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:vF,border:`1px solid ${lF}`,borderRadius:nF.borderRadius,padding:nF.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:vF,border:`none`},"& > ul > li":{padding:nF.padding,lineHeight:nF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:gF+`30`,color:rF,borderRadius:nF.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:gF+`15`},"& > ul > li > span.cm-completionIcon":{color:iF,paddingRight:nF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:iF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:vF,borderBottomColor:vF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${_F}`},"&-warning":{borderLeft:`3px solid ${bF}`},"&-info":{borderLeft:`3px solid ${xF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${_F}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${bF}`},".cm-matchingBracket":{backgroundColor:Tme,outline:`1px solid ${Eme}`,borderRadius:QP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#fb492740`,outline:`1px solid ${_F}`,borderRadius:QP.borderRadius},".cm-selectionMatch":{backgroundColor:wme,outline:`1px solid ${lF}`,borderRadius:QP.borderRadius},".cm-foldPlaceholder":{backgroundColor:`transparent`,color:vme,border:`1px dotted ${lF}`,borderRadius:$P.borderRadius,padding:$P.padding,margin:$P.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${oF}, 0 0 0 3px ${gF}40`},"& .cm-scroller::-webkit-scrollbar":{width:eF.width,height:eF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:oF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:lF,borderRadius:eF.borderRadius,border:`3px solid ${oF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:yme},".cm-ghostText":{opacity:`0.5`,color:aF}},{dark:!1}),D(B.define([{tag:A.keyword,color:uF,fontWeight:`bold`},{tag:A.controlKeyword,color:uF,fontWeight:`bold`},{tag:A.moduleKeyword,color:uF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:pF},{tag:[A.variableName],color:pF},{tag:[A.propertyName],color:hF,fontStyle:`normal`},{tag:[A.typeName],color:hF},{tag:[A.className],color:fF,fontStyle:`italic`},{tag:[A.namespace],color:pF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:rF},{tag:[A.bracket],color:aF},{tag:[A.brace],color:aF},{tag:[A.punctuation],color:aF},{tag:[A.function(A.variableName),A.labelName],color:fF},{tag:[A.definition(A.variableName)],color:pF},{tag:A.number,color:mF},{tag:A.changed,color:mF},{tag:A.annotation,color:_F,fontStyle:`italic`},{tag:A.modifier,color:mF,fontStyle:`italic`},{tag:A.self,color:mF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:gF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:gF},{tag:[A.processingInstruction,A.inserted],color:dF},{tag:[A.special(A.string),A.regexp],color:dF},{tag:A.string,color:dF},{tag:A.definition(A.typeName),color:hF,fontWeight:`bold`},{tag:A.meta,color:aF},{tag:A.comment,fontStyle:`italic`,color:aF},{tag:A.docComment,fontStyle:`italic`,color:aF},{tag:[A.tagName],color:uF},{tag:[A.attributeName],color:fF},{tag:[A.heading],fontWeight:`bold`,color:fF},{tag:[A.strong],fontWeight:`bold`,color:fF},{tag:[A.emphasis],fontStyle:`italic`,color:dF},{tag:[A.link],color:Dme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:xF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:rF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${_F}`},{tag:[A.strikethrough],color:_F,textDecoration:`line-through`},{tag:A.constant(A.name),color:gF},{tag:A.deleted,color:_F},{tag:A.squareBracket,color:aF},{tag:A.angleBracket,color:aF},{tag:A.monospace,color:rF},{tag:[A.contentSeparator],color:pF},{tag:A.quote,color:aF}]))],EF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},kme={borderLeftWidth:`2px`},DF={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},OF={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},kF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Ame={borderRadius:`2px`},AF={borderRadius:`2px`},jF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},MF={width:`12px`,height:`12px`,borderRadius:`6px`},NF={borderRadius:`4px`,padding:`2px 6px`},PF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},FF=`#212121`,IF=`#505d64`,LF=`#606f7a`,RF=`#707d8b`,jme=`#a0a4ae`,zF=`#bdbdbd`,BF=`#e0e0e0`,Mme=`#202325`,VF=`#ff5f52`,HF=`#ff6e40`,Nme=`#fa5788`,UF=`#facf4e`,WF=`#ffad42`,GF=`#56c8d8`,KF=`#7186f0`,qF=`#cf6edf`,Pme=`#6abf69`,Fme=`#99d066`,Ime=`#4ebaaa`,JF=VF,YF=Mme,Lme=`#2d333b30`,XF=FF,ZF=IF,QF=`#ffffff1f`,Rme=`#4A707A80`,$F=jme,zme=`#39496650`,Bme=GF,eI=WF,tI=GF,Vme=qF,nI=`#1e3d2780`,rI=`#4e282880`,iI=`#6abf69`,aI=`#ff5f52`,Hme=[I.theme({"&":{color:zF,backgroundColor:XF,fontSize:EF.fontSize,fontFamily:EF.fontFamily},".cm-content":{caretColor:$F,lineHeight:EF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:$F,borderLeftWidth:kme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${$F}99`,color:XF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:QF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#394966cc`,outline:`1px solid ${GF}`,color:BF,borderRadius:NF.borderRadius,"& span":{color:BF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:GF,color:XF,padding:NF.padding,"& span":{color:XF}},".cm-search.cm-panel.cm-textfield":{color:zF,borderRadius:NF.borderRadius,padding:NF.padding},".cm-panels":{backgroundColor:FF,color:zF,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${RF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${RF}`},".cm-panel button":{backgroundColor:ZF,color:zF,border:kF.border,borderRadius:kF.borderRadius,padding:kF.padding},".cm-panel button:hover":{backgroundColor:LF},".cm-activeLine":{backgroundColor:Lme,borderRadius:Ame.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:YF,color:RF,border:OF.border,borderRight:`1px solid ${IF}`,paddingRight:OF.paddingRight},".cm-activeLineGutter":{backgroundColor:`#252a2c`,color:zF,fontWeight:OF.fontWeight},".cm-lineNumbers":{fontSize:OF.fontSize,lineHeight:OF.lineHeight},".cm-foldGutter":{fontSize:OF.fontSize,lineHeight:OF.lineHeight},".cm-foldGutter .cm-gutterElement":{color:RF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:zF},".cm-insertedLine":{textDecoration:DF.insertedTextDecoration,backgroundColor:nI,color:iI,padding:DF.insertedLinePadding,borderRadius:DF.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:DF.insertedTextDecoration,backgroundColor:`${nI} !important`,color:iI,padding:DF.insertedLinePadding,borderRadius:DF.borderRadious,border:`1px solid ${iI}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:DF.deletedTextDecoration,backgroundColor:rI,color:aI,padding:DF.insertedLinePadding,borderRadius:DF.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:DF.deletedTextDecoration,backgroundColor:`${rI} !important`,color:aI,padding:DF.insertedLinePadding,borderRadius:DF.borderRadious,border:`1px solid ${aI}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:ZF,border:`1px solid ${RF}`,borderRadius:PF.borderRadius,padding:PF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:ZF,border:`none`},"& > ul > li":{padding:PF.padding,lineHeight:PF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:QF,color:BF,borderRadius:PF.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:RF,paddingRight:PF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:RF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ZF,borderBottomColor:ZF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${JF}`},"&-warning":{borderLeft:`3px solid ${eI}`},"&-info":{borderLeft:`3px solid ${tI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${JF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${eI}`},".cm-matchingBracket":{backgroundColor:zme,outline:`1px solid ${Bme}`,borderRadius:AF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ff5f5240`,outline:`1px solid ${JF}`,borderRadius:AF.borderRadius},".cm-selectionMatch":{backgroundColor:Rme,outline:`1px solid ${LF}50`,borderRadius:AF.borderRadius},".cm-foldPlaceholder":{backgroundColor:ZF,color:RF,border:`1px dotted ${RF}70`,borderRadius:jF.borderRadius,padding:jF.padding,margin:jF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${XF}, 0 0 0 3px ${GF}40`},"& .cm-scroller::-webkit-scrollbar":{width:MF.width,height:MF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:YF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:LF,borderRadius:MF.borderRadius,border:`3px solid ${YF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:RF},".cm-ghostText":{opacity:`0.5`,color:RF}},{dark:!0}),D(B.define([{tag:A.keyword,color:VF,fontWeight:`bold`},{tag:A.controlKeyword,color:VF,fontWeight:`bold`},{tag:A.moduleKeyword,color:VF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:KF},{tag:[A.variableName],color:Fme},{tag:[A.propertyName],color:qF,fontStyle:`normal`},{tag:[A.typeName],color:VF},{tag:[A.className],color:UF,fontStyle:`italic`},{tag:[A.namespace],color:KF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:zF},{tag:[A.bracket],color:RF},{tag:[A.brace],color:RF},{tag:[A.punctuation],color:RF},{tag:[A.function(A.variableName)],color:GF},{tag:[A.labelName],color:GF,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:GF},{tag:[A.definition(A.variableName)],color:KF},{tag:A.number,color:UF},{tag:A.changed,color:UF},{tag:A.annotation,color:JF,fontStyle:`italic`},{tag:A.modifier,color:HF,fontStyle:`italic`},{tag:A.self,color:HF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:HF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:HF},{tag:[A.processingInstruction,A.inserted],color:Pme},{tag:[A.special(A.string),A.regexp],color:Nme},{tag:A.string,color:WF},{tag:A.definition(A.typeName),color:VF,fontWeight:`bold`},{tag:A.meta,color:RF},{tag:A.comment,fontStyle:`italic`,color:RF},{tag:A.docComment,fontStyle:`italic`,color:RF},{tag:[A.tagName],color:qF},{tag:[A.attributeName],color:UF},{tag:[A.heading],fontWeight:`bold`,color:Ime},{tag:A.heading1,color:UF},{tag:A.heading2,color:WF},{tag:A.heading3,color:GF},{tag:A.heading4,color:KF},{tag:A.heading5,color:qF},{tag:A.heading6,color:VF},{tag:[A.strong],fontWeight:`bold`,color:KF},{tag:[A.emphasis],fontStyle:`italic`,color:WF},{tag:[A.link],color:Vme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:tI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:zF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${JF}`},{tag:[A.strikethrough],color:JF,textDecoration:`line-through`},{tag:A.constant(A.name),color:HF},{tag:A.deleted,color:JF},{tag:A.squareBracket,color:RF},{tag:A.angleBracket,color:RF},{tag:A.monospace,color:zF},{tag:[A.contentSeparator],color:KF},{tag:A.quote,color:RF}]))],oI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Ume={borderLeftWidth:`2px`},sI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},cI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},lI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Wme={borderRadius:`2px`},uI={borderRadius:`2px`},dI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},fI={width:`12px`,height:`12px`,borderRadius:`6px`},pI={borderRadius:`4px`,padding:`2px 6px`},mI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Gme=`#ffffff`,hI=`#f5f5f5`,gI=`#212121`,_I=`#757575`,vI=`#9e9e9e`,yI=`#424242`,Kme=`#eeeeee`,bI=`#fafafa`,xI=`#f44336`,SI=`#ff3e00`,CI=`#FF00E9FF`,qme=`#ffc107`,wI=`#ff9800`,TI=`#00acc1`,EI=`#3949ab`,DI=`#8e24aa`,OI=`#43a047`,kI=`#00897b`,AI=`#1e88e5`,jI=xI,Jme=`#00000008`,MI=Gme,NI=hI,Yme=`#DDEEFF`,Xme=`#90a4ae26`,PI=vI,Zme=`#DDEEFF80`,Qme=TI,FI=wI,II=TI,$me=DI,LI=`#ECEFF180`,RI=`#e6ffed80`,zI=`#ffebe980`,BI=`#28a745`,VI=`#d73a49`,ehe=[I.theme({"&":{color:gI,backgroundColor:MI,fontSize:oI.fontSize,fontFamily:oI.fontFamily},".cm-content":{caretColor:PI,lineHeight:oI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:PI,borderLeftWidth:Ume.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${gI}99`,color:MI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Yme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#FFA72680`,outline:`1px solid ${qme}`,color:gI,borderRadius:pI.borderRadius,"& span":{color:gI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:TI,color:MI,padding:pI.padding,"& span":{color:MI}},".cm-search.cm-panel.cm-textfield":{color:gI,borderRadius:pI.borderRadius,padding:pI.padding},".cm-panels":{backgroundColor:Kme,color:gI,borderRadius:`4px`,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${vI}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${vI}`},".cm-panel button":{backgroundColor:NI,color:gI,border:lI.border,borderRadius:lI.borderRadius,padding:lI.padding},".cm-panel button:hover":{backgroundColor:`#CFD8DC`},".cm-activeLine":{backgroundColor:Jme,borderRadius:Wme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:bI,color:_I,border:cI.border,borderRight:`1px solid ${vI}`,paddingRight:cI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#E0E0E0`,color:gI,fontWeight:cI.fontWeight},".cm-lineNumbers":{fontSize:cI.fontSize,lineHeight:cI.lineHeight},".cm-foldGutter":{fontSize:cI.fontSize,lineHeight:cI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:_I,cursor:`pointer`,transition:`color 0.15s ease`},".cm-foldGutter .cm-gutterElement:hover":{color:gI},".cm-insertedLine":{textDecoration:sI.insertedTextDecoration,backgroundColor:RI,color:BI,padding:sI.insertedLinePadding,borderRadius:sI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:sI.insertedTextDecoration,backgroundColor:`${RI} !important`,color:BI,padding:sI.insertedLinePadding,borderRadius:sI.borderRadious,border:`1px solid ${BI}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:sI.deletedTextDecoration,backgroundColor:zI,color:VI,padding:sI.insertedLinePadding,borderRadius:sI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:sI.deletedTextDecoration,backgroundColor:`${zI} !important`,color:VI,padding:sI.insertedLinePadding,borderRadius:sI.borderRadious,border:`1px solid ${VI}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:NI,border:`1px solid ${vI}`,borderRadius:mI.borderRadius,padding:mI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:NI,border:`none`},"& > ul > li":{padding:mI.padding,lineHeight:mI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:LI,color:gI,borderRadius:mI.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:LI},"& > ul > li > span.cm-completionIcon":{color:_I,paddingRight:mI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:_I,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:NI,borderBottomColor:NI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${jI}`},"&-warning":{borderLeft:`3px solid ${FI}`},"&-info":{borderLeft:`3px solid ${II}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${jI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${FI}`},".cm-matchingBracket":{backgroundColor:Zme,outline:`1px solid ${Qme}`,borderRadius:uI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${jI}20`,outline:`1px solid ${jI}`,borderRadius:uI.borderRadius},".cm-selectionMatch":{backgroundColor:Xme,outline:`1px solid ${_I}30`,borderRadius:uI.borderRadius},".cm-foldPlaceholder":{backgroundColor:hI,color:_I,border:`1px dotted ${_I}70`,borderRadius:dI.borderRadius,padding:dI.padding,margin:dI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${MI}, 0 0 0 3px ${TI}40`},"& .cm-scroller::-webkit-scrollbar":{width:fI.width,height:fI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:bI},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:_I,borderRadius:fI.borderRadius,border:`3px solid ${bI}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:gI},".cm-ghostText":{opacity:`0.5`,color:_I}},{dark:!1}),D(B.define([{tag:A.keyword,color:TI,fontWeight:`bold`},{tag:A.controlKeyword,color:TI,fontWeight:`bold`},{tag:A.moduleKeyword,color:TI,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:yI},{tag:[A.variableName],color:yI},{tag:[A.propertyName],color:kI,fontStyle:`normal`},{tag:[A.typeName],color:wI},{tag:[A.className],color:wI,fontStyle:`italic`},{tag:[A.namespace],color:EI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:EI},{tag:[A.bracket],color:DI},{tag:[A.brace],color:DI},{tag:[A.punctuation],color:_I},{tag:[A.function(A.variableName)],color:SI},{tag:[A.labelName],color:AI,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:SI},{tag:[A.definition(A.variableName)],color:CI},{tag:A.number,color:wI},{tag:A.changed,color:wI},{tag:A.annotation,color:jI,fontStyle:`italic`},{tag:A.modifier,color:wI,fontStyle:`italic`},{tag:A.self,color:wI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:wI},{tag:[A.atom,A.bool],color:DI},{tag:[A.processingInstruction,A.inserted],color:OI},{tag:A.string,color:OI},{tag:[A.special(A.string),A.regexp],color:CI},{tag:A.definition(A.typeName),color:CI,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:CI},{tag:A.meta,color:_I},{tag:A.comment,fontStyle:`italic`,color:_I},{tag:A.docComment,fontStyle:`italic`,color:_I},{tag:[A.tagName],color:SI},{tag:[A.attributeName],color:yI},{tag:[A.heading],fontWeight:`bold`,color:kI},{tag:A.heading1,color:AI},{tag:A.heading2,color:wI},{tag:A.heading3,color:TI},{tag:A.heading4,color:EI},{tag:A.heading5,color:DI},{tag:A.heading6,color:OI},{tag:[A.strong],fontWeight:`bold`,color:EI},{tag:[A.emphasis],fontStyle:`italic`,color:wI},{tag:[A.link],color:$me,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:II,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:gI,textDecoration:`underline wavy`,borderBottom:`1px dotted ${xI}`},{tag:[A.strikethrough],color:jI,textDecoration:`line-through`},{tag:A.constant(A.name),color:SI},{tag:A.deleted,color:jI},{tag:A.squareBracket,color:xI},{tag:A.angleBracket,color:gI},{tag:A.monospace,color:gI},{tag:[A.contentSeparator],color:TI},{tag:A.quote,color:OI}]))],HI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},the={borderLeftWidth:`2px`},UI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},WI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},GI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},nhe={borderRadius:`2px`},KI={borderRadius:`2px`},qI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},JI={width:`12px`,height:`12px`,borderRadius:`6px`},YI={borderRadius:`4px`,padding:`2px 6px`},XI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},ZI=`#272822`,QI=`#f8f8f2`,$I=`#88846f`,rhe=`#f8f8f0`,eL=`#F92672`,tL=`#FD971F`,nL=`#66D9EF`,rL=`#E6DB74`,iL=`#AE81FF`,aL=`#A6E22E`,oL=`#F44747`,sL=`#414339`,ihe=`#3e3d3257`,cL=`#34352f`,lL=`#49483E`,ahe=`#75715e70`,uL=rhe,ohe=`#75715E55`,she=nL,dL=tL,fL=nL,che=iL,pL=`#3d4d3880`,mL=`#4d393980`,hL=`#A6E22E`,gL=`#F92672`,lhe=[I.theme({"&":{color:QI,backgroundColor:ZI,fontSize:HI.fontSize,fontFamily:HI.fontFamily},".cm-content":{caretColor:uL,lineHeight:HI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:uL,borderLeftWidth:the.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${uL}99`,color:ZI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lL},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#49483E99`,outline:`1px solid ${rL}`,color:QI,borderRadius:YI.borderRadius,"& span":{color:QI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:eL,color:ZI,padding:YI.padding,"& span":{color:ZI}},".cm-search.cm-panel.cm-textfield":{color:QI,borderRadius:YI.borderRadius,padding:YI.padding},".cm-panels":{backgroundColor:sL,color:QI,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${$I}80`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${$I}80`},".cm-panel button":{backgroundColor:cL,color:QI,border:GI.border,borderRadius:GI.borderRadius,padding:GI.padding},".cm-panel button:hover":{backgroundColor:`#49483E`},".cm-activeLine":{backgroundColor:ihe,borderRadius:nhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:sL,color:$I,border:WI.border,borderRight:`1px solid #3e3d32`,paddingRight:WI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#35352c`,color:QI,fontWeight:WI.fontWeight},".cm-lineNumbers":{fontSize:WI.fontSize,lineHeight:WI.lineHeight},".cm-foldGutter":{fontSize:WI.fontSize,lineHeight:WI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:$I,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:QI},".cm-insertedLine":{textDecoration:UI.insertedTextDecoration,backgroundColor:pL,color:hL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:UI.insertedTextDecoration,backgroundColor:`${pL} !important`,color:hL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious,border:`1px solid ${hL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:UI.deletedTextDecoration,backgroundColor:mL,color:gL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:UI.deletedTextDecoration,backgroundColor:`${mL} !important`,color:gL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious,border:`1px solid ${gL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:cL,border:`1px solid #49483E`,borderRadius:XI.borderRadius,padding:XI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.4)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:cL,border:`none`},"& > ul > li":{padding:XI.padding,lineHeight:XI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:lL,color:QI,borderRadius:XI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:$I,paddingRight:XI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:$I,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:cL,borderBottomColor:cL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${oL}`},"&-warning":{borderLeft:`3px solid ${dL}`},"&-info":{borderLeft:`3px solid ${fL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${oL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${dL}`},".cm-matchingBracket":{backgroundColor:ohe,outline:`1px solid ${she}`,borderRadius:KI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9267240`,outline:`1px solid ${oL}`,borderRadius:KI.borderRadius},".cm-selectionMatch":{backgroundColor:ahe,outline:`1px solid ${$I}50`,borderRadius:KI.borderRadius},".cm-foldPlaceholder":{backgroundColor:cL,color:$I,border:`1px dotted ${$I}70`,borderRadius:qI.borderRadius,padding:qI.padding,margin:qI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${ZI}, 0 0 0 3px ${nL}40`},"& .cm-scroller::-webkit-scrollbar":{width:JI.width,height:JI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:sL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#49483E`,borderRadius:JI.borderRadius,border:`3px solid ${sL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#5a594d`},".cm-ghostText":{opacity:`0.5`,color:$I}},{dark:!0}),D(B.define([{tag:A.keyword,color:eL,fontWeight:`bold`},{tag:A.controlKeyword,color:eL,fontWeight:`bold`},{tag:A.moduleKeyword,color:eL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:tL},{tag:[A.variableName],color:tL},{tag:[A.propertyName],color:aL,fontStyle:`normal`},{tag:[A.typeName],color:nL,fontStyle:`italic`},{tag:[A.className],color:aL,fontStyle:`italic`},{tag:[A.namespace],color:tL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:eL},{tag:[A.bracket],color:QI},{tag:[A.brace],color:QI},{tag:[A.punctuation],color:QI},{tag:[A.function(A.variableName),A.labelName],color:nL},{tag:[A.definition(A.function(A.variableName))],color:nL},{tag:[A.definition(A.variableName)],color:tL},{tag:A.number,color:iL},{tag:A.changed,color:iL},{tag:A.annotation,color:oL,fontStyle:`italic`},{tag:A.modifier,color:iL,fontStyle:`italic`},{tag:A.self,color:iL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:iL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:iL},{tag:[A.processingInstruction,A.inserted],color:aL},{tag:[A.special(A.string),A.regexp],color:rL},{tag:A.string,color:rL},{tag:A.definition(A.typeName),color:nL,fontWeight:`bold`},{tag:A.meta,color:$I},{tag:A.comment,fontStyle:`italic`,color:$I},{tag:A.docComment,fontStyle:`italic`,color:$I},{tag:[A.tagName],color:eL},{tag:[A.attributeName],color:aL},{tag:[A.heading],fontWeight:`bold`,color:aL},{tag:[A.strong],fontWeight:`bold`,color:tL},{tag:[A.emphasis],fontStyle:`italic`,color:tL},{tag:[A.link],color:che,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:fL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:QI,textDecoration:`underline wavy`,borderBottom:`1px wavy ${oL}`},{tag:[A.strikethrough],color:oL,textDecoration:`line-through`},{tag:A.constant(A.name),color:iL},{tag:A.deleted,color:oL},{tag:A.squareBracket,color:QI},{tag:A.angleBracket,color:QI},{tag:A.monospace,color:QI},{tag:[A.contentSeparator],color:tL},{tag:A.quote,color:$I}]))],_L={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},uhe={borderLeftWidth:`2px`},vL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},yL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},bL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},dhe={borderRadius:`2px`},xL={borderRadius:`2px`},SL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},CL={width:`12px`,height:`12px`,borderRadius:`6px`},wL={borderRadius:`4px`,padding:`2px 6px`},TL={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},fhe=`#2e3440`,EL=`#3b4252`,DL=`#434c5e`,OL=`#4c566a`,kL=`#d8dee9`,AL=`#eceff4`,jL=`#8fbcbb`,ML=`#88c0d0`,NL=`#81a1c1`,PL=`#5e81ac`,FL=`#bf616a`,IL=`#d08770`,LL=`#ebcb8b`,RL=`#a3be8c`,zL=`#b48ead`,phe=`#d30102`,BL=`#252a33`,mhe=`#3b425277`,VL=fhe,HL=EL,hhe=DL,ghe=`#4c566a80`,UL=kL,_he=`#4c566a55`,vhe=ML,WL=LL,GL=NL,yhe=zL,KL=`#3b4a3880`,qL=`#4a393a80`,JL=`#a3be8c`,YL=`#bf616a`,bhe=[I.theme({"&":{color:kL,backgroundColor:VL,fontSize:_L.fontSize,fontFamily:_L.fontFamily},".cm-content":{caretColor:UL,lineHeight:_L.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:UL,borderLeftWidth:uhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${UL}99`,color:VL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:hhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#5e81ac80`,outline:`1px solid ${jL}`,color:kL,borderRadius:wL.borderRadius,"& span":{color:kL}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:NL,color:AL,padding:wL.padding,"& span":{color:AL}},".cm-search.cm-panel.cm-textfield":{color:kL,borderRadius:wL.borderRadius,padding:wL.padding},".cm-panels":{backgroundColor:BL,color:kL,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${OL}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${OL}`},".cm-panel button":{backgroundColor:HL,color:kL,border:bL.border,borderRadius:bL.borderRadius,padding:bL.padding},".cm-panel button:hover":{backgroundColor:DL},".cm-activeLine":{backgroundColor:mhe,borderRadius:dhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:BL,color:OL,border:yL.border,borderRight:`1px solid ${DL}`,paddingRight:yL.paddingRight},".cm-activeLineGutter":{backgroundColor:EL,color:kL,fontWeight:yL.fontWeight},".cm-lineNumbers":{fontSize:yL.fontSize,lineHeight:yL.lineHeight},".cm-foldGutter":{fontSize:yL.fontSize,lineHeight:yL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:OL,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:kL},".cm-insertedLine":{textDecoration:vL.insertedTextDecoration,backgroundColor:KL,color:JL,padding:vL.insertedLinePadding,borderRadius:vL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:vL.insertedTextDecoration,backgroundColor:`${KL} !important`,color:JL,padding:vL.insertedLinePadding,borderRadius:vL.borderRadious,border:`1px solid ${JL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:vL.deletedTextDecoration,backgroundColor:qL,color:YL,padding:vL.insertedLinePadding,borderRadius:vL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:vL.deletedTextDecoration,backgroundColor:`${qL} !important`,color:YL,padding:vL.insertedLinePadding,borderRadius:vL.borderRadious,border:`1px solid ${YL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:HL,border:`1px solid ${OL}`,borderRadius:TL.borderRadius,padding:TL.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:HL,border:`none`},"& > ul > li":{padding:TL.padding,lineHeight:TL.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:DL,color:AL,borderRadius:TL.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:OL,paddingRight:TL.paddingRight},"& > ul > li > span.cm-completionDetail":{color:OL,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:HL,borderBottomColor:HL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${FL}`},"&-warning":{borderLeft:`3px solid ${WL}`},"&-info":{borderLeft:`3px solid ${GL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${FL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${WL}`},".cm-matchingBracket":{backgroundColor:_he,outline:`1px solid ${vhe}`,borderRadius:xL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${FL}40`,outline:`1px solid ${phe}`,borderRadius:xL.borderRadius},".cm-selectionMatch":{backgroundColor:ghe,outline:`1px solid ${DL}50`,borderRadius:xL.borderRadius},".cm-foldPlaceholder":{backgroundColor:HL,color:OL,border:`1px dotted ${OL}70`,borderRadius:SL.borderRadius,padding:SL.padding,margin:SL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${VL}, 0 0 0 3px ${ML}40`},"& .cm-scroller::-webkit-scrollbar":{width:CL.width,height:CL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:BL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:DL,borderRadius:CL.borderRadius,border:`3px solid ${BL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:OL},".cm-ghostText":{opacity:`0.5`,color:OL}},{dark:!0}),D(B.define([{tag:A.keyword,color:PL,fontWeight:`bold`},{tag:A.controlKeyword,color:PL,fontWeight:`bold`},{tag:A.moduleKeyword,color:PL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:ML},{tag:[A.variableName],color:kL},{tag:[A.propertyName],color:ML,fontStyle:`normal`},{tag:[A.typeName],color:LL},{tag:[A.className],color:LL,fontStyle:`italic`},{tag:[A.namespace],color:NL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:zL},{tag:[A.bracket],color:kL},{tag:[A.brace],color:jL},{tag:[A.punctuation],color:kL},{tag:[A.function(A.variableName),A.labelName],color:jL},{tag:[A.definition(A.function(A.variableName))],color:jL},{tag:[A.definition(A.variableName)],color:IL},{tag:A.number,color:IL},{tag:A.changed,color:zL},{tag:A.annotation,color:FL,fontStyle:`italic`},{tag:A.modifier,color:zL,fontStyle:`italic`},{tag:A.self,color:zL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:IL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:zL},{tag:[A.processingInstruction,A.inserted],color:jL},{tag:[A.special(A.string),A.regexp],color:zL},{tag:A.string,color:RL},{tag:A.definition(A.typeName),color:LL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:RL},{tag:A.meta,color:OL},{tag:A.comment,fontStyle:`italic`,color:OL},{tag:A.docComment,fontStyle:`italic`,color:OL},{tag:[A.tagName],color:FL},{tag:[A.attributeName],color:LL},{tag:[A.heading],fontWeight:`bold`,color:NL},{tag:[A.strong],fontWeight:`bold`,color:ML},{tag:[A.emphasis],fontStyle:`italic`,color:LL},{tag:[A.link],color:yhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:GL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:kL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${FL}`},{tag:[A.strikethrough],color:FL,textDecoration:`line-through`},{tag:A.constant(A.name),color:IL},{tag:A.deleted,color:FL},{tag:A.squareBracket,color:FL},{tag:A.angleBracket,color:IL},{tag:A.monospace,color:kL,fontStyle:`italic`},{tag:[A.contentSeparator],color:NL},{tag:A.quote,color:zL}]))],XL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},xhe={borderLeftWidth:`2px`},ZL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},QL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},$L={border:`none`,borderRadius:`4px`,padding:`2px 10px`},She={borderRadius:`2px`},eR={borderRadius:`2px`},tR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},nR={width:`12px`,height:`12px`,borderRadius:`6px`},rR={borderRadius:`4px`,padding:`2px 6px`},iR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Che=`#e1e2e7`,aR=`#3760bf`,oR=`#99a7df`,sR=`#848cb5`,whe=`#8c91a8`,cR=`#3760bf`,lR=`#e9e9ec`,uR=`#d5d6db`,dR=`#f52a65`,fR=`#b15c00`,pR=`#8c6c3e`,mR=`#587539`,hR=`#007197`,gR=`#2e7de9`,_R=`#7847bd`,The=`#9854f1`,vR=dR,yR=uR,Ehe=`#5F5FAF5A`,bR=Che,xR=lR,SR=`#99a7df40`,Dhe=`#99a7df60`,CR=aR,Ohe=`#0e639c20`,khe=hR,wR=fR,TR=hR,Ahe=_R,ER=`#58753920`,DR=`#f52a6520`,OR=`#587539`,kR=`#f52a65`,jhe=[I.theme({"&":{color:cR,backgroundColor:bR,fontSize:XL.fontSize,fontFamily:XL.fontFamily},".cm-content":{caretColor:CR,lineHeight:XL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:CR,borderLeftWidth:xhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${CR}99`,color:bR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:SR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#0e639c40`,outline:`1px solid ${hR}`,color:cR,borderRadius:rR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:hR,color:bR,padding:rR.padding,"& span":{color:bR}},".cm-search.cm-panel.cm-textfield":{color:cR,borderRadius:rR.borderRadius,padding:rR.padding},".cm-panels":{backgroundColor:lR,color:cR,borderRadius:`4px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.1)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${sR}30`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${sR}30`},".cm-panel button":{backgroundColor:xR,color:cR,border:$L.border,borderRadius:$L.borderRadius,padding:$L.padding},".cm-panel button:hover":{backgroundColor:uR,border:`1px solid ${oR}`},".cm-activeLine":{backgroundColor:Ehe,borderRadius:She.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yR,color:sR,border:QL.border,borderRight:`1px solid ${uR}`,paddingRight:QL.paddingRight},".cm-activeLineGutter":{color:aR,fontWeight:QL.fontWeight},".cm-lineNumbers":{fontSize:QL.fontSize,lineHeight:QL.lineHeight},".cm-foldGutter":{fontSize:QL.fontSize,lineHeight:QL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:sR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:aR},".cm-insertedLine":{textDecoration:ZL.insertedTextDecoration,backgroundColor:ER,color:OR,padding:ZL.insertedLinePadding,borderRadius:ZL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:ZL.insertedTextDecoration,backgroundColor:`${ER} !important`,color:OR,padding:ZL.insertedLinePadding,borderRadius:ZL.borderRadious,border:`1px solid ${OR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:ZL.deletedTextDecoration,backgroundColor:DR,color:kR,padding:ZL.insertedLinePadding,borderRadius:ZL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:ZL.deletedTextDecoration,backgroundColor:`${DR} !important`,color:kR,padding:ZL.insertedLinePadding,borderRadius:ZL.borderRadious,border:`1px solid ${kR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:xR,border:`1px solid ${whe}40`,borderRadius:iR.borderRadius,padding:iR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:xR,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:iR.padding,lineHeight:iR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:SR,color:aR,borderRadius:iR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:sR,paddingRight:iR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:sR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:xR,borderBottomColor:xR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${vR}`},"&-warning":{borderLeft:`3px solid ${wR}`},"&-info":{borderLeft:`3px solid ${TR}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${vR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${wR}`},".cm-matchingBracket":{backgroundColor:Ohe,outline:`1px solid ${khe}`,borderRadius:eR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${dR}20`,outline:`1px solid ${vR}`,borderRadius:eR.borderRadius},".cm-selectionMatch":{backgroundColor:Dhe,outline:`1px solid ${oR}50`,borderRadius:eR.borderRadius},".cm-foldPlaceholder":{backgroundColor:xR,color:sR,border:`1px dotted ${sR}70`,borderRadius:tR.borderRadius,padding:tR.padding,margin:tR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${bR}, 0 0 0 3px ${hR}40`},"& .cm-scroller::-webkit-scrollbar":{width:nR.width,height:nR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:yR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:sR,borderRadius:nR.borderRadius,border:`3px solid ${yR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:oR},".cm-ghostText":{opacity:`0.5`,color:sR}},{dark:!1}),D(B.define([{tag:A.keyword,color:hR,fontWeight:`bold`},{tag:A.controlKeyword,color:hR,fontWeight:`bold`},{tag:A.moduleKeyword,color:hR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:gR},{tag:[A.variableName],color:aR},{tag:[A.propertyName],color:gR,fontStyle:`normal`},{tag:[A.typeName],color:hR},{tag:[A.className],color:pR,fontStyle:`italic`},{tag:[A.namespace],color:_R,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:_R},{tag:[A.bracket],color:sR},{tag:[A.brace],color:sR},{tag:[A.punctuation],color:sR},{tag:[A.function(A.variableName)],color:hR},{tag:[A.labelName],color:_R,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:hR},{tag:[A.definition(A.variableName)],color:gR},{tag:A.number,color:fR},{tag:A.changed,color:fR},{tag:A.annotation,color:vR,fontStyle:`italic`},{tag:A.modifier,color:fR,fontStyle:`italic`},{tag:A.self,color:fR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:fR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:fR},{tag:[A.processingInstruction,A.inserted],color:mR},{tag:[A.special(A.string),A.regexp],color:The},{tag:A.string,color:mR},{tag:A.definition(A.typeName),color:hR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:gR},{tag:A.meta,color:sR},{tag:A.comment,fontStyle:`italic`,color:sR},{tag:A.docComment,fontStyle:`italic`,color:sR},{tag:[A.tagName],color:_R},{tag:[A.attributeName],color:pR},{tag:[A.heading],fontWeight:`bold`,color:fR},{tag:A.heading1,color:fR,fontWeight:`bold`},{tag:A.heading2,color:fR},{tag:A.heading3,color:fR},{tag:A.heading4,color:hR},{tag:A.heading5,color:hR},{tag:A.heading6,color:hR},{tag:[A.strong],fontWeight:`bold`,color:aR},{tag:[A.emphasis],fontStyle:`italic`,color:mR},{tag:[A.link],color:Ahe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:TR,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:aR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${vR}`},{tag:[A.strikethrough],color:vR,textDecoration:`line-through`},{tag:A.constant(A.name),color:fR},{tag:A.deleted,color:vR},{tag:A.squareBracket,color:sR},{tag:A.angleBracket,color:sR},{tag:A.monospace,color:aR},{tag:[A.contentSeparator],color:gR},{tag:A.quote,color:sR}]))],AR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Mhe={borderLeftWidth:`2px`},jR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},MR={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},NR={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Nhe={borderRadius:`2px`},PR={borderRadius:`2px`},FR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},IR={width:`12px`,height:`12px`,borderRadius:`6px`},LR={borderRadius:`4px`,padding:`2px 6px`},RR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Phe=`#24283b`,zR=`#414868`,BR=`#565f89`,VR=`#c0caf5`,HR=`#282e44`,UR=`#1f2335`,Fhe=`#f7768e`,WR=`#ff9e64`,GR=`#e0af68`,KR=`#9ece6a`,qR=`#2ac3de`,JR=`#7aa2f7`,YR=`#bb9af7`,XR=`#f7768e`,ZR=UR,Ihe=`#292e427a`,QR=Phe,$R=HR,ez=`#6f7bb630`,Lhe=`#6f7bb650`,tz=VR,Rhe=`#3d59a150`,zhe=JR,nz=WR,rz=qR,Bhe=YR,iz=`#3b4a3880`,az=`#4a393a80`,oz=`#9ece6a`,sz=`#f7768e`,Vhe=[I.theme({"&":{color:VR,backgroundColor:QR,fontSize:AR.fontSize,fontFamily:AR.fontFamily},".cm-content":{caretColor:tz,lineHeight:AR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:tz,borderLeftWidth:Mhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${tz}99`,color:QR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ez},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#7aa2f740`,outline:`1px solid ${JR}`,color:VR,borderRadius:LR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:JR,color:QR,padding:LR.padding,"& span":{color:QR}},".cm-search.cm-panel.cm-textfield":{color:VR,borderRadius:LR.borderRadius,padding:LR.padding},".cm-panels":{backgroundColor:HR,color:VR,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${BR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${BR}`},".cm-panel button":{backgroundColor:$R,color:VR,border:NR.border,borderRadius:NR.borderRadius,padding:NR.padding},".cm-panel button:hover":{backgroundColor:UR},".cm-activeLine":{backgroundColor:Ihe,borderRadius:Nhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:ZR,color:BR,border:MR.border,borderRight:`1px solid ${UR}`,paddingRight:MR.paddingRight},".cm-activeLineGutter":{backgroundColor:UR,color:VR,fontWeight:MR.fontWeight},".cm-lineNumbers":{fontSize:MR.fontSize,lineHeight:MR.lineHeight},".cm-foldGutter":{fontSize:MR.fontSize,lineHeight:MR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:BR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:VR},".cm-insertedLine":{textDecoration:jR.insertedTextDecoration,backgroundColor:iz,color:oz,padding:jR.insertedLinePadding,borderRadius:jR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:jR.insertedTextDecoration,backgroundColor:`${iz} !important`,color:oz,padding:jR.insertedLinePadding,borderRadius:jR.borderRadious,border:`1px solid ${oz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:jR.deletedTextDecoration,backgroundColor:az,color:sz,padding:jR.insertedLinePadding,borderRadius:jR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:jR.deletedTextDecoration,backgroundColor:`${az} !important`,color:sz,padding:jR.insertedLinePadding,borderRadius:jR.borderRadious,border:`1px solid ${sz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:$R,border:`1px solid ${BR}`,borderRadius:RR.borderRadius,padding:RR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:$R,border:`none`},"& > ul > li":{padding:RR.padding,lineHeight:RR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:ez,color:VR,borderRadius:RR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:BR,paddingRight:RR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:BR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:$R,borderBottomColor:$R},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${XR}`},"&-warning":{borderLeft:`3px solid ${nz}`},"&-info":{borderLeft:`3px solid ${rz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${XR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${nz}`},".cm-matchingBracket":{backgroundColor:Rhe,outline:`1px solid ${zhe}`,borderRadius:PR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${Fhe}20`,outline:`1px solid ${XR}`,borderRadius:PR.borderRadius},".cm-selectionMatch":{backgroundColor:Lhe,outline:`1px solid ${zR}50`,borderRadius:PR.borderRadius},".cm-foldPlaceholder":{backgroundColor:$R,color:BR,border:`1px dotted ${BR}70`,borderRadius:FR.borderRadius,padding:FR.padding,margin:FR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${QR}, 0 0 0 3px ${JR}40`},"& .cm-scroller::-webkit-scrollbar":{width:IR.width,height:IR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:ZR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:zR,borderRadius:IR.borderRadius,border:`3px solid ${ZR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:BR},".cm-ghostText":{opacity:`0.5`,color:BR}},{dark:!0}),D(B.define([{tag:A.keyword,color:YR,fontWeight:`bold`},{tag:A.controlKeyword,color:YR,fontWeight:`bold`},{tag:A.moduleKeyword,color:YR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:VR},{tag:[A.variableName],color:VR},{tag:[A.propertyName],color:JR,fontStyle:`normal`},{tag:[A.typeName],color:qR},{tag:[A.className],color:GR,fontStyle:`italic`},{tag:[A.namespace],color:JR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:YR},{tag:[A.bracket],color:BR},{tag:[A.brace],color:BR},{tag:[A.punctuation],color:BR},{tag:[A.function(A.variableName)],color:JR},{tag:[A.labelName],color:JR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:JR},{tag:[A.definition(A.variableName)],color:VR},{tag:A.number,color:WR},{tag:A.changed,color:WR},{tag:A.annotation,color:XR,fontStyle:`italic`},{tag:A.modifier,color:WR,fontStyle:`italic`},{tag:A.self,color:WR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:YR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:WR},{tag:[A.processingInstruction,A.inserted],color:KR},{tag:[A.special(A.string),A.regexp],color:`#b4f9f8`},{tag:A.string,color:KR},{tag:A.definition(A.typeName),color:qR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:VR},{tag:A.meta,color:BR},{tag:A.comment,fontStyle:`italic`,color:BR},{tag:A.docComment,fontStyle:`italic`,color:BR},{tag:[A.tagName],color:YR},{tag:[A.attributeName],color:GR},{tag:[A.heading],fontWeight:`bold`,color:`#89ddff`},{tag:A.heading1,color:`#89ddff`,fontWeight:`bold`},{tag:A.heading2,color:`#89ddff`},{tag:A.heading3,color:`#89ddff`},{tag:A.heading4,color:`#89ddff`},{tag:A.heading5,color:`#89ddff`},{tag:A.heading6,color:`#89ddff`},{tag:[A.strong],fontWeight:`bold`,color:VR},{tag:[A.emphasis],fontStyle:`italic`,color:qR},{tag:[A.link],color:Bhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:rz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:VR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${XR}`},{tag:[A.strikethrough],color:XR,textDecoration:`line-through`},{tag:A.constant(A.name),color:WR},{tag:A.deleted,color:XR},{tag:A.squareBracket,color:BR},{tag:A.angleBracket,color:BR},{tag:A.monospace,color:VR},{tag:[A.contentSeparator],color:JR},{tag:A.quote,color:BR}]))],cz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Hhe={borderLeftWidth:`2px`},lz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},uz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},dz={borderRadius:`4px`,padding:`2px 10px`},Uhe={borderRadius:`2px`},fz={borderRadius:`2px`},pz={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},mz={width:`12px`,height:`12px`,borderRadius:`6px`},hz={borderRadius:`4px`,padding:`2px 6px`},gz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Whe=`#1e1e1e`,_z=`#252526`,vz=`#2d2d30`,yz=`#838383`,Ghe=`#c6c6c6`,bz=`#d4d4d4`,xz=`#e9e9e9`,Khe=`#1c1c1c`,Sz=`#569cd6`,qhe=`#c586c0`,Cz=`#9cdcfe`,wz=`#4ec9b0`,Tz=`#dcdcaa`,Jhe=`#b5cea8`,Ez=`#ce9178`,Dz=`#f44747`,Oz=`#d7ba7d`,kz=`#6a9955`,Az=Dz,jz=`#FFFFFF08`,Mz=Whe,Nz=_z,Yhe=`#264F7899`,Xhe=`#72a1ff59`,Pz=Ghe,Zhe=`#ffffff15`,Qhe=Sz,Fz=Oz,Iz=`#3794ff`,$he=`#c586c0`,Lz=`#1e3f1e80`,Rz=`#4b1c1c80`,zz=`#6cc26f`,Bz=`#f14c4c`,Vz=[I.theme({"&":{color:bz,backgroundColor:Mz,fontSize:cz.fontSize,fontFamily:cz.fontFamily},".cm-content":{caretColor:Pz,lineHeight:cz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:Pz,borderLeftWidth:Hhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${Pz}99`,color:Mz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Yhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#72a1ff40`,outline:`1px solid ${Sz}90`,color:xz,borderRadius:hz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#3794ff90`,color:xz,padding:hz.padding,"& span":{color:xz}},".cm-search.cm-panel.cm-textfield":{color:bz,borderRadius:hz.borderRadius,padding:hz.padding},".cm-panels":{backgroundColor:_z,color:bz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.45)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${vz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${vz}`},".cm-panel button":{backgroundColor:vz,color:bz,border:`1px solid ${vz}`,borderRadius:dz.borderRadius,padding:dz.padding},".cm-panel button:hover":{backgroundColor:`#3a3a3a`,border:`1px solid ${yz}80`},".cm-activeLine":{backgroundColor:jz,borderRadius:Uhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:Khe,color:yz,border:`none`,borderRight:`1px solid ${vz}`,paddingRight:uz.paddingRight},".cm-activeLineGutter":{backgroundColor:jz,color:xz,fontWeight:uz.fontWeight},".cm-lineNumbers":{fontSize:uz.fontSize,lineHeight:uz.lineHeight},".cm-foldGutter":{fontSize:uz.fontSize,lineHeight:uz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:yz,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:xz},".cm-insertedLine":{textDecoration:lz.insertedTextDecoration,backgroundColor:Lz,color:zz,padding:lz.insertedLinePadding,borderRadius:lz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:lz.insertedTextDecoration,backgroundColor:`${Lz} !important`,color:zz,padding:lz.insertedLinePadding,borderRadius:lz.borderRadious,border:`1px solid ${zz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:lz.deletedTextDecoration,backgroundColor:Rz,color:Bz,padding:lz.insertedLinePadding,borderRadius:lz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:lz.deletedTextDecoration,backgroundColor:`${Rz} !important`,color:Bz,padding:lz.insertedLinePadding,borderRadius:lz.borderRadious,border:`1px solid ${Bz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:Nz,border:`1px solid ${vz}`,borderRadius:gz.borderRadius,padding:gz.padding,boxShadow:`0 3px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:Nz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:gz.padding,lineHeight:gz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#04395e`,color:xz,borderRadius:gz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:yz,paddingRight:gz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:yz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Nz,borderBottomColor:Nz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${Az}`},"&-warning":{borderLeft:`3px solid ${Fz}`},"&-info":{borderLeft:`3px solid ${Iz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${Az}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${Fz}`},".cm-matchingBracket":{backgroundColor:Zhe,outline:`1px solid ${Qhe}80`,borderRadius:fz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${Dz}40`,outline:`1px solid ${Az}`,borderRadius:fz.borderRadius},".cm-selectionMatch":{backgroundColor:Xhe,outline:`1px solid ${vz}70`,borderRadius:fz.borderRadius},".cm-foldPlaceholder":{backgroundColor:Nz,color:yz,border:`1px dotted ${yz}70`,borderRadius:pz.borderRadius,padding:pz.padding,margin:pz.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${vz}`},"& .cm-scroller::-webkit-scrollbar":{width:mz.width,height:mz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:Mz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#424242`,borderRadius:mz.borderRadius,border:`3px solid ${Mz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#525252`},".cm-ghostText":{opacity:`0.5`,color:yz}},{dark:!0}),D(B.define([{tag:A.keyword,color:Sz,fontWeight:`bold`},{tag:A.controlKeyword,color:qhe,fontWeight:`bold`},{tag:A.moduleKeyword,color:Sz,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:bz},{tag:[A.variableName],color:Cz},{tag:[A.propertyName],color:Cz,fontStyle:`normal`},{tag:[A.typeName],color:wz},{tag:[A.className],color:wz,fontStyle:`normal`},{tag:[A.namespace],color:bz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:bz},{tag:[A.bracket],color:bz},{tag:[A.brace],color:bz},{tag:[A.punctuation],color:bz},{tag:[A.function(A.variableName)],color:Tz},{tag:[A.labelName],color:Tz,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:Tz},{tag:[A.definition(A.variableName)],color:Cz},{tag:A.number,color:Jhe},{tag:A.changed,color:Oz},{tag:A.annotation,color:Oz,fontStyle:`italic`},{tag:A.modifier,color:Sz,fontStyle:`normal`},{tag:A.self,color:Sz},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:Cz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:Sz},{tag:[A.processingInstruction,A.inserted],color:Ez},{tag:[A.special(A.string),A.regexp],color:`#d16969`},{tag:A.string,color:Ez},{tag:A.definition(A.typeName),color:wz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:bz},{tag:A.meta,color:yz},{tag:A.comment,fontStyle:`italic`,color:kz},{tag:A.docComment,fontStyle:`italic`,color:kz},{tag:[A.tagName],color:Sz},{tag:[A.attributeName],color:Cz},{tag:[A.heading],fontWeight:`bold`,color:Sz},{tag:A.heading1,color:Sz,fontWeight:`bold`},{tag:A.heading2,color:Sz},{tag:A.heading3,color:Sz},{tag:A.heading4,color:Sz},{tag:A.heading5,color:Sz},{tag:A.heading6,color:Sz},{tag:[A.strong],fontWeight:`bold`,color:Sz},{tag:[A.emphasis],fontStyle:`italic`,color:wz},{tag:[A.link],color:$he,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:Iz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:bz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${Az}`},{tag:[A.strikethrough],color:Az,textDecoration:`line-through`},{tag:A.constant(A.name),color:Cz},{tag:A.deleted,color:Az},{tag:A.squareBracket,color:bz},{tag:A.angleBracket,color:bz},{tag:A.monospace,color:bz},{tag:[A.contentSeparator],color:bz},{tag:A.quote,color:kz}]))],Hz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Uz={borderLeftWidth:`2px`},Wz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},Gz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},Kz={borderRadius:`4px`,padding:`2px 10px`},qz={borderRadius:`2px`},Jz={borderRadius:`2px`},Yz={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},Xz={width:`12px`,height:`12px`,borderRadius:`6px`},Zz={borderRadius:`4px`,padding:`2px 6px`},Qz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},$z=`#ffffff`,eB=`#f3f3f3`,tB=`#d6d6d6`,nB=`#6b6b6b`,rB=`#000000`,iB=`#383a42`,aB=`#1f1f1f`,oB=`#f5f5f5`,sB=`#0064ff`,cB=`#af00db`,lB=`#0070c1`,uB=`#267f99`,dB=`#795e26`,fB=`#098658`,pB=`#a31515`,mB=`#e51400`,hB=`#795e26`,gB=`#008000`,_B=mB,vB=`#99999926`,yB=$z,bB=eB,xB=`#add6ff`,SB=`#a8ac9480`,CB=rB,wB=`#007acc20`,TB=`#007acc`,EB=`#bf8803`,DB=`#006ab1`,OB=`#9e46d0`,kB=`#ddfbe0`,AB=`#ffebec`,jB=`#22863a`,MB=`#e51400`,NB=[I.theme({"&":{color:iB,backgroundColor:yB,fontSize:Hz.fontSize,fontFamily:Hz.fontFamily},".cm-content":{caretColor:CB,lineHeight:Hz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:CB,borderLeftWidth:Uz.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${CB}99`,color:yB},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:xB},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#bbdefb`,outline:`1px solid ${lB}90`,color:aB,borderRadius:Zz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#90caf9`,color:aB,padding:Zz.padding,"& span":{color:aB}},".cm-search.cm-panel.cm-textfield":{color:iB,borderRadius:Zz.borderRadius,padding:Zz.padding},".cm-panels":{backgroundColor:eB,color:iB,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${tB}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${tB}`},".cm-panel button":{backgroundColor:yB,color:iB,border:`1px solid ${tB}`,borderRadius:Kz.borderRadius,padding:Kz.padding},".cm-panel button:hover":{backgroundColor:`#e8e8e8`,border:`1px solid ${nB}80`},".cm-activeLine":{backgroundColor:vB,borderRadius:qz.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:oB,color:`#237893`,border:`none`,borderRight:`1px solid ${tB}`,paddingRight:Gz.paddingRight},".cm-activeLineGutter":{backgroundColor:vB,color:`#0b216f`,fontWeight:Gz.fontWeight},".cm-lineNumbers":{fontSize:Gz.fontSize,lineHeight:Gz.lineHeight},".cm-foldGutter":{fontSize:Gz.fontSize,lineHeight:Gz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:`#237893`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`#0b216f`},".cm-insertedLine":{textDecoration:Wz.insertedTextDecoration,backgroundColor:kB,color:jB,padding:Wz.insertedLinePadding,borderRadius:Wz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:Wz.insertedTextDecoration,backgroundColor:`${kB} !important`,color:jB,padding:Wz.insertedLinePadding,borderRadius:Wz.borderRadious,border:`1px solid ${jB}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:Wz.deletedTextDecoration,backgroundColor:AB,color:MB,padding:Wz.insertedLinePadding,borderRadius:Wz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:Wz.deletedTextDecoration,backgroundColor:`${AB} !important`,color:MB,padding:Wz.insertedLinePadding,borderRadius:Wz.borderRadious,border:`1px solid ${MB}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:bB,border:`1px solid ${tB}`,borderRadius:Qz.borderRadius,padding:Qz.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:bB,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:Qz.padding,lineHeight:Qz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#dcebfc`,color:aB,borderRadius:Qz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:nB,paddingRight:Qz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:nB,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:bB,borderBottomColor:bB},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${_B}`},"&-warning":{borderLeft:`3px solid ${EB}`},"&-info":{borderLeft:`3px solid ${DB}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${_B}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${EB}`},".cm-matchingBracket":{backgroundColor:wB,outline:`1px solid ${TB}80`,borderRadius:Jz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${mB}20`,outline:`1px solid ${_B}`,borderRadius:Jz.borderRadius},".cm-selectionMatch":{backgroundColor:SB,outline:`1px solid ${tB}70`,borderRadius:Jz.borderRadius},".cm-foldPlaceholder":{backgroundColor:bB,color:nB,border:`1px dotted ${nB}70`,borderRadius:Yz.borderRadius,padding:Yz.padding,margin:Yz.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${tB}`},"& .cm-scroller::-webkit-scrollbar":{width:Xz.width,height:Xz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:yB},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#dadada`,borderRadius:Xz.borderRadius,border:`3px solid ${yB}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#cccccc`},".cm-ghostText":{opacity:`0.5`,color:nB}},{dark:!1}),D(B.define([{tag:A.keyword,color:sB,fontWeight:`bold`},{tag:A.controlKeyword,color:cB,fontWeight:`bold`},{tag:A.moduleKeyword,color:sB,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:iB},{tag:[A.variableName],color:lB},{tag:[A.propertyName],color:lB,fontStyle:`normal`},{tag:[A.typeName],color:uB},{tag:[A.className],color:uB,fontStyle:`normal`},{tag:[A.namespace],color:iB,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:iB},{tag:[A.bracket],color:iB},{tag:[A.brace],color:iB},{tag:[A.punctuation],color:iB},{tag:[A.function(A.variableName)],color:dB},{tag:[A.labelName],color:dB,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:dB},{tag:[A.definition(A.variableName)],color:lB},{tag:A.number,color:fB},{tag:A.changed,color:hB},{tag:A.annotation,color:hB,fontStyle:`italic`},{tag:A.modifier,color:sB,fontStyle:`normal`},{tag:A.self,color:sB},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:lB},{tag:[A.atom,A.bool,A.special(A.variableName)],color:sB},{tag:[A.processingInstruction,A.inserted],color:pB},{tag:[A.special(A.string),A.regexp],color:cB},{tag:A.string,color:pB},{tag:A.definition(A.typeName),color:uB,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:iB},{tag:A.meta,color:nB},{tag:A.comment,fontStyle:`italic`,color:gB},{tag:A.docComment,fontStyle:`italic`,color:gB},{tag:[A.tagName],color:sB},{tag:[A.attributeName],color:lB},{tag:[A.heading],fontWeight:`bold`,color:sB},{tag:A.heading1,color:sB,fontWeight:`bold`},{tag:A.heading2,color:sB},{tag:A.heading3,color:sB},{tag:A.heading4,color:sB},{tag:A.heading5,color:sB},{tag:A.heading6,color:sB},{tag:[A.strong],fontWeight:`bold`,color:sB},{tag:[A.emphasis],fontStyle:`italic`,color:lB},{tag:[A.link],color:OB,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:DB,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:iB,textDecoration:`underline wavy`,borderBottom:`1px wavy ${_B}`},{tag:[A.strikethrough],color:_B,textDecoration:`line-through`},{tag:A.constant(A.name),color:lB},{tag:A.deleted,color:_B},{tag:A.squareBracket,color:iB},{tag:A.angleBracket,color:iB},{tag:A.monospace,color:iB},{tag:[A.contentSeparator],color:iB},{tag:A.quote,color:gB}]))];function PB(){return PB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PB.apply(null,arguments)}function FB(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var IB=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,LB=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(IB(e)):IB,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Re(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=ve(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=P(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let a=r.charCodeAt(e),o=this.match(a,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==a&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],a=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,a=!0)),a||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<`u`&&(LB.prototype[Symbol.iterator]=function(){return this});var RB={from:-1,to:-1,match:/.*/.exec(``)},zB=`gm`+(/x/.unicode==null?``:`u`),BB=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=RB,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new UB(e,t,n,r,i);this.re=new RegExp(t,zB+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=GB(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=GB(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},VB=new WeakMap,HB=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=VB.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return VB.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),VB.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},UB=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=RB,this.matchPos=GB(e,r),this.re=new RegExp(t,zB+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=HB.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=GB(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=HB.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(BB.prototype[Symbol.iterator]=UB.prototype[Symbol.iterator]=function(){return this});function WB(e){try{return new RegExp(e,zB),!0}catch{return!1}}function GB(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}function KB(e){let t=je(`input`,{class:`cm-textfield`,name:`line`,value:String(e.state.doc.lineAt(e.state.selection.main.head).number)}),n=je(`form`,{class:`cm-gotoLine`,onkeydown:t=>{t.keyCode==27?(t.preventDefault(),e.dispatch({effects:qB.of(!1)}),e.focus()):t.keyCode==13&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},je(`label`,e.state.phrase(`Go to line`),`: `,t),` `,je(`button`,{class:`cm-button`,type:`submit`},e.state.phrase(`go`)),je(`button`,{name:`close`,onclick:()=>{e.dispatch({effects:qB.of(!1)}),e.focus()},"aria-label":e.state.phrase(`close`),type:`button`},[`×`]));function r(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,a,o,s,c]=n,l=s?+s.slice(1):0,u=o?+o:i.number;if(o&&c){let e=u/100;a&&(e=e*(a==`-`?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else o&&a&&(u=u*(a==`-`?-1:1)+i.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),f=le.cursor(d.from+Math.max(0,Math.min(l,d.length)));e.dispatch({effects:[qB.of(!1),I.scrollIntoView(f.from,{y:`center`})],selection:f}),e.focus()}return{dom:n}}var qB=V.define(),JB=Be.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(qB)&&(e=n.value);return e},provide:e=>ne.from(e,e=>e?KB:null)}),YB=e=>{let t=De(e,KB);if(!t){let n=[qB.of(!0)];e.state.field(JB,!1)??n.push(V.appendConfig.of([JB,XB])),e.dispatch({effects:n}),t=De(e,KB)}return t&&t.dom.querySelector(`input`).select(),!0},XB=I.baseTheme({".cm-panel.cm-gotoLine":{padding:`2px 6px 4px`,position:`relative`,"& label":{fontSize:`80%`},"& [name=close]":{position:`absolute`,top:`0`,bottom:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:`0`}}}),ZB={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},QB=xe.define({combine(e){return f(e,ZB,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function $B(e){let t=[aV,iV];return e&&t.push(QB.of(e)),t}var eV=Ve.mark({class:`cm-selectionMatch`}),tV=Ve.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function nV(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=oe.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=oe.Word)}function rV(e,t,n,r){return e(t.sliceDoc(n,n+1))==oe.Word&&e(t.sliceDoc(r-1,r))==oe.Word}var iV=g.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(QB),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Ve.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return Ve.none;let e=n.wordAt(i.head);if(!e)return Ve.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return Ve.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(nV(o,n,i.from,i.to)&&rV(o,n,i.from,i.to)))return Ve.none}else if(a=n.sliceDoc(i.from,i.to),!a)return Ve.none}let s=[];for(let r of e.visibleRanges){let e=new LB(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||nV(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(tV.range(r,a)):(r>=i.to||a<=i.from)&&s.push(eV.range(r,a)),s.length>t.maxMatches))return Ve.none}}return Ve.set(s)}},{decorations:e=>e.decorations}),aV=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),oV=({state:e,dispatch:t})=>{let{selection:n}=e,r=le.create(n.ranges.map(t=>e.wordAt(t.head)||le.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function sV(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new LB(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new LB(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var cV=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return oV({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=sV(e,r);return i?(t(e.update({selection:e.selection.addRange(le.range(i.from,i.to),!1),effects:I.scrollIntoView(i.to)})),!0):!1},lV=xe.define({combine(e){return f(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new VV(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),uV=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||WB(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
354
354
  `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new yV(this):new mV(this)}getCursor(e,t=0,n){let r=e.doc?e:Ee.create({doc:e});return n??=r.doc.length,this.regexp?hV(this,r,t,n):fV(this,r,t,n)}},dV=class{constructor(e){this.spec=e}};function fV(e,t,n,r){return new LB(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?pV(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function pV(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(gV(i,n-a))!=oe.Word||t(_V(i,n-a))!=oe.Word)&&(t(_V(i,r-a))!=oe.Word||t(gV(i,r-a))!=oe.Word))}var mV=class extends dV{constructor(e){super(e)}nextMatch(e,t,n){let r=fV(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=fV(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=fV(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=fV(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=fV(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function hV(e,t,n,r){return new BB(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?vV(t.charCategorizer(t.selection.main.head)):void 0},n,r)}function gV(e,t){return e.slice(E(e,t,!1),t)}function _V(e,t){return e.slice(t,E(e,t))}function vV(e){return(t,n,r)=>!r[0].length||(e(gV(r.input,r.index))!=oe.Word||e(_V(r.input,r.index))!=oe.Word)&&(e(_V(r.input,r.index+r[0].length))!=oe.Word||e(gV(r.input,r.index+r[0].length))!=oe.Word)}var yV=class extends dV{nextMatch(e,t,n){let r=hV(this.spec,e,n,e.doc.length).next();return r.done&&(r=hV(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=hV(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=hV(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=hV(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},bV=V.define(),xV=V.define(),SV=Be.define({create(e){return new CV(FV(e).create(),null)},update(e,t){for(let n of t.effects)n.is(bV)?e=new CV(n.value.create(),e.panel):n.is(xV)&&(e=new CV(e.query,n.value?PV:null));return e},provide:e=>ne.from(e,e=>e.panel)}),CV=class{constructor(e,t){this.query=e,this.panel=t}},wV=Ve.mark({class:`cm-searchMatch`}),TV=Ve.mark({class:`cm-searchMatch cm-searchMatch-selected`}),EV=g.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(SV))}update(e){let t=e.state.field(SV);(t!=e.startState.field(SV)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Ve.none;let{view:n}=this,r=new Ie;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?TV:wV)})}return r.finish()}},{decorations:e=>e.decorations});function DV(e){return t=>{let n=t.state.field(SV,!1);return n&&n.query.spec.valid?e(t,n):RV(t)}}var OV=DV((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=le.single(r.from,r.to),a=e.state.facet(lV);return e.dispatch({selection:i,effects:[GV(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),LV(e),!0}),kV=DV((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=le.single(i.from,i.to),o=e.state.facet(lV);return e.dispatch({selection:a,effects:[GV(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),LV(e),!0}),AV=DV((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:le.create(n.map(e=>le.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),jV=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new LB(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(le.range(t.value.from,t.value.to))}return t(e.update({selection:le.create(a,o),userEvent:`select.search.matches`})),!0},MV=DV((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(I.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`)));let d=e.state.changes(s);return o&&(c=le.single(o.from,o.to).map(d),u.push(GV(e,o)),u.push(n.facet(lV).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),NV=DV((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:I.announce.of(r),userEvent:`input.replace.all`}),!0});function PV(e){return e.state.facet(lV).createPanel(e)}function FV(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(lV);return new uV({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function IV(e){let t=De(e,PV);return t&&t.dom.querySelector(`[main-field]`)}function LV(e){let t=IV(e);t&&t==e.root.activeElement&&t.select()}var RV=e=>{let t=e.state.field(SV,!1);if(t&&t.panel){let n=IV(e);if(n&&n!=e.root.activeElement){let r=FV(e.state,t.query.spec);r.valid&&e.dispatch({effects:bV.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[xV.of(!0),t?bV.of(FV(e.state,t.query.spec)):V.appendConfig.of(qV)]});return!0},zV=e=>{let t=e.state.field(SV,!1);if(!t||!t.panel)return!1;let n=De(e,PV);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:xV.of(!1)}),!0},BV=[{key:`Mod-f`,run:RV,scope:`editor search-panel`},{key:`F3`,run:OV,shift:kV,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:OV,shift:kV,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:zV,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:jV},{key:`Mod-Alt-g`,run:YB},{key:`Mod-d`,run:cV,preventDefault:!0}],VV=class{constructor(e){this.view=e;let t=this.query=e.state.field(SV).query.spec;this.commit=this.commit.bind(this),this.searchField=je(`input`,{value:t.search,placeholder:HV(e,`Find`),"aria-label":HV(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=je(`input`,{value:t.replace,placeholder:HV(e,`Replace`),"aria-label":HV(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=je(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=je(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=je(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return je(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=je(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>OV(e),[HV(e,`next`)]),n(`prev`,()=>kV(e),[HV(e,`previous`)]),n(`select`,()=>AV(e),[HV(e,`all`)]),je(`label`,null,[this.caseField,HV(e,`match case`)]),je(`label`,null,[this.reField,HV(e,`regexp`)]),je(`label`,null,[this.wordField,HV(e,`by word`)]),...e.state.readOnly?[]:[je(`br`),this.replaceField,n(`replace`,()=>MV(e),[HV(e,`replace`)]),n(`replaceAll`,()=>NV(e),[HV(e,`replace all`)])],je(`button`,{name:`close`,onclick:()=>zV(e),"aria-label":HV(e,`close`),type:`button`},[`×`])])}commit(){let e=new uV({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:bV.of(e)}))}keydown(e){me(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?kV:OV)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),MV(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(bV)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(lV).top}};function HV(e,t){return e.state.phrase(t)}var UV=30,WV=/[\s\.,:;?!]/;function GV(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-UV),o=Math.min(i,n+UV),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<UV;e++)if(!WV.test(s[e+1])&&WV.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-UV;e--)if(!WV.test(s[e-1])&&WV.test(s[e])){s=s.slice(0,e);break}}return I.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var KV=I.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),qV=[SV,de.low(EV),KV],JV=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},YV=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(lH).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new Ie,s=[],c=0,l=r.doc.iter(),u=0,d=r.doc.length;for(let e=0;;){let t=e==a.length?null:a[e];if(!t&&!s.length)break;let n,r;if(s.length)n=c,r=s.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>d)break;r=t.to,s.push(t),e++}for(;e<a.length;){let t=a[e];if(t.from==n&&(t.to>t.from||t.to==n))s.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,d);let i=!1;if(s.some(e=>e.from==n&&(e.to==r||r==d))&&(i=n==r,!i&&r-n<10)){let e=n-(u+l.value.length);e>0&&(l.next(e),u=n);for(let e=n;;){if(e>=r){i=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let f=bH(s);if(i)o.add(n,n,Ve.widget({widget:new pH(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,Ve.mark({class:`cm-lintRange cm-lintRange-`+f+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}if(c=r,c==d)break;for(let e=0;e<s.length;e++)s[e].to<=c&&s.splice(e--,1)}let f=o.finish();return new e(f,n,XV(f))}};function XV(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0))if(!r)r=new JV(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new JV(r.from,n,r.diagnostic)}),r}function ZV(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(lH).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is($V))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function QV(e,t){return e.field(nH,!1)?t:t.concat(V.appendConfig.of(xH))}var $V=V.define(),eH=V.define(),tH=V.define(),nH=Be.define({create(){return new YV(Ve.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=XV(n,e.selected.diagnostic,i)||XV(n,null,i)}!n.size&&i&&t.state.facet(lH).autoPanel&&(i=null),e=new YV(n,i,r)}for(let n of t.effects)if(n.is($V)){let r=t.state.facet(lH).autoPanel?n.value.length?hH.open:null:e.panel;e=YV.init(n.value,r,t.state)}else n.is(eH)?e=new YV(e.diagnostics,n.value?hH.open:null,e.selected):n.is(tH)&&(e=new YV(e.diagnostics,e.panel,n.value));return e},provide:e=>[ne.from(e,e=>e.panel),I.decorations.from(e,e=>e.diagnostics)]}),rH=Ve.mark({class:`cm-lintRange cm-lintRange-active`});function iH(e,t,n){let{diagnostics:r}=e.state.field(nH),i,a=-1,o=-1;r.between(t-(n<0?1:0),t+(n>0?1:0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(lH).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:e.state.doc.lineAt(a).to<o,create(){return{dom:aH(e,i)}}}:null}function aH(e,t){return je(`ul`,{class:`cm-tooltip-lint`},t.map(t=>fH(e,t,!1)))}var oH=e=>{let t=e.state.field(nH,!1);(!t||!t.panel)&&e.dispatch({effects:QV(e.state,[eH.of(!0)])});let n=De(e,hH.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},sH=e=>{let t=e.state.field(nH,!1);return!t||!t.panel?!1:(e.dispatch({effects:eH.of(!1)}),!0)},cH=[{key:`Mod-Shift-m`,run:oH,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field(nH,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],lH=xe.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),...f(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:uH,tooltipFilter:uH,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function uH(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function dH(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function fH(e,t,n){let r=n?dH(t.actions):[];return je(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},je(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=XV(e.state.field(nH).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),je(`u`,s.slice(c,c+1)),s.slice(c+1)];return je(`button`,{type:`button`,class:`cm-diagnosticAction`+(n.markClass?` `+n.markClass:``),onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&je(`div`,{class:`cm-diagnosticSource`},t.source))}var pH=class extends F{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return je(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},mH=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=fH(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},hH=class e{constructor(e){this.view=e,this.items=[];let t=t=>{if(t.keyCode==27)sH(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=dH(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=XV(this.view.state.field(nH).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()},n=e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)};this.list=je(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t,onclick:n}),this.dom=je(`div`,{class:`cm-panel-lint`},this.list,je(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>sH(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(nH).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(nH),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new mH(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new mH(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=XV(this.view.state.field(nH).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:tH.of(t)})}static open(t){return new e(t)}};function gH(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function _H(e){return gH(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}var vH=I.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:_H(`#d11`)},".cm-lintRange-warning":{backgroundImage:_H(`orange`)},".cm-lintRange-info":{backgroundImage:_H(`#999`)},".cm-lintRange-hint":{backgroundImage:_H(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}}});function yH(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function bH(e){let t=`hint`,n=1;for(let r of e){let e=yH(r.severity);e>n&&(n=e,t=r.severity)}return t}var xH=[nH,I.decorations.compute([nH],e=>{let{selected:t,panel:n}=e.field(nH);return!t||!n||t.from==t.to?Ve.none:Ve.set([rH.range(t.from,t.to)])}),k(iH,{hideOn:ZV}),vH],SH=function(e){e===void 0&&(e={});var{crosshairCursor:t=!1}=e,n=[];e.closeBracketsKeymap!==!1&&(n=n.concat(qe)),e.defaultKeymap!==!1&&(n=n.concat(nfe)),e.searchKeymap!==!1&&(n=n.concat(BV)),e.historyKeymap!==!1&&(n=n.concat(Fde)),e.foldKeymap!==!1&&(n=n.concat(j)),e.completionKeymap!==!1&&(n=n.concat(Ye)),e.lintKeymap!==!1&&(n=n.concat(cH));var a=[];return e.lineNumbers!==!1&&a.push(se()),e.highlightActiveLineGutter!==!1&&a.push(L()),e.highlightSpecialChars!==!1&&a.push(z()),e.history!==!1&&a.push(Ede()),e.foldGutter!==!1&&a.push(re()),e.drawSelection!==!1&&a.push(h()),e.dropCursor!==!1&&a.push(y()),e.allowMultipleSelections!==!1&&a.push(Ee.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&a.push(T()),e.syntaxHighlighting!==!1&&a.push(D(ue,{fallback:!0})),e.bracketMatching!==!1&&a.push(Te()),e.closeBrackets!==!1&&a.push(Xe()),e.autocompletion!==!1&&a.push(Je()),e.rectangularSelection!==!1&&a.push(ke()),t!==!1&&a.push(ee()),e.highlightActiveLine!==!1&&a.push(R()),e.highlightSelectionMatches!==!1&&a.push($B()),e.tabSize&&typeof e.tabSize==`number`&&a.push(i.of(` `.repeat(e.tabSize))),a.concat([r.of(n.flat())]).filter(Boolean)},CH=`#e5c07b`,wH=`#e06c75`,TH=`#56b6c2`,EH=`#ffffff`,DH=`#abb2bf`,OH=`#7d8799`,kH=`#61afef`,AH=`#98c379`,jH=`#d19a66`,MH=`#c678dd`,NH=`#21252b`,PH=`#2c313a`,FH=`#282c34`,IH=`#353a42`,LH=`#3E4451`,RH=`#528bff`,zH=[I.theme({"&":{color:DH,backgroundColor:FH},".cm-content":{caretColor:RH},".cm-cursor, .cm-dropCursor":{borderLeftColor:RH},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:LH},".cm-panels":{backgroundColor:NH,color:DH},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:FH,color:OH,border:`none`},".cm-activeLineGutter":{backgroundColor:PH},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:IH},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:IH,borderBottomColor:IH},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:PH,color:DH}}},{dark:!0}),D(B.define([{tag:A.keyword,color:MH},{tag:[A.name,A.deleted,A.character,A.propertyName,A.macroName],color:wH},{tag:[A.function(A.variableName),A.labelName],color:kH},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:jH},{tag:[A.definition(A.name),A.separator],color:DH},{tag:[A.typeName,A.className,A.number,A.changed,A.annotation,A.modifier,A.self,A.namespace],color:CH},{tag:[A.operator,A.operatorKeyword,A.url,A.escape,A.regexp,A.link,A.special(A.string)],color:TH},{tag:[A.meta,A.comment],color:OH},{tag:A.strong,fontWeight:`bold`},{tag:A.emphasis,fontStyle:`italic`},{tag:A.strikethrough,textDecoration:`line-through`},{tag:A.link,color:OH,textDecoration:`underline`},{tag:A.heading,fontWeight:`bold`,color:wH},{tag:[A.atom,A.bool,A.special(A.variableName)],color:jH},{tag:[A.processingInstruction,A.string,A.inserted],color:AH},{tag:A.invalid,color:EH}]))],BH=I.theme({"&":{backgroundColor:`#fff`}},{dark:!1}),VH=function(e){e===void 0&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:i=!1,theme:a=`light`,placeholder:o=``,basicSetup:s=!0}=e,c=[];switch(t&&c.unshift(r.of([rfe])),s&&(typeof s==`boolean`?c.unshift(SH()):c.unshift(SH(s))),o&&c.unshift(Ce(o)),a){case`light`:c.push(BH);break;case`dark`:c.push(zH);break;case`none`:break;default:c.push(a);break}return n===!1&&c.push(I.editable.of(!1)),i&&c.push(Ee.readOnly.of(!0)),[...c]},HH=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),UH=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},WH=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},GH=null,KH=()=>typeof window>`u`?new WH:(GH||=new WH,GH),qH=ie.define(),JH=200,YH=[];function XH(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:a,onUpdate:o,extensions:s=YH,autoFocus:c,theme:l=`light`,height:u=null,minHeight:d=null,maxHeight:f=null,width:p=null,minWidth:m=null,maxWidth:h=null,placeholder:g=``,editable:_=!0,readOnly:v=!1,indentWithTab:y=!0,basicSetup:b=!0,root:x,initialState:S}=e,[C,w]=(0,G.useState)(),[T,E]=(0,G.useState)(),[D,O]=(0,G.useState)(),k=(0,G.useState)(()=>({current:null}))[0],A=(0,G.useState)(()=>({current:null}))[0],j=I.theme({"&":{height:u,minHeight:d,maxHeight:f,width:p,minWidth:m,maxWidth:h},"& .cm-scroller":{height:`100% !important`}}),M=[I.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(qH))&&(k.current?k.current.reset():(k.current=new UH(()=>{if(A.current){var e=A.current;A.current=null,e()}k.current=null},JH),KH().add(k.current)),r(e.state.doc.toString(),e)),i&&i(HH(e))}),j,...VH({theme:l,editable:_,readOnly:v,placeholder:g,indentWithTab:y,basicSetup:b})];return o&&typeof o==`function`&&M.push(I.updateListener.of(o)),M=M.concat(s),(0,G.useLayoutEffect)(()=>{if(C&&!D){var e={doc:t,selection:n,extensions:M},r=S?Ee.fromJSON(S.json,e,S.fields):Ee.create(e);if(O(r),!T){var i=new I({state:r,parent:C,root:x});E(i),a&&a(i,r)}}return()=>{T&&(O(void 0),E(void 0))}},[C,D]),(0,G.useEffect)(()=>{e.container&&w(e.container)},[e.container]),(0,G.useEffect)(()=>()=>{T&&(T.destroy(),E(void 0)),k.current&&=(k.current.cancel(),null)},[T]),(0,G.useEffect)(()=>{c&&T&&T.focus()},[c,T]),(0,G.useEffect)(()=>{T&&T.dispatch({effects:V.reconfigure.of(M)})},[l,s,u,d,f,p,m,h,g,_,v,y,b,r,o]),(0,G.useEffect)(()=>{if(t!==void 0){var e=T?T.state.doc.toString():``;if(T&&t!==e){var n=k.current&&!k.current.isDone,r=()=>{T&&t!==T.state.doc.toString()&&T.dispatch({changes:{from:0,to:T.state.doc.toString().length,insert:t||``},annotations:[qH.of(!0)]})};n?A.current=r:r()}}},[t,T]),{state:D,setState:O,view:T,setView:E,container:C,setContainer:w}}var ZH=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],QH=(0,G.forwardRef)((e,t)=>{var{className:n,value:r=``,selection:i,extensions:a=[],onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,autoFocus:u,theme:d=`light`,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,root:C,initialState:w}=e,T=FB(e,ZH),E=(0,G.useRef)(null),{state:D,view:O,container:k,setContainer:A}=XH({root:C,value:r,autoFocus:u,theme:d,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,selection:i,onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,extensions:a,initialState:w});(0,G.useImperativeHandle)(t,()=>({editor:E.current,state:D,view:O}),[E,k,D,O]);var j=(0,G.useCallback)(e=>{E.current=e,A(e)},[A]);if(typeof r!=`string`)throw Error(`value must be typeof string but got `+typeof r);return(0,K.jsx)(`div`,PB({ref:j,className:(typeof d==`string`?`cm-theme-`+d:`cm-theme`)+(n?` `+n:``)},T))});QH.displayName=`CodeMirror`;function $H(e){if(!e)return`plain`;let t=e.toLowerCase();return t.endsWith(`.md`)?`markdown`:t.endsWith(`.ts`)||t.endsWith(`.tsx`)?`typescript`:t.endsWith(`.js`)||t.endsWith(`.jsx`)?`javascript`:t.endsWith(`.json`)?`json`:t.endsWith(`.yml`)||t.endsWith(`.yaml`)?`yaml`:`plain`}function eU(e,t){switch(e){case`markdown`:return[sM({base:Gj,codeLanguages:Rpe}),gde()];case`typescript`:return[We({typescript:!0,jsx:t?.endsWith(`.tsx`)})];case`javascript`:return[We({jsx:t?.endsWith(`.jsx`)})];case`json`:return[IO()];case`yaml`:return[eN()];default:return[]}}function tU(e,t){switch(e){case`github`:return t?FN:mP;case`material`:return t?Hme:ehe;case`vscode`:return t?Vz:NB;case`tokyo`:return t?Vhe:jhe;case`gruvbox`:return t?mme:Ome;case`monokai`:return lhe;case`nord`:return bhe;default:return t?FN:mP}}function nU({value:e,onChange:t,readOnly:n=!1,language:i,filename:a,lineNumbers:o=!0,lineWrapping:s=!0,fontSize:c=13,className:l=``,style:u,placeholder:d,editorMinHeight:f=`240px`}){let p=i??$H(a),m=B_(),{data:h}=Rg(),g=h?.codeEditor?.theme??`github`,_=(0,G.useMemo)(()=>{let e=[Ee.readOnly.of(n),...eU(p,a)];return e.push(tU(g,m)),e.push(I.theme({".cm-line":{lineHeight:`21px`},"&":{borderRadius:`6px`,border:`1px solid var(--code-editor-border)`,height:`100%`,minHeight:`var(--code-editor-min-height, 240px)`},".cm-content":{fontFamily:`var(--font-mono)`},".cm-gutters":{fontFamily:`var(--font-mono)`},".cm-scroller":{fontFamily:`var(--font-mono)`,overflow:`auto`,scrollbarWidth:`thin`},".cm-md-codeblock":{padding:`0`,borderRadius:0}})),e.push(r.of([{key:`Mod-a`,run:rO}])),s&&e.push(I.lineWrapping),e},[p,a,n,s,g,m]);return(0,K.jsx)(QH,{value:e,onChange:t,placeholder:d,theme:`none`,basicSetup:{lineNumbers:o,foldGutter:!n,highlightActiveLine:!n,highlightActiveLineGutter:!n,autocompletion:!n,closeBrackets:!n,bracketMatching:!n},extensions:_,className:`scrollbar-thin scrollbar-track-transparent overflow-auto ${l}`,style:{fontSize:c,"--code-editor-min-height":f,...u}})}function rU(e){if(!e)return null;if(e.type===`point`)return{x:e.x,y:e.y};let t=e.element;if(!t)return null;let n=t.getBoundingClientRect();switch(e.placement??`bottom-start`){case`bottom-end`:return{x:n.right,y:n.bottom};case`top-start`:return{x:n.left,y:n.top};case`top-end`:return{x:n.right,y:n.top};default:return{x:n.left,y:n.bottom}}}function iU(e,t,n){let r=n?.left??0,i=n?.top??0,a=n?.right??window.innerWidth,o=n?.bottom??window.innerHeight,s=r+12,c=i+12,l=Math.max(s,a-t.width-12),u=Math.max(c,o-t.height-12);return{x:Math.max(s,Math.min(e.x,l)),y:Math.max(c,Math.min(e.y,u))}}function aU(e,t){if(!t)return{position:`fixed`,left:e.x,top:e.y};let n=t.getBoundingClientRect();return{position:`absolute`,left:e.x-n.left+t.scrollLeft,top:e.y-n.top+t.scrollTop}}function oU(e){return e?.type===`target`?e.placement??`bottom-start`:`bottom-start`}function sU({open:e,items:t,anchor:n,wrapperElement:r,boundaryElement:i,position:a,onClose:o}){let s=(0,G.useRef)(null),c=(0,G.useMemo)(()=>a?{type:`point`,x:a.x,y:a.y}:null,[a]),l=n??c,u=r??i??null,d=(0,G.useMemo)(()=>rU(l),[l]),[f,p]=(0,G.useState)(null),m=(0,G.useId)().replace(/[^a-zA-Z0-9_-]/g,``),h=`--context-menu-anchor-${m}`,g=`context-menu-${m}`,_=oU(l),v=(0,G.useMemo)(()=>t.filter(e=>e.label.length>0),[t]),y=e&&!!d&&v.length>0;(0,G.useLayoutEffect)(()=>{if(!e||!d){p(null);return}let t=s.current;if(!t){p(d);return}let n=u?.getBoundingClientRect()??null;p(iU(d,t.getBoundingClientRect(),n))},[d,u,e]),(0,G.useEffect)(()=>{let e=()=>o();return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[e,o]),(0,G.useEffect)(()=>{if(!y)return;let e=e=>{if(e.button===2)return;let t=e.target;t instanceof Node&&(s.current?.contains(t)||l?.type===`target`&&l.element?.contains(t)||o())},t=e=>{e.key===`Escape`&&o()};return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`keydown`,t)}},[l,o,y]),(0,G.useEffect)(()=>{if(!e||l?.type!==`target`||!l.element)return;let t=l.element,n=t.style.getPropertyValue(`anchor-name`),r=t.style.getPropertyPriority(`anchor-name`);return t.style.setProperty(`anchor-name`,h),()=>{n?t.style.setProperty(`anchor-name`,n,r):t.style.removeProperty(`anchor-name`)}},[l,h,e]);let b=f??d,x=b===null?{left:0,top:0}:{left:b.x,top:b.y},S=l?.type===`point`&&d?aU(d,u):null;if((0,G.useEffect)(()=>{let e=s.current;e&&(y?e.matches(`:popover-open`)||e.showPopover?.():e.matches(`:popover-open`)&&e.hidePopover?.())},[y]),!y)return null;let C=String.raw;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`style`,{children:C`
355
355
  .context-menu-anchor[data-context-menu-id='${g}'] {
356
356
  width: 1px;
@@ -947,7 +947,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
947
947
  @pointerdown=${e=>this._onResizeStart(e,`br`)}
948
948
  ></div>
949
949
  ${e}
950
- </dialog>`:e}};customElements.define(`input-panel`,Ive);var Lve={extension:{type:W.Environment,name:`browser`,priority:-1},test:()=>!0,load:async()=>{await q(()=>import(`./browserAll-D7igzN7y.js`),__vite__mapDeps([127,128,1,129]))}},Rve={extension:{type:W.Environment,name:`webworker`,priority:0},test:()=>typeof self<`u`&&self.WorkerGlobalScope!==void 0,load:async()=>{await q(()=>import(`./webworkerAll-_OODBDte.js`),__vite__mapDeps([130,128,1,129]))}},zve=new mt;function IZ(e,t,n){let r=zve;e.measurable=!0,Nt(e,n,r),t.addBoundsMask(r),e.measurable=!1}function LZ(e,t,n){let r=$e.get();e.measurable=!0;let i=Mt.get().identity();ht(e,r,RZ(e,n,i)),e.measurable=!1,t.addBoundsMask(r),Mt.return(i),$e.return(r)}function RZ(e,t,n){return e?(e!==t&&(RZ(e.parent,t,n),e.updateLocalTransform(),n.append(e.localTransform)),n):(ot(`Mask bounds, renderable is not inside the root container`),n)}var zZ=class{constructor(e){this.priority=0,this.inverse=!1,this.pipe=`alphaMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.renderMaskToTexture=!(e instanceof Jt),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(e,t){this.inverse||IZ(this.mask,e,t)}addLocalBounds(e,t){LZ(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof Jt}};zZ.extension=W.MaskEffect;var BZ=class{constructor(e){this.priority=0,this.pipe=`colorMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e}destroy(){}static test(e){return typeof e==`number`}};BZ.extension=W.MaskEffect;var VZ=class{constructor(e){this.priority=0,this.pipe=`stencilMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(e,t){IZ(this.mask,e,t)}addLocalBounds(e,t){LZ(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof qt}};VZ.extension=W.MaskEffect;var HZ;async function Bve(){return HZ??=(async()=>{let e=Gt.get().createCanvas(1,1).getContext(`webgl`);if(!e)return`premultiply-alpha-on-upload`;let t=await new Promise(e=>{let t=document.createElement(`video`);t.onloadeddata=()=>e(t),t.onerror=()=>e(null),t.autoplay=!1,t.crossOrigin=`anonymous`,t.preload=`auto`,t.src=`data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=`,t.load()});if(!t)return`premultiply-alpha-on-upload`;let n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n);let r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t);let i=new Uint8Array(4);return e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,i),e.deleteFramebuffer(r),e.deleteTexture(n),e.getExtension(`WEBGL_lose_context`)?.loseContext(),i[0]<=i[3]?`premultiplied-alpha`:`premultiply-alpha-on-upload`})(),HZ}var UZ=class e extends gt{constructor(t){super(t),this.isReady=!1,this.uploadMethodId=`video`,t={...e.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??`premultiply-alpha-on-upload`,this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){let e=kt.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;let e=this.resource,t=this.options;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener(`play`,this._onPlayStart),e.addEventListener(`pause`,this._onPlayStop),e.addEventListener(`seeked`,this._onSeeked),this._isSourceReady()?this._mediaReady():(t.preload||e.addEventListener(`canplay`,this._onCanPlay),e.addEventListener(`canplaythrough`,this._onCanPlayThrough),e.addEventListener(`error`,this._onError,!0)),this.alphaMode=await Bve(),this._load=new Promise((n,r)=>{this.isValid?n(this):(this._resolve=n,this._reject=r,t.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${t.preloadTimeoutMs}ms`))})),e.load())}),this._load}_onError(e){this.resource.removeEventListener(`error`,this._onError,!0),this.emit(`error`,e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){let e=this.resource;return!e.paused&&!e.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener(`canplay`,this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener(`canplaythrough`,this._onCanPlay),this._preloadTimeout&&=(clearTimeout(this._preloadTimeout),void 0),this._mediaReady()}_mediaReady(){let e=this.resource;this.isValid&&(this.isReady=!0,this.resize(e.videoWidth,e.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();let e=this.resource;e&&(e.removeEventListener(`play`,this._onPlayStart),e.removeEventListener(`pause`,this._onPlayStop),e.removeEventListener(`seeked`,this._onSeeked),e.removeEventListener(`canplay`,this._onCanPlay),e.removeEventListener(`canplaythrough`,this._onCanPlayThrough),e.removeEventListener(`error`,this._onError,!0),e.pause(),e.src=``,e.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(kt.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(kt.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(kt.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};UZ.extension=W.TextureSource,UZ.defaultOptions={...gt.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},UZ.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`};var Vve=UZ,WZ=(e,t,n=!1)=>(Array.isArray(e)||(e=[e]),t?e.map(e=>typeof e==`string`||n?t(e):e):e),GZ=new class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){let t=this._cache.get(e);return t||ot(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){let n=WZ(e),r;for(let e=0;e<this.parsers.length;e++){let i=this.parsers[e];if(i.test(t)){r=i.getCacheableAssets(n,t);break}}let i=new Map(Object.entries(r||{}));r||n.forEach(e=>{i.set(e,t)});let a=[...i.keys()],o={cacheKeys:a,keys:n};n.forEach(e=>{this._cacheMap.set(e,o)}),a.forEach(e=>{let n=r?r[e]:t;this._cache.has(e)&&this._cache.get(e)!==n&&ot(`[Cache] already has key:`,e),this._cache.set(e,i.get(e))})}remove(e){if(!this._cacheMap.has(e)){ot(`[Assets] Asset id ${e} was not found in the Cache`);return}let t=this._cacheMap.get(e);t.cacheKeys.forEach(e=>{this._cache.delete(e)}),t.keys.forEach(e=>{this._cacheMap.delete(e)})}get parsers(){return this._parsers}},KZ=[];jt.handleByList(W.TextureSource,KZ);function qZ(e={}){let t=e&&e.resource,n=t?e.resource:e,r=t?e:{resource:e};for(let e=0;e<KZ.length;e++){let t=KZ[e];if(t.test(n))return new t(r)}throw Error(`Could not find a source type for resource: ${r.resource}`)}function Hve(e={},t=!1){let n=e&&e.resource,r=n?e.resource:e,i=n?e:{resource:e};if(!t&&GZ.has(r))return GZ.get(r);let a=new et({source:qZ(i)});return a.on(`destroy`,()=>{GZ.has(r)&&GZ.remove(r)}),t||GZ.set(r,a),a}function Uve(e,t=!1){return typeof e==`string`?GZ.get(e):e instanceof gt?new et({source:e}):Hve(e,t)}et.from=Uve,gt.from=qZ,jt.add(zZ,BZ,VZ,Vve,Xt,xt,at);var JZ=(e=>(e[e.Low=0]=`Low`,e[e.Normal=1]=`Normal`,e[e.High=2]=`High`,e))(JZ||{});function YZ(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function XZ(e){return e.split(`?`)[0].split(`#`)[0]}function Wve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Gve(e,t,n){return e.replace(new RegExp(Wve(t),`g`),n)}function Kve(e,t){let n=``,r=0,i=-1,a=0,o=-1;for(let s=0;s<=e.length;++s){if(s<e.length)o=e.charCodeAt(s);else if(o===47)break;else o=47;if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){let e=n.lastIndexOf(`/`);if(e!==n.length-1){e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}}else if(n.length===2||n.length===1){n=``,r=0,i=s,a=0;continue}}t&&(n.length>0?n+=`/..`:n=`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a!==-1?++a:a=-1}return n}var ZZ={toPosix(e){return Gve(e,`\\`,`/`)},isUrl(e){return/^https?:/.test(this.toPosix(e))},isDataUrl(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},isBlobUrl(e){return e.startsWith(`blob:`)},hasProtocol(e){return/^[^/:]+:/.test(this.toPosix(e))},getProtocol(e){YZ(e),e=this.toPosix(e);let t=/^file:\/\/\//.exec(e);if(t)return t[0];let n=/^[^/:]+:\/{0,2}/.exec(e);return n?n[0]:``},toAbsolute(e,t,n){if(YZ(e),this.isDataUrl(e)||this.isBlobUrl(e))return e;let r=XZ(this.toPosix(t??Gt.get().getBaseUrl())),i=XZ(this.toPosix(n??this.rootname(r)));return e=this.toPosix(e),e.startsWith(`/`)?ZZ.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(YZ(e),e.length===0)return`.`;if(this.isDataUrl(e)||this.isBlobUrl(e))return e;e=this.toPosix(e);let t=``,n=e.startsWith(`/`);this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));let r=e.endsWith(`/`);return e=Kve(e,!1),e.length>0&&r&&(e+=`/`),n?`/${e}`:t+e},isAbsolute(e){return YZ(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith(`/`)},join(...e){if(e.length===0)return`.`;let t;for(let n=0;n<e.length;++n){let r=e[n];if(YZ(r),r.length>0)if(t===void 0)t=r;else{let i=e[n-1]??``;this.joinExtensions.includes(this.extname(i).toLowerCase())?t+=`/../${r}`:t+=`/${r}`}}return t===void 0?`.`:this.normalize(t)},dirname(e){if(YZ(e),e.length===0)return`.`;e=this.toPosix(e);let t=e.charCodeAt(0),n=t===47,r=-1,i=!0,a=this.getProtocol(e),o=e;e=e.slice(a.length);for(let n=e.length-1;n>=1;--n)if(t=e.charCodeAt(n),t===47){if(!i){r=n;break}}else i=!1;return r===-1?n?`/`:this.isUrl(o)?a+e:a:n&&r===1?`//`:a+e.slice(0,r)},rootname(e){YZ(e),e=this.toPosix(e);let t=``;if(t=e.startsWith(`/`)?`/`:this.getProtocol(e),this.isUrl(e)){let n=e.indexOf(`/`,t.length);t=n===-1?e:e.slice(0,n),t.endsWith(`/`)||(t+=`/`)}return t},basename(e,t){YZ(e),t&&YZ(t),e=XZ(this.toPosix(e));let n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;let o=t.length-1,s=-1;for(a=e.length-1;a>=0;--a){let c=e.charCodeAt(a);if(c===47){if(!i){n=a+1;break}}else s===-1&&(i=!1,s=a+1),o>=0&&(c===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=s))}return n===r?r=s:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?``:e.slice(n,r)},extname(e){YZ(e),e=XZ(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,a=0;for(let o=e.length-1;o>=0;--o){let s=e.charCodeAt(o);if(s===47){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),s===46?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||r===-1||a===0||a===1&&t===r-1&&t===n+1?``:e.slice(t,r)},parse(e){YZ(e);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;e=XZ(this.toPosix(e));let n=e.charCodeAt(0),r=this.isAbsolute(e),i;t.root=this.rootname(e),i=r||this.hasProtocol(e)?1:0;let a=-1,o=0,s=-1,c=!0,l=e.length-1,u=0;for(;l>=i;--l){if(n=e.charCodeAt(l),n===47){if(!c){o=l+1;break}continue}s===-1&&(c=!1,s=l+1),n===46?a===-1?a=l:u!==1&&(u=1):a!==-1&&(u=-1)}return a===-1||s===-1||u===0||u===1&&a===s-1&&a===o+1?s!==-1&&(o===0&&r?t.base=t.name=e.slice(1,s):t.base=t.name=e.slice(o,s)):(o===0&&r?(t.name=e.slice(1,a),t.base=e.slice(1,s)):(t.name=e.slice(o,a),t.base=e.slice(o,s)),t.ext=e.slice(a,s)),t.dir=this.dirname(e),t},sep:`/`,delimiter:`:`,joinExtensions:[`.html`]};function QZ(e,t,n,r,i){let a=t[n];for(let o=0;o<a.length;o++){let s=a[o];n<t.length-1?QZ(e.replace(r[n],s),t,n+1,r,i):i.push(e.replace(r[n],s))}}function qve(e){let t=e.match(/\{(.*?)\}/g),n=[];if(t){let r=[];t.forEach(e=>{let t=e.substring(1,e.length-1).split(`,`);r.push(t)}),QZ(e,r,0,t,n)}else n.push(e);return n}var $Z=e=>!Array.isArray(e),eQ=class{constructor(){this._defaultBundleIdentifierOptions={connector:`-`,createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,``)},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle(`foo`,this._createBundleAssetId(`foo`,`bar`))!==`bar`)throw Error(`[Resolver] GenerateBundleAssetId are not working correctly`)}prefer(...e){e.forEach(e=>{this._preferredOrder.push(e),e.priority||=Object.keys(e.params)}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e==`string`)this._defaultSearchParams=e;else{let t=e;this._defaultSearchParams=Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join(`&`)}}getAlias(e){let{alias:t,src:n}=e;return WZ(t||n,e=>typeof e==`string`?e:Array.isArray(e)?e.map(e=>e?.src??e):e?.src?e.src:e,!0)}addManifest(e){this._manifest&&ot(`[Resolver] Manifest already exists, this will be overwritten`),this._manifest=e,e.bundles.forEach(e=>{this.addBundle(e.name,e.assets)})}addBundle(e,t){let n=[],r=t;Array.isArray(t)||(r=Object.entries(t).map(([e,t])=>typeof t==`string`||Array.isArray(t)?{alias:e,src:t}:{alias:e,...t})),r.forEach(t=>{let r=t.src,i=t.alias,a;if(typeof i==`string`){let t=this._createBundleAssetId(e,i);n.push(t),a=[i,t]}else{let t=i.map(t=>this._createBundleAssetId(e,t));n.push(...t),a=[...i,...t]}this.add({...t,alias:a,src:r})}),this._bundles[e]=n}add(e){let t=[];Array.isArray(e)?t.push(...e):t.push(e);let n=e=>{this.hasKey(e)&&ot(`[Resolver] already has key: ${e} overwriting`)};WZ(t).forEach(e=>{let{src:t}=e,{data:r,format:i,loadParser:a,parser:o}=e,s=WZ(t).map(e=>typeof e==`string`?qve(e):Array.isArray(e)?e:[e]),c=this.getAlias(e);Array.isArray(c)?c.forEach(n):n(c);let l=[],u=e=>({src:e,...this._parsers.find(t=>t.test(e))?.parse(e)});s.forEach(t=>{t.forEach(t=>{let n={};if(typeof t==`object`?(r=t.data??r,i=t.format??i,(t.loadParser||t.parser)&&(a=t.loadParser??a,o=t.parser??o),n={...u(t.src),...t}):n=u(t),!c)throw Error(`[Resolver] alias is undefined for this asset: ${n.src}`);n=this._buildResolvedAsset(n,{aliases:c,data:r,format:i,loadParser:a,parser:o,progressSize:e.progressSize}),l.push(n)})}),c.forEach(e=>{this._assetMap[e]=l})})}resolveBundle(e){let t=$Z(e);e=WZ(e);let n={};return e.forEach(e=>{let t=this._bundles[e];if(t){let r=this.resolve(t),i={};for(let t in r){let n=r[t];i[this._extractAssetIdFromBundle(e,t)]=n}n[e]=i}}),t?n[e[0]]:n}resolveUrl(e){let t=this.resolve(e);if(typeof e!=`string`){let e={};for(let n in t)e[n]=t[n].src;return e}return t.src}resolve(e){let t=$Z(e);e=WZ(e);let n={};return e.forEach(e=>{if(!this._resolverHash[e])if(this._assetMap[e]){let t=this._assetMap[e],n=this._getPreferredOrder(t);n?.priority.forEach(e=>{n.params[e].forEach(n=>{let r=t.filter(t=>t[e]?t[e]===n:!1);r.length&&(t=r)})}),this._resolverHash[e]=t[0]}else this._resolverHash[e]=this._buildResolvedAsset({alias:[e],src:e},{});n[e]=this._resolverHash[e]}),t?n[e[0]]:n}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){let n=e[t],r=this._preferredOrder.find(e=>e.params.format.includes(n.format));if(r)return r}return this._preferredOrder[0]}_appendDefaultSearchParams(e){return this._defaultSearchParams?`${e}${/\?/.test(e)?`&`:`?`}${this._defaultSearchParams}`:e}_buildResolvedAsset(e,t){let{aliases:n,data:r,loadParser:i,parser:a,format:o,progressSize:s}=t;return(this._basePath||this._rootPath)&&(e.src=ZZ.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=n??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...r||{},...e.data},e.loadParser=i??e.loadParser,e.parser=a??e.parser,e.format=o??e.format??Jve(e.src),s!==void 0&&(e.progressSize=s),e}};eQ.RETINA_PREFIX=/@([0-9\.]+)x/;function Jve(e){return e.split(`.`).pop().split(`?`).shift().split(`#`).shift()}var tQ=(e,t)=>{let n=t.split(`?`)[1];return n&&(e+=`?${n}`),e},nQ=class e{constructor(e,t){this.linkedSheets=[];let n=e;e?.source instanceof gt&&(n={texture:e,data:t});let{texture:r,data:i,cachePrefix:a=``}=n;this.cachePrefix=a,this._texture=r instanceof et?r:null,this.textureSource=r.source,this.textures={},this.animations={},this.data=i;let o=parseFloat(i.meta.scale);o?(this.resolution=o,r.source.resolution=this.resolution):this.resolution=r.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=e.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(t,n=!1){let r=t,i=n?1/0:e.BATCH_SIZE;for(;r-t<i&&r<this._frameKeys.length;){let e=this._frameKeys[r],t=this._frames[e],n=t.frame;if(n){let r=null,i=null,a=t.trimmed!==!1&&t.sourceSize?t.sourceSize:t.frame,o=new bt(0,0,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution);r=t.rotated?new bt(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.h)/this.resolution,Math.floor(n.w)/this.resolution):new bt(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution),t.trimmed!==!1&&t.spriteSourceSize&&(i=new bt(Math.floor(t.spriteSourceSize.x)/this.resolution,Math.floor(t.spriteSourceSize.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution)),this.textures[e]=new et({source:this.textureSource,frame:r,orig:o,trim:i,rotate:t.rotated?2:0,defaultAnchor:t.anchor,defaultBorders:t.borders,label:e.toString()})}r++}}_processAnimations(){let e=this.data.animations||{};for(let t in e){this.animations[t]=[];for(let n=0;n<e[t].length;n++){let r=e[t][n];this.animations[t].push(this.textures[r])}}}_parseComplete(){let e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*e.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*e.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){for(let e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};nQ.BATCH_SIZE=1e3;var rQ=nQ,Yve=[`jpg`,`png`,`jpeg`,`avif`,`webp`,`basis`,`etc2`,`bc7`,`bc6h`,`bc5`,`bc4`,`bc3`,`bc2`,`bc1`,`eac`,`astc`];function iQ(e,t,n){let r={};if(e.forEach(e=>{r[e]=t}),Object.keys(t.textures).forEach(e=>{r[`${t.cachePrefix}${e}`]=t.textures[e]}),!n){let n=ZZ.dirname(e[0]);t.linkedSheets.forEach((e,i)=>{let a=iQ([`${n}/${t.data.meta.related_multi_packs[i]}`],e,!0);Object.assign(r,a)})}return r}var Xve={extension:W.Asset,cache:{test:e=>e instanceof rQ,getCacheableAssets:(e,t)=>iQ(e,t,!1)},resolver:{extension:{type:W.ResolveParser,name:`resolveSpritesheet`},test:e=>{let t=e.split(`?`)[0].split(`.`),n=t.pop(),r=t.pop();return n===`json`&&Yve.includes(r)},parse:e=>{let t=e.split(`.`);return{resolution:parseFloat(eQ.RETINA_PREFIX.exec(e)?.[1]??`1`),format:t[t.length-2],src:e}}},loader:{name:`spritesheetLoader`,id:`spritesheet`,extension:{type:W.LoadParser,priority:JZ.Normal,name:`spritesheetLoader`},async testParse(e,t){return ZZ.extname(t.src).toLowerCase()===`.json`&&!!e.frames},async parse(e,t,n){let{texture:r,imageFilename:i,textureOptions:a,cachePrefix:o}=t?.data??{},s=ZZ.dirname(t.src);s&&s.lastIndexOf(`/`)!==s.length-1&&(s+=`/`);let c;if(r instanceof et)c=r;else{let r=tQ(s+(i??e.meta.image),t.src);c=(await n.load([{src:r,data:a}]))[r]}let l=new rQ({texture:c.source,data:e,cachePrefix:o});await l.parse();let u=e?.meta?.related_multi_packs;if(Array.isArray(u)){let e=[];for(let r of u){if(typeof r!=`string`)continue;let i=s+r;t.data?.ignoreMultiPack||(i=tQ(i,t.src),e.push(n.load({src:i,data:{textureOptions:a,ignoreMultiPack:!0}})))}let r=await Promise.all(e);l.linkedSheets=r,r.forEach(e=>{e.linkedSheets=[l].concat(l.linkedSheets.filter(t=>t!==e))})}return l},async unload(e,t,n){await n.unload(e.textureSource._sourceOrigin),e.destroy(!1)}}};jt.add(Xve);var Zve=class{constructor(e){this._lastTransform=``,this._observer=null,this._tickerAttached=!1,this.updateTranslation=()=>{if(!this._canvas)return;let e=this._canvas.getBoundingClientRect(),t=this._canvas.width,n=this._canvas.height,r=e.width/t*this._renderer.resolution,i=e.height/n*this._renderer.resolution,a=`translate(${e.left}px, ${e.top}px) scale(${r}, ${i})`;a!==this._lastTransform&&(this._domElement.style.transform=a,this._lastTransform=a)},this._domElement=e.domElement,this._renderer=e.renderer,!(globalThis.OffscreenCanvas&&this._renderer.canvas instanceof OffscreenCanvas)&&(this._canvas=this._renderer.canvas,this._attachObserver())}get canvas(){return this._canvas}ensureAttached(){!this._domElement.parentNode&&this._canvas.parentNode&&(this._canvas.parentNode.appendChild(this._domElement),this.updateTranslation())}_attachObserver(){`ResizeObserver`in globalThis?(this._observer&&=(this._observer.disconnect(),null),this._observer=new ResizeObserver(e=>{for(let t of e){if(t.target!==this._canvas)continue;let e=this.canvas.width,n=this.canvas.height,r=t.contentRect.width/e*this._renderer.resolution,i=t.contentRect.height/n*this._renderer.resolution;(this._lastScaleX!==r||this._lastScaleY!==i)&&(this.updateTranslation(),this._lastScaleX=r,this._lastScaleY=i)}}),this._observer.observe(this._canvas)):this._tickerAttached||kt.shared.add(this.updateTranslation,this,Ot.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&kt.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform=``,this._lastScaleX=null,this._lastScaleY=null}},aQ=class e{constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=e.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Et,this.page=new Et,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,n){throw Error(`initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.`)}initUIEvent(e,t,n,r,i){throw Error(`initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.`)}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}},oQ=/iPhone/i,sQ=/iPod/i,cQ=/iPad/i,lQ=/\biOS-universal(?:.+)Mac\b/i,uQ=/\bAndroid(?:.+)Mobile\b/i,dQ=/Android/i,fQ=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,pQ=/Silk/i,mQ=/Windows Phone/i,hQ=/\bWindows(?:.+)ARM\b/i,gQ=/BlackBerry/i,_Q=/BB10/i,vQ=/Opera Mini/i,yQ=/\b(CriOS|Chrome)(?:.+)Mobile/i,bQ=/Mobile(?:.+)Firefox\b/i,xQ=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Qve(e){return function(t){return t.test(e)}}function SQ(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=Qve(n),a={apple:{phone:i(oQ)&&!i(mQ),ipod:i(sQ),tablet:!i(oQ)&&(i(cQ)||xQ(t))&&!i(mQ),universal:i(lQ),device:(i(oQ)||i(sQ)||i(cQ)||i(lQ)||xQ(t))&&!i(mQ)},amazon:{phone:i(fQ),tablet:!i(fQ)&&i(pQ),device:i(fQ)||i(pQ)},android:{phone:!i(mQ)&&i(fQ)||!i(mQ)&&i(uQ),tablet:!i(mQ)&&!i(fQ)&&!i(uQ)&&(i(pQ)||i(dQ)),device:!i(mQ)&&(i(fQ)||i(pQ)||i(uQ)||i(dQ))||i(/\bokhttp\b/i)},windows:{phone:i(mQ),tablet:i(hQ),device:i(mQ)||i(hQ)},other:{blackberry:i(gQ),blackberry10:i(_Q),opera:i(vQ),firefox:i(bQ),chrome:i(yQ),device:i(gQ)||i(_Q)||i(vQ)||i(bQ)||i(yQ)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var $ve=(SQ.default??SQ)(globalThis.navigator),eye=9,CQ=100,tye=0,nye=0,wQ=2,TQ=1,rye=-1e3,iye=-1e3,aye=2,EQ=class e{constructor(e,t=$ve){this._mobileInfo=t,this.debug=!1,this._activateOnTab=!0,this._deactivateOnMouseMove=!0,this._isActive=!1,this._isMobileAccessibility=!1,this._div=null,this._pools={},this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._isRunningTests=!1,this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnMouseMove=this._onMouseMove.bind(this),this._hookDiv=null,(t.tablet||t.phone)&&this._createTouchHook(),this._renderer=e}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}get div(){return this._div}_createTouchHook(){let e=document.createElement(`button`);e.style.width=`${TQ}px`,e.style.height=`${TQ}px`,e.style.position=`absolute`,e.style.top=`${rye}px`,e.style.left=`${iye}px`,e.style.zIndex=aye.toString(),e.style.backgroundColor=`#FF0000`,e.title=`select to enable accessibility for this content`,e.addEventListener(`focus`,()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}_destroyTouchHook(){this._hookDiv&&=(document.body.removeChild(this._hookDiv),null)}_activate(){if(this._isActive)return;this._isActive=!0,this._div||(this._div=document.createElement(`div`),this._div.style.position=`absolute`,this._div.style.top=`${tye}px`,this._div.style.left=`${nye}px`,this._div.style.pointerEvents=`none`,this._div.style.zIndex=wQ.toString(),this._canvasObserver=new Zve({domElement:this._div,renderer:this._renderer})),this._activateOnTab&&globalThis.addEventListener(`keydown`,this._boundOnKeyDown,!1),this._deactivateOnMouseMove&&globalThis.document.addEventListener(`mousemove`,this._boundOnMouseMove,!0);let e=this._renderer.view.canvas;if(e.parentNode)this._canvasObserver.ensureAttached(),this._initAccessibilitySetup();else{let t=new MutationObserver(()=>{e.parentNode&&(t.disconnect(),this._canvasObserver.ensureAttached(),this._initAccessibilitySetup())});t.observe(document.body,{childList:!0,subtree:!0})}}_initAccessibilitySetup(){this._renderer.runners.postrender.add(this),this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered)}_deactivate(){if(!(!this._isActive||this._isMobileAccessibility)){this._isActive=!1,globalThis.document.removeEventListener(`mousemove`,this._boundOnMouseMove,!0),this._activateOnTab&&globalThis.addEventListener(`keydown`,this._boundOnKeyDown,!1),this._renderer.runners.postrender.remove(this);for(let e of this._children)e._accessibleDiv?.parentNode&&(e._accessibleDiv.parentNode.removeChild(e._accessibleDiv),e._accessibleDiv=null),e._accessibleActive=!1;for(let e in this._pools)this._pools[e].forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)}),delete this._pools[e];this._div?.parentNode&&this._div.parentNode.removeChild(this._div),this._pools={},this._children=[]}}_updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&(e._accessibleActive||this._addChild(e),e._renderId=this._renderId);let t=e.children;if(t)for(let e=0;e<t.length;e++)this._updateAccessibleObjects(t[e])}init(t){let n={accessibilityOptions:{...e.defaultOptions,...t?.accessibilityOptions||{}}};this.debug=n.accessibilityOptions.debug,this._activateOnTab=n.accessibilityOptions.activateOnTab,this._deactivateOnMouseMove=n.accessibilityOptions.deactivateOnMouseMove,n.accessibilityOptions.enabledByDefault&&this._activate(),this._renderer.runners.postrender.remove(this)}postrender(){let e=performance.now();if(this._mobileInfo.android.device&&e<this._androidUpdateCount||(this._androidUpdateCount=e+this._androidUpdateFrequency,(!this._renderer.renderingToScreen||!this._renderer.view.canvas)&&!this._isRunningTests))return;let t=new Set;if(this._renderer.lastObjectRendered){this._updateAccessibleObjects(this._renderer.lastObjectRendered);for(let e of this._children)e._renderId===this._renderId&&t.add(this._children.indexOf(e))}for(let e=this._children.length-1;e>=0;e--){let n=this._children[e];t.has(e)||(n._accessibleDiv&&n._accessibleDiv.parentNode&&(n._accessibleDiv.parentNode.removeChild(n._accessibleDiv),this._getPool(n.accessibleType).push(n._accessibleDiv),n._accessibleDiv=null),n._accessibleActive=!1,ut(this._children,e,1))}this._renderer.renderingToScreen&&this._canvasObserver.ensureAttached();for(let e=0;e<this._children.length;e++){let t=this._children[e];if(!t._accessibleActive||!t._accessibleDiv)continue;let n=t._accessibleDiv,r=t.hitArea||t.getBounds().rectangle;if(t.hitArea){let e=t.worldTransform;n.style.left=`${e.tx+r.x*e.a}px`,n.style.top=`${e.ty+r.y*e.d}px`,n.style.width=`${r.width*e.a}px`,n.style.height=`${r.height*e.d}px`}else this._capHitArea(r),n.style.left=`${r.x}px`,n.style.top=`${r.y}px`,n.style.width=`${r.width}px`,n.style.height=`${r.height}px`}this._renderId++}_updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}_capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);let{width:t,height:n}=this._renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>n&&(e.height=n-e.y)}_addChild(e){let t=this._getPool(e.accessibleType).pop();t?(t.innerHTML=``,t.removeAttribute(`title`),t.removeAttribute(`aria-label`),t.tabIndex=0):(e.accessibleType===`button`?t=document.createElement(`button`):(t=document.createElement(e.accessibleType),t.style.cssText=`
950
+ </dialog>`:e}};customElements.define(`input-panel`,Ive);var Lve={extension:{type:W.Environment,name:`browser`,priority:-1},test:()=>!0,load:async()=>{await q(()=>import(`./browserAll-BgTDhPwL.js`),__vite__mapDeps([127,128,1,129]))}},Rve={extension:{type:W.Environment,name:`webworker`,priority:0},test:()=>typeof self<`u`&&self.WorkerGlobalScope!==void 0,load:async()=>{await q(()=>import(`./webworkerAll-DnUz-KLD.js`),__vite__mapDeps([130,128,1,129]))}},zve=new mt;function IZ(e,t,n){let r=zve;e.measurable=!0,Nt(e,n,r),t.addBoundsMask(r),e.measurable=!1}function LZ(e,t,n){let r=$e.get();e.measurable=!0;let i=Mt.get().identity();ht(e,r,RZ(e,n,i)),e.measurable=!1,t.addBoundsMask(r),Mt.return(i),$e.return(r)}function RZ(e,t,n){return e?(e!==t&&(RZ(e.parent,t,n),e.updateLocalTransform(),n.append(e.localTransform)),n):(ot(`Mask bounds, renderable is not inside the root container`),n)}var zZ=class{constructor(e){this.priority=0,this.inverse=!1,this.pipe=`alphaMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.renderMaskToTexture=!(e instanceof Jt),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(e,t){this.inverse||IZ(this.mask,e,t)}addLocalBounds(e,t){LZ(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof Jt}};zZ.extension=W.MaskEffect;var BZ=class{constructor(e){this.priority=0,this.pipe=`colorMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e}destroy(){}static test(e){return typeof e==`number`}};BZ.extension=W.MaskEffect;var VZ=class{constructor(e){this.priority=0,this.pipe=`stencilMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(e,t){IZ(this.mask,e,t)}addLocalBounds(e,t){LZ(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof qt}};VZ.extension=W.MaskEffect;var HZ;async function Bve(){return HZ??=(async()=>{let e=Gt.get().createCanvas(1,1).getContext(`webgl`);if(!e)return`premultiply-alpha-on-upload`;let t=await new Promise(e=>{let t=document.createElement(`video`);t.onloadeddata=()=>e(t),t.onerror=()=>e(null),t.autoplay=!1,t.crossOrigin=`anonymous`,t.preload=`auto`,t.src=`data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=`,t.load()});if(!t)return`premultiply-alpha-on-upload`;let n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n);let r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t);let i=new Uint8Array(4);return e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,i),e.deleteFramebuffer(r),e.deleteTexture(n),e.getExtension(`WEBGL_lose_context`)?.loseContext(),i[0]<=i[3]?`premultiplied-alpha`:`premultiply-alpha-on-upload`})(),HZ}var UZ=class e extends gt{constructor(t){super(t),this.isReady=!1,this.uploadMethodId=`video`,t={...e.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??`premultiply-alpha-on-upload`,this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){let e=kt.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;let e=this.resource,t=this.options;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener(`play`,this._onPlayStart),e.addEventListener(`pause`,this._onPlayStop),e.addEventListener(`seeked`,this._onSeeked),this._isSourceReady()?this._mediaReady():(t.preload||e.addEventListener(`canplay`,this._onCanPlay),e.addEventListener(`canplaythrough`,this._onCanPlayThrough),e.addEventListener(`error`,this._onError,!0)),this.alphaMode=await Bve(),this._load=new Promise((n,r)=>{this.isValid?n(this):(this._resolve=n,this._reject=r,t.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${t.preloadTimeoutMs}ms`))})),e.load())}),this._load}_onError(e){this.resource.removeEventListener(`error`,this._onError,!0),this.emit(`error`,e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){let e=this.resource;return!e.paused&&!e.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener(`canplay`,this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener(`canplaythrough`,this._onCanPlay),this._preloadTimeout&&=(clearTimeout(this._preloadTimeout),void 0),this._mediaReady()}_mediaReady(){let e=this.resource;this.isValid&&(this.isReady=!0,this.resize(e.videoWidth,e.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();let e=this.resource;e&&(e.removeEventListener(`play`,this._onPlayStart),e.removeEventListener(`pause`,this._onPlayStop),e.removeEventListener(`seeked`,this._onSeeked),e.removeEventListener(`canplay`,this._onCanPlay),e.removeEventListener(`canplaythrough`,this._onCanPlayThrough),e.removeEventListener(`error`,this._onError,!0),e.pause(),e.src=``,e.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(kt.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(kt.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(kt.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};UZ.extension=W.TextureSource,UZ.defaultOptions={...gt.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},UZ.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`};var Vve=UZ,WZ=(e,t,n=!1)=>(Array.isArray(e)||(e=[e]),t?e.map(e=>typeof e==`string`||n?t(e):e):e),GZ=new class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){let t=this._cache.get(e);return t||ot(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){let n=WZ(e),r;for(let e=0;e<this.parsers.length;e++){let i=this.parsers[e];if(i.test(t)){r=i.getCacheableAssets(n,t);break}}let i=new Map(Object.entries(r||{}));r||n.forEach(e=>{i.set(e,t)});let a=[...i.keys()],o={cacheKeys:a,keys:n};n.forEach(e=>{this._cacheMap.set(e,o)}),a.forEach(e=>{let n=r?r[e]:t;this._cache.has(e)&&this._cache.get(e)!==n&&ot(`[Cache] already has key:`,e),this._cache.set(e,i.get(e))})}remove(e){if(!this._cacheMap.has(e)){ot(`[Assets] Asset id ${e} was not found in the Cache`);return}let t=this._cacheMap.get(e);t.cacheKeys.forEach(e=>{this._cache.delete(e)}),t.keys.forEach(e=>{this._cacheMap.delete(e)})}get parsers(){return this._parsers}},KZ=[];jt.handleByList(W.TextureSource,KZ);function qZ(e={}){let t=e&&e.resource,n=t?e.resource:e,r=t?e:{resource:e};for(let e=0;e<KZ.length;e++){let t=KZ[e];if(t.test(n))return new t(r)}throw Error(`Could not find a source type for resource: ${r.resource}`)}function Hve(e={},t=!1){let n=e&&e.resource,r=n?e.resource:e,i=n?e:{resource:e};if(!t&&GZ.has(r))return GZ.get(r);let a=new et({source:qZ(i)});return a.on(`destroy`,()=>{GZ.has(r)&&GZ.remove(r)}),t||GZ.set(r,a),a}function Uve(e,t=!1){return typeof e==`string`?GZ.get(e):e instanceof gt?new et({source:e}):Hve(e,t)}et.from=Uve,gt.from=qZ,jt.add(zZ,BZ,VZ,Vve,Xt,xt,at);var JZ=(e=>(e[e.Low=0]=`Low`,e[e.Normal=1]=`Normal`,e[e.High=2]=`High`,e))(JZ||{});function YZ(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function XZ(e){return e.split(`?`)[0].split(`#`)[0]}function Wve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Gve(e,t,n){return e.replace(new RegExp(Wve(t),`g`),n)}function Kve(e,t){let n=``,r=0,i=-1,a=0,o=-1;for(let s=0;s<=e.length;++s){if(s<e.length)o=e.charCodeAt(s);else if(o===47)break;else o=47;if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){let e=n.lastIndexOf(`/`);if(e!==n.length-1){e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}}else if(n.length===2||n.length===1){n=``,r=0,i=s,a=0;continue}}t&&(n.length>0?n+=`/..`:n=`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a!==-1?++a:a=-1}return n}var ZZ={toPosix(e){return Gve(e,`\\`,`/`)},isUrl(e){return/^https?:/.test(this.toPosix(e))},isDataUrl(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},isBlobUrl(e){return e.startsWith(`blob:`)},hasProtocol(e){return/^[^/:]+:/.test(this.toPosix(e))},getProtocol(e){YZ(e),e=this.toPosix(e);let t=/^file:\/\/\//.exec(e);if(t)return t[0];let n=/^[^/:]+:\/{0,2}/.exec(e);return n?n[0]:``},toAbsolute(e,t,n){if(YZ(e),this.isDataUrl(e)||this.isBlobUrl(e))return e;let r=XZ(this.toPosix(t??Gt.get().getBaseUrl())),i=XZ(this.toPosix(n??this.rootname(r)));return e=this.toPosix(e),e.startsWith(`/`)?ZZ.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(YZ(e),e.length===0)return`.`;if(this.isDataUrl(e)||this.isBlobUrl(e))return e;e=this.toPosix(e);let t=``,n=e.startsWith(`/`);this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));let r=e.endsWith(`/`);return e=Kve(e,!1),e.length>0&&r&&(e+=`/`),n?`/${e}`:t+e},isAbsolute(e){return YZ(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith(`/`)},join(...e){if(e.length===0)return`.`;let t;for(let n=0;n<e.length;++n){let r=e[n];if(YZ(r),r.length>0)if(t===void 0)t=r;else{let i=e[n-1]??``;this.joinExtensions.includes(this.extname(i).toLowerCase())?t+=`/../${r}`:t+=`/${r}`}}return t===void 0?`.`:this.normalize(t)},dirname(e){if(YZ(e),e.length===0)return`.`;e=this.toPosix(e);let t=e.charCodeAt(0),n=t===47,r=-1,i=!0,a=this.getProtocol(e),o=e;e=e.slice(a.length);for(let n=e.length-1;n>=1;--n)if(t=e.charCodeAt(n),t===47){if(!i){r=n;break}}else i=!1;return r===-1?n?`/`:this.isUrl(o)?a+e:a:n&&r===1?`//`:a+e.slice(0,r)},rootname(e){YZ(e),e=this.toPosix(e);let t=``;if(t=e.startsWith(`/`)?`/`:this.getProtocol(e),this.isUrl(e)){let n=e.indexOf(`/`,t.length);t=n===-1?e:e.slice(0,n),t.endsWith(`/`)||(t+=`/`)}return t},basename(e,t){YZ(e),t&&YZ(t),e=XZ(this.toPosix(e));let n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;let o=t.length-1,s=-1;for(a=e.length-1;a>=0;--a){let c=e.charCodeAt(a);if(c===47){if(!i){n=a+1;break}}else s===-1&&(i=!1,s=a+1),o>=0&&(c===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=s))}return n===r?r=s:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?``:e.slice(n,r)},extname(e){YZ(e),e=XZ(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,a=0;for(let o=e.length-1;o>=0;--o){let s=e.charCodeAt(o);if(s===47){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),s===46?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||r===-1||a===0||a===1&&t===r-1&&t===n+1?``:e.slice(t,r)},parse(e){YZ(e);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;e=XZ(this.toPosix(e));let n=e.charCodeAt(0),r=this.isAbsolute(e),i;t.root=this.rootname(e),i=r||this.hasProtocol(e)?1:0;let a=-1,o=0,s=-1,c=!0,l=e.length-1,u=0;for(;l>=i;--l){if(n=e.charCodeAt(l),n===47){if(!c){o=l+1;break}continue}s===-1&&(c=!1,s=l+1),n===46?a===-1?a=l:u!==1&&(u=1):a!==-1&&(u=-1)}return a===-1||s===-1||u===0||u===1&&a===s-1&&a===o+1?s!==-1&&(o===0&&r?t.base=t.name=e.slice(1,s):t.base=t.name=e.slice(o,s)):(o===0&&r?(t.name=e.slice(1,a),t.base=e.slice(1,s)):(t.name=e.slice(o,a),t.base=e.slice(o,s)),t.ext=e.slice(a,s)),t.dir=this.dirname(e),t},sep:`/`,delimiter:`:`,joinExtensions:[`.html`]};function QZ(e,t,n,r,i){let a=t[n];for(let o=0;o<a.length;o++){let s=a[o];n<t.length-1?QZ(e.replace(r[n],s),t,n+1,r,i):i.push(e.replace(r[n],s))}}function qve(e){let t=e.match(/\{(.*?)\}/g),n=[];if(t){let r=[];t.forEach(e=>{let t=e.substring(1,e.length-1).split(`,`);r.push(t)}),QZ(e,r,0,t,n)}else n.push(e);return n}var $Z=e=>!Array.isArray(e),eQ=class{constructor(){this._defaultBundleIdentifierOptions={connector:`-`,createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,``)},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle(`foo`,this._createBundleAssetId(`foo`,`bar`))!==`bar`)throw Error(`[Resolver] GenerateBundleAssetId are not working correctly`)}prefer(...e){e.forEach(e=>{this._preferredOrder.push(e),e.priority||=Object.keys(e.params)}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e==`string`)this._defaultSearchParams=e;else{let t=e;this._defaultSearchParams=Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join(`&`)}}getAlias(e){let{alias:t,src:n}=e;return WZ(t||n,e=>typeof e==`string`?e:Array.isArray(e)?e.map(e=>e?.src??e):e?.src?e.src:e,!0)}addManifest(e){this._manifest&&ot(`[Resolver] Manifest already exists, this will be overwritten`),this._manifest=e,e.bundles.forEach(e=>{this.addBundle(e.name,e.assets)})}addBundle(e,t){let n=[],r=t;Array.isArray(t)||(r=Object.entries(t).map(([e,t])=>typeof t==`string`||Array.isArray(t)?{alias:e,src:t}:{alias:e,...t})),r.forEach(t=>{let r=t.src,i=t.alias,a;if(typeof i==`string`){let t=this._createBundleAssetId(e,i);n.push(t),a=[i,t]}else{let t=i.map(t=>this._createBundleAssetId(e,t));n.push(...t),a=[...i,...t]}this.add({...t,alias:a,src:r})}),this._bundles[e]=n}add(e){let t=[];Array.isArray(e)?t.push(...e):t.push(e);let n=e=>{this.hasKey(e)&&ot(`[Resolver] already has key: ${e} overwriting`)};WZ(t).forEach(e=>{let{src:t}=e,{data:r,format:i,loadParser:a,parser:o}=e,s=WZ(t).map(e=>typeof e==`string`?qve(e):Array.isArray(e)?e:[e]),c=this.getAlias(e);Array.isArray(c)?c.forEach(n):n(c);let l=[],u=e=>({src:e,...this._parsers.find(t=>t.test(e))?.parse(e)});s.forEach(t=>{t.forEach(t=>{let n={};if(typeof t==`object`?(r=t.data??r,i=t.format??i,(t.loadParser||t.parser)&&(a=t.loadParser??a,o=t.parser??o),n={...u(t.src),...t}):n=u(t),!c)throw Error(`[Resolver] alias is undefined for this asset: ${n.src}`);n=this._buildResolvedAsset(n,{aliases:c,data:r,format:i,loadParser:a,parser:o,progressSize:e.progressSize}),l.push(n)})}),c.forEach(e=>{this._assetMap[e]=l})})}resolveBundle(e){let t=$Z(e);e=WZ(e);let n={};return e.forEach(e=>{let t=this._bundles[e];if(t){let r=this.resolve(t),i={};for(let t in r){let n=r[t];i[this._extractAssetIdFromBundle(e,t)]=n}n[e]=i}}),t?n[e[0]]:n}resolveUrl(e){let t=this.resolve(e);if(typeof e!=`string`){let e={};for(let n in t)e[n]=t[n].src;return e}return t.src}resolve(e){let t=$Z(e);e=WZ(e);let n={};return e.forEach(e=>{if(!this._resolverHash[e])if(this._assetMap[e]){let t=this._assetMap[e],n=this._getPreferredOrder(t);n?.priority.forEach(e=>{n.params[e].forEach(n=>{let r=t.filter(t=>t[e]?t[e]===n:!1);r.length&&(t=r)})}),this._resolverHash[e]=t[0]}else this._resolverHash[e]=this._buildResolvedAsset({alias:[e],src:e},{});n[e]=this._resolverHash[e]}),t?n[e[0]]:n}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){let n=e[t],r=this._preferredOrder.find(e=>e.params.format.includes(n.format));if(r)return r}return this._preferredOrder[0]}_appendDefaultSearchParams(e){return this._defaultSearchParams?`${e}${/\?/.test(e)?`&`:`?`}${this._defaultSearchParams}`:e}_buildResolvedAsset(e,t){let{aliases:n,data:r,loadParser:i,parser:a,format:o,progressSize:s}=t;return(this._basePath||this._rootPath)&&(e.src=ZZ.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=n??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...r||{},...e.data},e.loadParser=i??e.loadParser,e.parser=a??e.parser,e.format=o??e.format??Jve(e.src),s!==void 0&&(e.progressSize=s),e}};eQ.RETINA_PREFIX=/@([0-9\.]+)x/;function Jve(e){return e.split(`.`).pop().split(`?`).shift().split(`#`).shift()}var tQ=(e,t)=>{let n=t.split(`?`)[1];return n&&(e+=`?${n}`),e},nQ=class e{constructor(e,t){this.linkedSheets=[];let n=e;e?.source instanceof gt&&(n={texture:e,data:t});let{texture:r,data:i,cachePrefix:a=``}=n;this.cachePrefix=a,this._texture=r instanceof et?r:null,this.textureSource=r.source,this.textures={},this.animations={},this.data=i;let o=parseFloat(i.meta.scale);o?(this.resolution=o,r.source.resolution=this.resolution):this.resolution=r.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=e.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(t,n=!1){let r=t,i=n?1/0:e.BATCH_SIZE;for(;r-t<i&&r<this._frameKeys.length;){let e=this._frameKeys[r],t=this._frames[e],n=t.frame;if(n){let r=null,i=null,a=t.trimmed!==!1&&t.sourceSize?t.sourceSize:t.frame,o=new bt(0,0,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution);r=t.rotated?new bt(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.h)/this.resolution,Math.floor(n.w)/this.resolution):new bt(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution),t.trimmed!==!1&&t.spriteSourceSize&&(i=new bt(Math.floor(t.spriteSourceSize.x)/this.resolution,Math.floor(t.spriteSourceSize.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution)),this.textures[e]=new et({source:this.textureSource,frame:r,orig:o,trim:i,rotate:t.rotated?2:0,defaultAnchor:t.anchor,defaultBorders:t.borders,label:e.toString()})}r++}}_processAnimations(){let e=this.data.animations||{};for(let t in e){this.animations[t]=[];for(let n=0;n<e[t].length;n++){let r=e[t][n];this.animations[t].push(this.textures[r])}}}_parseComplete(){let e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*e.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*e.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){for(let e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};nQ.BATCH_SIZE=1e3;var rQ=nQ,Yve=[`jpg`,`png`,`jpeg`,`avif`,`webp`,`basis`,`etc2`,`bc7`,`bc6h`,`bc5`,`bc4`,`bc3`,`bc2`,`bc1`,`eac`,`astc`];function iQ(e,t,n){let r={};if(e.forEach(e=>{r[e]=t}),Object.keys(t.textures).forEach(e=>{r[`${t.cachePrefix}${e}`]=t.textures[e]}),!n){let n=ZZ.dirname(e[0]);t.linkedSheets.forEach((e,i)=>{let a=iQ([`${n}/${t.data.meta.related_multi_packs[i]}`],e,!0);Object.assign(r,a)})}return r}var Xve={extension:W.Asset,cache:{test:e=>e instanceof rQ,getCacheableAssets:(e,t)=>iQ(e,t,!1)},resolver:{extension:{type:W.ResolveParser,name:`resolveSpritesheet`},test:e=>{let t=e.split(`?`)[0].split(`.`),n=t.pop(),r=t.pop();return n===`json`&&Yve.includes(r)},parse:e=>{let t=e.split(`.`);return{resolution:parseFloat(eQ.RETINA_PREFIX.exec(e)?.[1]??`1`),format:t[t.length-2],src:e}}},loader:{name:`spritesheetLoader`,id:`spritesheet`,extension:{type:W.LoadParser,priority:JZ.Normal,name:`spritesheetLoader`},async testParse(e,t){return ZZ.extname(t.src).toLowerCase()===`.json`&&!!e.frames},async parse(e,t,n){let{texture:r,imageFilename:i,textureOptions:a,cachePrefix:o}=t?.data??{},s=ZZ.dirname(t.src);s&&s.lastIndexOf(`/`)!==s.length-1&&(s+=`/`);let c;if(r instanceof et)c=r;else{let r=tQ(s+(i??e.meta.image),t.src);c=(await n.load([{src:r,data:a}]))[r]}let l=new rQ({texture:c.source,data:e,cachePrefix:o});await l.parse();let u=e?.meta?.related_multi_packs;if(Array.isArray(u)){let e=[];for(let r of u){if(typeof r!=`string`)continue;let i=s+r;t.data?.ignoreMultiPack||(i=tQ(i,t.src),e.push(n.load({src:i,data:{textureOptions:a,ignoreMultiPack:!0}})))}let r=await Promise.all(e);l.linkedSheets=r,r.forEach(e=>{e.linkedSheets=[l].concat(l.linkedSheets.filter(t=>t!==e))})}return l},async unload(e,t,n){await n.unload(e.textureSource._sourceOrigin),e.destroy(!1)}}};jt.add(Xve);var Zve=class{constructor(e){this._lastTransform=``,this._observer=null,this._tickerAttached=!1,this.updateTranslation=()=>{if(!this._canvas)return;let e=this._canvas.getBoundingClientRect(),t=this._canvas.width,n=this._canvas.height,r=e.width/t*this._renderer.resolution,i=e.height/n*this._renderer.resolution,a=`translate(${e.left}px, ${e.top}px) scale(${r}, ${i})`;a!==this._lastTransform&&(this._domElement.style.transform=a,this._lastTransform=a)},this._domElement=e.domElement,this._renderer=e.renderer,!(globalThis.OffscreenCanvas&&this._renderer.canvas instanceof OffscreenCanvas)&&(this._canvas=this._renderer.canvas,this._attachObserver())}get canvas(){return this._canvas}ensureAttached(){!this._domElement.parentNode&&this._canvas.parentNode&&(this._canvas.parentNode.appendChild(this._domElement),this.updateTranslation())}_attachObserver(){`ResizeObserver`in globalThis?(this._observer&&=(this._observer.disconnect(),null),this._observer=new ResizeObserver(e=>{for(let t of e){if(t.target!==this._canvas)continue;let e=this.canvas.width,n=this.canvas.height,r=t.contentRect.width/e*this._renderer.resolution,i=t.contentRect.height/n*this._renderer.resolution;(this._lastScaleX!==r||this._lastScaleY!==i)&&(this.updateTranslation(),this._lastScaleX=r,this._lastScaleY=i)}}),this._observer.observe(this._canvas)):this._tickerAttached||kt.shared.add(this.updateTranslation,this,Ot.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&kt.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform=``,this._lastScaleX=null,this._lastScaleY=null}},aQ=class e{constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=e.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Et,this.page=new Et,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,n){throw Error(`initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.`)}initUIEvent(e,t,n,r,i){throw Error(`initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.`)}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}},oQ=/iPhone/i,sQ=/iPod/i,cQ=/iPad/i,lQ=/\biOS-universal(?:.+)Mac\b/i,uQ=/\bAndroid(?:.+)Mobile\b/i,dQ=/Android/i,fQ=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,pQ=/Silk/i,mQ=/Windows Phone/i,hQ=/\bWindows(?:.+)ARM\b/i,gQ=/BlackBerry/i,_Q=/BB10/i,vQ=/Opera Mini/i,yQ=/\b(CriOS|Chrome)(?:.+)Mobile/i,bQ=/Mobile(?:.+)Firefox\b/i,xQ=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Qve(e){return function(t){return t.test(e)}}function SQ(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=Qve(n),a={apple:{phone:i(oQ)&&!i(mQ),ipod:i(sQ),tablet:!i(oQ)&&(i(cQ)||xQ(t))&&!i(mQ),universal:i(lQ),device:(i(oQ)||i(sQ)||i(cQ)||i(lQ)||xQ(t))&&!i(mQ)},amazon:{phone:i(fQ),tablet:!i(fQ)&&i(pQ),device:i(fQ)||i(pQ)},android:{phone:!i(mQ)&&i(fQ)||!i(mQ)&&i(uQ),tablet:!i(mQ)&&!i(fQ)&&!i(uQ)&&(i(pQ)||i(dQ)),device:!i(mQ)&&(i(fQ)||i(pQ)||i(uQ)||i(dQ))||i(/\bokhttp\b/i)},windows:{phone:i(mQ),tablet:i(hQ),device:i(mQ)||i(hQ)},other:{blackberry:i(gQ),blackberry10:i(_Q),opera:i(vQ),firefox:i(bQ),chrome:i(yQ),device:i(gQ)||i(_Q)||i(vQ)||i(bQ)||i(yQ)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var $ve=(SQ.default??SQ)(globalThis.navigator),eye=9,CQ=100,tye=0,nye=0,wQ=2,TQ=1,rye=-1e3,iye=-1e3,aye=2,EQ=class e{constructor(e,t=$ve){this._mobileInfo=t,this.debug=!1,this._activateOnTab=!0,this._deactivateOnMouseMove=!0,this._isActive=!1,this._isMobileAccessibility=!1,this._div=null,this._pools={},this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._isRunningTests=!1,this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnMouseMove=this._onMouseMove.bind(this),this._hookDiv=null,(t.tablet||t.phone)&&this._createTouchHook(),this._renderer=e}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}get div(){return this._div}_createTouchHook(){let e=document.createElement(`button`);e.style.width=`${TQ}px`,e.style.height=`${TQ}px`,e.style.position=`absolute`,e.style.top=`${rye}px`,e.style.left=`${iye}px`,e.style.zIndex=aye.toString(),e.style.backgroundColor=`#FF0000`,e.title=`select to enable accessibility for this content`,e.addEventListener(`focus`,()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}_destroyTouchHook(){this._hookDiv&&=(document.body.removeChild(this._hookDiv),null)}_activate(){if(this._isActive)return;this._isActive=!0,this._div||(this._div=document.createElement(`div`),this._div.style.position=`absolute`,this._div.style.top=`${tye}px`,this._div.style.left=`${nye}px`,this._div.style.pointerEvents=`none`,this._div.style.zIndex=wQ.toString(),this._canvasObserver=new Zve({domElement:this._div,renderer:this._renderer})),this._activateOnTab&&globalThis.addEventListener(`keydown`,this._boundOnKeyDown,!1),this._deactivateOnMouseMove&&globalThis.document.addEventListener(`mousemove`,this._boundOnMouseMove,!0);let e=this._renderer.view.canvas;if(e.parentNode)this._canvasObserver.ensureAttached(),this._initAccessibilitySetup();else{let t=new MutationObserver(()=>{e.parentNode&&(t.disconnect(),this._canvasObserver.ensureAttached(),this._initAccessibilitySetup())});t.observe(document.body,{childList:!0,subtree:!0})}}_initAccessibilitySetup(){this._renderer.runners.postrender.add(this),this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered)}_deactivate(){if(!(!this._isActive||this._isMobileAccessibility)){this._isActive=!1,globalThis.document.removeEventListener(`mousemove`,this._boundOnMouseMove,!0),this._activateOnTab&&globalThis.addEventListener(`keydown`,this._boundOnKeyDown,!1),this._renderer.runners.postrender.remove(this);for(let e of this._children)e._accessibleDiv?.parentNode&&(e._accessibleDiv.parentNode.removeChild(e._accessibleDiv),e._accessibleDiv=null),e._accessibleActive=!1;for(let e in this._pools)this._pools[e].forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)}),delete this._pools[e];this._div?.parentNode&&this._div.parentNode.removeChild(this._div),this._pools={},this._children=[]}}_updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&(e._accessibleActive||this._addChild(e),e._renderId=this._renderId);let t=e.children;if(t)for(let e=0;e<t.length;e++)this._updateAccessibleObjects(t[e])}init(t){let n={accessibilityOptions:{...e.defaultOptions,...t?.accessibilityOptions||{}}};this.debug=n.accessibilityOptions.debug,this._activateOnTab=n.accessibilityOptions.activateOnTab,this._deactivateOnMouseMove=n.accessibilityOptions.deactivateOnMouseMove,n.accessibilityOptions.enabledByDefault&&this._activate(),this._renderer.runners.postrender.remove(this)}postrender(){let e=performance.now();if(this._mobileInfo.android.device&&e<this._androidUpdateCount||(this._androidUpdateCount=e+this._androidUpdateFrequency,(!this._renderer.renderingToScreen||!this._renderer.view.canvas)&&!this._isRunningTests))return;let t=new Set;if(this._renderer.lastObjectRendered){this._updateAccessibleObjects(this._renderer.lastObjectRendered);for(let e of this._children)e._renderId===this._renderId&&t.add(this._children.indexOf(e))}for(let e=this._children.length-1;e>=0;e--){let n=this._children[e];t.has(e)||(n._accessibleDiv&&n._accessibleDiv.parentNode&&(n._accessibleDiv.parentNode.removeChild(n._accessibleDiv),this._getPool(n.accessibleType).push(n._accessibleDiv),n._accessibleDiv=null),n._accessibleActive=!1,ut(this._children,e,1))}this._renderer.renderingToScreen&&this._canvasObserver.ensureAttached();for(let e=0;e<this._children.length;e++){let t=this._children[e];if(!t._accessibleActive||!t._accessibleDiv)continue;let n=t._accessibleDiv,r=t.hitArea||t.getBounds().rectangle;if(t.hitArea){let e=t.worldTransform;n.style.left=`${e.tx+r.x*e.a}px`,n.style.top=`${e.ty+r.y*e.d}px`,n.style.width=`${r.width*e.a}px`,n.style.height=`${r.height*e.d}px`}else this._capHitArea(r),n.style.left=`${r.x}px`,n.style.top=`${r.y}px`,n.style.width=`${r.width}px`,n.style.height=`${r.height}px`}this._renderId++}_updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}_capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);let{width:t,height:n}=this._renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>n&&(e.height=n-e.y)}_addChild(e){let t=this._getPool(e.accessibleType).pop();t?(t.innerHTML=``,t.removeAttribute(`title`),t.removeAttribute(`aria-label`),t.tabIndex=0):(e.accessibleType===`button`?t=document.createElement(`button`):(t=document.createElement(e.accessibleType),t.style.cssText=`
951
951
  color: transparent;
952
952
  pointer-events: none;
953
953
  padding: 0;
@@ -960,7 +960,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
960
960
  -webkit-user-select: none;
961
961
  -moz-user-select: none;
962
962
  -ms-user-select: none;
963
- `,e.accessibleText&&(t.innerText=e.accessibleText)),t.style.width=`${CQ}px`,t.style.height=`${CQ}px`,t.style.backgroundColor=this.debug?`rgba(255,255,255,0.5)`:`transparent`,t.style.position=`absolute`,t.style.zIndex=wQ.toString(),t.style.borderStyle=`none`,navigator.userAgent.toLowerCase().includes(`chrome`)?t.setAttribute(`aria-live`,`off`):t.setAttribute(`aria-live`,`polite`),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute(`aria-relevant`,`additions`):t.setAttribute(`aria-relevant`,`text`),t.addEventListener(`click`,this._onClick.bind(this)),t.addEventListener(`focus`,this._onFocus.bind(this)),t.addEventListener(`focusout`,this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`container ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute(`aria-label`,e.accessibleHint),e.interactive?t.tabIndex=e.tabIndex:t.tabIndex=0,this.debug&&this._updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.container=e,this._children.push(e),this._div.appendChild(e._accessibleDiv)}_dispatchEvent(e,t){let{container:n}=e.target,r=this._renderer.events.rootBoundary,i=Object.assign(new aQ(r),{target:n});r.rootTarget=this._renderer.lastObjectRendered,t.forEach(e=>r.dispatchEvent(i,e))}_onClick(e){this._dispatchEvent(e,[`click`,`pointertap`,`tap`])}_onFocus(e){e.target.getAttribute(`aria-live`)||e.target.setAttribute(`aria-live`,`assertive`),this._dispatchEvent(e,[`mouseover`])}_onFocusOut(e){e.target.getAttribute(`aria-live`)||e.target.setAttribute(`aria-live`,`polite`),this._dispatchEvent(e,[`mouseout`])}_onKeyDown(e){e.keyCode!==eye||!this._activateOnTab||this._activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this._deactivate()}destroy(){this._deactivate(),this._destroyTouchHook(),this._canvasObserver?.destroy(),this._canvasObserver=null,this._div=null,this._pools=null,this._children=null,this._renderer=null,this._hookDiv=null,globalThis.removeEventListener(`keydown`,this._boundOnKeyDown),this._boundOnKeyDown=null,globalThis.document.removeEventListener(`mousemove`,this._boundOnMouseMove,!0),this._boundOnMouseMove=null}setAccessibilityEnabled(e){e?this._activate():this._deactivate()}_getPool(e){return this._pools[e]||(this._pools[e]=[]),this._pools[e]}};EQ.extension={type:[W.WebGLSystem,W.WebGPUSystem],name:`accessibility`},EQ.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0};var oye=EQ,sye={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,accessibleType:`button`,accessibleText:null,accessiblePointerEvents:`auto`,accessibleChildren:!0,_accessibleActive:!1,_accessibleDiv:null,_renderId:-1},DQ;function cye(e){return DQ===void 0&&(DQ=(()=>{let t={stencil:!0,failIfMajorPerformanceCaveat:e??Qt.defaultOptions.failIfMajorPerformanceCaveat};try{if(!Gt.get().getWebGLRenderingContext())return!1;let e=Gt.get().createCanvas().getContext(`webgl`,t),n=!!e?.getContextAttributes()?.stencil;if(e){let t=e.getExtension(`WEBGL_lose_context`);t&&t.loseContext()}return e=null,n}catch{return!1}})()),DQ}var OQ;async function lye(e={}){return OQ===void 0&&(OQ=await(async()=>{let t=Gt.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(e)).requestDevice(),!0}catch{return!1}})()),OQ}var kQ=[`webgl`,`webgpu`,`canvas`];async function uye(e){let t=[];e.preference?(t.push(e.preference),kQ.forEach(n=>{n!==e.preference&&t.push(n)})):t=kQ.slice();let n,r={};for(let i=0;i<t.length;i++){let a=t[i];if(a===`webgpu`&&await lye()){let{WebGPURenderer:t}=await q(async()=>{let{WebGPURenderer:e}=await import(`./WebGPURenderer-r7TRWUkD.js`);return{WebGPURenderer:e}},__vite__mapDeps([131,128,1]));n=t,r={...e,...e.webgpu};break}else if(a===`webgl`&&cye(e.failIfMajorPerformanceCaveat??Qt.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:t}=await q(async()=>{let{WebGLRenderer:e}=await import(`./WebGLRenderer-BrfpRfdk.js`);return{WebGLRenderer:e}},__vite__mapDeps([132,128,1]));n=t,r={...e,...e.webgl};break}else if(a===`canvas`){let{CanvasRenderer:t}=await q(async()=>{let{CanvasRenderer:e}=await import(`./CanvasRenderer-vRzYl9FZ.js`);return{CanvasRenderer:e}},__vite__mapDeps([133,128,1]));n=t,r={...e,...e.canvasOptions};break}}if(delete r.webgpu,delete r.webgl,delete r.canvasOptions,!n)throw Error(`No available renderer for the current environment`);let i=new n;return await i.init(r),i}var AQ=class{static init(e){Object.defineProperty(this,`resizeTo`,{configurable:!0,set(e){globalThis.removeEventListener(`resize`,this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener(`resize`,this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&=(cancelAnimationFrame(this._resizeId),null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let e,t;if(this._resizeTo===globalThis.window)e=globalThis.innerWidth,t=globalThis.innerHeight;else{let{clientWidth:n,clientHeight:r}=this._resizeTo;e=n,t=r}this.renderer.resize(e,t),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener(`resize`,this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}};AQ.extension=W.Application;var jQ=class{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,`ticker`,{configurable:!0,set(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,Ot.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?kt.shared:new kt,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}};jQ.extension=W.Application,jt.add(AQ),jt.add(jQ);var MQ=class e{constructor(...e){this.stage=new qt,e[0]!==void 0&&zt(st,`Application constructor options are deprecated, please use Application.init() instead.`)}async init(t){t={...t},this.stage||=new qt,this.renderer=await uye(t),e._plugins.forEach(e=>{e.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return zt(st,`Application.view is deprecated, please use Application.canvas instead.`),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){let r=e._plugins.slice(0);r.reverse(),r.forEach(e=>{e.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};MQ._plugins=[];var NQ=MQ;jt.handleByList(W.Application,NQ._plugins),jt.add($t);var dye=t(n(((e,t)=>{t.exports=i;var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/gi;function i(e){var t=[];return e.replace(r,function(e,r,i){var a=r.toLowerCase();for(i=o(i),a==`m`&&i.length>2&&(t.push([r].concat(i.splice(0,2))),a=`l`,r=r==`m`?`l`:`L`);;){if(i.length==n[a])return i.unshift(r),t.push(i);if(i.length<n[a])throw Error(`malformed path data`);t.push([r].concat(i.splice(0,n[a])))}}),t}var a=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function o(e){var t=e.match(a);return t?t.map(Number):[]}}))(),1);function fye(e,t){let n=(0,dye.default)(e),r=[],i=null,a=0,o=0;for(let e=0;e<n.length;e++){let s=n[e],c=s[0],l=s;switch(c){case`M`:a=l[1],o=l[2],t.moveTo(a,o);break;case`m`:a+=l[1],o+=l[2],t.moveTo(a,o);break;case`H`:a=l[1],t.lineTo(a,o);break;case`h`:a+=l[1],t.lineTo(a,o);break;case`V`:o=l[1],t.lineTo(a,o);break;case`v`:o+=l[1],t.lineTo(a,o);break;case`L`:a=l[1],o=l[2],t.lineTo(a,o);break;case`l`:a+=l[1],o+=l[2],t.lineTo(a,o);break;case`C`:a=l[5],o=l[6],t.bezierCurveTo(l[1],l[2],l[3],l[4],a,o);break;case`c`:t.bezierCurveTo(a+l[1],o+l[2],a+l[3],o+l[4],a+l[5],o+l[6]),a+=l[5],o+=l[6];break;case`S`:a=l[3],o=l[4],t.bezierCurveToShort(l[1],l[2],a,o);break;case`s`:t.bezierCurveToShort(a+l[1],o+l[2],a+l[3],o+l[4]),a+=l[3],o+=l[4];break;case`Q`:a=l[3],o=l[4],t.quadraticCurveTo(l[1],l[2],a,o);break;case`q`:t.quadraticCurveTo(a+l[1],o+l[2],a+l[3],o+l[4]),a+=l[3],o+=l[4];break;case`T`:a=l[1],o=l[2],t.quadraticCurveToShort(a,o);break;case`t`:a+=l[1],o+=l[2],t.quadraticCurveToShort(a,o);break;case`A`:a=l[6],o=l[7],t.arcToSvg(l[1],l[2],l[3],l[4],l[5],a,o);break;case`a`:a+=l[6],o+=l[7],t.arcToSvg(l[1],l[2],l[3],l[4],l[5],a,o);break;case`Z`:case`z`:t.closePath(),r.length>0&&(i=r.pop(),i?(a=i.startX,o=i.startY):(a=0,o=0)),i=null;break;default:ot(`Unknown SVG path command: ${c}`)}c!==`Z`&&c!==`z`&&i===null&&(i={startX:a,startY:o},r.push(i))}return t}var pye=class e{constructor(e=0,t=0,n=0){this.type=`circle`,this.x=e,this.y=t,this.radius=n}clone(){return new e(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;let n=this.radius*this.radius,r=this.x-e,i=this.y-t;return r*=r,i*=i,r+i<=n}strokeContains(e,t,n,r=.5){if(this.radius===0)return!1;let i=this.x-e,a=this.y-t,o=this.radius,s=(1-r)*n,c=Math.sqrt(i*i+a*a);return c<=o+s&&c>o-(n-s)}getBounds(e){return e||=new bt,e.x=this.x-this.radius,e.y=this.y-this.radius,e.width=this.radius*2,e.height=this.radius*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.radius=e.radius,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}},mye=class e{constructor(e=0,t=0,n=0,r=0){this.type=`ellipse`,this.x=e,this.y=t,this.halfWidth=n,this.halfHeight=r}clone(){return new e(this.x,this.y,this.halfWidth,this.halfHeight)}contains(e,t){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let n=(e-this.x)/this.halfWidth,r=(t-this.y)/this.halfHeight;return n*=n,r*=r,n+r<=1}strokeContains(e,t,n,r=.5){let{halfWidth:i,halfHeight:a}=this;if(i<=0||a<=0)return!1;let o=n*(1-r),s=n-o,c=i-s,l=a-s,u=i+o,d=a+o,f=e-this.x,p=t-this.y,m=f*f/(c*c)+p*p/(l*l),h=f*f/(u*u)+p*p/(d*d);return m>1&&h<=1}getBounds(e){return e||=new bt,e.x=this.x-this.halfWidth,e.y=this.y-this.halfHeight,e.width=this.halfWidth*2,e.height=this.halfHeight*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.halfWidth=e.halfWidth,this.halfHeight=e.halfHeight,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}};function hye(e,t,n,r,i,a){let o=e-n,s=t-r,c=i-n,l=a-r,u=o*c+s*l,d=c*c+l*l,f=-1;d!==0&&(f=u/d);let p,m;f<0?(p=n,m=r):f>1?(p=i,m=a):(p=n+f*c,m=r+f*l);let h=e-p,g=t-m;return h*h+g*g}var gye,_ye,PQ=class e{constructor(...e){this.type=`polygon`;let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!=`number`){let e=[];for(let n=0,r=t.length;n<r;n++)e.push(t[n].x,t[n].y);t=e}this.points=t,this.closePath=!0}isClockwise(){let e=0,t=this.points,n=t.length;for(let r=0;r<n;r+=2){let i=t[r],a=t[r+1],o=t[(r+2)%n],s=t[(r+3)%n];e+=(o-i)*(s+a)}return e<0}containsPolygon(e){let t=this.getBounds(gye),n=e.getBounds(_ye);if(!t.containsRect(n))return!1;let r=e.points;for(let e=0;e<r.length;e+=2){let t=r[e],n=r[e+1];if(!this.contains(t,n))return!1}return!0}clone(){let t=new e(this.points.slice());return t.closePath=this.closePath,t}contains(e,t){let n=!1,r=this.points.length/2;for(let i=0,a=r-1;i<r;a=i++){let r=this.points[i*2],o=this.points[i*2+1],s=this.points[a*2],c=this.points[a*2+1];o>t!=c>t&&e<(s-r)*((t-o)/(c-o))+r&&(n=!n)}return n}strokeContains(e,t,n,r=.5){let i=n*n,a=i*(1-r),o=i-a,{points:s}=this,c=s.length-(this.closePath?0:2);for(let n=0;n<c;n+=2){let r=s[n],i=s[n+1],c=s[(n+2)%s.length],l=s[(n+3)%s.length];if(hye(e,t,r,i,c,l)<=(Math.sign((c-r)*(t-i)-(l-i)*(e-r))<0?o:a))return!0}return!1}getBounds(e){e||=new bt;let t=this.points,n=1/0,r=-1/0,i=1/0,a=-1/0;for(let e=0,o=t.length;e<o;e+=2){let o=t[e],s=t[e+1];n=o<n?o:n,r=o>r?o:r,i=s<i?s:i,a=s>a?s:a}return e.x=n,e.width=r-n,e.y=i,e.height=a-i,e}copyFrom(e){return this.points=e.points.slice(),this.closePath=e.closePath,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((e,t)=>`${e}, ${t}`,``)}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return zt(`8.11.0`,`Polygon.lastX is deprecated, please use Polygon.lastX instead.`),this.points[this.points.length-2]}get y(){return zt(`8.11.0`,`Polygon.y is deprecated, please use Polygon.lastY instead.`),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}},FQ=(e,t,n,r,i,a,o)=>{let s=e-n,c=t-r,l=Math.sqrt(s*s+c*c);return l>=i-a&&l<=i+o},vye=class e{constructor(e=0,t=0,n=0,r=0,i=20){this.type=`roundedRectangle`,this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i}getBounds(e){return e||=new bt,e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}clone(){return new e(this.x,this.y,this.width,this.height,this.radius)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){let n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;let r=e-(this.x+n),i=t-(this.y+n),a=n*n;if(r*r+i*i<=a||(r=e-(this.x+this.width-n),r*r+i*i<=a)||(i=t-(this.y+this.height-n),r*r+i*i<=a)||(r=e-(this.x+n),r*r+i*i<=a))return!0}return!1}strokeContains(e,t,n,r=.5){let{x:i,y:a,width:o,height:s,radius:c}=this,l=n*(1-r),u=n-l,d=i+c,f=a+c,p=o-c*2,m=s-c*2,h=i+o,g=a+s;return(e>=i-l&&e<=i+u||e>=h-u&&e<=h+l)&&t>=f&&t<=f+m||(t>=a-l&&t<=a+u||t>=g-u&&t<=g+l)&&e>=d&&e<=d+p?!0:e<d&&t<f&&FQ(e,t,d,f,c,u,l)||e>h-c&&t<f&&FQ(e,t,h-c,f,c,u,l)||e>h-c&&t>g-c&&FQ(e,t,h-c,g-c,c,u,l)||e<d&&t>g-c&&FQ(e,t,d,g-c,c,u,l)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}};function yye(e,t,n,r,i,a,o,s=null){let c=0;n*=t,i*=a;let l=s.a,u=s.b,d=s.c,f=s.d,p=s.tx,m=s.ty;for(;c<o;){let o=e[n],s=e[n+1];r[i]=l*o+d*s+p,r[i+1]=u*o+f*s+m,i+=a,n+=t,c++}}function bye(e,t,n,r){let i=0;for(t*=n;i<r;)e[t]=0,e[t+1]=0,t+=n,i++}function IQ(e,t,n,r,i){let a=t.a,o=t.b,s=t.c,c=t.d,l=t.tx,u=t.ty;n||=0,r||=2,i||=e.length/r-n;let d=n*r;for(let t=0;t<i;t++){let t=e[d],n=e[d+1];e[d]=a*t+s*n+l,e[d+1]=o*t+c*n+u,d+=r}}var xye=new Qe,LQ=class{constructor(){this.packAsQuad=!1,this.batcherName=`default`,this.topology=`triangle-list`,this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:`normal`}get color(){let e=this.baseColor,t=e>>16|e&65280|(e&255)<<16,n=this.renderable;return n?dt(t,n.groupColor)+(this.alpha*n.groupAlpha*255<<24):t+(this.alpha*255<<24)}get transform(){return this.renderable?.groupTransform||xye}copyTo(e){e.indexOffset=this.indexOffset,e.indexSize=this.indexSize,e.attributeOffset=this.attributeOffset,e.attributeSize=this.attributeSize,e.baseColor=this.baseColor,e.alpha=this.alpha,e.texture=this.texture,e.geometryData=this.geometryData,e.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology=`triangle-list`}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}},RQ={extension:{type:W.ShapeBuilder,name:`circle`},build(e,t){let n,r,i,a,o,s;if(e.type===`circle`){let t=e;if(o=s=t.radius,o<=0)return!1;n=t.x,r=t.y,i=a=0}else if(e.type===`ellipse`){let t=e;if(o=t.halfWidth,s=t.halfHeight,o<=0||s<=0)return!1;n=t.x,r=t.y,i=a=0}else{let t=e,c=t.width/2,l=t.height/2;n=t.x+c,r=t.y+l,o=s=Math.max(0,Math.min(t.radius,Math.min(c,l))),i=c-o,a=l-s}if(i<0||a<0)return!1;let c=Math.ceil(2.3*Math.sqrt(o+s)),l=c*8+(i?4:0)+(a?4:0);if(l===0)return!1;if(c===0)return t[0]=t[6]=n+i,t[1]=t[3]=r+a,t[2]=t[4]=n-i,t[5]=t[7]=r-a,!0;let u=0,d=c*4+(i?2:0)+2,f=d,p=l,m=i+o,h=a,g=n+m,_=n-m,v=r+h;if(t[u++]=g,t[u++]=v,t[--d]=v,t[--d]=_,a){let e=r-h;t[f++]=_,t[f++]=e,t[--p]=e,t[--p]=g}for(let e=1;e<c;e++){let l=Math.PI/2*(e/c),m=i+Math.cos(l)*o,h=a+Math.sin(l)*s,g=n+m,_=n-m,v=r+h,y=r-h;t[u++]=g,t[u++]=v,t[--d]=v,t[--d]=_,t[f++]=_,t[f++]=y,t[--p]=y,t[--p]=g}m=i,h=a+s,g=n+m,_=n-m,v=r+h;let y=r-h;return t[u++]=g,t[u++]=v,t[--p]=y,t[--p]=g,i&&(t[u++]=_,t[u++]=v,t[--p]=y,t[--p]=_),!0},triangulate(e,t,n,r,i,a){if(e.length===0)return;let o=0,s=0;for(let t=0;t<e.length;t+=2)o+=e[t],s+=e[t+1];o/=e.length/2,s/=e.length/2;let c=r;t[c*n]=o,t[c*n+1]=s;let l=c++;for(let r=0;r<e.length;r+=2)t[c*n]=e[r],t[c*n+1]=e[r+1],r>0&&(i[a++]=c,i[a++]=l,i[a++]=c-1),c++;i[a++]=l+1,i[a++]=l,i[a++]=c-1}},Sye={...RQ,extension:{...RQ.extension,name:`ellipse`}},Cye={...RQ,extension:{...RQ.extension,name:`roundedRectangle`}},zQ=1e-4,BQ=1e-4;function wye(e){let t=e.length;if(t<6)return 1;let n=0;for(let r=0,i=e[t-2],a=e[t-1];r<t;r+=2){let t=e[r],o=e[r+1];n+=(t-i)*(o+a),i=t,a=o}return n<0?-1:1}function VQ(e,t,n,r,i,a,o,s){let c=e-n*i,l=t-r*i,u=e+n*a,d=t+r*a,f,p;o?(f=r,p=-n):(f=-r,p=n);let m=c+f,h=l+p,g=u+f,_=d+p;return s.push(m,h),s.push(g,_),2}function HQ(e,t,n,r,i,a,o,s){let c=n-e,l=r-t,u=Math.atan2(c,l),d=Math.atan2(i-e,a-t);s&&u<d?u+=Math.PI*2:!s&&u>d&&(d+=Math.PI*2);let f=u,p=d-u,m=Math.abs(p),h=Math.sqrt(c*c+l*l),g=(15*m*Math.sqrt(h)/Math.PI>>0)+1,_=p/g;if(f+=_,s){o.push(e,t),o.push(n,r);for(let n=1,r=f;n<g;n++,r+=_)o.push(e,t),o.push(e+Math.sin(r)*h,t+Math.cos(r)*h);o.push(e,t),o.push(i,a)}else{o.push(n,r),o.push(e,t);for(let n=1,r=f;n<g;n++,r+=_)o.push(e+Math.sin(r)*h,t+Math.cos(r)*h),o.push(e,t);o.push(i,a),o.push(e,t)}return g*2}function UQ(e,t,n,r,i,a){let o=zQ;if(e.length===0)return;let s=t,c=s.alignment;if(t.alignment!==.5){let t=wye(e);n&&(t*=-1),c=(c-.5)*t+.5}let l=new Et(e[0],e[1]),u=new Et(e[e.length-2],e[e.length-1]),d=r,f=Math.abs(l.x-u.x)<o&&Math.abs(l.y-u.y)<o;if(d){e=e.slice(),f&&(e.pop(),e.pop(),u.set(e[e.length-2],e[e.length-1]));let t=(l.x+u.x)*.5,n=(u.y+l.y)*.5;e.unshift(t,n),e.push(t,n)}let p=i,m=e.length/2,h=e.length,g=p.length/2,_=s.width/2,v=_*_,y=s.miterLimit*s.miterLimit,b=e[0],x=e[1],S=e[2],C=e[3],w=0,T=0,E=-(x-C),D=b-S,O=0,k=0,A=Math.sqrt(E*E+D*D);E/=A,D/=A,E*=_,D*=_;let j=c,M=(1-j)*2,N=j*2;d||(s.cap===`round`?h+=HQ(b-E*(M-N)*.5,x-D*(M-N)*.5,b-E*M,x-D*M,b+E*N,x+D*N,p,!0)+2:s.cap===`square`&&(h+=VQ(b,x,E,D,M,N,!0,p))),p.push(b-E*M,x-D*M),p.push(b+E*N,x+D*N);for(let t=1;t<m-1;++t){b=e[(t-1)*2],x=e[(t-1)*2+1],S=e[t*2],C=e[t*2+1],w=e[(t+1)*2],T=e[(t+1)*2+1],E=-(x-C),D=b-S,A=Math.sqrt(E*E+D*D),E/=A,D/=A,E*=_,D*=_,O=-(C-T),k=S-w,A=Math.sqrt(O*O+k*k),O/=A,k/=A,O*=_,k*=_;let n=S-b,r=x-C,i=S-w,a=T-C,o=n*i+r*a,c=r*i-a*n,l=c<0;if(Math.abs(c)<.001*Math.abs(o)){p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),o>=0&&(s.join===`round`?h+=HQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+4:h+=2,p.push(S-O*N,C-k*N),p.push(S+O*M,C+k*M));continue}let u=(-E+b)*(-D+C)-(-E+S)*(-D+x),d=(-O+w)*(-k+C)-(-O+S)*(-k+T),f=(n*d-i*u)/c,m=(a*u-r*d)/c,g=(f-S)*(f-S)+(m-C)*(m-C),j=S+(f-S)*M,P=C+(m-C)*M,F=S-(f-S)*N,I=C-(m-C)*N,ee=Math.min(n*n+r*r,i*i+a*a),L=l?M:N;g<=ee+L*L*v?s.join===`bevel`||g/v>y?(l?(p.push(j,P),p.push(S+E*N,C+D*N),p.push(j,P),p.push(S+O*N,C+k*N)):(p.push(S-E*M,C-D*M),p.push(F,I),p.push(S-O*M,C-k*M),p.push(F,I)),h+=2):s.join===`round`?l?(p.push(j,P),p.push(S+E*N,C+D*N),h+=HQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+4,p.push(j,P),p.push(S+O*N,C+k*N)):(p.push(S-E*M,C-D*M),p.push(F,I),h+=HQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+4,p.push(S-O*M,C-k*M),p.push(F,I)):(p.push(j,P),p.push(F,I)):(p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),s.join===`round`?l?h+=HQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+2:h+=HQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+2:s.join===`miter`&&g/v<=y&&(l?(p.push(F,I),p.push(F,I)):(p.push(j,P),p.push(j,P)),h+=2),p.push(S-O*M,C-k*M),p.push(S+O*N,C+k*N),h+=2)}b=e[(m-2)*2],x=e[(m-2)*2+1],S=e[(m-1)*2],C=e[(m-1)*2+1],E=-(x-C),D=b-S,A=Math.sqrt(E*E+D*D),E/=A,D/=A,E*=_,D*=_,p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),d||(s.cap===`round`?h+=HQ(S-E*(M-N)*.5,C-D*(M-N)*.5,S-E*M,C-D*M,S+E*N,C+D*N,p,!1)+2:s.cap===`square`&&(h+=VQ(S,C,E,D,M,N,!1,p)));let P=BQ*BQ;for(let e=g;e<h+g-2;++e)b=p[e*2],x=p[e*2+1],S=p[(e+1)*2],C=p[(e+1)*2+1],w=p[(e+2)*2],T=p[(e+2)*2+1],!(Math.abs(b*(C-T)+S*(T-x)+w*(x-C))<P)&&a.push(e,e+1,e+2)}function Tye(e,t,n,r){let i=zQ;if(e.length===0)return;let a=e[0],o=e[1],s=e[e.length-2],c=e[e.length-1],l=t||Math.abs(a-s)<i&&Math.abs(o-c)<i,u=n,d=e.length/2,f=u.length/2;for(let t=0;t<d;t++)u.push(e[t*2]),u.push(e[t*2+1]);for(let e=0;e<d-1;e++)r.push(f+e,f+e+1);l&&r.push(f+d-1,f)}function WQ(e,t,n,r,i,a,o){let s=pn(e,t,2);if(!s)return;for(let e=0;e<s.length;e+=3)a[o++]=s[e]+i,a[o++]=s[e+1]+i,a[o++]=s[e+2]+i;let c=i*r;for(let t=0;t<e.length;t+=2)n[c]=e[t],n[c+1]=e[t+1],c+=r}var Eye=[],Dye={extension:{type:W.ShapeBuilder,name:`polygon`},build(e,t){for(let n=0;n<e.points.length;n++)t[n]=e.points[n];return!0},triangulate(e,t,n,r,i,a){WQ(e,Eye,t,n,r,i,a)}},Oye={extension:{type:W.ShapeBuilder,name:`rectangle`},build(e,t){let n=e,r=n.x,i=n.y,a=n.width,o=n.height;return a>0&&o>0?(t[0]=r,t[1]=i,t[2]=r+a,t[3]=i,t[4]=r+a,t[5]=i+o,t[6]=r,t[7]=i+o,!0):!1},triangulate(e,t,n,r,i,a){let o=0;r*=n,t[r+o]=e[0],t[r+o+1]=e[1],o+=n,t[r+o]=e[2],t[r+o+1]=e[3],o+=n,t[r+o]=e[6],t[r+o+1]=e[7],o+=n,t[r+o]=e[4],t[r+o+1]=e[5],o+=n;let s=r/n;i[a++]=s,i[a++]=s+1,i[a++]=s+2,i[a++]=s+1,i[a++]=s+3,i[a++]=s+2}},kye={extension:{type:W.ShapeBuilder,name:`triangle`},build(e,t){return t[0]=e.x,t[1]=e.y,t[2]=e.x2,t[3]=e.y2,t[4]=e.x3,t[5]=e.y3,!0},triangulate(e,t,n,r,i,a){let o=0;r*=n,t[r+o]=e[0],t[r+o+1]=e[1],o+=n,t[r+o]=e[2],t[r+o+1]=e[3],o+=n,t[r+o]=e[4],t[r+o+1]=e[5];let s=r/n;i[a++]=s,i[a++]=s+1,i[a++]=s+2}},GQ=[{offset:0,color:`white`},{offset:1,color:`black`}],KQ=class e{constructor(...t){this.uid=vt(`fillGradient`),this._tick=0,this.type=`linear`,this.colorStops=[];let n=Aye(t);n={...n.type===`radial`?e.defaultRadialOptions:e.defaultLinearOptions,...it(n)},this._textureSize=n.textureSize,this._wrapMode=n.wrapMode,n.type===`radial`?(this.center=n.center,this.outerCenter=n.outerCenter??this.center,this.innerRadius=n.innerRadius,this.outerRadius=n.outerRadius,this.scale=n.scale,this.rotation=n.rotation):(this.start=n.start,this.end=n.end),this.textureSpace=n.textureSpace,this.type=n.type,n.colorStops.forEach(e=>{this.addColorStop(e.offset,e.color)})}addColorStop(e,t){return this.colorStops.push({offset:e,color:lt.shared.setValue(t).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:e,y:t}=this.start,{x:n,y:r}=this.end,i=n-e,a=r-t,o=i<0||a<0;if(this._wrapMode===`clamp-to-edge`){if(i<0){let t=e;e=n,n=t,i*=-1}if(a<0){let e=t;t=r,r=e,a*=-1}}let s=this.colorStops.length?this.colorStops:GQ,c=this._textureSize,{canvas:l,context:u}=YQ(c,1),d=o?u.createLinearGradient(this._textureSize,0,0,0):u.createLinearGradient(0,0,this._textureSize,0);JQ(d,s),u.fillStyle=d,u.fillRect(0,0,c,1),this.texture=new et({source:new Xt({resource:l,addressMode:this._wrapMode})});let f=Math.sqrt(i*i+a*a),p=Math.atan2(a,i),m=new Qe;m.scale(f/c,1),m.rotate(p),m.translate(e,t),this.textureSpace===`local`&&m.scale(c,c),this.transform=m}buildGradient(){this.texture||this._tick++,this.type===`linear`?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;let e=this.colorStops.length?this.colorStops:GQ,t=this._textureSize,{canvas:n,context:r}=YQ(t,t),{x:i,y:a}=this.center,{x:o,y:s}=this.outerCenter,c=this.innerRadius,l=this.outerRadius,u=o-l,d=s-l,f=t/(l*2),p=(i-u)*f,m=(a-d)*f,h=r.createRadialGradient(p,m,c*f,(o-u)*f,(s-d)*f,l*f);JQ(h,e),r.fillStyle=e[e.length-1].color,r.fillRect(0,0,t,t),r.fillStyle=h,r.translate(p,m),r.rotate(this.rotation),r.scale(1,this.scale),r.translate(-p,-m),r.fillRect(0,0,t,t),this.texture=new et({source:new Xt({resource:n,addressMode:this._wrapMode})});let g=new Qe;g.scale(1/f,1/f),g.translate(u,d),this.textureSpace===`local`&&g.scale(t,t),this.transform=g}destroy(){this.texture?.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};KQ.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:`local`,type:`linear`,textureSize:256,wrapMode:`clamp-to-edge`},KQ.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:`local`,type:`radial`,textureSize:256,wrapMode:`clamp-to-edge`};var qQ=KQ;function JQ(e,t){for(let n=0;n<t.length;n++){let r=t[n];e.addColorStop(r.offset,r.color)}}function YQ(e,t){let n=Gt.get().createCanvas(e,t);return{canvas:n,context:n.getContext(`2d`)}}function Aye(e){let t=e[0]??{};return(typeof t==`number`||e[1])&&(zt(`8.5.2`,`use options object instead`),t={type:`linear`,start:{x:e[0],y:e[1]},end:{x:e[2],y:e[3]},textureSpace:e[4],textureSize:e[5]??qQ.defaultLinearOptions.textureSize}),t}var jye=new Qe,Mye=new bt;function XQ(e,t,n,r){let i=t.matrix?e.copyFrom(t.matrix).invert():e.identity();if(t.textureSpace===`local`){let e=n.getBounds(Mye);t.width&&e.pad(t.width);let{x:r,y:a}=e,o=1/e.width,s=1/e.height,c=-r*o,l=-a*s,u=i.a,d=i.b,f=i.c,p=i.d;i.a*=o,i.b*=o,i.c*=s,i.d*=s,i.tx=c*u+l*f+i.tx,i.ty=c*d+l*p+i.ty}else i.translate(t.texture.frame.x,t.texture.frame.y),i.scale(1/t.texture.source.width,1/t.texture.source.height);let a=t.texture.source.style;return!(t.fill instanceof qQ)&&a.addressMode===`clamp-to-edge`&&(a.addressMode=`repeat`,a.update()),r&&i.append(jye.copyFrom(r).invert()),i}var ZQ={};jt.handleByMap(W.ShapeBuilder,ZQ),jt.add(Oye,Dye,kye,RQ,Sye,Cye);var Nye=new bt,Pye=new Qe;function Fye(e,t){let{geometryData:n,batches:r}=t;r.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let t=0;t<e.instructions.length;t++){let i=e.instructions[t];if(i.action===`texture`)Iye(i.data,r,n);else if(i.action===`fill`||i.action===`stroke`){let e=i.action===`stroke`,t=i.data.path.shapePath,a=i.data.style,o=i.data.hole;e&&o&&QQ(o.shapePath,a,!0,r,n),o&&(t.shapePrimitives[t.shapePrimitives.length-1].holes=o.shapePath.shapePrimitives),QQ(t,a,e,r,n)}}}function Iye(e,t,n){let r=[],i=ZQ.rectangle,a=Nye;a.x=e.dx,a.y=e.dy,a.width=e.dw,a.height=e.dh;let o=e.transform;if(!i.build(a,r))return;let{vertices:s,uvs:c,indices:l}=n,u=l.length,d=s.length/2;o&&IQ(r,o),i.triangulate(r,s,2,d,l,u);let f=e.image,p=f.uvs;c.push(p.x0,p.y0,p.x1,p.y1,p.x3,p.y3,p.x2,p.y2);let m=ft.get(LQ);m.indexOffset=u,m.indexSize=l.length-u,m.attributeOffset=d,m.attributeSize=s.length/2-d,m.baseColor=e.style,m.alpha=e.alpha,m.texture=f,m.geometryData=n,t.push(m)}function QQ(e,t,n,r,i){let{vertices:a,uvs:o,indices:s}=i;e.shapePrimitives.forEach(({shape:e,transform:c,holes:l})=>{let u=[],d=ZQ[e.type];if(!d.build(e,u))return;let f=s.length,p=a.length/2,m=`triangle-list`;if(c&&IQ(u,c),n){let n=e.closePath??!0,r=t;r.pixelLine?(Tye(u,n,a,s),m=`line-list`):UQ(u,r,!1,n,a,s)}else if(l){let e=[],t=u.slice();Lye(l).forEach(n=>{e.push(t.length/2),t.push(...n)}),WQ(t,e,a,2,p,s,f)}else d.triangulate(u,a,2,p,s,f);let h=o.length/2,g=t.texture;if(g!==et.WHITE){let n=XQ(Pye,t,e,c);yye(a,2,p,o,h,2,a.length/2-p,n)}else bye(o,h,2,a.length/2-p);let _=ft.get(LQ);_.indexOffset=f,_.indexSize=s.length-f,_.attributeOffset=p,_.attributeSize=a.length/2-p,_.baseColor=t.color,_.alpha=t.alpha,_.texture=g,_.geometryData=i,_.topology=m,r.push(_)})}function Lye(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n].shape,i=[];ZQ[r.type].build(r,i)&&t.push(i)}return t}var Rye=class{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(e=>{ft.return(e)}),this.graphicsData&&ft.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}},zye=class{constructor(){this.instructions=new Kt}init(e){let t=e.maxTextures;this.batcher?this.batcher._updateMaxTextures(t):this.batcher=new vn({maxTextures:t}),this.instructions.reset()}get geometry(){return zt(yt,`GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead.`),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}},$Q=class e{constructor(e){this._renderer=e,this._managedContexts=new ln({renderer:e,type:`resource`,name:`graphicsContext`})}init(t){e.defaultOptions.bezierSmoothness=t?.bezierSmoothness??e.defaultOptions.bezierSmoothness}getContextRenderData(e){return e._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(e)}updateGpuContext(e){let t=!!e._gpuData[this._renderer.uid],n=e._gpuData[this._renderer.uid]||this._initContext(e);if(e.dirty||!t){t&&n.reset(),Fye(e,n);let r=e.batchMode;e.customShader||r===`no-batch`?n.isBatchable=!1:r===`auto`?n.isBatchable=n.geometryData.vertices.length<400:n.isBatchable=!0,e.dirty=!1}return n}getGpuContext(e){return e._gpuData[this._renderer.uid]||this._initContext(e)}_initContextRenderData(e){let t=ft.get(zye,{maxTextures:this._renderer.limits.maxBatchableTextures}),n=e._gpuData[this._renderer.uid],{batches:r,geometryData:i}=n;n.graphicsData=t;let a=i.vertices.length,o=i.indices.length;for(let e=0;e<r.length;e++)r[e].applyTransform=!1;let s=t.batcher;s.ensureAttributeBuffer(a),s.ensureIndexBuffer(o),s.begin();for(let e=0;e<r.length;e++){let t=r[e];s.add(t)}s.finish(t.instructions);let c=s.geometry;c.indexBuffer.setDataWithSize(s.indexBuffer,s.indexSize,!0),c.buffers[0].setDataWithSize(s.attributeBuffer.float32View,s.attributeSize,!0);let l=s.batches;for(let e=0;e<l.length;e++){let t=l[e];t.bindGroup=Dn(t.textures.textures,t.textures.count,this._renderer.limits.maxBatchableTextures)}return t}_initContext(e){let t=new Rye;return t.context=e,e._gpuData[this._renderer.uid]=t,this._managedContexts.add(e),t}destroy(){this._managedContexts.destroy(),this._renderer=null}};$Q.extension={type:[W.WebGLSystem,W.WebGPUSystem],name:`graphicsContext`},$Q.defaultOptions={bezierSmoothness:.5};var e$=$Q,Bye=8,t$=1.1920929e-7,Vye=1,n$=.01,r$=0,i$=0;function a$(e,t,n,r,i,a,o,s,c,l){let u=(Vye-Math.min(.99,Math.max(0,l??e$.defaultOptions.bezierSmoothness)))/1;return u*=u,Hye(t,n,r,i,a,o,s,c,e,u),e}function Hye(e,t,n,r,i,a,o,s,c,l){o$(e,t,n,r,i,a,o,s,c,l,0),c.push(o,s)}function o$(e,t,n,r,i,a,o,s,c,l,u){if(u>Bye)return;let d=Math.PI,f=(e+n)/2,p=(t+r)/2,m=(n+i)/2,h=(r+a)/2,g=(i+o)/2,_=(a+s)/2,v=(f+m)/2,y=(p+h)/2,b=(m+g)/2,x=(h+_)/2,S=(v+b)/2,C=(y+x)/2;if(u>0){let u=o-e,f=s-t,p=Math.abs((n-o)*f-(r-s)*u),m=Math.abs((i-o)*f-(a-s)*u),h,g;if(p>t$&&m>t$){if((p+m)*(p+m)<=l*(u*u+f*f)){if(r$<n$){c.push(S,C);return}let l=Math.atan2(a-r,i-n);if(h=Math.abs(l-Math.atan2(r-t,n-e)),g=Math.abs(Math.atan2(s-a,o-i)-l),h>=d&&(h=2*d-h),g>=d&&(g=2*d-g),h+g<r$){c.push(S,C);return}if(i$!==0){if(h>i$){c.push(n,r);return}if(g>i$){c.push(i,a);return}}}}else if(p>t$){if(p*p<=l*(u*u+f*f)){if(r$<n$){c.push(S,C);return}if(h=Math.abs(Math.atan2(a-r,i-n)-Math.atan2(r-t,n-e)),h>=d&&(h=2*d-h),h<r$){c.push(n,r),c.push(i,a);return}if(i$!==0&&h>i$){c.push(n,r);return}}}else if(m>t$){if(m*m<=l*(u*u+f*f)){if(r$<n$){c.push(S,C);return}if(h=Math.abs(Math.atan2(s-a,o-i)-Math.atan2(a-r,i-n)),h>=d&&(h=2*d-h),h<r$){c.push(n,r),c.push(i,a);return}if(i$!==0&&h>i$){c.push(i,a);return}}}else if(u=S-(e+o)/2,f=C-(t+s)/2,u*u+f*f<=l){c.push(S,C);return}}o$(e,t,f,p,v,y,S,C,c,l,u+1),o$(S,C,b,x,g,_,o,s,c,l,u+1)}var Uye=8,s$=1.1920929e-7,Wye=1,Gye=.01,c$=0;function Kye(e,t,n,r,i,a,o,s){let c=(Wye-Math.min(.99,Math.max(0,s??e$.defaultOptions.bezierSmoothness)))/1;return c*=c,qye(t,n,r,i,a,o,e,c),e}function qye(e,t,n,r,i,a,o,s){l$(o,e,t,n,r,i,a,s,0),o.push(i,a)}function l$(e,t,n,r,i,a,o,s,c){if(c>Uye)return;let l=Math.PI,u=(t+r)/2,d=(n+i)/2,f=(r+a)/2,p=(i+o)/2,m=(u+f)/2,h=(d+p)/2,g=a-t,_=o-n,v=Math.abs((r-a)*_-(i-o)*g);if(v>s$){if(v*v<=s*(g*g+_*_)){if(c$<Gye){e.push(m,h);return}let s=Math.abs(Math.atan2(o-i,a-r)-Math.atan2(i-n,r-t));if(s>=l&&(s=2*l-s),s<c$){e.push(m,h);return}}}else if(g=m-(t+a)/2,_=h-(n+o)/2,g*g+_*_<=s){e.push(m,h);return}l$(e,t,n,u,d,m,h,s,c+1),l$(e,m,h,f,p,a,o,s,c+1)}function u$(e,t,n,r,i,a,o,s){let c=Math.abs(i-a);(!o&&i>a||o&&a>i)&&(c=2*Math.PI-c),s||=Math.max(6,Math.floor(6*r**(1/3)*(c/Math.PI))),s=Math.max(s,3);let l=c/s,u=i;l*=o?-1:1;for(let i=0;i<s+1;i++){let i=Math.cos(u),a=Math.sin(u),o=t+i*r,s=n+a*r;e.push(o,s),u+=l}}function Jye(e,t,n,r,i,a){let o=e[e.length-2],s=e[e.length-1]-n,c=o-t,l=i-n,u=r-t,d=Math.abs(s*u-c*l);if(d<1e-8||a===0){(e[e.length-2]!==t||e[e.length-1]!==n)&&e.push(t,n);return}let f=s*s+c*c,p=l*l+u*u,m=s*l+c*u,h=a*Math.sqrt(f)/d,g=a*Math.sqrt(p)/d,_=h*m/f,v=g*m/p,y=h*u+g*c,b=h*l+g*s,x=c*(g+_),S=s*(g+_),C=u*(h+v),w=l*(h+v),T=Math.atan2(S-b,x-y),E=Math.atan2(w-b,C-y);u$(e,y+t,b+n,a,T,E,c*l>u*s)}var d$=Math.PI*2,f$={centerX:0,centerY:0,ang1:0,ang2:0},p$=({x:e,y:t},n,r,i,a,o,s,c)=>{e*=n,t*=r;let l=i*e-a*t,u=a*e+i*t;return c.x=l+o,c.y=u+s,c};function Yye(e,t){let n=t===-1.5707963267948966?-.551915024494:4/3*Math.tan(t/4),r=t===1.5707963267948966?.551915024494:n,i=Math.cos(e),a=Math.sin(e),o=Math.cos(e+t),s=Math.sin(e+t);return[{x:i-a*r,y:a+i*r},{x:o+s*r,y:s-o*r},{x:o,y:s}]}var m$=(e,t,n,r)=>{let i=e*r-t*n<0?-1:1,a=e*n+t*r;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)},Xye=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{let p=i**2,m=a**2,h=u**2,g=d**2,_=p*m-p*g-m*h;_<0&&(_=0),_/=p*g+m*h,_=Math.sqrt(_)*(o===s?-1:1);let v=_*i/a*d,y=_*-a/i*u,b=l*v-c*y+(e+n)/2,x=c*v+l*y+(t+r)/2,S=(u-v)/i,C=(d-y)/a,w=(-u-v)/i,T=(-d-y)/a,E=m$(1,0,S,C),D=m$(S,C,w,T);s===0&&D>0&&(D-=d$),s===1&&D<0&&(D+=d$),f.centerX=b,f.centerY=x,f.ang1=E,f.ang2=D};function Zye(e,t,n,r,i,a,o,s=0,c=0,l=0){if(a===0||o===0)return;let u=Math.sin(s*d$/360),d=Math.cos(s*d$/360),f=d*(t-r)/2+u*(n-i)/2,p=-u*(t-r)/2+d*(n-i)/2;if(f===0&&p===0)return;a=Math.abs(a),o=Math.abs(o);let m=f**2/a**2+p**2/o**2;m>1&&(a*=Math.sqrt(m),o*=Math.sqrt(m)),Xye(t,n,r,i,a,o,c,l,u,d,f,p,f$);let{ang1:h,ang2:g}=f$,{centerX:_,centerY:v}=f$,y=Math.abs(g)/(d$/4);Math.abs(1-y)<1e-7&&(y=1);let b=Math.max(Math.ceil(y),1);g/=b;let x=e[e.length-2],S=e[e.length-1],C={x:0,y:0};for(let t=0;t<b;t++){let t=Yye(h,g),{x:n,y:r}=p$(t[0],a,o,d,u,_,v,C),{x:i,y:s}=p$(t[1],a,o,d,u,_,v,C),{x:c,y:l}=p$(t[2],a,o,d,u,_,v,C);a$(e,x,S,n,r,i,s,c,l),x=c,S=l,h+=g}}function Qye(e,t,n){let r=(e,t)=>{let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return{len:i,nx:n/i,ny:r/i}},i=(t,n)=>{t===0?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)},a=t[t.length-1];for(let o=0;o<t.length;o++){let s=t[o%t.length],c=s.radius??n;if(c<=0){i(o,s),a=s;continue}let l=t[(o+1)%t.length],u=r(s,a),d=r(s,l);if(u.len<1e-4||d.len<1e-4){i(o,s),a=s;continue}let f=Math.asin(u.nx*d.ny-u.ny*d.nx),p=1,m=!1;u.nx*d.nx-u.ny*-d.ny<0?f<0?f=Math.PI+f:(f=Math.PI-f,p=-1,m=!0):f>0&&(p=-1,m=!0);let h=f/2,g,_=Math.abs(Math.cos(h)*c/Math.sin(h));_>Math.min(u.len/2,d.len/2)?(_=Math.min(u.len/2,d.len/2),g=Math.abs(_*Math.sin(h)/Math.cos(h))):g=c;let v=s.x+d.nx*_+-d.ny*g*p,y=s.y+d.ny*_+d.nx*g*p,b=Math.atan2(u.ny,u.nx)+Math.PI/2*p,x=Math.atan2(d.ny,d.nx)-Math.PI/2*p;o===0&&e.moveTo(v+Math.cos(b)*g,y+Math.sin(b)*g),e.arc(v,y,g,b,x,m),a=s}}function $ye(e,t,n,r){let i=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),a=(e,t,n)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),o=t.length;for(let s=0;s<o;s++){let c=t[(s+1)%o],l=c.radius??n;if(l<=0){s===0?e.moveTo(c.x,c.y):e.lineTo(c.x,c.y);continue}let u=t[s],d=t[(s+2)%o],f=i(u,c),p;p=f<1e-4?c:a(c,u,Math.min(f/2,l)/f);let m=i(d,c),h;h=m<1e-4?c:a(c,d,Math.min(m/2,l)/m),s===0?e.moveTo(p.x,p.y):e.lineTo(p.x,p.y),e.quadraticCurveTo(c.x,c.y,h.x,h.y,r)}}var ebe=new bt,tbe=class{constructor(e){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new mt,this._graphicsPath2D=e,this.signed=e.checkForHoles}moveTo(e,t){return this.startPoly(e,t),this}lineTo(e,t){this._ensurePoly();let n=this._currentPoly.points,r=n[n.length-2],i=n[n.length-1];return(r!==e||i!==t)&&n.push(e,t),this}arc(e,t,n,r,i,a){this._ensurePoly(!1);let o=this._currentPoly.points;return u$(o,e,t,n,r,i,a),this}arcTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly.points;return Jye(a,e,t,n,r,i),this}arcToSvg(e,t,n,r,i,a,o){let s=this._currentPoly.points;return Zye(s,this._currentPoly.lastX,this._currentPoly.lastY,a,o,e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,a,o){this._ensurePoly();let s=this._currentPoly;return a$(this._currentPoly.points,s.lastX,s.lastY,e,t,n,r,i,a,o),this}quadraticCurveTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly;return Kye(this._currentPoly.points,a.lastX,a.lastY,e,t,n,r,i),this}closePath(){return this.endPoly(!0),this}addPath(e,t){this.endPoly(),t&&!t.isIdentity()&&(e=e.clone(!0),e.transform(t));let n=this.shapePrimitives,r=n.length;for(let t=0;t<e.instructions.length;t++){let n=e.instructions[t];this[n.action](...n.data)}if(e.checkForHoles&&n.length-r>1){let e=null;for(let t=r;t<n.length;t++){let r=n[t];if(r.shape.type===`polygon`){let i=r.shape,a=e?.shape;a&&a.containsPolygon(i)?(e.holes||=[],e.holes.push(r),n.copyWithin(t,t+1),n.length--,t--):e=r}}}return this}finish(e=!1){this.endPoly(e)}rect(e,t,n,r,i){return this.drawShape(new bt(e,t,n,r),i),this}circle(e,t,n,r){return this.drawShape(new pye(e,t,n),r),this}poly(e,t,n){let r=new PQ(e);return r.closePath=t,this.drawShape(r,n),this}regularPoly(e,t,n,r,i=0,a){r=Math.max(r|0,3);let o=-1*Math.PI/2+i,s=Math.PI*2/r,c=[];for(let i=0;i<r;i++){let r=o-i*s;c.push(e+n*Math.cos(r),t+n*Math.sin(r))}return this.poly(c,!0,a),this}roundPoly(e,t,n,r,i,a=0,o){if(r=Math.max(r|0,3),i<=0)return this.regularPoly(e,t,n,r,a);let s=n*Math.sin(Math.PI/r)-.001;i=Math.min(i,s);let c=-1*Math.PI/2+a,l=Math.PI*2/r,u=(r-2)*Math.PI/r/2;for(let a=0;a<r;a++){let r=a*l+c,s=e+n*Math.cos(r),d=t+n*Math.sin(r),f=r+Math.PI+u,p=r-Math.PI-u,m=s+i*Math.cos(f),h=d+i*Math.sin(f),g=s+i*Math.cos(p),_=d+i*Math.sin(p);a===0?this.moveTo(m,h):this.lineTo(m,h),this.quadraticCurveTo(s,d,g,_,o)}return this.closePath()}roundShape(e,t,n=!1,r){return e.length<3?this:(n?$ye(this,e,t,r):Qye(this,e,t),this.closePath())}filletRect(e,t,n,r,i){if(i===0)return this.rect(e,t,n,r);let a=Math.min(n,r)/2,o=Math.min(a,Math.max(-a,i)),s=e+n,c=t+r,l=o<0?-o:0,u=Math.abs(o);return this.moveTo(e,t+u).arcTo(e+l,t+l,e+u,t,u).lineTo(s-u,t).arcTo(s-l,t+l,s,t+u,u).lineTo(s,c-u).arcTo(s-l,c-l,e+n-u,c,u).lineTo(e+u,c).arcTo(e+l,c-l,e,c-u,u).closePath()}chamferRect(e,t,n,r,i,a){if(i<=0)return this.rect(e,t,n,r);let o=Math.min(i,Math.min(n,r)/2),s=e+n,c=t+r,l=[e+o,t,s-o,t,s,t+o,s,c-o,s-o,c,e+o,c,e,c-o,e,t+o];for(let e=l.length-1;e>=2;e-=2)l[e]===l[e-2]&&l[e-1]===l[e-3]&&l.splice(e-1,2);return this.poly(l,!0,a)}ellipse(e,t,n,r,i){return this.drawShape(new mye(e,t,n,r),i),this}roundRect(e,t,n,r,i,a){return this.drawShape(new vye(e,t,n,r,i),a),this}drawShape(e,t){return this.endPoly(),this.shapePrimitives.push({shape:e,transform:t}),this}startPoly(e,t){let n=this._currentPoly;return n&&this.endPoly(),n=new PQ,n.points.push(e,t),this._currentPoly=n,this}endPoly(e=!1){let t=this._currentPoly;return t&&t.points.length>2&&(t.closePath=e,this.shapePrimitives.push({shape:t})),this._currentPoly=null,this}_ensurePoly(e=!0){if(!this._currentPoly&&(this._currentPoly=new PQ,e)){let e=this.shapePrimitives[this.shapePrimitives.length-1];if(e){let t=e.shape.x,n=e.shape.y;if(e.transform&&!e.transform.isIdentity()){let r=e.transform,i=t;t=r.a*t+r.c*n+r.tx,n=r.b*i+r.d*n+r.ty}this._currentPoly.points.push(t,n)}else this._currentPoly.points.push(0,0)}}buildPath(){let e=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let t=0;t<e.instructions.length;t++){let n=e.instructions[t];this[n.action](...n.data)}this.finish()}get bounds(){let e=this._bounds;e.clear();let t=this.shapePrimitives;for(let n=0;n<t.length;n++){let r=t[n],i=r.shape.getBounds(ebe);r.transform?e.addRect(i,r.transform):e.addRect(i)}return e}},h$=class e{constructor(e,t=!1){this.instructions=[],this.uid=vt(`graphicsPath`),this._dirty=!0,this.checkForHoles=t,typeof e==`string`?fye(e,this):this.instructions=e?.slice()??[]}get shapePath(){return this._shapePath||=new tbe(this),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(e,t){return e=e.clone(),this.instructions.push({action:`addPath`,data:[e,t]}),this._dirty=!0,this}arc(...e){return this.instructions.push({action:`arc`,data:e}),this._dirty=!0,this}arcTo(...e){return this.instructions.push({action:`arcTo`,data:e}),this._dirty=!0,this}arcToSvg(...e){return this.instructions.push({action:`arcToSvg`,data:e}),this._dirty=!0,this}bezierCurveTo(...e){return this.instructions.push({action:`bezierCurveTo`,data:e}),this._dirty=!0,this}bezierCurveToShort(e,t,n,r,i){let a=this.instructions[this.instructions.length-1],o=this.getLastPoint(Et.shared),s=0,c=0;if(!a||a.action!==`bezierCurveTo`)s=o.x,c=o.y;else{s=a.data[2],c=a.data[3];let e=o.x,t=o.y;s=e+(e-s),c=t+(t-c)}return this.instructions.push({action:`bezierCurveTo`,data:[s,c,e,t,n,r,i]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:`closePath`,data:[]}),this._dirty=!0,this}ellipse(...e){return this.instructions.push({action:`ellipse`,data:e}),this._dirty=!0,this}lineTo(...e){return this.instructions.push({action:`lineTo`,data:e}),this._dirty=!0,this}moveTo(...e){return this.instructions.push({action:`moveTo`,data:e}),this}quadraticCurveTo(...e){return this.instructions.push({action:`quadraticCurveTo`,data:e}),this._dirty=!0,this}quadraticCurveToShort(e,t,n){let r=this.instructions[this.instructions.length-1],i=this.getLastPoint(Et.shared),a=0,o=0;if(!r||r.action!==`quadraticCurveTo`)a=i.x,o=i.y;else{a=r.data[0],o=r.data[1];let e=i.x,t=i.y;a=e+(e-a),o=t+(t-o)}return this.instructions.push({action:`quadraticCurveTo`,data:[a,o,e,t,n]}),this._dirty=!0,this}rect(e,t,n,r,i){return this.instructions.push({action:`rect`,data:[e,t,n,r,i]}),this._dirty=!0,this}circle(e,t,n,r){return this.instructions.push({action:`circle`,data:[e,t,n,r]}),this._dirty=!0,this}roundRect(...e){return this.instructions.push({action:`roundRect`,data:e}),this._dirty=!0,this}poly(...e){return this.instructions.push({action:`poly`,data:e}),this._dirty=!0,this}regularPoly(...e){return this.instructions.push({action:`regularPoly`,data:e}),this._dirty=!0,this}roundPoly(...e){return this.instructions.push({action:`roundPoly`,data:e}),this._dirty=!0,this}roundShape(...e){return this.instructions.push({action:`roundShape`,data:e}),this._dirty=!0,this}filletRect(...e){return this.instructions.push({action:`filletRect`,data:e}),this._dirty=!0,this}chamferRect(...e){return this.instructions.push({action:`chamferRect`,data:e}),this._dirty=!0,this}star(e,t,n,r,i,a,o){i||=r/2;let s=-1*Math.PI/2+a,c=n*2,l=Math.PI*2/c,u=[];for(let n=0;n<c;n++){let a=n%2?i:r,o=n*l+s;u.push(e+a*Math.cos(o),t+a*Math.sin(o))}return this.poly(u,!0,o),this}clone(t=!1){let n=new e;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let e=0;e<this.instructions.length;e++){let t=this.instructions[e];n.instructions.push({action:t.action,data:t.data.slice()})}return n}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(e){if(e.isIdentity())return this;let t=e.a,n=e.b,r=e.c,i=e.d,a=e.tx,o=e.ty,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0;for(let h=0;h<this.instructions.length;h++){let g=this.instructions[h],_=g.data;switch(g.action){case`moveTo`:case`lineTo`:s=_[0],c=_[1],_[0]=t*s+r*c+a,_[1]=n*s+i*c+o;break;case`bezierCurveTo`:l=_[0],u=_[1],d=_[2],f=_[3],s=_[4],c=_[5],_[0]=t*l+r*u+a,_[1]=n*l+i*u+o,_[2]=t*d+r*f+a,_[3]=n*d+i*f+o,_[4]=t*s+r*c+a,_[5]=n*s+i*c+o;break;case`quadraticCurveTo`:l=_[0],u=_[1],s=_[2],c=_[3],_[0]=t*l+r*u+a,_[1]=n*l+i*u+o,_[2]=t*s+r*c+a,_[3]=n*s+i*c+o;break;case`arcToSvg`:s=_[5],c=_[6],p=_[0],m=_[1],_[0]=t*p+r*m,_[1]=n*p+i*m,_[5]=t*s+r*c+a,_[6]=n*s+i*c+o;break;case`circle`:_[4]=g$(_[3],e);break;case`rect`:_[4]=g$(_[4],e);break;case`ellipse`:_[8]=g$(_[8],e);break;case`roundRect`:_[5]=g$(_[5],e);break;case`addPath`:_[0].transform(e);break;case`poly`:_[2]=g$(_[2],e);break;default:ot(`unknown transform action`,g.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(e){let t=this.instructions.length-1,n=this.instructions[t];if(!n)return e.x=0,e.y=0,e;for(;n.action===`closePath`;){if(t--,t<0)return e.x=0,e.y=0,e;n=this.instructions[t]}switch(n.action){case`moveTo`:case`lineTo`:e.x=n.data[0],e.y=n.data[1];break;case`quadraticCurveTo`:e.x=n.data[2],e.y=n.data[3];break;case`bezierCurveTo`:e.x=n.data[4],e.y=n.data[5];break;case`arc`:case`arcToSvg`:e.x=n.data[5],e.y=n.data[6];break;case`addPath`:n.data[0].getLastPoint(e);break}return e}};function g$(e,t){return e?e.prepend(t):t.clone()}function _$(e,t,n){let r=e.getAttribute(t);return r?Number(r):n}function nbe(e,t){let n=e.querySelectorAll(`defs`);for(let e=0;e<n.length;e++){let r=n[e];for(let e=0;e<r.children.length;e++){let n=r.children[e];switch(n.nodeName.toLowerCase()){case`lineargradient`:t.defs[n.id]=rbe(n);break;case`radialgradient`:t.defs[n.id]=ibe(n);break;default:break}}}}function rbe(e){let t=new qQ(_$(e,`x1`,0),_$(e,`y1`,0),_$(e,`x2`,1),_$(e,`y2`,0),(e.getAttribute(`gradientUnits`)||`objectBoundingBox`)===`objectBoundingBox`?`local`:`global`);for(let n=0;n<e.children.length;n++){let r=e.children[n],i=_$(r,`offset`,0),a=lt.shared.setValue(r.getAttribute(`stop-color`)).toNumber();t.addColorStop(i,a)}return t}function ibe(e){return ot(`[SVG Parser] Radial gradients are not yet supported`),new qQ(0,0,1,0)}function v$(e){let t=e.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:``}var y$={fill:{type:`paint`,default:0},"fill-opacity":{type:`number`,default:1},stroke:{type:`paint`,default:0},"stroke-width":{type:`number`,default:1},"stroke-opacity":{type:`number`,default:1},"stroke-linecap":{type:`string`,default:`butt`},"stroke-linejoin":{type:`string`,default:`miter`},"stroke-miterlimit":{type:`number`,default:10},"stroke-dasharray":{type:`string`,default:`none`},"stroke-dashoffset":{type:`number`,default:0},opacity:{type:`number`,default:1}};function b$(e,t){let n=e.getAttribute(`style`),r={},i={},a={strokeStyle:r,fillStyle:i,useFill:!1,useStroke:!1};for(let n in y$){let r=e.getAttribute(n);r&&x$(t,a,n,r.trim())}if(n){let e=n.split(`;`);for(let n=0;n<e.length;n++){let[r,i]=e[n].trim().split(`:`);y$[r]&&x$(t,a,r,i.trim())}}return{strokeStyle:a.useStroke?r:null,fillStyle:a.useFill?i:null,useFill:a.useFill,useStroke:a.useStroke}}function x$(e,t,n,r){switch(n){case`stroke`:if(r!==`none`){if(r.startsWith(`url(`)){let n=v$(r);t.strokeStyle.fill=e.defs[n]}else t.strokeStyle.color=lt.shared.setValue(r).toNumber();t.useStroke=!0}break;case`stroke-width`:t.strokeStyle.width=Number(r);break;case`fill`:if(r!==`none`){if(r.startsWith(`url(`)){let n=v$(r);t.fillStyle.fill=e.defs[n]}else t.fillStyle.color=lt.shared.setValue(r).toNumber();t.useFill=!0}break;case`fill-opacity`:t.fillStyle.alpha=Number(r);break;case`stroke-opacity`:t.strokeStyle.alpha=Number(r);break;case`opacity`:t.fillStyle.alpha=Number(r),t.strokeStyle.alpha=Number(r);break}}function abe(e){if(e.length<=2)return!0;let t=e.map(e=>e.area).sort((e,t)=>t-e),[n,r]=t,i=t[t.length-1],a=n/r,o=r/i;return!(a>3&&o<2)}function obe(e){return e.split(/(?=[Mm])/).filter(e=>e.trim().length>0)}function sbe(e){let t=e.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;let n=t.map(Number),r=[],i=[];for(let e=0;e<n.length;e+=2)e+1<n.length&&(r.push(n[e]),i.push(n[e+1]));if(r.length===0||i.length===0)return 0;let a=Math.min(...r),o=Math.max(...r),s=Math.min(...i),c=Math.max(...i);return(o-a)*(c-s)}function S$(e,t){let n=new h$(e,!1);for(let e of n.instructions)t.instructions.push(e)}function cbe(e,t){if(typeof e==`string`){let t=document.createElement(`div`);t.innerHTML=e.trim(),e=t.querySelector(`svg`)}let n={context:t,defs:{},path:new h$};nbe(e,n);let r=e.children,{fillStyle:i,strokeStyle:a}=b$(e,n);for(let e=0;e<r.length;e++){let t=r[e];t.nodeName.toLowerCase()!==`defs`&&C$(t,n,i,a)}return t}function C$(e,t,n,r){let i=e.children,{fillStyle:a,strokeStyle:o}=b$(e,t);a&&n?n={...n,...a}:a&&(n=a),o&&r?r={...r,...o}:o&&(r=o);let s=!n&&!r;s&&(n={color:0});let c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;switch(e.nodeName.toLowerCase()){case`path`:{x=e.getAttribute(`d`);let i=e.getAttribute(`fill-rule`),a=obe(x),o=i===`evenodd`,s=a.length>1;if(o&&s){let e=a.map(e=>({path:e,area:sbe(e)}));if(e.sort((e,t)=>t.area-e.area),a.length>3||!abe(e))for(let i=0;i<e.length;i++){let a=e[i],o=i===0;t.context.beginPath();let s=new h$(void 0,!0);S$(a.path,s),t.context.path(s),o?(n&&t.context.fill(n),r&&t.context.stroke(r)):t.context.cut()}else for(let i=0;i<e.length;i++){let a=e[i],o=i%2==1;t.context.beginPath();let s=new h$(void 0,!0);S$(a.path,s),t.context.path(s),o?t.context.cut():(n&&t.context.fill(n),r&&t.context.stroke(r))}}else S=new h$(x,i?i===`evenodd`:!0),t.context.path(S),n&&t.context.fill(n),r&&t.context.stroke(r);break}case`circle`:m=_$(e,`cx`,0),h=_$(e,`cy`,0),g=_$(e,`r`,0),t.context.ellipse(m,h,g,g),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`rect`:c=_$(e,`x`,0),l=_$(e,`y`,0),C=_$(e,`width`,0),w=_$(e,`height`,0),_=_$(e,`rx`,0),v=_$(e,`ry`,0),_||v?t.context.roundRect(c,l,C,w,_||v):t.context.rect(c,l,C,w),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`ellipse`:m=_$(e,`cx`,0),h=_$(e,`cy`,0),_=_$(e,`rx`,0),v=_$(e,`ry`,0),t.context.beginPath(),t.context.ellipse(m,h,_,v),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`line`:u=_$(e,`x1`,0),d=_$(e,`y1`,0),f=_$(e,`x2`,0),p=_$(e,`y2`,0),t.context.beginPath(),t.context.moveTo(u,d),t.context.lineTo(f,p),r&&t.context.stroke(r);break;case`polygon`:b=e.getAttribute(`points`),y=b.match(/-?\d+/g).map(e=>parseInt(e,10)),t.context.poly(y,!0),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`polyline`:b=e.getAttribute(`points`),y=b.match(/-?\d+/g).map(e=>parseInt(e,10)),t.context.poly(y,!1),r&&t.context.stroke(r);break;case`g`:case`svg`:break;default:ot(`[SVG parser] <${e.nodeName}> elements unsupported`);break}s&&(n=null);for(let e=0;e<i.length;e++)C$(i[e],t,n,r)}var w$={repeat:{addressModeU:`repeat`,addressModeV:`repeat`},"repeat-x":{addressModeU:`repeat`,addressModeV:`clamp-to-edge`},"repeat-y":{addressModeU:`clamp-to-edge`,addressModeV:`repeat`},"no-repeat":{addressModeU:`clamp-to-edge`,addressModeV:`clamp-to-edge`}},T$=class{constructor(e,t){this.uid=vt(`fillPattern`),this._tick=0,this.transform=new Qe,this.texture=e,this.transform.scale(1/e.frame.width,1/e.frame.height),t&&(e.source.style.addressModeU=w$[t].addressModeU,e.source.style.addressModeV=w$[t].addressModeV)}setTransform(e){let t=this.texture;this.transform.copyFrom(e),this.transform.invert(),this.transform.scale(1/t.frame.width,1/t.frame.height),this._tick++}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture=e,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}};function lbe(e){return lt.isColorLike(e)}function E$(e){return e instanceof T$}function D$(e){return e instanceof qQ}function ube(e){return e instanceof et}function dbe(e,t,n){let r=lt.shared.setValue(t??0);return e.color=r.toNumber(),e.alpha=r.alpha===1?n.alpha:r.alpha,e.texture=et.WHITE,{...n,...e}}function fbe(e,t,n){return e.texture=t,{...n,...e}}function O$(e,t,n){return e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,{...n,...e}}function k$(e,t,n){return t.buildGradient(),e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,e.textureSpace=t.textureSpace,{...n,...e}}function pbe(e,t){let n={...t,...e},r=lt.shared.setValue(n.color);return n.alpha*=r.alpha,n.color=r.toNumber(),n}function A$(e,t){if(e==null)return null;let n={},r=e;return lbe(e)?dbe(n,e,t):ube(e)?fbe(n,e,t):E$(e)?O$(n,e,t):D$(e)?k$(n,e,t):r.fill&&E$(r.fill)?O$(r,r.fill,t):r.fill&&D$(r.fill)?k$(r,r.fill,t):pbe(r,t)}function j$(e,t){let{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...c}=t,l=A$(e,c);return l?{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...l}:null}var mbe=new Et,M$=new Qe,N$=class e extends Ut{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=vt(`graphicsContext`),this.dirty=!0,this.batchMode=`auto`,this.instructions=[],this.destroyed=!1,this._activePath=new h$,this._transform=new Qe,this._fillStyle={...e.defaultFillStyle},this._strokeStyle={...e.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new mt,this._boundsDirty=!0}clone(){let t=new e;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=A$(t,e.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=j$(t,e.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=A$(t,e.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=A$(t,e.defaultStrokeStyle),this}texture(e,t,n,r,i,a){return this.instructions.push({action:`texture`,data:{image:e,dx:n||0,dy:r||0,dw:i||e.frame.width,dh:a||e.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:t||t===0?lt.shared.setValue(t).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new h$,this}fill(t,n){let r,i=this.instructions[this.instructions.length-1];return r=this._tick===0&&i?.action===`stroke`?i.data.path:this._activePath.clone(),r?(t!=null&&(n!==void 0&&typeof t==`number`&&(zt(st,`GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead`),t={color:t,alpha:n}),this._fillStyle=A$(t,e.defaultFillStyle)),this.instructions.push({action:`fill`,data:{style:this.fillStyle,path:r}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){let{x:e,y:t}=this._activePath.getLastPoint(Et.shared);this._activePath.clear(),this._activePath.moveTo(e,t)}stroke(t){let n,r=this.instructions[this.instructions.length-1];return n=this._tick===0&&r?.action===`fill`?r.data.path:this._activePath.clone(),n?(t!=null&&(this._strokeStyle=j$(t,e.defaultStrokeStyle)),this.instructions.push({action:`stroke`,data:{style:this.strokeStyle,path:n}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let e=0;e<2;e++){let t=this.instructions[this.instructions.length-1-e],n=this._activePath.clone();if(t&&(t.action===`stroke`||t.action===`fill`))if(t.data.hole)t.data.hole.addPath(n);else{t.data.hole=n;break}}return this._initNextPathLocation(),this}arc(e,t,n,r,i,a){this._tick++;let o=this._transform;return this._activePath.arc(o.a*e+o.c*t+o.tx,o.b*e+o.d*t+o.ty,n,r,i,a),this}arcTo(e,t,n,r,i){this._tick++;let a=this._transform;return this._activePath.arcTo(a.a*e+a.c*t+a.tx,a.b*e+a.d*t+a.ty,a.a*n+a.c*r+a.tx,a.b*n+a.d*r+a.ty,i),this}arcToSvg(e,t,n,r,i,a,o){this._tick++;let s=this._transform;return this._activePath.arcToSvg(e,t,n,r,i,s.a*a+s.c*o+s.tx,s.b*a+s.d*o+s.ty),this}bezierCurveTo(e,t,n,r,i,a,o){this._tick++;let s=this._transform;return this._activePath.bezierCurveTo(s.a*e+s.c*t+s.tx,s.b*e+s.d*t+s.ty,s.a*n+s.c*r+s.tx,s.b*n+s.d*r+s.ty,s.a*i+s.c*a+s.tx,s.b*i+s.d*a+s.ty,o),this}closePath(){return this._tick++,this._activePath?.closePath(),this}ellipse(e,t,n,r){return this._tick++,this._activePath.ellipse(e,t,n,r,this._transform.clone()),this}circle(e,t,n){return this._tick++,this._activePath.circle(e,t,n,this._transform.clone()),this}path(e){return this._tick++,this._activePath.addPath(e,this._transform.clone()),this}lineTo(e,t){this._tick++;let n=this._transform;return this._activePath.lineTo(n.a*e+n.c*t+n.tx,n.b*e+n.d*t+n.ty),this}moveTo(e,t){this._tick++;let n=this._transform,r=this._activePath.instructions,i=n.a*e+n.c*t+n.tx,a=n.b*e+n.d*t+n.ty;return r.length===1&&r[0].action===`moveTo`?(r[0].data[0]=i,r[0].data[1]=a,this):(this._activePath.moveTo(i,a),this)}quadraticCurveTo(e,t,n,r,i){this._tick++;let a=this._transform;return this._activePath.quadraticCurveTo(a.a*e+a.c*t+a.tx,a.b*e+a.d*t+a.ty,a.a*n+a.c*r+a.tx,a.b*n+a.d*r+a.ty,i),this}rect(e,t,n,r){return this._tick++,this._activePath.rect(e,t,n,r,this._transform.clone()),this}roundRect(e,t,n,r,i){return this._tick++,this._activePath.roundRect(e,t,n,r,i,this._transform.clone()),this}poly(e,t){return this._tick++,this._activePath.poly(e,t,this._transform.clone()),this}regularPoly(e,t,n,r,i=0,a){return this._tick++,this._activePath.regularPoly(e,t,n,r,i,a),this}roundPoly(e,t,n,r,i,a){return this._tick++,this._activePath.roundPoly(e,t,n,r,i,a),this}roundShape(e,t,n,r){return this._tick++,this._activePath.roundShape(e,t,n,r),this}filletRect(e,t,n,r,i){return this._tick++,this._activePath.filletRect(e,t,n,r,i),this}chamferRect(e,t,n,r,i,a){return this._tick++,this._activePath.chamferRect(e,t,n,r,i,a),this}star(e,t,n,r,i=0,a=0){return this._tick++,this._activePath.star(e,t,n,r,i,a,this._transform.clone()),this}svg(e){return this._tick++,cbe(e,this),this}restore(){let e=this._stateStack.pop();return e&&(this._transform=e.transform,this._fillStyle=e.fillStyle,this._strokeStyle=e.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(e){return this._transform.rotate(e),this}scale(e,t=e){return this._transform.scale(e,t),this}setTransform(e,t,n,r,i,a){return e instanceof Qe?(this._transform.set(e.a,e.b,e.c,e.d,e.tx,e.ty),this):(this._transform.set(e,t,n,r,i,a),this)}transform(e,t,n,r,i,a){return e instanceof Qe?(this._transform.append(e),this):(M$.set(e,t,n,r,i,a),this._transform.append(M$),this)}translate(e,t=e){return this._transform.translate(e,t),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,!this.dirty&&(this.emit(`update`,this,16),this.dirty=!0)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;let e=this._bounds;e.clear();for(let t=0;t<this.instructions.length;t++){let n=this.instructions[t],r=n.action;if(r===`fill`){let t=n.data;e.addBounds(t.path.bounds)}else if(r===`texture`){let t=n.data;e.addFrame(t.dx,t.dy,t.dx+t.dw,t.dy+t.dh,t.transform)}if(r===`stroke`){let t=n.data,r=t.style.alignment,i=t.style.width*(1-r),a=t.path.bounds;e.addFrame(a.minX-i,a.minY-i,a.maxX+i,a.maxY+i)}}return e}containsPoint(e){if(!this.bounds.containsPoint(e.x,e.y))return!1;let t=this.instructions,n=!1;for(let r=0;r<t.length;r++){let i=t[r],a=i.data,o=a.path;if(!i.action||!o)continue;let s=a.style,c=o.shapePath.shapePrimitives;for(let t=0;t<c.length;t++){let r=c[t].shape;if(!s||!r)continue;let o=c[t].transform,l=o?o.applyInverse(e,mbe):e;if(i.action===`fill`)n=r.contains(l.x,l.y);else{let e=s;n=r.strokeContains(l.x,l.y,e.width,e.alignment)}let u=a.hole;if(u){let e=u.shapePath?.shapePrimitives;if(e)for(let t=0;t<e.length;t++)e[t].shape.contains(l.x,l.y)&&(n=!1)}if(n)return!0}}return n}unload(){this.emit(`unload`,this);for(let e in this._gpuData)this._gpuData[e]?.destroy();this._gpuData=Object.create(null)}destroy(e=!1){if(!this.destroyed){if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit(`destroy`,this),this.removeAllListeners(),typeof e==`boolean`?e:e?.texture){let t=typeof e==`boolean`?e:e?.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&`uid`in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(t)),this._strokeStyle.texture&&(this._strokeStyle.fill&&`uid`in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(t))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}}};N$.defaultFillStyle={color:16777215,alpha:1,texture:et.WHITE,matrix:null,fill:null,textureSpace:`local`},N$.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:`butt`,join:`miter`,texture:et.WHITE,matrix:null,fill:null,textureSpace:`local`,pixelLine:!1};var P$=N$,F$=new class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this._tickerAdded||!this.domElement||(kt.system.add(this._tickerUpdate,this,Ot.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&=(kt.system.remove(this._tickerUpdate,this),!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}let e=this.events._rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType===`touch`||globalThis.document.dispatchEvent(this.events.supportsPointerEvents?new PointerEvent(`pointermove`,{clientX:e.clientX,clientY:e.clientY,pointerType:e.pointerType,pointerId:e.pointerId}):new MouseEvent(`mousemove`,{clientX:e.clientX,clientY:e.clientY}))}_tickerUpdate(e){this._deltaTime+=e.deltaTime,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this._update())}destroy(){this.removeTickerListener(),this.events=null,this.domElement=null,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}},I$=class extends aQ{constructor(){super(...arguments),this.client=new Et,this.movement=new Et,this.offset=new Et,this.global=new Et,this.screen=new Et}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,n){return e.worldTransform.applyInverse(n||this.global,t)}getModifierState(e){return`getModifierState`in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){throw Error(`Method not implemented.`)}},L$=class extends I${constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type===`pointermove`||this.type===`mousemove`||this.type===`touchmove`?[this]:[]}getPredictedEvents(){throw Error(`getPredictedEvents is not supported!`)}},R$=class extends I${constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};R$.DOM_DELTA_PIXEL=0,R$.DOM_DELTA_LINE=1,R$.DOM_DELTA_PAGE=2;var hbe=2048,gbe=new Et,z$=new Et,_be=class{constructor(e){this.dispatch=new Ut,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping(`pointerdown`,this.mapPointerDown),this.addEventMapping(`pointermove`,this.mapPointerMove),this.addEventMapping(`pointerout`,this.mapPointerOut),this.addEventMapping(`pointerleave`,this.mapPointerOut),this.addEventMapping(`pointerover`,this.mapPointerOver),this.addEventMapping(`pointerup`,this.mapPointerUp),this.addEventMapping(`pointerupoutside`,this.mapPointerUpOutside),this.addEventMapping(`wheel`,this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((e,t)=>e.priority-t.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;let t=this.mappingTable[e.type];if(t)for(let n=0,r=t.length;n<r;n++)t[n].fn(e);else ot(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){F$.pauseUpdate=!0;let n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?`hitTestMoveRecursive`:`hitTestRecursive`,r=this[n](this.rootTarget,this.rootTarget.eventMode,gbe.set(e,t),this.hitTestFn,this.hitPruneFn);return r&&r[0]}propagate(e,t){if(!e.target)return;let n=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let r=0,i=n.length-1;r<i;r++)if(e.currentTarget=n[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let r=n.length-2;r>=0;r--)if(e.currentTarget=n[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,n=this._allInteractiveElements){if(n.length===0)return;e.eventPhase=e.BUBBLING_PHASE;let r=Array.isArray(t)?t:[t];for(let t=n.length-1;t>=0;t--)r.forEach(r=>{e.currentTarget=n[t],this.notifyTarget(e,r)})}propagationPath(e){let t=[e];for(let n=0;n<hbe&&e!==this.rootTarget&&e.parent;n++){if(!e.parent)throw Error(`Cannot find propagation path to disconnected target`);t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,n,r,i,a=!1){let o=!1;if(this._interactivePrune(e))return null;if((e.eventMode===`dynamic`||t===`dynamic`)&&(F$.pauseUpdate=!1),e.interactiveChildren&&e.children){let s=e.children;for(let c=s.length-1;c>=0;c--){let l=s[c],u=this.hitTestMoveRecursive(l,this._isInteractive(t)?t:l.eventMode,n,r,i,a||i(e,n));if(u){if(u.length>0&&!u[u.length-1].parent)continue;let t=e.isInteractive();(u.length>0||t)&&(t&&this._allInteractiveElements.push(e),u.push(e)),this._hitElements.length===0&&(this._hitElements=u),o=!0}}}let s=this._isInteractive(t),c=e.isInteractive();return c&&c&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:s&&!i(e,n)&&r(e,n)?c?[e]:[]:null}hitTestRecursive(e,t,n,r,i){if(this._interactivePrune(e)||i(e,n))return null;if((e.eventMode===`dynamic`||t===`dynamic`)&&(F$.pauseUpdate=!1),e.interactiveChildren&&e.children){let a=e.children,o=n;for(let n=a.length-1;n>=0;n--){let s=a[n],c=this.hitTestRecursive(s,this._isInteractive(t)?t:s.eventMode,o,r,i);if(c){if(c.length>0&&!c[c.length-1].parent)continue;let t=e.isInteractive();return(c.length>0||t)&&c.push(e),c}}}let a=this._isInteractive(t),o=e.isInteractive();return a&&r(e,n)?o?[e]:[]:null}_isInteractive(e){return e===`static`||e===`dynamic`}_interactivePrune(e){return!e||!e.visible||!e.renderable||!e.measurable||e.eventMode===`none`||e.eventMode===`passive`&&!e.interactiveChildren}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,z$),!e.hitArea.contains(z$.x,z$.y)))return!0;if(e.effects&&e.effects.length)for(let n=0;n<e.effects.length;n++){let r=e.effects[n];if(r.containsPoint&&!r.containsPoint(t,this.hitTestFn))return!0}return!1}hitTestFn(e,t){return e.hitArea?!0:e?.containsPoint?(e.worldTransform.applyInverse(t,z$),e.containsPoint(z$)):!1}notifyTarget(e,t){if(!e.currentTarget.isInteractive())return;t??=e.type;let n=`on${t}`;e.currentTarget[n]?.(e);let r=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this._notifyListeners(e,r),e.eventPhase===e.AT_TARGET&&this._notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.createPointerEvent(e);if(this.dispatchEvent(t,`pointerdown`),t.pointerType===`touch`)this.dispatchEvent(t,`touchstart`);else if(t.pointerType===`mouse`||t.pointerType===`pen`){let e=t.button===2;this.dispatchEvent(t,e?`rightdown`:`mousedown`)}let n=this.trackingData(e.pointerId);n.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;let t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;let n=t.pointerType===`mouse`||t.pointerType===`pen`,r=this.trackingData(e.pointerId),i=this.findMountedTarget(r.overTargets);if(r.overTargets?.length>0&&i!==t.target){let r=e.type===`mousemove`?`mouseout`:`pointerout`,a=this.createPointerEvent(e,r,i);if(this.dispatchEvent(a,`pointerout`),n&&this.dispatchEvent(a,`mouseout`),!t.composedPath().includes(i)){let r=this.createPointerEvent(e,`pointerleave`,i);for(r.eventPhase=r.AT_TARGET;r.target&&!t.composedPath().includes(r.target);)r.currentTarget=r.target,this.notifyTarget(r),n&&this.notifyTarget(r,`mouseleave`),r.target=r.target.parent;this.freeEvent(r)}this.freeEvent(a)}if(i!==t.target){let r=e.type===`mousemove`?`mouseover`:`pointerover`,a=this.clonePointerEvent(t,r);this.dispatchEvent(a,`pointerover`),n&&this.dispatchEvent(a,`mouseover`);let o=i?.parent;for(;o&&o!==this.rootTarget.parent&&o!==t.target;)o=o.parent;if(!o||o===this.rootTarget.parent){let e=this.clonePointerEvent(t,`pointerenter`);for(e.eventPhase=e.AT_TARGET;e.target&&e.target!==i&&e.target!==this.rootTarget.parent;)e.currentTarget=e.target,this.notifyTarget(e),n&&this.notifyTarget(e,`mouseenter`),e.target=e.target.parent;this.freeEvent(e)}this.freeEvent(a)}let a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push(`pointermove`):this.dispatchEvent(t,`pointermove`),o&&a.push(`globalpointermove`),t.pointerType===`touch`&&(this.moveOnAll?a.splice(1,0,`touchmove`):this.dispatchEvent(t,`touchmove`),o&&a.push(`globaltouchmove`)),n&&(this.moveOnAll?a.splice(1,0,`mousemove`):this.dispatchEvent(t,`mousemove`),o&&a.push(`globalmousemove`),this.cursor=t.target?.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,r.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId),n=this.createPointerEvent(e),r=n.pointerType===`mouse`||n.pointerType===`pen`;this.dispatchEvent(n,`pointerover`),r&&this.dispatchEvent(n,`mouseover`),n.pointerType===`mouse`&&(this.cursor=n.target?.cursor);let i=this.clonePointerEvent(n,`pointerenter`);for(i.eventPhase=i.AT_TARGET;i.target&&i.target!==this.rootTarget.parent;)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,`mouseenter`),i.target=i.target.parent;t.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(i)}mapPointerOut(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId);if(t.overTargets){let n=e.pointerType===`mouse`||e.pointerType===`pen`,r=this.findMountedTarget(t.overTargets),i=this.createPointerEvent(e,`pointerout`,r);this.dispatchEvent(i),n&&this.dispatchEvent(i,`mouseout`);let a=this.createPointerEvent(e,`pointerleave`,r);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),n&&this.notifyTarget(a,`mouseleave`),a.target=a.target.parent;t.overTargets=null,this.freeEvent(i),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=performance.now(),n=this.createPointerEvent(e);if(this.dispatchEvent(n,`pointerup`),n.pointerType===`touch`)this.dispatchEvent(n,`touchend`);else if(n.pointerType===`mouse`||n.pointerType===`pen`){let e=n.button===2;this.dispatchEvent(n,e?`rightup`:`mouseup`)}let r=this.trackingData(e.pointerId),i=this.findMountedTarget(r.pressTargetsByButton[e.button]),a=i;if(i&&!n.composedPath().includes(i)){let t=i;for(;t&&!n.composedPath().includes(t);){if(n.currentTarget=t,this.notifyTarget(n,`pointerupoutside`),n.pointerType===`touch`)this.notifyTarget(n,`touchendoutside`);else if(n.pointerType===`mouse`||n.pointerType===`pen`){let e=n.button===2;this.notifyTarget(n,e?`rightupoutside`:`mouseupoutside`)}t=t.parent}delete r.pressTargetsByButton[e.button],a=t}if(a){let i=this.clonePointerEvent(n,`click`);i.target=a,i.path=null,r.clicksByButton[e.button]||(r.clicksByButton[e.button]={clickCount:0,target:i.target,timeStamp:t});let o=r.clicksByButton[e.button];if(o.target===i.target&&t-o.timeStamp<200?++o.clickCount:o.clickCount=1,o.target=i.target,o.timeStamp=t,i.detail=o.clickCount,i.pointerType===`mouse`){let e=i.button===2;this.dispatchEvent(i,e?`rightclick`:`click`)}else i.pointerType===`touch`&&this.dispatchEvent(i,`tap`);this.dispatchEvent(i,`pointertap`),this.freeEvent(i)}this.freeEvent(n)}mapPointerUpOutside(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId),n=this.findMountedTarget(t.pressTargetsByButton[e.button]),r=this.createPointerEvent(e);if(n){let i=n;for(;i;)r.currentTarget=i,this.notifyTarget(r,`pointerupoutside`),r.pointerType===`touch`?this.notifyTarget(r,`touchendoutside`):(r.pointerType===`mouse`||r.pointerType===`pen`)&&this.notifyTarget(r,r.button===2?`rightupoutside`:`mouseupoutside`),i=i.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(r)}mapWheel(e){if(!(e instanceof R$)){ot(`EventBoundary cannot map a non-wheel event as a wheel event`);return}let t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let n=1;n<e.length&&e[n].parent===t;n++)t=e[n];return t}createPointerEvent(e,t,n){let r=this.allocateEvent(L$);return this.copyPointerData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.nativeEvent=e.nativeEvent,r.originalEvent=e,r.target=n??this.hitTest(r.global.x,r.global.y)??this._hitElements[0],typeof t==`string`&&(r.type=t),r}createWheelEvent(e){let t=this.allocateEvent(R$);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){let n=this.allocateEvent(L$);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=t??n.type,n}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof L$&&t instanceof L$&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof I$&&t instanceof I$&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);let t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.defaultPrevented=!1,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw Error(`It is illegal to free an event not managed by this EventBoundary!`);let t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}_notifyListeners(e,t){let n=e.currentTarget._events[t];if(n)if(`fn`in n)n.once&&e.currentTarget.removeListener(t,n.fn,void 0,!0),n.fn.call(n.context,e);else for(let r=0,i=n.length;r<i&&!e.propagationImmediatelyStopped;r++)n[r].once&&e.currentTarget.removeListener(t,n[r].fn,void 0,!0),n[r].fn.call(n[r].context,e)}},vbe=1,ybe={touchstart:`pointerdown`,touchend:`pointerup`,touchendoutside:`pointerupoutside`,touchmove:`pointermove`,touchcancel:`pointercancel`},B$=class e{constructor(t){this.supportsTouchEvents=`ontouchstart`in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=t,this.rootBoundary=new _be(null),F$.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new L$(null),this._rootWheelEvent=new R$(null),this.cursorStyles={default:`inherit`,pointer:`pointer`},this.features=new Proxy({...e.defaultEventFeatures},{set:(e,t,n)=>(t===`globalMove`&&(this.rootBoundary.enableGlobalMoveEvents=n),e[t]=n,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(t){let{canvas:n,resolution:r}=this.renderer;this.setTargetElement(n),this.resolution=r,e._defaultEventMode=t.eventMode??`passive`,Object.assign(this.features,t.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){F$.destroy(),this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(e){e||=`default`;let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this._currentCursor===e)return;this._currentCursor=e;let n=this.cursorStyles[e];if(n)switch(typeof n){case`string`:t&&(this.domElement.style.cursor=n);break;case`function`:n(e);break;case`object`:t&&Object.assign(this.domElement.style,n);break}else t&&typeof e==`string`&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this._rootPointerEvent}_onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=this._normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!(`cancelable`in e))&&e.preventDefault();for(let e=0,n=t.length;e<n;e++){let n=t[e],r=this._bootstrapEvent(this._rootPointerEvent,n);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,F$.pointerMoved();let t=this._normalizeToPointerData(e);for(let e=0,n=t.length;e<n;e++){let n=this._bootstrapEvent(this._rootPointerEvent,t[e]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=e.target;e.composedPath&&e.composedPath().length>0&&(t=e.composedPath()[0]);let n=t===this.domElement?``:`outside`,r=this._normalizeToPointerData(e);for(let e=0,t=r.length;e<t;e++){let t=this._bootstrapEvent(this._rootPointerEvent,r[e]);t.type+=n,this.rootBoundary.mapEvent(t)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=this._normalizeToPointerData(e);for(let e=0,n=t.length;e<n;e++){let n=this._bootstrapEvent(this._rootPointerEvent,t[e]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;let t=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(t)}setTargetElement(e){this._removeEvents(),this.domElement=e,F$.domElement=e,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;F$.addTickerListener();let e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`)),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this._onPointerMove,!0),this.domElement.addEventListener(`pointerdown`,this._onPointerDown,!0),this.domElement.addEventListener(`pointerleave`,this._onPointerOverOut,!0),this.domElement.addEventListener(`pointerover`,this._onPointerOverOut,!0),globalThis.addEventListener(`pointerup`,this._onPointerUp,!0)):(globalThis.document.addEventListener(`mousemove`,this._onPointerMove,!0),this.domElement.addEventListener(`mousedown`,this._onPointerDown,!0),this.domElement.addEventListener(`mouseout`,this._onPointerOverOut,!0),this.domElement.addEventListener(`mouseover`,this._onPointerOverOut,!0),globalThis.addEventListener(`mouseup`,this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener(`touchstart`,this._onPointerDown,!0),this.domElement.addEventListener(`touchend`,this._onPointerUp,!0),this.domElement.addEventListener(`touchmove`,this._onPointerMove,!0))),this.domElement.addEventListener(`wheel`,this.onWheel,{passive:!0,capture:!0}),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;F$.removeTickerListener();let e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``)),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this._onPointerMove,!0),this.domElement.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.domElement.removeEventListener(`pointerleave`,this._onPointerOverOut,!0),this.domElement.removeEventListener(`pointerover`,this._onPointerOverOut,!0),globalThis.removeEventListener(`pointerup`,this._onPointerUp,!0)):(globalThis.document.removeEventListener(`mousemove`,this._onPointerMove,!0),this.domElement.removeEventListener(`mousedown`,this._onPointerDown,!0),this.domElement.removeEventListener(`mouseout`,this._onPointerOverOut,!0),this.domElement.removeEventListener(`mouseover`,this._onPointerOverOut,!0),globalThis.removeEventListener(`mouseup`,this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener(`touchstart`,this._onPointerDown,!0),this.domElement.removeEventListener(`touchend`,this._onPointerUp,!0),this.domElement.removeEventListener(`touchmove`,this._onPointerMove,!0))),this.domElement.removeEventListener(`wheel`,this.onWheel,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(e,t,n){let r=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},i=1/this.resolution;e.x=(t-r.left)*(this.domElement.width/r.width)*i,e.y=(n-r.top)*(this.domElement.height/r.height)*i}_normalizeToPointerData(e){let t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let n=0,r=e.changedTouches.length;n<r;n++){let r=e.changedTouches[n];r.button===void 0&&(r.button=0),r.buttons===void 0&&(r.buttons=1),r.isPrimary===void 0&&(r.isPrimary=e.touches.length===1&&e.type===`touchstart`),r.width===void 0&&(r.width=r.radiusX||1),r.height===void 0&&(r.height=r.radiusY||1),r.tiltX===void 0&&(r.tiltX=0),r.tiltY===void 0&&(r.tiltY=0),r.pointerType===void 0&&(r.pointerType=`touch`),r.pointerId===void 0&&(r.pointerId=r.identifier||0),r.pressure===void 0&&(r.pressure=r.force||.5),r.twist===void 0&&(r.twist=0),r.tangentialPressure===void 0&&(r.tangentialPressure=0),r.layerX===void 0&&(r.layerX=r.offsetX=r.clientX),r.layerY===void 0&&(r.layerY=r.offsetY=r.clientY),r.isNormalized=!0,r.type=e.type,t.push(r)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){let n=e;n.isPrimary===void 0&&(n.isPrimary=!0),n.width===void 0&&(n.width=1),n.height===void 0&&(n.height=1),n.tiltX===void 0&&(n.tiltX=0),n.tiltY===void 0&&(n.tiltY=0),n.pointerType===void 0&&(n.pointerType=`mouse`),n.pointerId===void 0&&(n.pointerId=vbe),n.pressure===void 0&&(n.pressure=.5),n.twist===void 0&&(n.twist=0),n.tangentialPressure===void 0&&(n.tangentialPressure=0),n.isNormalized=!0,t.push(n)}else t.push(e);return t}normalizeWheelEvent(e){let t=this._rootWheelEvent;return this._transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}_bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this._transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type===`pointerleave`&&(e.type=`pointerout`),e.type.startsWith(`mouse`)&&(e.type=e.type.replace(`mouse`,`pointer`)),e.type.startsWith(`touch`)&&(e.type=ybe[e.type]||e.type),e}_transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};B$.extension={name:`events`,type:[W.WebGLSystem,W.CanvasSystem,W.WebGPUSystem],priority:-1},B$.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};var V$=B$,bbe={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return this.eventMode===`dynamic`||this.eventMode===`static`},set interactive(e){this.eventMode=e?`static`:`passive`},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??V$.defaultEventMode},set eventMode(e){this._internalEventMode=e},isInteractive(){return this.eventMode===`static`||this.eventMode===`dynamic`},interactiveChildren:!0,hitArea:null,addEventListener(e,t,n){let r=typeof n==`boolean`&&n||typeof n==`object`&&n.capture,i=typeof n==`object`?n.signal:void 0,a=typeof n==`object`?n.once===!0:!1,o=typeof t==`function`?void 0:t;e=r?`${e}capture`:e;let s=typeof t==`function`?t:t.handleEvent,c=this;i&&i.addEventListener(`abort`,()=>{c.off(e,s,o)}),a?c.once(e,s,o):c.on(e,s,o)},removeEventListener(e,t,n){let r=typeof n==`boolean`&&n||typeof n==`object`&&n.capture,i=typeof t==`function`?void 0:t;e=r?`${e}capture`:e,t=typeof t==`function`?t:t.handleEvent,this.off(e,t,i)},dispatchEvent(e){if(!(e instanceof aQ))throw Error(`Container cannot propagate events outside of the Federated Events API`);return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}},xbe=`in vec2 aPosition;
963
+ `,e.accessibleText&&(t.innerText=e.accessibleText)),t.style.width=`${CQ}px`,t.style.height=`${CQ}px`,t.style.backgroundColor=this.debug?`rgba(255,255,255,0.5)`:`transparent`,t.style.position=`absolute`,t.style.zIndex=wQ.toString(),t.style.borderStyle=`none`,navigator.userAgent.toLowerCase().includes(`chrome`)?t.setAttribute(`aria-live`,`off`):t.setAttribute(`aria-live`,`polite`),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute(`aria-relevant`,`additions`):t.setAttribute(`aria-relevant`,`text`),t.addEventListener(`click`,this._onClick.bind(this)),t.addEventListener(`focus`,this._onFocus.bind(this)),t.addEventListener(`focusout`,this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`container ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute(`aria-label`,e.accessibleHint),e.interactive?t.tabIndex=e.tabIndex:t.tabIndex=0,this.debug&&this._updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.container=e,this._children.push(e),this._div.appendChild(e._accessibleDiv)}_dispatchEvent(e,t){let{container:n}=e.target,r=this._renderer.events.rootBoundary,i=Object.assign(new aQ(r),{target:n});r.rootTarget=this._renderer.lastObjectRendered,t.forEach(e=>r.dispatchEvent(i,e))}_onClick(e){this._dispatchEvent(e,[`click`,`pointertap`,`tap`])}_onFocus(e){e.target.getAttribute(`aria-live`)||e.target.setAttribute(`aria-live`,`assertive`),this._dispatchEvent(e,[`mouseover`])}_onFocusOut(e){e.target.getAttribute(`aria-live`)||e.target.setAttribute(`aria-live`,`polite`),this._dispatchEvent(e,[`mouseout`])}_onKeyDown(e){e.keyCode!==eye||!this._activateOnTab||this._activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this._deactivate()}destroy(){this._deactivate(),this._destroyTouchHook(),this._canvasObserver?.destroy(),this._canvasObserver=null,this._div=null,this._pools=null,this._children=null,this._renderer=null,this._hookDiv=null,globalThis.removeEventListener(`keydown`,this._boundOnKeyDown),this._boundOnKeyDown=null,globalThis.document.removeEventListener(`mousemove`,this._boundOnMouseMove,!0),this._boundOnMouseMove=null}setAccessibilityEnabled(e){e?this._activate():this._deactivate()}_getPool(e){return this._pools[e]||(this._pools[e]=[]),this._pools[e]}};EQ.extension={type:[W.WebGLSystem,W.WebGPUSystem],name:`accessibility`},EQ.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0};var oye=EQ,sye={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,accessibleType:`button`,accessibleText:null,accessiblePointerEvents:`auto`,accessibleChildren:!0,_accessibleActive:!1,_accessibleDiv:null,_renderId:-1},DQ;function cye(e){return DQ===void 0&&(DQ=(()=>{let t={stencil:!0,failIfMajorPerformanceCaveat:e??Qt.defaultOptions.failIfMajorPerformanceCaveat};try{if(!Gt.get().getWebGLRenderingContext())return!1;let e=Gt.get().createCanvas().getContext(`webgl`,t),n=!!e?.getContextAttributes()?.stencil;if(e){let t=e.getExtension(`WEBGL_lose_context`);t&&t.loseContext()}return e=null,n}catch{return!1}})()),DQ}var OQ;async function lye(e={}){return OQ===void 0&&(OQ=await(async()=>{let t=Gt.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(e)).requestDevice(),!0}catch{return!1}})()),OQ}var kQ=[`webgl`,`webgpu`,`canvas`];async function uye(e){let t=[];e.preference?(t.push(e.preference),kQ.forEach(n=>{n!==e.preference&&t.push(n)})):t=kQ.slice();let n,r={};for(let i=0;i<t.length;i++){let a=t[i];if(a===`webgpu`&&await lye()){let{WebGPURenderer:t}=await q(async()=>{let{WebGPURenderer:e}=await import(`./WebGPURenderer-BevM1O4I.js`);return{WebGPURenderer:e}},__vite__mapDeps([131,128,1]));n=t,r={...e,...e.webgpu};break}else if(a===`webgl`&&cye(e.failIfMajorPerformanceCaveat??Qt.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:t}=await q(async()=>{let{WebGLRenderer:e}=await import(`./WebGLRenderer-8qk8lSz6.js`);return{WebGLRenderer:e}},__vite__mapDeps([132,128,1]));n=t,r={...e,...e.webgl};break}else if(a===`canvas`){let{CanvasRenderer:t}=await q(async()=>{let{CanvasRenderer:e}=await import(`./CanvasRenderer-C1h1JIPm.js`);return{CanvasRenderer:e}},__vite__mapDeps([133,128,1]));n=t,r={...e,...e.canvasOptions};break}}if(delete r.webgpu,delete r.webgl,delete r.canvasOptions,!n)throw Error(`No available renderer for the current environment`);let i=new n;return await i.init(r),i}var AQ=class{static init(e){Object.defineProperty(this,`resizeTo`,{configurable:!0,set(e){globalThis.removeEventListener(`resize`,this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener(`resize`,this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&=(cancelAnimationFrame(this._resizeId),null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let e,t;if(this._resizeTo===globalThis.window)e=globalThis.innerWidth,t=globalThis.innerHeight;else{let{clientWidth:n,clientHeight:r}=this._resizeTo;e=n,t=r}this.renderer.resize(e,t),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener(`resize`,this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}};AQ.extension=W.Application;var jQ=class{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,`ticker`,{configurable:!0,set(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,Ot.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?kt.shared:new kt,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}};jQ.extension=W.Application,jt.add(AQ),jt.add(jQ);var MQ=class e{constructor(...e){this.stage=new qt,e[0]!==void 0&&zt(st,`Application constructor options are deprecated, please use Application.init() instead.`)}async init(t){t={...t},this.stage||=new qt,this.renderer=await uye(t),e._plugins.forEach(e=>{e.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return zt(st,`Application.view is deprecated, please use Application.canvas instead.`),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){let r=e._plugins.slice(0);r.reverse(),r.forEach(e=>{e.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};MQ._plugins=[];var NQ=MQ;jt.handleByList(W.Application,NQ._plugins),jt.add($t);var dye=t(n(((e,t)=>{t.exports=i;var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/gi;function i(e){var t=[];return e.replace(r,function(e,r,i){var a=r.toLowerCase();for(i=o(i),a==`m`&&i.length>2&&(t.push([r].concat(i.splice(0,2))),a=`l`,r=r==`m`?`l`:`L`);;){if(i.length==n[a])return i.unshift(r),t.push(i);if(i.length<n[a])throw Error(`malformed path data`);t.push([r].concat(i.splice(0,n[a])))}}),t}var a=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function o(e){var t=e.match(a);return t?t.map(Number):[]}}))(),1);function fye(e,t){let n=(0,dye.default)(e),r=[],i=null,a=0,o=0;for(let e=0;e<n.length;e++){let s=n[e],c=s[0],l=s;switch(c){case`M`:a=l[1],o=l[2],t.moveTo(a,o);break;case`m`:a+=l[1],o+=l[2],t.moveTo(a,o);break;case`H`:a=l[1],t.lineTo(a,o);break;case`h`:a+=l[1],t.lineTo(a,o);break;case`V`:o=l[1],t.lineTo(a,o);break;case`v`:o+=l[1],t.lineTo(a,o);break;case`L`:a=l[1],o=l[2],t.lineTo(a,o);break;case`l`:a+=l[1],o+=l[2],t.lineTo(a,o);break;case`C`:a=l[5],o=l[6],t.bezierCurveTo(l[1],l[2],l[3],l[4],a,o);break;case`c`:t.bezierCurveTo(a+l[1],o+l[2],a+l[3],o+l[4],a+l[5],o+l[6]),a+=l[5],o+=l[6];break;case`S`:a=l[3],o=l[4],t.bezierCurveToShort(l[1],l[2],a,o);break;case`s`:t.bezierCurveToShort(a+l[1],o+l[2],a+l[3],o+l[4]),a+=l[3],o+=l[4];break;case`Q`:a=l[3],o=l[4],t.quadraticCurveTo(l[1],l[2],a,o);break;case`q`:t.quadraticCurveTo(a+l[1],o+l[2],a+l[3],o+l[4]),a+=l[3],o+=l[4];break;case`T`:a=l[1],o=l[2],t.quadraticCurveToShort(a,o);break;case`t`:a+=l[1],o+=l[2],t.quadraticCurveToShort(a,o);break;case`A`:a=l[6],o=l[7],t.arcToSvg(l[1],l[2],l[3],l[4],l[5],a,o);break;case`a`:a+=l[6],o+=l[7],t.arcToSvg(l[1],l[2],l[3],l[4],l[5],a,o);break;case`Z`:case`z`:t.closePath(),r.length>0&&(i=r.pop(),i?(a=i.startX,o=i.startY):(a=0,o=0)),i=null;break;default:ot(`Unknown SVG path command: ${c}`)}c!==`Z`&&c!==`z`&&i===null&&(i={startX:a,startY:o},r.push(i))}return t}var pye=class e{constructor(e=0,t=0,n=0){this.type=`circle`,this.x=e,this.y=t,this.radius=n}clone(){return new e(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;let n=this.radius*this.radius,r=this.x-e,i=this.y-t;return r*=r,i*=i,r+i<=n}strokeContains(e,t,n,r=.5){if(this.radius===0)return!1;let i=this.x-e,a=this.y-t,o=this.radius,s=(1-r)*n,c=Math.sqrt(i*i+a*a);return c<=o+s&&c>o-(n-s)}getBounds(e){return e||=new bt,e.x=this.x-this.radius,e.y=this.y-this.radius,e.width=this.radius*2,e.height=this.radius*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.radius=e.radius,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}},mye=class e{constructor(e=0,t=0,n=0,r=0){this.type=`ellipse`,this.x=e,this.y=t,this.halfWidth=n,this.halfHeight=r}clone(){return new e(this.x,this.y,this.halfWidth,this.halfHeight)}contains(e,t){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let n=(e-this.x)/this.halfWidth,r=(t-this.y)/this.halfHeight;return n*=n,r*=r,n+r<=1}strokeContains(e,t,n,r=.5){let{halfWidth:i,halfHeight:a}=this;if(i<=0||a<=0)return!1;let o=n*(1-r),s=n-o,c=i-s,l=a-s,u=i+o,d=a+o,f=e-this.x,p=t-this.y,m=f*f/(c*c)+p*p/(l*l),h=f*f/(u*u)+p*p/(d*d);return m>1&&h<=1}getBounds(e){return e||=new bt,e.x=this.x-this.halfWidth,e.y=this.y-this.halfHeight,e.width=this.halfWidth*2,e.height=this.halfHeight*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.halfWidth=e.halfWidth,this.halfHeight=e.halfHeight,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}};function hye(e,t,n,r,i,a){let o=e-n,s=t-r,c=i-n,l=a-r,u=o*c+s*l,d=c*c+l*l,f=-1;d!==0&&(f=u/d);let p,m;f<0?(p=n,m=r):f>1?(p=i,m=a):(p=n+f*c,m=r+f*l);let h=e-p,g=t-m;return h*h+g*g}var gye,_ye,PQ=class e{constructor(...e){this.type=`polygon`;let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!=`number`){let e=[];for(let n=0,r=t.length;n<r;n++)e.push(t[n].x,t[n].y);t=e}this.points=t,this.closePath=!0}isClockwise(){let e=0,t=this.points,n=t.length;for(let r=0;r<n;r+=2){let i=t[r],a=t[r+1],o=t[(r+2)%n],s=t[(r+3)%n];e+=(o-i)*(s+a)}return e<0}containsPolygon(e){let t=this.getBounds(gye),n=e.getBounds(_ye);if(!t.containsRect(n))return!1;let r=e.points;for(let e=0;e<r.length;e+=2){let t=r[e],n=r[e+1];if(!this.contains(t,n))return!1}return!0}clone(){let t=new e(this.points.slice());return t.closePath=this.closePath,t}contains(e,t){let n=!1,r=this.points.length/2;for(let i=0,a=r-1;i<r;a=i++){let r=this.points[i*2],o=this.points[i*2+1],s=this.points[a*2],c=this.points[a*2+1];o>t!=c>t&&e<(s-r)*((t-o)/(c-o))+r&&(n=!n)}return n}strokeContains(e,t,n,r=.5){let i=n*n,a=i*(1-r),o=i-a,{points:s}=this,c=s.length-(this.closePath?0:2);for(let n=0;n<c;n+=2){let r=s[n],i=s[n+1],c=s[(n+2)%s.length],l=s[(n+3)%s.length];if(hye(e,t,r,i,c,l)<=(Math.sign((c-r)*(t-i)-(l-i)*(e-r))<0?o:a))return!0}return!1}getBounds(e){e||=new bt;let t=this.points,n=1/0,r=-1/0,i=1/0,a=-1/0;for(let e=0,o=t.length;e<o;e+=2){let o=t[e],s=t[e+1];n=o<n?o:n,r=o>r?o:r,i=s<i?s:i,a=s>a?s:a}return e.x=n,e.width=r-n,e.y=i,e.height=a-i,e}copyFrom(e){return this.points=e.points.slice(),this.closePath=e.closePath,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((e,t)=>`${e}, ${t}`,``)}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return zt(`8.11.0`,`Polygon.lastX is deprecated, please use Polygon.lastX instead.`),this.points[this.points.length-2]}get y(){return zt(`8.11.0`,`Polygon.y is deprecated, please use Polygon.lastY instead.`),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}},FQ=(e,t,n,r,i,a,o)=>{let s=e-n,c=t-r,l=Math.sqrt(s*s+c*c);return l>=i-a&&l<=i+o},vye=class e{constructor(e=0,t=0,n=0,r=0,i=20){this.type=`roundedRectangle`,this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i}getBounds(e){return e||=new bt,e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}clone(){return new e(this.x,this.y,this.width,this.height,this.radius)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){let n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;let r=e-(this.x+n),i=t-(this.y+n),a=n*n;if(r*r+i*i<=a||(r=e-(this.x+this.width-n),r*r+i*i<=a)||(i=t-(this.y+this.height-n),r*r+i*i<=a)||(r=e-(this.x+n),r*r+i*i<=a))return!0}return!1}strokeContains(e,t,n,r=.5){let{x:i,y:a,width:o,height:s,radius:c}=this,l=n*(1-r),u=n-l,d=i+c,f=a+c,p=o-c*2,m=s-c*2,h=i+o,g=a+s;return(e>=i-l&&e<=i+u||e>=h-u&&e<=h+l)&&t>=f&&t<=f+m||(t>=a-l&&t<=a+u||t>=g-u&&t<=g+l)&&e>=d&&e<=d+p?!0:e<d&&t<f&&FQ(e,t,d,f,c,u,l)||e>h-c&&t<f&&FQ(e,t,h-c,f,c,u,l)||e>h-c&&t>g-c&&FQ(e,t,h-c,g-c,c,u,l)||e<d&&t>g-c&&FQ(e,t,d,g-c,c,u,l)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}};function yye(e,t,n,r,i,a,o,s=null){let c=0;n*=t,i*=a;let l=s.a,u=s.b,d=s.c,f=s.d,p=s.tx,m=s.ty;for(;c<o;){let o=e[n],s=e[n+1];r[i]=l*o+d*s+p,r[i+1]=u*o+f*s+m,i+=a,n+=t,c++}}function bye(e,t,n,r){let i=0;for(t*=n;i<r;)e[t]=0,e[t+1]=0,t+=n,i++}function IQ(e,t,n,r,i){let a=t.a,o=t.b,s=t.c,c=t.d,l=t.tx,u=t.ty;n||=0,r||=2,i||=e.length/r-n;let d=n*r;for(let t=0;t<i;t++){let t=e[d],n=e[d+1];e[d]=a*t+s*n+l,e[d+1]=o*t+c*n+u,d+=r}}var xye=new Qe,LQ=class{constructor(){this.packAsQuad=!1,this.batcherName=`default`,this.topology=`triangle-list`,this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:`normal`}get color(){let e=this.baseColor,t=e>>16|e&65280|(e&255)<<16,n=this.renderable;return n?dt(t,n.groupColor)+(this.alpha*n.groupAlpha*255<<24):t+(this.alpha*255<<24)}get transform(){return this.renderable?.groupTransform||xye}copyTo(e){e.indexOffset=this.indexOffset,e.indexSize=this.indexSize,e.attributeOffset=this.attributeOffset,e.attributeSize=this.attributeSize,e.baseColor=this.baseColor,e.alpha=this.alpha,e.texture=this.texture,e.geometryData=this.geometryData,e.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology=`triangle-list`}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}},RQ={extension:{type:W.ShapeBuilder,name:`circle`},build(e,t){let n,r,i,a,o,s;if(e.type===`circle`){let t=e;if(o=s=t.radius,o<=0)return!1;n=t.x,r=t.y,i=a=0}else if(e.type===`ellipse`){let t=e;if(o=t.halfWidth,s=t.halfHeight,o<=0||s<=0)return!1;n=t.x,r=t.y,i=a=0}else{let t=e,c=t.width/2,l=t.height/2;n=t.x+c,r=t.y+l,o=s=Math.max(0,Math.min(t.radius,Math.min(c,l))),i=c-o,a=l-s}if(i<0||a<0)return!1;let c=Math.ceil(2.3*Math.sqrt(o+s)),l=c*8+(i?4:0)+(a?4:0);if(l===0)return!1;if(c===0)return t[0]=t[6]=n+i,t[1]=t[3]=r+a,t[2]=t[4]=n-i,t[5]=t[7]=r-a,!0;let u=0,d=c*4+(i?2:0)+2,f=d,p=l,m=i+o,h=a,g=n+m,_=n-m,v=r+h;if(t[u++]=g,t[u++]=v,t[--d]=v,t[--d]=_,a){let e=r-h;t[f++]=_,t[f++]=e,t[--p]=e,t[--p]=g}for(let e=1;e<c;e++){let l=Math.PI/2*(e/c),m=i+Math.cos(l)*o,h=a+Math.sin(l)*s,g=n+m,_=n-m,v=r+h,y=r-h;t[u++]=g,t[u++]=v,t[--d]=v,t[--d]=_,t[f++]=_,t[f++]=y,t[--p]=y,t[--p]=g}m=i,h=a+s,g=n+m,_=n-m,v=r+h;let y=r-h;return t[u++]=g,t[u++]=v,t[--p]=y,t[--p]=g,i&&(t[u++]=_,t[u++]=v,t[--p]=y,t[--p]=_),!0},triangulate(e,t,n,r,i,a){if(e.length===0)return;let o=0,s=0;for(let t=0;t<e.length;t+=2)o+=e[t],s+=e[t+1];o/=e.length/2,s/=e.length/2;let c=r;t[c*n]=o,t[c*n+1]=s;let l=c++;for(let r=0;r<e.length;r+=2)t[c*n]=e[r],t[c*n+1]=e[r+1],r>0&&(i[a++]=c,i[a++]=l,i[a++]=c-1),c++;i[a++]=l+1,i[a++]=l,i[a++]=c-1}},Sye={...RQ,extension:{...RQ.extension,name:`ellipse`}},Cye={...RQ,extension:{...RQ.extension,name:`roundedRectangle`}},zQ=1e-4,BQ=1e-4;function wye(e){let t=e.length;if(t<6)return 1;let n=0;for(let r=0,i=e[t-2],a=e[t-1];r<t;r+=2){let t=e[r],o=e[r+1];n+=(t-i)*(o+a),i=t,a=o}return n<0?-1:1}function VQ(e,t,n,r,i,a,o,s){let c=e-n*i,l=t-r*i,u=e+n*a,d=t+r*a,f,p;o?(f=r,p=-n):(f=-r,p=n);let m=c+f,h=l+p,g=u+f,_=d+p;return s.push(m,h),s.push(g,_),2}function HQ(e,t,n,r,i,a,o,s){let c=n-e,l=r-t,u=Math.atan2(c,l),d=Math.atan2(i-e,a-t);s&&u<d?u+=Math.PI*2:!s&&u>d&&(d+=Math.PI*2);let f=u,p=d-u,m=Math.abs(p),h=Math.sqrt(c*c+l*l),g=(15*m*Math.sqrt(h)/Math.PI>>0)+1,_=p/g;if(f+=_,s){o.push(e,t),o.push(n,r);for(let n=1,r=f;n<g;n++,r+=_)o.push(e,t),o.push(e+Math.sin(r)*h,t+Math.cos(r)*h);o.push(e,t),o.push(i,a)}else{o.push(n,r),o.push(e,t);for(let n=1,r=f;n<g;n++,r+=_)o.push(e+Math.sin(r)*h,t+Math.cos(r)*h),o.push(e,t);o.push(i,a),o.push(e,t)}return g*2}function UQ(e,t,n,r,i,a){let o=zQ;if(e.length===0)return;let s=t,c=s.alignment;if(t.alignment!==.5){let t=wye(e);n&&(t*=-1),c=(c-.5)*t+.5}let l=new Et(e[0],e[1]),u=new Et(e[e.length-2],e[e.length-1]),d=r,f=Math.abs(l.x-u.x)<o&&Math.abs(l.y-u.y)<o;if(d){e=e.slice(),f&&(e.pop(),e.pop(),u.set(e[e.length-2],e[e.length-1]));let t=(l.x+u.x)*.5,n=(u.y+l.y)*.5;e.unshift(t,n),e.push(t,n)}let p=i,m=e.length/2,h=e.length,g=p.length/2,_=s.width/2,v=_*_,y=s.miterLimit*s.miterLimit,b=e[0],x=e[1],S=e[2],C=e[3],w=0,T=0,E=-(x-C),D=b-S,O=0,k=0,A=Math.sqrt(E*E+D*D);E/=A,D/=A,E*=_,D*=_;let j=c,M=(1-j)*2,N=j*2;d||(s.cap===`round`?h+=HQ(b-E*(M-N)*.5,x-D*(M-N)*.5,b-E*M,x-D*M,b+E*N,x+D*N,p,!0)+2:s.cap===`square`&&(h+=VQ(b,x,E,D,M,N,!0,p))),p.push(b-E*M,x-D*M),p.push(b+E*N,x+D*N);for(let t=1;t<m-1;++t){b=e[(t-1)*2],x=e[(t-1)*2+1],S=e[t*2],C=e[t*2+1],w=e[(t+1)*2],T=e[(t+1)*2+1],E=-(x-C),D=b-S,A=Math.sqrt(E*E+D*D),E/=A,D/=A,E*=_,D*=_,O=-(C-T),k=S-w,A=Math.sqrt(O*O+k*k),O/=A,k/=A,O*=_,k*=_;let n=S-b,r=x-C,i=S-w,a=T-C,o=n*i+r*a,c=r*i-a*n,l=c<0;if(Math.abs(c)<.001*Math.abs(o)){p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),o>=0&&(s.join===`round`?h+=HQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+4:h+=2,p.push(S-O*N,C-k*N),p.push(S+O*M,C+k*M));continue}let u=(-E+b)*(-D+C)-(-E+S)*(-D+x),d=(-O+w)*(-k+C)-(-O+S)*(-k+T),f=(n*d-i*u)/c,m=(a*u-r*d)/c,g=(f-S)*(f-S)+(m-C)*(m-C),j=S+(f-S)*M,P=C+(m-C)*M,F=S-(f-S)*N,I=C-(m-C)*N,ee=Math.min(n*n+r*r,i*i+a*a),L=l?M:N;g<=ee+L*L*v?s.join===`bevel`||g/v>y?(l?(p.push(j,P),p.push(S+E*N,C+D*N),p.push(j,P),p.push(S+O*N,C+k*N)):(p.push(S-E*M,C-D*M),p.push(F,I),p.push(S-O*M,C-k*M),p.push(F,I)),h+=2):s.join===`round`?l?(p.push(j,P),p.push(S+E*N,C+D*N),h+=HQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+4,p.push(j,P),p.push(S+O*N,C+k*N)):(p.push(S-E*M,C-D*M),p.push(F,I),h+=HQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+4,p.push(S-O*M,C-k*M),p.push(F,I)):(p.push(j,P),p.push(F,I)):(p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),s.join===`round`?l?h+=HQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+2:h+=HQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+2:s.join===`miter`&&g/v<=y&&(l?(p.push(F,I),p.push(F,I)):(p.push(j,P),p.push(j,P)),h+=2),p.push(S-O*M,C-k*M),p.push(S+O*N,C+k*N),h+=2)}b=e[(m-2)*2],x=e[(m-2)*2+1],S=e[(m-1)*2],C=e[(m-1)*2+1],E=-(x-C),D=b-S,A=Math.sqrt(E*E+D*D),E/=A,D/=A,E*=_,D*=_,p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),d||(s.cap===`round`?h+=HQ(S-E*(M-N)*.5,C-D*(M-N)*.5,S-E*M,C-D*M,S+E*N,C+D*N,p,!1)+2:s.cap===`square`&&(h+=VQ(S,C,E,D,M,N,!1,p)));let P=BQ*BQ;for(let e=g;e<h+g-2;++e)b=p[e*2],x=p[e*2+1],S=p[(e+1)*2],C=p[(e+1)*2+1],w=p[(e+2)*2],T=p[(e+2)*2+1],!(Math.abs(b*(C-T)+S*(T-x)+w*(x-C))<P)&&a.push(e,e+1,e+2)}function Tye(e,t,n,r){let i=zQ;if(e.length===0)return;let a=e[0],o=e[1],s=e[e.length-2],c=e[e.length-1],l=t||Math.abs(a-s)<i&&Math.abs(o-c)<i,u=n,d=e.length/2,f=u.length/2;for(let t=0;t<d;t++)u.push(e[t*2]),u.push(e[t*2+1]);for(let e=0;e<d-1;e++)r.push(f+e,f+e+1);l&&r.push(f+d-1,f)}function WQ(e,t,n,r,i,a,o){let s=pn(e,t,2);if(!s)return;for(let e=0;e<s.length;e+=3)a[o++]=s[e]+i,a[o++]=s[e+1]+i,a[o++]=s[e+2]+i;let c=i*r;for(let t=0;t<e.length;t+=2)n[c]=e[t],n[c+1]=e[t+1],c+=r}var Eye=[],Dye={extension:{type:W.ShapeBuilder,name:`polygon`},build(e,t){for(let n=0;n<e.points.length;n++)t[n]=e.points[n];return!0},triangulate(e,t,n,r,i,a){WQ(e,Eye,t,n,r,i,a)}},Oye={extension:{type:W.ShapeBuilder,name:`rectangle`},build(e,t){let n=e,r=n.x,i=n.y,a=n.width,o=n.height;return a>0&&o>0?(t[0]=r,t[1]=i,t[2]=r+a,t[3]=i,t[4]=r+a,t[5]=i+o,t[6]=r,t[7]=i+o,!0):!1},triangulate(e,t,n,r,i,a){let o=0;r*=n,t[r+o]=e[0],t[r+o+1]=e[1],o+=n,t[r+o]=e[2],t[r+o+1]=e[3],o+=n,t[r+o]=e[6],t[r+o+1]=e[7],o+=n,t[r+o]=e[4],t[r+o+1]=e[5],o+=n;let s=r/n;i[a++]=s,i[a++]=s+1,i[a++]=s+2,i[a++]=s+1,i[a++]=s+3,i[a++]=s+2}},kye={extension:{type:W.ShapeBuilder,name:`triangle`},build(e,t){return t[0]=e.x,t[1]=e.y,t[2]=e.x2,t[3]=e.y2,t[4]=e.x3,t[5]=e.y3,!0},triangulate(e,t,n,r,i,a){let o=0;r*=n,t[r+o]=e[0],t[r+o+1]=e[1],o+=n,t[r+o]=e[2],t[r+o+1]=e[3],o+=n,t[r+o]=e[4],t[r+o+1]=e[5];let s=r/n;i[a++]=s,i[a++]=s+1,i[a++]=s+2}},GQ=[{offset:0,color:`white`},{offset:1,color:`black`}],KQ=class e{constructor(...t){this.uid=vt(`fillGradient`),this._tick=0,this.type=`linear`,this.colorStops=[];let n=Aye(t);n={...n.type===`radial`?e.defaultRadialOptions:e.defaultLinearOptions,...it(n)},this._textureSize=n.textureSize,this._wrapMode=n.wrapMode,n.type===`radial`?(this.center=n.center,this.outerCenter=n.outerCenter??this.center,this.innerRadius=n.innerRadius,this.outerRadius=n.outerRadius,this.scale=n.scale,this.rotation=n.rotation):(this.start=n.start,this.end=n.end),this.textureSpace=n.textureSpace,this.type=n.type,n.colorStops.forEach(e=>{this.addColorStop(e.offset,e.color)})}addColorStop(e,t){return this.colorStops.push({offset:e,color:lt.shared.setValue(t).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:e,y:t}=this.start,{x:n,y:r}=this.end,i=n-e,a=r-t,o=i<0||a<0;if(this._wrapMode===`clamp-to-edge`){if(i<0){let t=e;e=n,n=t,i*=-1}if(a<0){let e=t;t=r,r=e,a*=-1}}let s=this.colorStops.length?this.colorStops:GQ,c=this._textureSize,{canvas:l,context:u}=YQ(c,1),d=o?u.createLinearGradient(this._textureSize,0,0,0):u.createLinearGradient(0,0,this._textureSize,0);JQ(d,s),u.fillStyle=d,u.fillRect(0,0,c,1),this.texture=new et({source:new Xt({resource:l,addressMode:this._wrapMode})});let f=Math.sqrt(i*i+a*a),p=Math.atan2(a,i),m=new Qe;m.scale(f/c,1),m.rotate(p),m.translate(e,t),this.textureSpace===`local`&&m.scale(c,c),this.transform=m}buildGradient(){this.texture||this._tick++,this.type===`linear`?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;let e=this.colorStops.length?this.colorStops:GQ,t=this._textureSize,{canvas:n,context:r}=YQ(t,t),{x:i,y:a}=this.center,{x:o,y:s}=this.outerCenter,c=this.innerRadius,l=this.outerRadius,u=o-l,d=s-l,f=t/(l*2),p=(i-u)*f,m=(a-d)*f,h=r.createRadialGradient(p,m,c*f,(o-u)*f,(s-d)*f,l*f);JQ(h,e),r.fillStyle=e[e.length-1].color,r.fillRect(0,0,t,t),r.fillStyle=h,r.translate(p,m),r.rotate(this.rotation),r.scale(1,this.scale),r.translate(-p,-m),r.fillRect(0,0,t,t),this.texture=new et({source:new Xt({resource:n,addressMode:this._wrapMode})});let g=new Qe;g.scale(1/f,1/f),g.translate(u,d),this.textureSpace===`local`&&g.scale(t,t),this.transform=g}destroy(){this.texture?.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};KQ.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:`local`,type:`linear`,textureSize:256,wrapMode:`clamp-to-edge`},KQ.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:`local`,type:`radial`,textureSize:256,wrapMode:`clamp-to-edge`};var qQ=KQ;function JQ(e,t){for(let n=0;n<t.length;n++){let r=t[n];e.addColorStop(r.offset,r.color)}}function YQ(e,t){let n=Gt.get().createCanvas(e,t);return{canvas:n,context:n.getContext(`2d`)}}function Aye(e){let t=e[0]??{};return(typeof t==`number`||e[1])&&(zt(`8.5.2`,`use options object instead`),t={type:`linear`,start:{x:e[0],y:e[1]},end:{x:e[2],y:e[3]},textureSpace:e[4],textureSize:e[5]??qQ.defaultLinearOptions.textureSize}),t}var jye=new Qe,Mye=new bt;function XQ(e,t,n,r){let i=t.matrix?e.copyFrom(t.matrix).invert():e.identity();if(t.textureSpace===`local`){let e=n.getBounds(Mye);t.width&&e.pad(t.width);let{x:r,y:a}=e,o=1/e.width,s=1/e.height,c=-r*o,l=-a*s,u=i.a,d=i.b,f=i.c,p=i.d;i.a*=o,i.b*=o,i.c*=s,i.d*=s,i.tx=c*u+l*f+i.tx,i.ty=c*d+l*p+i.ty}else i.translate(t.texture.frame.x,t.texture.frame.y),i.scale(1/t.texture.source.width,1/t.texture.source.height);let a=t.texture.source.style;return!(t.fill instanceof qQ)&&a.addressMode===`clamp-to-edge`&&(a.addressMode=`repeat`,a.update()),r&&i.append(jye.copyFrom(r).invert()),i}var ZQ={};jt.handleByMap(W.ShapeBuilder,ZQ),jt.add(Oye,Dye,kye,RQ,Sye,Cye);var Nye=new bt,Pye=new Qe;function Fye(e,t){let{geometryData:n,batches:r}=t;r.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let t=0;t<e.instructions.length;t++){let i=e.instructions[t];if(i.action===`texture`)Iye(i.data,r,n);else if(i.action===`fill`||i.action===`stroke`){let e=i.action===`stroke`,t=i.data.path.shapePath,a=i.data.style,o=i.data.hole;e&&o&&QQ(o.shapePath,a,!0,r,n),o&&(t.shapePrimitives[t.shapePrimitives.length-1].holes=o.shapePath.shapePrimitives),QQ(t,a,e,r,n)}}}function Iye(e,t,n){let r=[],i=ZQ.rectangle,a=Nye;a.x=e.dx,a.y=e.dy,a.width=e.dw,a.height=e.dh;let o=e.transform;if(!i.build(a,r))return;let{vertices:s,uvs:c,indices:l}=n,u=l.length,d=s.length/2;o&&IQ(r,o),i.triangulate(r,s,2,d,l,u);let f=e.image,p=f.uvs;c.push(p.x0,p.y0,p.x1,p.y1,p.x3,p.y3,p.x2,p.y2);let m=ft.get(LQ);m.indexOffset=u,m.indexSize=l.length-u,m.attributeOffset=d,m.attributeSize=s.length/2-d,m.baseColor=e.style,m.alpha=e.alpha,m.texture=f,m.geometryData=n,t.push(m)}function QQ(e,t,n,r,i){let{vertices:a,uvs:o,indices:s}=i;e.shapePrimitives.forEach(({shape:e,transform:c,holes:l})=>{let u=[],d=ZQ[e.type];if(!d.build(e,u))return;let f=s.length,p=a.length/2,m=`triangle-list`;if(c&&IQ(u,c),n){let n=e.closePath??!0,r=t;r.pixelLine?(Tye(u,n,a,s),m=`line-list`):UQ(u,r,!1,n,a,s)}else if(l){let e=[],t=u.slice();Lye(l).forEach(n=>{e.push(t.length/2),t.push(...n)}),WQ(t,e,a,2,p,s,f)}else d.triangulate(u,a,2,p,s,f);let h=o.length/2,g=t.texture;if(g!==et.WHITE){let n=XQ(Pye,t,e,c);yye(a,2,p,o,h,2,a.length/2-p,n)}else bye(o,h,2,a.length/2-p);let _=ft.get(LQ);_.indexOffset=f,_.indexSize=s.length-f,_.attributeOffset=p,_.attributeSize=a.length/2-p,_.baseColor=t.color,_.alpha=t.alpha,_.texture=g,_.geometryData=i,_.topology=m,r.push(_)})}function Lye(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n].shape,i=[];ZQ[r.type].build(r,i)&&t.push(i)}return t}var Rye=class{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(e=>{ft.return(e)}),this.graphicsData&&ft.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}},zye=class{constructor(){this.instructions=new Kt}init(e){let t=e.maxTextures;this.batcher?this.batcher._updateMaxTextures(t):this.batcher=new vn({maxTextures:t}),this.instructions.reset()}get geometry(){return zt(yt,`GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead.`),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}},$Q=class e{constructor(e){this._renderer=e,this._managedContexts=new ln({renderer:e,type:`resource`,name:`graphicsContext`})}init(t){e.defaultOptions.bezierSmoothness=t?.bezierSmoothness??e.defaultOptions.bezierSmoothness}getContextRenderData(e){return e._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(e)}updateGpuContext(e){let t=!!e._gpuData[this._renderer.uid],n=e._gpuData[this._renderer.uid]||this._initContext(e);if(e.dirty||!t){t&&n.reset(),Fye(e,n);let r=e.batchMode;e.customShader||r===`no-batch`?n.isBatchable=!1:r===`auto`?n.isBatchable=n.geometryData.vertices.length<400:n.isBatchable=!0,e.dirty=!1}return n}getGpuContext(e){return e._gpuData[this._renderer.uid]||this._initContext(e)}_initContextRenderData(e){let t=ft.get(zye,{maxTextures:this._renderer.limits.maxBatchableTextures}),n=e._gpuData[this._renderer.uid],{batches:r,geometryData:i}=n;n.graphicsData=t;let a=i.vertices.length,o=i.indices.length;for(let e=0;e<r.length;e++)r[e].applyTransform=!1;let s=t.batcher;s.ensureAttributeBuffer(a),s.ensureIndexBuffer(o),s.begin();for(let e=0;e<r.length;e++){let t=r[e];s.add(t)}s.finish(t.instructions);let c=s.geometry;c.indexBuffer.setDataWithSize(s.indexBuffer,s.indexSize,!0),c.buffers[0].setDataWithSize(s.attributeBuffer.float32View,s.attributeSize,!0);let l=s.batches;for(let e=0;e<l.length;e++){let t=l[e];t.bindGroup=Dn(t.textures.textures,t.textures.count,this._renderer.limits.maxBatchableTextures)}return t}_initContext(e){let t=new Rye;return t.context=e,e._gpuData[this._renderer.uid]=t,this._managedContexts.add(e),t}destroy(){this._managedContexts.destroy(),this._renderer=null}};$Q.extension={type:[W.WebGLSystem,W.WebGPUSystem],name:`graphicsContext`},$Q.defaultOptions={bezierSmoothness:.5};var e$=$Q,Bye=8,t$=1.1920929e-7,Vye=1,n$=.01,r$=0,i$=0;function a$(e,t,n,r,i,a,o,s,c,l){let u=(Vye-Math.min(.99,Math.max(0,l??e$.defaultOptions.bezierSmoothness)))/1;return u*=u,Hye(t,n,r,i,a,o,s,c,e,u),e}function Hye(e,t,n,r,i,a,o,s,c,l){o$(e,t,n,r,i,a,o,s,c,l,0),c.push(o,s)}function o$(e,t,n,r,i,a,o,s,c,l,u){if(u>Bye)return;let d=Math.PI,f=(e+n)/2,p=(t+r)/2,m=(n+i)/2,h=(r+a)/2,g=(i+o)/2,_=(a+s)/2,v=(f+m)/2,y=(p+h)/2,b=(m+g)/2,x=(h+_)/2,S=(v+b)/2,C=(y+x)/2;if(u>0){let u=o-e,f=s-t,p=Math.abs((n-o)*f-(r-s)*u),m=Math.abs((i-o)*f-(a-s)*u),h,g;if(p>t$&&m>t$){if((p+m)*(p+m)<=l*(u*u+f*f)){if(r$<n$){c.push(S,C);return}let l=Math.atan2(a-r,i-n);if(h=Math.abs(l-Math.atan2(r-t,n-e)),g=Math.abs(Math.atan2(s-a,o-i)-l),h>=d&&(h=2*d-h),g>=d&&(g=2*d-g),h+g<r$){c.push(S,C);return}if(i$!==0){if(h>i$){c.push(n,r);return}if(g>i$){c.push(i,a);return}}}}else if(p>t$){if(p*p<=l*(u*u+f*f)){if(r$<n$){c.push(S,C);return}if(h=Math.abs(Math.atan2(a-r,i-n)-Math.atan2(r-t,n-e)),h>=d&&(h=2*d-h),h<r$){c.push(n,r),c.push(i,a);return}if(i$!==0&&h>i$){c.push(n,r);return}}}else if(m>t$){if(m*m<=l*(u*u+f*f)){if(r$<n$){c.push(S,C);return}if(h=Math.abs(Math.atan2(s-a,o-i)-Math.atan2(a-r,i-n)),h>=d&&(h=2*d-h),h<r$){c.push(n,r),c.push(i,a);return}if(i$!==0&&h>i$){c.push(i,a);return}}}else if(u=S-(e+o)/2,f=C-(t+s)/2,u*u+f*f<=l){c.push(S,C);return}}o$(e,t,f,p,v,y,S,C,c,l,u+1),o$(S,C,b,x,g,_,o,s,c,l,u+1)}var Uye=8,s$=1.1920929e-7,Wye=1,Gye=.01,c$=0;function Kye(e,t,n,r,i,a,o,s){let c=(Wye-Math.min(.99,Math.max(0,s??e$.defaultOptions.bezierSmoothness)))/1;return c*=c,qye(t,n,r,i,a,o,e,c),e}function qye(e,t,n,r,i,a,o,s){l$(o,e,t,n,r,i,a,s,0),o.push(i,a)}function l$(e,t,n,r,i,a,o,s,c){if(c>Uye)return;let l=Math.PI,u=(t+r)/2,d=(n+i)/2,f=(r+a)/2,p=(i+o)/2,m=(u+f)/2,h=(d+p)/2,g=a-t,_=o-n,v=Math.abs((r-a)*_-(i-o)*g);if(v>s$){if(v*v<=s*(g*g+_*_)){if(c$<Gye){e.push(m,h);return}let s=Math.abs(Math.atan2(o-i,a-r)-Math.atan2(i-n,r-t));if(s>=l&&(s=2*l-s),s<c$){e.push(m,h);return}}}else if(g=m-(t+a)/2,_=h-(n+o)/2,g*g+_*_<=s){e.push(m,h);return}l$(e,t,n,u,d,m,h,s,c+1),l$(e,m,h,f,p,a,o,s,c+1)}function u$(e,t,n,r,i,a,o,s){let c=Math.abs(i-a);(!o&&i>a||o&&a>i)&&(c=2*Math.PI-c),s||=Math.max(6,Math.floor(6*r**(1/3)*(c/Math.PI))),s=Math.max(s,3);let l=c/s,u=i;l*=o?-1:1;for(let i=0;i<s+1;i++){let i=Math.cos(u),a=Math.sin(u),o=t+i*r,s=n+a*r;e.push(o,s),u+=l}}function Jye(e,t,n,r,i,a){let o=e[e.length-2],s=e[e.length-1]-n,c=o-t,l=i-n,u=r-t,d=Math.abs(s*u-c*l);if(d<1e-8||a===0){(e[e.length-2]!==t||e[e.length-1]!==n)&&e.push(t,n);return}let f=s*s+c*c,p=l*l+u*u,m=s*l+c*u,h=a*Math.sqrt(f)/d,g=a*Math.sqrt(p)/d,_=h*m/f,v=g*m/p,y=h*u+g*c,b=h*l+g*s,x=c*(g+_),S=s*(g+_),C=u*(h+v),w=l*(h+v),T=Math.atan2(S-b,x-y),E=Math.atan2(w-b,C-y);u$(e,y+t,b+n,a,T,E,c*l>u*s)}var d$=Math.PI*2,f$={centerX:0,centerY:0,ang1:0,ang2:0},p$=({x:e,y:t},n,r,i,a,o,s,c)=>{e*=n,t*=r;let l=i*e-a*t,u=a*e+i*t;return c.x=l+o,c.y=u+s,c};function Yye(e,t){let n=t===-1.5707963267948966?-.551915024494:4/3*Math.tan(t/4),r=t===1.5707963267948966?.551915024494:n,i=Math.cos(e),a=Math.sin(e),o=Math.cos(e+t),s=Math.sin(e+t);return[{x:i-a*r,y:a+i*r},{x:o+s*r,y:s-o*r},{x:o,y:s}]}var m$=(e,t,n,r)=>{let i=e*r-t*n<0?-1:1,a=e*n+t*r;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)},Xye=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{let p=i**2,m=a**2,h=u**2,g=d**2,_=p*m-p*g-m*h;_<0&&(_=0),_/=p*g+m*h,_=Math.sqrt(_)*(o===s?-1:1);let v=_*i/a*d,y=_*-a/i*u,b=l*v-c*y+(e+n)/2,x=c*v+l*y+(t+r)/2,S=(u-v)/i,C=(d-y)/a,w=(-u-v)/i,T=(-d-y)/a,E=m$(1,0,S,C),D=m$(S,C,w,T);s===0&&D>0&&(D-=d$),s===1&&D<0&&(D+=d$),f.centerX=b,f.centerY=x,f.ang1=E,f.ang2=D};function Zye(e,t,n,r,i,a,o,s=0,c=0,l=0){if(a===0||o===0)return;let u=Math.sin(s*d$/360),d=Math.cos(s*d$/360),f=d*(t-r)/2+u*(n-i)/2,p=-u*(t-r)/2+d*(n-i)/2;if(f===0&&p===0)return;a=Math.abs(a),o=Math.abs(o);let m=f**2/a**2+p**2/o**2;m>1&&(a*=Math.sqrt(m),o*=Math.sqrt(m)),Xye(t,n,r,i,a,o,c,l,u,d,f,p,f$);let{ang1:h,ang2:g}=f$,{centerX:_,centerY:v}=f$,y=Math.abs(g)/(d$/4);Math.abs(1-y)<1e-7&&(y=1);let b=Math.max(Math.ceil(y),1);g/=b;let x=e[e.length-2],S=e[e.length-1],C={x:0,y:0};for(let t=0;t<b;t++){let t=Yye(h,g),{x:n,y:r}=p$(t[0],a,o,d,u,_,v,C),{x:i,y:s}=p$(t[1],a,o,d,u,_,v,C),{x:c,y:l}=p$(t[2],a,o,d,u,_,v,C);a$(e,x,S,n,r,i,s,c,l),x=c,S=l,h+=g}}function Qye(e,t,n){let r=(e,t)=>{let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return{len:i,nx:n/i,ny:r/i}},i=(t,n)=>{t===0?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)},a=t[t.length-1];for(let o=0;o<t.length;o++){let s=t[o%t.length],c=s.radius??n;if(c<=0){i(o,s),a=s;continue}let l=t[(o+1)%t.length],u=r(s,a),d=r(s,l);if(u.len<1e-4||d.len<1e-4){i(o,s),a=s;continue}let f=Math.asin(u.nx*d.ny-u.ny*d.nx),p=1,m=!1;u.nx*d.nx-u.ny*-d.ny<0?f<0?f=Math.PI+f:(f=Math.PI-f,p=-1,m=!0):f>0&&(p=-1,m=!0);let h=f/2,g,_=Math.abs(Math.cos(h)*c/Math.sin(h));_>Math.min(u.len/2,d.len/2)?(_=Math.min(u.len/2,d.len/2),g=Math.abs(_*Math.sin(h)/Math.cos(h))):g=c;let v=s.x+d.nx*_+-d.ny*g*p,y=s.y+d.ny*_+d.nx*g*p,b=Math.atan2(u.ny,u.nx)+Math.PI/2*p,x=Math.atan2(d.ny,d.nx)-Math.PI/2*p;o===0&&e.moveTo(v+Math.cos(b)*g,y+Math.sin(b)*g),e.arc(v,y,g,b,x,m),a=s}}function $ye(e,t,n,r){let i=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),a=(e,t,n)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),o=t.length;for(let s=0;s<o;s++){let c=t[(s+1)%o],l=c.radius??n;if(l<=0){s===0?e.moveTo(c.x,c.y):e.lineTo(c.x,c.y);continue}let u=t[s],d=t[(s+2)%o],f=i(u,c),p;p=f<1e-4?c:a(c,u,Math.min(f/2,l)/f);let m=i(d,c),h;h=m<1e-4?c:a(c,d,Math.min(m/2,l)/m),s===0?e.moveTo(p.x,p.y):e.lineTo(p.x,p.y),e.quadraticCurveTo(c.x,c.y,h.x,h.y,r)}}var ebe=new bt,tbe=class{constructor(e){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new mt,this._graphicsPath2D=e,this.signed=e.checkForHoles}moveTo(e,t){return this.startPoly(e,t),this}lineTo(e,t){this._ensurePoly();let n=this._currentPoly.points,r=n[n.length-2],i=n[n.length-1];return(r!==e||i!==t)&&n.push(e,t),this}arc(e,t,n,r,i,a){this._ensurePoly(!1);let o=this._currentPoly.points;return u$(o,e,t,n,r,i,a),this}arcTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly.points;return Jye(a,e,t,n,r,i),this}arcToSvg(e,t,n,r,i,a,o){let s=this._currentPoly.points;return Zye(s,this._currentPoly.lastX,this._currentPoly.lastY,a,o,e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,a,o){this._ensurePoly();let s=this._currentPoly;return a$(this._currentPoly.points,s.lastX,s.lastY,e,t,n,r,i,a,o),this}quadraticCurveTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly;return Kye(this._currentPoly.points,a.lastX,a.lastY,e,t,n,r,i),this}closePath(){return this.endPoly(!0),this}addPath(e,t){this.endPoly(),t&&!t.isIdentity()&&(e=e.clone(!0),e.transform(t));let n=this.shapePrimitives,r=n.length;for(let t=0;t<e.instructions.length;t++){let n=e.instructions[t];this[n.action](...n.data)}if(e.checkForHoles&&n.length-r>1){let e=null;for(let t=r;t<n.length;t++){let r=n[t];if(r.shape.type===`polygon`){let i=r.shape,a=e?.shape;a&&a.containsPolygon(i)?(e.holes||=[],e.holes.push(r),n.copyWithin(t,t+1),n.length--,t--):e=r}}}return this}finish(e=!1){this.endPoly(e)}rect(e,t,n,r,i){return this.drawShape(new bt(e,t,n,r),i),this}circle(e,t,n,r){return this.drawShape(new pye(e,t,n),r),this}poly(e,t,n){let r=new PQ(e);return r.closePath=t,this.drawShape(r,n),this}regularPoly(e,t,n,r,i=0,a){r=Math.max(r|0,3);let o=-1*Math.PI/2+i,s=Math.PI*2/r,c=[];for(let i=0;i<r;i++){let r=o-i*s;c.push(e+n*Math.cos(r),t+n*Math.sin(r))}return this.poly(c,!0,a),this}roundPoly(e,t,n,r,i,a=0,o){if(r=Math.max(r|0,3),i<=0)return this.regularPoly(e,t,n,r,a);let s=n*Math.sin(Math.PI/r)-.001;i=Math.min(i,s);let c=-1*Math.PI/2+a,l=Math.PI*2/r,u=(r-2)*Math.PI/r/2;for(let a=0;a<r;a++){let r=a*l+c,s=e+n*Math.cos(r),d=t+n*Math.sin(r),f=r+Math.PI+u,p=r-Math.PI-u,m=s+i*Math.cos(f),h=d+i*Math.sin(f),g=s+i*Math.cos(p),_=d+i*Math.sin(p);a===0?this.moveTo(m,h):this.lineTo(m,h),this.quadraticCurveTo(s,d,g,_,o)}return this.closePath()}roundShape(e,t,n=!1,r){return e.length<3?this:(n?$ye(this,e,t,r):Qye(this,e,t),this.closePath())}filletRect(e,t,n,r,i){if(i===0)return this.rect(e,t,n,r);let a=Math.min(n,r)/2,o=Math.min(a,Math.max(-a,i)),s=e+n,c=t+r,l=o<0?-o:0,u=Math.abs(o);return this.moveTo(e,t+u).arcTo(e+l,t+l,e+u,t,u).lineTo(s-u,t).arcTo(s-l,t+l,s,t+u,u).lineTo(s,c-u).arcTo(s-l,c-l,e+n-u,c,u).lineTo(e+u,c).arcTo(e+l,c-l,e,c-u,u).closePath()}chamferRect(e,t,n,r,i,a){if(i<=0)return this.rect(e,t,n,r);let o=Math.min(i,Math.min(n,r)/2),s=e+n,c=t+r,l=[e+o,t,s-o,t,s,t+o,s,c-o,s-o,c,e+o,c,e,c-o,e,t+o];for(let e=l.length-1;e>=2;e-=2)l[e]===l[e-2]&&l[e-1]===l[e-3]&&l.splice(e-1,2);return this.poly(l,!0,a)}ellipse(e,t,n,r,i){return this.drawShape(new mye(e,t,n,r),i),this}roundRect(e,t,n,r,i,a){return this.drawShape(new vye(e,t,n,r,i),a),this}drawShape(e,t){return this.endPoly(),this.shapePrimitives.push({shape:e,transform:t}),this}startPoly(e,t){let n=this._currentPoly;return n&&this.endPoly(),n=new PQ,n.points.push(e,t),this._currentPoly=n,this}endPoly(e=!1){let t=this._currentPoly;return t&&t.points.length>2&&(t.closePath=e,this.shapePrimitives.push({shape:t})),this._currentPoly=null,this}_ensurePoly(e=!0){if(!this._currentPoly&&(this._currentPoly=new PQ,e)){let e=this.shapePrimitives[this.shapePrimitives.length-1];if(e){let t=e.shape.x,n=e.shape.y;if(e.transform&&!e.transform.isIdentity()){let r=e.transform,i=t;t=r.a*t+r.c*n+r.tx,n=r.b*i+r.d*n+r.ty}this._currentPoly.points.push(t,n)}else this._currentPoly.points.push(0,0)}}buildPath(){let e=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let t=0;t<e.instructions.length;t++){let n=e.instructions[t];this[n.action](...n.data)}this.finish()}get bounds(){let e=this._bounds;e.clear();let t=this.shapePrimitives;for(let n=0;n<t.length;n++){let r=t[n],i=r.shape.getBounds(ebe);r.transform?e.addRect(i,r.transform):e.addRect(i)}return e}},h$=class e{constructor(e,t=!1){this.instructions=[],this.uid=vt(`graphicsPath`),this._dirty=!0,this.checkForHoles=t,typeof e==`string`?fye(e,this):this.instructions=e?.slice()??[]}get shapePath(){return this._shapePath||=new tbe(this),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(e,t){return e=e.clone(),this.instructions.push({action:`addPath`,data:[e,t]}),this._dirty=!0,this}arc(...e){return this.instructions.push({action:`arc`,data:e}),this._dirty=!0,this}arcTo(...e){return this.instructions.push({action:`arcTo`,data:e}),this._dirty=!0,this}arcToSvg(...e){return this.instructions.push({action:`arcToSvg`,data:e}),this._dirty=!0,this}bezierCurveTo(...e){return this.instructions.push({action:`bezierCurveTo`,data:e}),this._dirty=!0,this}bezierCurveToShort(e,t,n,r,i){let a=this.instructions[this.instructions.length-1],o=this.getLastPoint(Et.shared),s=0,c=0;if(!a||a.action!==`bezierCurveTo`)s=o.x,c=o.y;else{s=a.data[2],c=a.data[3];let e=o.x,t=o.y;s=e+(e-s),c=t+(t-c)}return this.instructions.push({action:`bezierCurveTo`,data:[s,c,e,t,n,r,i]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:`closePath`,data:[]}),this._dirty=!0,this}ellipse(...e){return this.instructions.push({action:`ellipse`,data:e}),this._dirty=!0,this}lineTo(...e){return this.instructions.push({action:`lineTo`,data:e}),this._dirty=!0,this}moveTo(...e){return this.instructions.push({action:`moveTo`,data:e}),this}quadraticCurveTo(...e){return this.instructions.push({action:`quadraticCurveTo`,data:e}),this._dirty=!0,this}quadraticCurveToShort(e,t,n){let r=this.instructions[this.instructions.length-1],i=this.getLastPoint(Et.shared),a=0,o=0;if(!r||r.action!==`quadraticCurveTo`)a=i.x,o=i.y;else{a=r.data[0],o=r.data[1];let e=i.x,t=i.y;a=e+(e-a),o=t+(t-o)}return this.instructions.push({action:`quadraticCurveTo`,data:[a,o,e,t,n]}),this._dirty=!0,this}rect(e,t,n,r,i){return this.instructions.push({action:`rect`,data:[e,t,n,r,i]}),this._dirty=!0,this}circle(e,t,n,r){return this.instructions.push({action:`circle`,data:[e,t,n,r]}),this._dirty=!0,this}roundRect(...e){return this.instructions.push({action:`roundRect`,data:e}),this._dirty=!0,this}poly(...e){return this.instructions.push({action:`poly`,data:e}),this._dirty=!0,this}regularPoly(...e){return this.instructions.push({action:`regularPoly`,data:e}),this._dirty=!0,this}roundPoly(...e){return this.instructions.push({action:`roundPoly`,data:e}),this._dirty=!0,this}roundShape(...e){return this.instructions.push({action:`roundShape`,data:e}),this._dirty=!0,this}filletRect(...e){return this.instructions.push({action:`filletRect`,data:e}),this._dirty=!0,this}chamferRect(...e){return this.instructions.push({action:`chamferRect`,data:e}),this._dirty=!0,this}star(e,t,n,r,i,a,o){i||=r/2;let s=-1*Math.PI/2+a,c=n*2,l=Math.PI*2/c,u=[];for(let n=0;n<c;n++){let a=n%2?i:r,o=n*l+s;u.push(e+a*Math.cos(o),t+a*Math.sin(o))}return this.poly(u,!0,o),this}clone(t=!1){let n=new e;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let e=0;e<this.instructions.length;e++){let t=this.instructions[e];n.instructions.push({action:t.action,data:t.data.slice()})}return n}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(e){if(e.isIdentity())return this;let t=e.a,n=e.b,r=e.c,i=e.d,a=e.tx,o=e.ty,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0;for(let h=0;h<this.instructions.length;h++){let g=this.instructions[h],_=g.data;switch(g.action){case`moveTo`:case`lineTo`:s=_[0],c=_[1],_[0]=t*s+r*c+a,_[1]=n*s+i*c+o;break;case`bezierCurveTo`:l=_[0],u=_[1],d=_[2],f=_[3],s=_[4],c=_[5],_[0]=t*l+r*u+a,_[1]=n*l+i*u+o,_[2]=t*d+r*f+a,_[3]=n*d+i*f+o,_[4]=t*s+r*c+a,_[5]=n*s+i*c+o;break;case`quadraticCurveTo`:l=_[0],u=_[1],s=_[2],c=_[3],_[0]=t*l+r*u+a,_[1]=n*l+i*u+o,_[2]=t*s+r*c+a,_[3]=n*s+i*c+o;break;case`arcToSvg`:s=_[5],c=_[6],p=_[0],m=_[1],_[0]=t*p+r*m,_[1]=n*p+i*m,_[5]=t*s+r*c+a,_[6]=n*s+i*c+o;break;case`circle`:_[4]=g$(_[3],e);break;case`rect`:_[4]=g$(_[4],e);break;case`ellipse`:_[8]=g$(_[8],e);break;case`roundRect`:_[5]=g$(_[5],e);break;case`addPath`:_[0].transform(e);break;case`poly`:_[2]=g$(_[2],e);break;default:ot(`unknown transform action`,g.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(e){let t=this.instructions.length-1,n=this.instructions[t];if(!n)return e.x=0,e.y=0,e;for(;n.action===`closePath`;){if(t--,t<0)return e.x=0,e.y=0,e;n=this.instructions[t]}switch(n.action){case`moveTo`:case`lineTo`:e.x=n.data[0],e.y=n.data[1];break;case`quadraticCurveTo`:e.x=n.data[2],e.y=n.data[3];break;case`bezierCurveTo`:e.x=n.data[4],e.y=n.data[5];break;case`arc`:case`arcToSvg`:e.x=n.data[5],e.y=n.data[6];break;case`addPath`:n.data[0].getLastPoint(e);break}return e}};function g$(e,t){return e?e.prepend(t):t.clone()}function _$(e,t,n){let r=e.getAttribute(t);return r?Number(r):n}function nbe(e,t){let n=e.querySelectorAll(`defs`);for(let e=0;e<n.length;e++){let r=n[e];for(let e=0;e<r.children.length;e++){let n=r.children[e];switch(n.nodeName.toLowerCase()){case`lineargradient`:t.defs[n.id]=rbe(n);break;case`radialgradient`:t.defs[n.id]=ibe(n);break;default:break}}}}function rbe(e){let t=new qQ(_$(e,`x1`,0),_$(e,`y1`,0),_$(e,`x2`,1),_$(e,`y2`,0),(e.getAttribute(`gradientUnits`)||`objectBoundingBox`)===`objectBoundingBox`?`local`:`global`);for(let n=0;n<e.children.length;n++){let r=e.children[n],i=_$(r,`offset`,0),a=lt.shared.setValue(r.getAttribute(`stop-color`)).toNumber();t.addColorStop(i,a)}return t}function ibe(e){return ot(`[SVG Parser] Radial gradients are not yet supported`),new qQ(0,0,1,0)}function v$(e){let t=e.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:``}var y$={fill:{type:`paint`,default:0},"fill-opacity":{type:`number`,default:1},stroke:{type:`paint`,default:0},"stroke-width":{type:`number`,default:1},"stroke-opacity":{type:`number`,default:1},"stroke-linecap":{type:`string`,default:`butt`},"stroke-linejoin":{type:`string`,default:`miter`},"stroke-miterlimit":{type:`number`,default:10},"stroke-dasharray":{type:`string`,default:`none`},"stroke-dashoffset":{type:`number`,default:0},opacity:{type:`number`,default:1}};function b$(e,t){let n=e.getAttribute(`style`),r={},i={},a={strokeStyle:r,fillStyle:i,useFill:!1,useStroke:!1};for(let n in y$){let r=e.getAttribute(n);r&&x$(t,a,n,r.trim())}if(n){let e=n.split(`;`);for(let n=0;n<e.length;n++){let[r,i]=e[n].trim().split(`:`);y$[r]&&x$(t,a,r,i.trim())}}return{strokeStyle:a.useStroke?r:null,fillStyle:a.useFill?i:null,useFill:a.useFill,useStroke:a.useStroke}}function x$(e,t,n,r){switch(n){case`stroke`:if(r!==`none`){if(r.startsWith(`url(`)){let n=v$(r);t.strokeStyle.fill=e.defs[n]}else t.strokeStyle.color=lt.shared.setValue(r).toNumber();t.useStroke=!0}break;case`stroke-width`:t.strokeStyle.width=Number(r);break;case`fill`:if(r!==`none`){if(r.startsWith(`url(`)){let n=v$(r);t.fillStyle.fill=e.defs[n]}else t.fillStyle.color=lt.shared.setValue(r).toNumber();t.useFill=!0}break;case`fill-opacity`:t.fillStyle.alpha=Number(r);break;case`stroke-opacity`:t.strokeStyle.alpha=Number(r);break;case`opacity`:t.fillStyle.alpha=Number(r),t.strokeStyle.alpha=Number(r);break}}function abe(e){if(e.length<=2)return!0;let t=e.map(e=>e.area).sort((e,t)=>t-e),[n,r]=t,i=t[t.length-1],a=n/r,o=r/i;return!(a>3&&o<2)}function obe(e){return e.split(/(?=[Mm])/).filter(e=>e.trim().length>0)}function sbe(e){let t=e.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;let n=t.map(Number),r=[],i=[];for(let e=0;e<n.length;e+=2)e+1<n.length&&(r.push(n[e]),i.push(n[e+1]));if(r.length===0||i.length===0)return 0;let a=Math.min(...r),o=Math.max(...r),s=Math.min(...i),c=Math.max(...i);return(o-a)*(c-s)}function S$(e,t){let n=new h$(e,!1);for(let e of n.instructions)t.instructions.push(e)}function cbe(e,t){if(typeof e==`string`){let t=document.createElement(`div`);t.innerHTML=e.trim(),e=t.querySelector(`svg`)}let n={context:t,defs:{},path:new h$};nbe(e,n);let r=e.children,{fillStyle:i,strokeStyle:a}=b$(e,n);for(let e=0;e<r.length;e++){let t=r[e];t.nodeName.toLowerCase()!==`defs`&&C$(t,n,i,a)}return t}function C$(e,t,n,r){let i=e.children,{fillStyle:a,strokeStyle:o}=b$(e,t);a&&n?n={...n,...a}:a&&(n=a),o&&r?r={...r,...o}:o&&(r=o);let s=!n&&!r;s&&(n={color:0});let c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;switch(e.nodeName.toLowerCase()){case`path`:{x=e.getAttribute(`d`);let i=e.getAttribute(`fill-rule`),a=obe(x),o=i===`evenodd`,s=a.length>1;if(o&&s){let e=a.map(e=>({path:e,area:sbe(e)}));if(e.sort((e,t)=>t.area-e.area),a.length>3||!abe(e))for(let i=0;i<e.length;i++){let a=e[i],o=i===0;t.context.beginPath();let s=new h$(void 0,!0);S$(a.path,s),t.context.path(s),o?(n&&t.context.fill(n),r&&t.context.stroke(r)):t.context.cut()}else for(let i=0;i<e.length;i++){let a=e[i],o=i%2==1;t.context.beginPath();let s=new h$(void 0,!0);S$(a.path,s),t.context.path(s),o?t.context.cut():(n&&t.context.fill(n),r&&t.context.stroke(r))}}else S=new h$(x,i?i===`evenodd`:!0),t.context.path(S),n&&t.context.fill(n),r&&t.context.stroke(r);break}case`circle`:m=_$(e,`cx`,0),h=_$(e,`cy`,0),g=_$(e,`r`,0),t.context.ellipse(m,h,g,g),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`rect`:c=_$(e,`x`,0),l=_$(e,`y`,0),C=_$(e,`width`,0),w=_$(e,`height`,0),_=_$(e,`rx`,0),v=_$(e,`ry`,0),_||v?t.context.roundRect(c,l,C,w,_||v):t.context.rect(c,l,C,w),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`ellipse`:m=_$(e,`cx`,0),h=_$(e,`cy`,0),_=_$(e,`rx`,0),v=_$(e,`ry`,0),t.context.beginPath(),t.context.ellipse(m,h,_,v),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`line`:u=_$(e,`x1`,0),d=_$(e,`y1`,0),f=_$(e,`x2`,0),p=_$(e,`y2`,0),t.context.beginPath(),t.context.moveTo(u,d),t.context.lineTo(f,p),r&&t.context.stroke(r);break;case`polygon`:b=e.getAttribute(`points`),y=b.match(/-?\d+/g).map(e=>parseInt(e,10)),t.context.poly(y,!0),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`polyline`:b=e.getAttribute(`points`),y=b.match(/-?\d+/g).map(e=>parseInt(e,10)),t.context.poly(y,!1),r&&t.context.stroke(r);break;case`g`:case`svg`:break;default:ot(`[SVG parser] <${e.nodeName}> elements unsupported`);break}s&&(n=null);for(let e=0;e<i.length;e++)C$(i[e],t,n,r)}var w$={repeat:{addressModeU:`repeat`,addressModeV:`repeat`},"repeat-x":{addressModeU:`repeat`,addressModeV:`clamp-to-edge`},"repeat-y":{addressModeU:`clamp-to-edge`,addressModeV:`repeat`},"no-repeat":{addressModeU:`clamp-to-edge`,addressModeV:`clamp-to-edge`}},T$=class{constructor(e,t){this.uid=vt(`fillPattern`),this._tick=0,this.transform=new Qe,this.texture=e,this.transform.scale(1/e.frame.width,1/e.frame.height),t&&(e.source.style.addressModeU=w$[t].addressModeU,e.source.style.addressModeV=w$[t].addressModeV)}setTransform(e){let t=this.texture;this.transform.copyFrom(e),this.transform.invert(),this.transform.scale(1/t.frame.width,1/t.frame.height),this._tick++}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture=e,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}};function lbe(e){return lt.isColorLike(e)}function E$(e){return e instanceof T$}function D$(e){return e instanceof qQ}function ube(e){return e instanceof et}function dbe(e,t,n){let r=lt.shared.setValue(t??0);return e.color=r.toNumber(),e.alpha=r.alpha===1?n.alpha:r.alpha,e.texture=et.WHITE,{...n,...e}}function fbe(e,t,n){return e.texture=t,{...n,...e}}function O$(e,t,n){return e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,{...n,...e}}function k$(e,t,n){return t.buildGradient(),e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,e.textureSpace=t.textureSpace,{...n,...e}}function pbe(e,t){let n={...t,...e},r=lt.shared.setValue(n.color);return n.alpha*=r.alpha,n.color=r.toNumber(),n}function A$(e,t){if(e==null)return null;let n={},r=e;return lbe(e)?dbe(n,e,t):ube(e)?fbe(n,e,t):E$(e)?O$(n,e,t):D$(e)?k$(n,e,t):r.fill&&E$(r.fill)?O$(r,r.fill,t):r.fill&&D$(r.fill)?k$(r,r.fill,t):pbe(r,t)}function j$(e,t){let{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...c}=t,l=A$(e,c);return l?{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...l}:null}var mbe=new Et,M$=new Qe,N$=class e extends Ut{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=vt(`graphicsContext`),this.dirty=!0,this.batchMode=`auto`,this.instructions=[],this.destroyed=!1,this._activePath=new h$,this._transform=new Qe,this._fillStyle={...e.defaultFillStyle},this._strokeStyle={...e.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new mt,this._boundsDirty=!0}clone(){let t=new e;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=A$(t,e.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=j$(t,e.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=A$(t,e.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=A$(t,e.defaultStrokeStyle),this}texture(e,t,n,r,i,a){return this.instructions.push({action:`texture`,data:{image:e,dx:n||0,dy:r||0,dw:i||e.frame.width,dh:a||e.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:t||t===0?lt.shared.setValue(t).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new h$,this}fill(t,n){let r,i=this.instructions[this.instructions.length-1];return r=this._tick===0&&i?.action===`stroke`?i.data.path:this._activePath.clone(),r?(t!=null&&(n!==void 0&&typeof t==`number`&&(zt(st,`GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead`),t={color:t,alpha:n}),this._fillStyle=A$(t,e.defaultFillStyle)),this.instructions.push({action:`fill`,data:{style:this.fillStyle,path:r}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){let{x:e,y:t}=this._activePath.getLastPoint(Et.shared);this._activePath.clear(),this._activePath.moveTo(e,t)}stroke(t){let n,r=this.instructions[this.instructions.length-1];return n=this._tick===0&&r?.action===`fill`?r.data.path:this._activePath.clone(),n?(t!=null&&(this._strokeStyle=j$(t,e.defaultStrokeStyle)),this.instructions.push({action:`stroke`,data:{style:this.strokeStyle,path:n}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let e=0;e<2;e++){let t=this.instructions[this.instructions.length-1-e],n=this._activePath.clone();if(t&&(t.action===`stroke`||t.action===`fill`))if(t.data.hole)t.data.hole.addPath(n);else{t.data.hole=n;break}}return this._initNextPathLocation(),this}arc(e,t,n,r,i,a){this._tick++;let o=this._transform;return this._activePath.arc(o.a*e+o.c*t+o.tx,o.b*e+o.d*t+o.ty,n,r,i,a),this}arcTo(e,t,n,r,i){this._tick++;let a=this._transform;return this._activePath.arcTo(a.a*e+a.c*t+a.tx,a.b*e+a.d*t+a.ty,a.a*n+a.c*r+a.tx,a.b*n+a.d*r+a.ty,i),this}arcToSvg(e,t,n,r,i,a,o){this._tick++;let s=this._transform;return this._activePath.arcToSvg(e,t,n,r,i,s.a*a+s.c*o+s.tx,s.b*a+s.d*o+s.ty),this}bezierCurveTo(e,t,n,r,i,a,o){this._tick++;let s=this._transform;return this._activePath.bezierCurveTo(s.a*e+s.c*t+s.tx,s.b*e+s.d*t+s.ty,s.a*n+s.c*r+s.tx,s.b*n+s.d*r+s.ty,s.a*i+s.c*a+s.tx,s.b*i+s.d*a+s.ty,o),this}closePath(){return this._tick++,this._activePath?.closePath(),this}ellipse(e,t,n,r){return this._tick++,this._activePath.ellipse(e,t,n,r,this._transform.clone()),this}circle(e,t,n){return this._tick++,this._activePath.circle(e,t,n,this._transform.clone()),this}path(e){return this._tick++,this._activePath.addPath(e,this._transform.clone()),this}lineTo(e,t){this._tick++;let n=this._transform;return this._activePath.lineTo(n.a*e+n.c*t+n.tx,n.b*e+n.d*t+n.ty),this}moveTo(e,t){this._tick++;let n=this._transform,r=this._activePath.instructions,i=n.a*e+n.c*t+n.tx,a=n.b*e+n.d*t+n.ty;return r.length===1&&r[0].action===`moveTo`?(r[0].data[0]=i,r[0].data[1]=a,this):(this._activePath.moveTo(i,a),this)}quadraticCurveTo(e,t,n,r,i){this._tick++;let a=this._transform;return this._activePath.quadraticCurveTo(a.a*e+a.c*t+a.tx,a.b*e+a.d*t+a.ty,a.a*n+a.c*r+a.tx,a.b*n+a.d*r+a.ty,i),this}rect(e,t,n,r){return this._tick++,this._activePath.rect(e,t,n,r,this._transform.clone()),this}roundRect(e,t,n,r,i){return this._tick++,this._activePath.roundRect(e,t,n,r,i,this._transform.clone()),this}poly(e,t){return this._tick++,this._activePath.poly(e,t,this._transform.clone()),this}regularPoly(e,t,n,r,i=0,a){return this._tick++,this._activePath.regularPoly(e,t,n,r,i,a),this}roundPoly(e,t,n,r,i,a){return this._tick++,this._activePath.roundPoly(e,t,n,r,i,a),this}roundShape(e,t,n,r){return this._tick++,this._activePath.roundShape(e,t,n,r),this}filletRect(e,t,n,r,i){return this._tick++,this._activePath.filletRect(e,t,n,r,i),this}chamferRect(e,t,n,r,i,a){return this._tick++,this._activePath.chamferRect(e,t,n,r,i,a),this}star(e,t,n,r,i=0,a=0){return this._tick++,this._activePath.star(e,t,n,r,i,a,this._transform.clone()),this}svg(e){return this._tick++,cbe(e,this),this}restore(){let e=this._stateStack.pop();return e&&(this._transform=e.transform,this._fillStyle=e.fillStyle,this._strokeStyle=e.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(e){return this._transform.rotate(e),this}scale(e,t=e){return this._transform.scale(e,t),this}setTransform(e,t,n,r,i,a){return e instanceof Qe?(this._transform.set(e.a,e.b,e.c,e.d,e.tx,e.ty),this):(this._transform.set(e,t,n,r,i,a),this)}transform(e,t,n,r,i,a){return e instanceof Qe?(this._transform.append(e),this):(M$.set(e,t,n,r,i,a),this._transform.append(M$),this)}translate(e,t=e){return this._transform.translate(e,t),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,!this.dirty&&(this.emit(`update`,this,16),this.dirty=!0)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;let e=this._bounds;e.clear();for(let t=0;t<this.instructions.length;t++){let n=this.instructions[t],r=n.action;if(r===`fill`){let t=n.data;e.addBounds(t.path.bounds)}else if(r===`texture`){let t=n.data;e.addFrame(t.dx,t.dy,t.dx+t.dw,t.dy+t.dh,t.transform)}if(r===`stroke`){let t=n.data,r=t.style.alignment,i=t.style.width*(1-r),a=t.path.bounds;e.addFrame(a.minX-i,a.minY-i,a.maxX+i,a.maxY+i)}}return e}containsPoint(e){if(!this.bounds.containsPoint(e.x,e.y))return!1;let t=this.instructions,n=!1;for(let r=0;r<t.length;r++){let i=t[r],a=i.data,o=a.path;if(!i.action||!o)continue;let s=a.style,c=o.shapePath.shapePrimitives;for(let t=0;t<c.length;t++){let r=c[t].shape;if(!s||!r)continue;let o=c[t].transform,l=o?o.applyInverse(e,mbe):e;if(i.action===`fill`)n=r.contains(l.x,l.y);else{let e=s;n=r.strokeContains(l.x,l.y,e.width,e.alignment)}let u=a.hole;if(u){let e=u.shapePath?.shapePrimitives;if(e)for(let t=0;t<e.length;t++)e[t].shape.contains(l.x,l.y)&&(n=!1)}if(n)return!0}}return n}unload(){this.emit(`unload`,this);for(let e in this._gpuData)this._gpuData[e]?.destroy();this._gpuData=Object.create(null)}destroy(e=!1){if(!this.destroyed){if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit(`destroy`,this),this.removeAllListeners(),typeof e==`boolean`?e:e?.texture){let t=typeof e==`boolean`?e:e?.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&`uid`in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(t)),this._strokeStyle.texture&&(this._strokeStyle.fill&&`uid`in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(t))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}}};N$.defaultFillStyle={color:16777215,alpha:1,texture:et.WHITE,matrix:null,fill:null,textureSpace:`local`},N$.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:`butt`,join:`miter`,texture:et.WHITE,matrix:null,fill:null,textureSpace:`local`,pixelLine:!1};var P$=N$,F$=new class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this._tickerAdded||!this.domElement||(kt.system.add(this._tickerUpdate,this,Ot.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&=(kt.system.remove(this._tickerUpdate,this),!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}let e=this.events._rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType===`touch`||globalThis.document.dispatchEvent(this.events.supportsPointerEvents?new PointerEvent(`pointermove`,{clientX:e.clientX,clientY:e.clientY,pointerType:e.pointerType,pointerId:e.pointerId}):new MouseEvent(`mousemove`,{clientX:e.clientX,clientY:e.clientY}))}_tickerUpdate(e){this._deltaTime+=e.deltaTime,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this._update())}destroy(){this.removeTickerListener(),this.events=null,this.domElement=null,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}},I$=class extends aQ{constructor(){super(...arguments),this.client=new Et,this.movement=new Et,this.offset=new Et,this.global=new Et,this.screen=new Et}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,n){return e.worldTransform.applyInverse(n||this.global,t)}getModifierState(e){return`getModifierState`in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){throw Error(`Method not implemented.`)}},L$=class extends I${constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type===`pointermove`||this.type===`mousemove`||this.type===`touchmove`?[this]:[]}getPredictedEvents(){throw Error(`getPredictedEvents is not supported!`)}},R$=class extends I${constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};R$.DOM_DELTA_PIXEL=0,R$.DOM_DELTA_LINE=1,R$.DOM_DELTA_PAGE=2;var hbe=2048,gbe=new Et,z$=new Et,_be=class{constructor(e){this.dispatch=new Ut,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping(`pointerdown`,this.mapPointerDown),this.addEventMapping(`pointermove`,this.mapPointerMove),this.addEventMapping(`pointerout`,this.mapPointerOut),this.addEventMapping(`pointerleave`,this.mapPointerOut),this.addEventMapping(`pointerover`,this.mapPointerOver),this.addEventMapping(`pointerup`,this.mapPointerUp),this.addEventMapping(`pointerupoutside`,this.mapPointerUpOutside),this.addEventMapping(`wheel`,this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((e,t)=>e.priority-t.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;let t=this.mappingTable[e.type];if(t)for(let n=0,r=t.length;n<r;n++)t[n].fn(e);else ot(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){F$.pauseUpdate=!0;let n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?`hitTestMoveRecursive`:`hitTestRecursive`,r=this[n](this.rootTarget,this.rootTarget.eventMode,gbe.set(e,t),this.hitTestFn,this.hitPruneFn);return r&&r[0]}propagate(e,t){if(!e.target)return;let n=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let r=0,i=n.length-1;r<i;r++)if(e.currentTarget=n[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let r=n.length-2;r>=0;r--)if(e.currentTarget=n[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,n=this._allInteractiveElements){if(n.length===0)return;e.eventPhase=e.BUBBLING_PHASE;let r=Array.isArray(t)?t:[t];for(let t=n.length-1;t>=0;t--)r.forEach(r=>{e.currentTarget=n[t],this.notifyTarget(e,r)})}propagationPath(e){let t=[e];for(let n=0;n<hbe&&e!==this.rootTarget&&e.parent;n++){if(!e.parent)throw Error(`Cannot find propagation path to disconnected target`);t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,n,r,i,a=!1){let o=!1;if(this._interactivePrune(e))return null;if((e.eventMode===`dynamic`||t===`dynamic`)&&(F$.pauseUpdate=!1),e.interactiveChildren&&e.children){let s=e.children;for(let c=s.length-1;c>=0;c--){let l=s[c],u=this.hitTestMoveRecursive(l,this._isInteractive(t)?t:l.eventMode,n,r,i,a||i(e,n));if(u){if(u.length>0&&!u[u.length-1].parent)continue;let t=e.isInteractive();(u.length>0||t)&&(t&&this._allInteractiveElements.push(e),u.push(e)),this._hitElements.length===0&&(this._hitElements=u),o=!0}}}let s=this._isInteractive(t),c=e.isInteractive();return c&&c&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:s&&!i(e,n)&&r(e,n)?c?[e]:[]:null}hitTestRecursive(e,t,n,r,i){if(this._interactivePrune(e)||i(e,n))return null;if((e.eventMode===`dynamic`||t===`dynamic`)&&(F$.pauseUpdate=!1),e.interactiveChildren&&e.children){let a=e.children,o=n;for(let n=a.length-1;n>=0;n--){let s=a[n],c=this.hitTestRecursive(s,this._isInteractive(t)?t:s.eventMode,o,r,i);if(c){if(c.length>0&&!c[c.length-1].parent)continue;let t=e.isInteractive();return(c.length>0||t)&&c.push(e),c}}}let a=this._isInteractive(t),o=e.isInteractive();return a&&r(e,n)?o?[e]:[]:null}_isInteractive(e){return e===`static`||e===`dynamic`}_interactivePrune(e){return!e||!e.visible||!e.renderable||!e.measurable||e.eventMode===`none`||e.eventMode===`passive`&&!e.interactiveChildren}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,z$),!e.hitArea.contains(z$.x,z$.y)))return!0;if(e.effects&&e.effects.length)for(let n=0;n<e.effects.length;n++){let r=e.effects[n];if(r.containsPoint&&!r.containsPoint(t,this.hitTestFn))return!0}return!1}hitTestFn(e,t){return e.hitArea?!0:e?.containsPoint?(e.worldTransform.applyInverse(t,z$),e.containsPoint(z$)):!1}notifyTarget(e,t){if(!e.currentTarget.isInteractive())return;t??=e.type;let n=`on${t}`;e.currentTarget[n]?.(e);let r=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this._notifyListeners(e,r),e.eventPhase===e.AT_TARGET&&this._notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.createPointerEvent(e);if(this.dispatchEvent(t,`pointerdown`),t.pointerType===`touch`)this.dispatchEvent(t,`touchstart`);else if(t.pointerType===`mouse`||t.pointerType===`pen`){let e=t.button===2;this.dispatchEvent(t,e?`rightdown`:`mousedown`)}let n=this.trackingData(e.pointerId);n.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;let t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;let n=t.pointerType===`mouse`||t.pointerType===`pen`,r=this.trackingData(e.pointerId),i=this.findMountedTarget(r.overTargets);if(r.overTargets?.length>0&&i!==t.target){let r=e.type===`mousemove`?`mouseout`:`pointerout`,a=this.createPointerEvent(e,r,i);if(this.dispatchEvent(a,`pointerout`),n&&this.dispatchEvent(a,`mouseout`),!t.composedPath().includes(i)){let r=this.createPointerEvent(e,`pointerleave`,i);for(r.eventPhase=r.AT_TARGET;r.target&&!t.composedPath().includes(r.target);)r.currentTarget=r.target,this.notifyTarget(r),n&&this.notifyTarget(r,`mouseleave`),r.target=r.target.parent;this.freeEvent(r)}this.freeEvent(a)}if(i!==t.target){let r=e.type===`mousemove`?`mouseover`:`pointerover`,a=this.clonePointerEvent(t,r);this.dispatchEvent(a,`pointerover`),n&&this.dispatchEvent(a,`mouseover`);let o=i?.parent;for(;o&&o!==this.rootTarget.parent&&o!==t.target;)o=o.parent;if(!o||o===this.rootTarget.parent){let e=this.clonePointerEvent(t,`pointerenter`);for(e.eventPhase=e.AT_TARGET;e.target&&e.target!==i&&e.target!==this.rootTarget.parent;)e.currentTarget=e.target,this.notifyTarget(e),n&&this.notifyTarget(e,`mouseenter`),e.target=e.target.parent;this.freeEvent(e)}this.freeEvent(a)}let a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push(`pointermove`):this.dispatchEvent(t,`pointermove`),o&&a.push(`globalpointermove`),t.pointerType===`touch`&&(this.moveOnAll?a.splice(1,0,`touchmove`):this.dispatchEvent(t,`touchmove`),o&&a.push(`globaltouchmove`)),n&&(this.moveOnAll?a.splice(1,0,`mousemove`):this.dispatchEvent(t,`mousemove`),o&&a.push(`globalmousemove`),this.cursor=t.target?.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,r.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId),n=this.createPointerEvent(e),r=n.pointerType===`mouse`||n.pointerType===`pen`;this.dispatchEvent(n,`pointerover`),r&&this.dispatchEvent(n,`mouseover`),n.pointerType===`mouse`&&(this.cursor=n.target?.cursor);let i=this.clonePointerEvent(n,`pointerenter`);for(i.eventPhase=i.AT_TARGET;i.target&&i.target!==this.rootTarget.parent;)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,`mouseenter`),i.target=i.target.parent;t.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(i)}mapPointerOut(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId);if(t.overTargets){let n=e.pointerType===`mouse`||e.pointerType===`pen`,r=this.findMountedTarget(t.overTargets),i=this.createPointerEvent(e,`pointerout`,r);this.dispatchEvent(i),n&&this.dispatchEvent(i,`mouseout`);let a=this.createPointerEvent(e,`pointerleave`,r);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),n&&this.notifyTarget(a,`mouseleave`),a.target=a.target.parent;t.overTargets=null,this.freeEvent(i),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=performance.now(),n=this.createPointerEvent(e);if(this.dispatchEvent(n,`pointerup`),n.pointerType===`touch`)this.dispatchEvent(n,`touchend`);else if(n.pointerType===`mouse`||n.pointerType===`pen`){let e=n.button===2;this.dispatchEvent(n,e?`rightup`:`mouseup`)}let r=this.trackingData(e.pointerId),i=this.findMountedTarget(r.pressTargetsByButton[e.button]),a=i;if(i&&!n.composedPath().includes(i)){let t=i;for(;t&&!n.composedPath().includes(t);){if(n.currentTarget=t,this.notifyTarget(n,`pointerupoutside`),n.pointerType===`touch`)this.notifyTarget(n,`touchendoutside`);else if(n.pointerType===`mouse`||n.pointerType===`pen`){let e=n.button===2;this.notifyTarget(n,e?`rightupoutside`:`mouseupoutside`)}t=t.parent}delete r.pressTargetsByButton[e.button],a=t}if(a){let i=this.clonePointerEvent(n,`click`);i.target=a,i.path=null,r.clicksByButton[e.button]||(r.clicksByButton[e.button]={clickCount:0,target:i.target,timeStamp:t});let o=r.clicksByButton[e.button];if(o.target===i.target&&t-o.timeStamp<200?++o.clickCount:o.clickCount=1,o.target=i.target,o.timeStamp=t,i.detail=o.clickCount,i.pointerType===`mouse`){let e=i.button===2;this.dispatchEvent(i,e?`rightclick`:`click`)}else i.pointerType===`touch`&&this.dispatchEvent(i,`tap`);this.dispatchEvent(i,`pointertap`),this.freeEvent(i)}this.freeEvent(n)}mapPointerUpOutside(e){if(!(e instanceof L$)){ot(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId),n=this.findMountedTarget(t.pressTargetsByButton[e.button]),r=this.createPointerEvent(e);if(n){let i=n;for(;i;)r.currentTarget=i,this.notifyTarget(r,`pointerupoutside`),r.pointerType===`touch`?this.notifyTarget(r,`touchendoutside`):(r.pointerType===`mouse`||r.pointerType===`pen`)&&this.notifyTarget(r,r.button===2?`rightupoutside`:`mouseupoutside`),i=i.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(r)}mapWheel(e){if(!(e instanceof R$)){ot(`EventBoundary cannot map a non-wheel event as a wheel event`);return}let t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let n=1;n<e.length&&e[n].parent===t;n++)t=e[n];return t}createPointerEvent(e,t,n){let r=this.allocateEvent(L$);return this.copyPointerData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.nativeEvent=e.nativeEvent,r.originalEvent=e,r.target=n??this.hitTest(r.global.x,r.global.y)??this._hitElements[0],typeof t==`string`&&(r.type=t),r}createWheelEvent(e){let t=this.allocateEvent(R$);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){let n=this.allocateEvent(L$);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=t??n.type,n}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof L$&&t instanceof L$&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof I$&&t instanceof I$&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);let t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.defaultPrevented=!1,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw Error(`It is illegal to free an event not managed by this EventBoundary!`);let t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}_notifyListeners(e,t){let n=e.currentTarget._events[t];if(n)if(`fn`in n)n.once&&e.currentTarget.removeListener(t,n.fn,void 0,!0),n.fn.call(n.context,e);else for(let r=0,i=n.length;r<i&&!e.propagationImmediatelyStopped;r++)n[r].once&&e.currentTarget.removeListener(t,n[r].fn,void 0,!0),n[r].fn.call(n[r].context,e)}},vbe=1,ybe={touchstart:`pointerdown`,touchend:`pointerup`,touchendoutside:`pointerupoutside`,touchmove:`pointermove`,touchcancel:`pointercancel`},B$=class e{constructor(t){this.supportsTouchEvents=`ontouchstart`in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=t,this.rootBoundary=new _be(null),F$.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new L$(null),this._rootWheelEvent=new R$(null),this.cursorStyles={default:`inherit`,pointer:`pointer`},this.features=new Proxy({...e.defaultEventFeatures},{set:(e,t,n)=>(t===`globalMove`&&(this.rootBoundary.enableGlobalMoveEvents=n),e[t]=n,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(t){let{canvas:n,resolution:r}=this.renderer;this.setTargetElement(n),this.resolution=r,e._defaultEventMode=t.eventMode??`passive`,Object.assign(this.features,t.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){F$.destroy(),this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(e){e||=`default`;let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this._currentCursor===e)return;this._currentCursor=e;let n=this.cursorStyles[e];if(n)switch(typeof n){case`string`:t&&(this.domElement.style.cursor=n);break;case`function`:n(e);break;case`object`:t&&Object.assign(this.domElement.style,n);break}else t&&typeof e==`string`&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this._rootPointerEvent}_onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=this._normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!(`cancelable`in e))&&e.preventDefault();for(let e=0,n=t.length;e<n;e++){let n=t[e],r=this._bootstrapEvent(this._rootPointerEvent,n);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,F$.pointerMoved();let t=this._normalizeToPointerData(e);for(let e=0,n=t.length;e<n;e++){let n=this._bootstrapEvent(this._rootPointerEvent,t[e]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=e.target;e.composedPath&&e.composedPath().length>0&&(t=e.composedPath()[0]);let n=t===this.domElement?``:`outside`,r=this._normalizeToPointerData(e);for(let e=0,t=r.length;e<t;e++){let t=this._bootstrapEvent(this._rootPointerEvent,r[e]);t.type+=n,this.rootBoundary.mapEvent(t)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=this._normalizeToPointerData(e);for(let e=0,n=t.length;e<n;e++){let n=this._bootstrapEvent(this._rootPointerEvent,t[e]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;let t=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(t)}setTargetElement(e){this._removeEvents(),this.domElement=e,F$.domElement=e,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;F$.addTickerListener();let e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`)),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this._onPointerMove,!0),this.domElement.addEventListener(`pointerdown`,this._onPointerDown,!0),this.domElement.addEventListener(`pointerleave`,this._onPointerOverOut,!0),this.domElement.addEventListener(`pointerover`,this._onPointerOverOut,!0),globalThis.addEventListener(`pointerup`,this._onPointerUp,!0)):(globalThis.document.addEventListener(`mousemove`,this._onPointerMove,!0),this.domElement.addEventListener(`mousedown`,this._onPointerDown,!0),this.domElement.addEventListener(`mouseout`,this._onPointerOverOut,!0),this.domElement.addEventListener(`mouseover`,this._onPointerOverOut,!0),globalThis.addEventListener(`mouseup`,this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener(`touchstart`,this._onPointerDown,!0),this.domElement.addEventListener(`touchend`,this._onPointerUp,!0),this.domElement.addEventListener(`touchmove`,this._onPointerMove,!0))),this.domElement.addEventListener(`wheel`,this.onWheel,{passive:!0,capture:!0}),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;F$.removeTickerListener();let e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``)),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this._onPointerMove,!0),this.domElement.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.domElement.removeEventListener(`pointerleave`,this._onPointerOverOut,!0),this.domElement.removeEventListener(`pointerover`,this._onPointerOverOut,!0),globalThis.removeEventListener(`pointerup`,this._onPointerUp,!0)):(globalThis.document.removeEventListener(`mousemove`,this._onPointerMove,!0),this.domElement.removeEventListener(`mousedown`,this._onPointerDown,!0),this.domElement.removeEventListener(`mouseout`,this._onPointerOverOut,!0),this.domElement.removeEventListener(`mouseover`,this._onPointerOverOut,!0),globalThis.removeEventListener(`mouseup`,this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener(`touchstart`,this._onPointerDown,!0),this.domElement.removeEventListener(`touchend`,this._onPointerUp,!0),this.domElement.removeEventListener(`touchmove`,this._onPointerMove,!0))),this.domElement.removeEventListener(`wheel`,this.onWheel,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(e,t,n){let r=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},i=1/this.resolution;e.x=(t-r.left)*(this.domElement.width/r.width)*i,e.y=(n-r.top)*(this.domElement.height/r.height)*i}_normalizeToPointerData(e){let t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let n=0,r=e.changedTouches.length;n<r;n++){let r=e.changedTouches[n];r.button===void 0&&(r.button=0),r.buttons===void 0&&(r.buttons=1),r.isPrimary===void 0&&(r.isPrimary=e.touches.length===1&&e.type===`touchstart`),r.width===void 0&&(r.width=r.radiusX||1),r.height===void 0&&(r.height=r.radiusY||1),r.tiltX===void 0&&(r.tiltX=0),r.tiltY===void 0&&(r.tiltY=0),r.pointerType===void 0&&(r.pointerType=`touch`),r.pointerId===void 0&&(r.pointerId=r.identifier||0),r.pressure===void 0&&(r.pressure=r.force||.5),r.twist===void 0&&(r.twist=0),r.tangentialPressure===void 0&&(r.tangentialPressure=0),r.layerX===void 0&&(r.layerX=r.offsetX=r.clientX),r.layerY===void 0&&(r.layerY=r.offsetY=r.clientY),r.isNormalized=!0,r.type=e.type,t.push(r)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){let n=e;n.isPrimary===void 0&&(n.isPrimary=!0),n.width===void 0&&(n.width=1),n.height===void 0&&(n.height=1),n.tiltX===void 0&&(n.tiltX=0),n.tiltY===void 0&&(n.tiltY=0),n.pointerType===void 0&&(n.pointerType=`mouse`),n.pointerId===void 0&&(n.pointerId=vbe),n.pressure===void 0&&(n.pressure=.5),n.twist===void 0&&(n.twist=0),n.tangentialPressure===void 0&&(n.tangentialPressure=0),n.isNormalized=!0,t.push(n)}else t.push(e);return t}normalizeWheelEvent(e){let t=this._rootWheelEvent;return this._transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}_bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this._transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type===`pointerleave`&&(e.type=`pointerout`),e.type.startsWith(`mouse`)&&(e.type=e.type.replace(`mouse`,`pointer`)),e.type.startsWith(`touch`)&&(e.type=ybe[e.type]||e.type),e}_transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};B$.extension={name:`events`,type:[W.WebGLSystem,W.CanvasSystem,W.WebGPUSystem],priority:-1},B$.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};var V$=B$,bbe={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return this.eventMode===`dynamic`||this.eventMode===`static`},set interactive(e){this.eventMode=e?`static`:`passive`},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??V$.defaultEventMode},set eventMode(e){this._internalEventMode=e},isInteractive(){return this.eventMode===`static`||this.eventMode===`dynamic`},interactiveChildren:!0,hitArea:null,addEventListener(e,t,n){let r=typeof n==`boolean`&&n||typeof n==`object`&&n.capture,i=typeof n==`object`?n.signal:void 0,a=typeof n==`object`?n.once===!0:!1,o=typeof t==`function`?void 0:t;e=r?`${e}capture`:e;let s=typeof t==`function`?t:t.handleEvent,c=this;i&&i.addEventListener(`abort`,()=>{c.off(e,s,o)}),a?c.once(e,s,o):c.on(e,s,o)},removeEventListener(e,t,n){let r=typeof n==`boolean`&&n||typeof n==`object`&&n.capture,i=typeof t==`function`?void 0:t;e=r?`${e}capture`:e,t=typeof t==`function`?t:t.handleEvent,this.off(e,t,i)},dispatchEvent(e){if(!(e instanceof aQ))throw Error(`Container cannot propagate events outside of the Federated Events API`);return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}},xbe=`in vec2 aPosition;
964
964
  out vec2 vTextureCoord;
965
965
 
966
966
  uniform vec4 uInputSize;
@@ -1395,7 +1395,7 @@ fn mainFragment(
1395
1395
  <div class="pixi-host">
1396
1396
  <div class="edge-glow"></div>
1397
1397
  </div>
1398
- `}};customElements.define(`virtual-trackpad-tab`,TCe);var ECe=/^\/versions\/[^/]+(?:\/|$)/;function DCe(e){return ECe.test(e.pathname)&&new URLSearchParams(e.search).get(`session`)?.trim()||null}function F2(e,t=window.location){let n=DCe(t);return n?`hosted-session:${n}:${e}`:e}var I2=1.5,L2=30,OCe=50,R2=15;function z2(){return`ontouchstart`in window||navigator.maxTouchPoints>0}function B2(e){return e===`input`||e===`keys`||e===`shortcuts`||e===`trackpad`||e===`settings`}function V2(e){return typeof e==`object`&&!!e}function H2(){try{let e=localStorage.getItem(F2(`xtermInputPanelState`));if(!e)return{};let t=JSON.parse(e);return V2(t)?t:{}}catch{return{}}}function kCe(e){try{localStorage.setItem(F2(`xtermInputPanelState`),JSON.stringify(e))}catch{}}function ACe(e){let t=H2().sessions;if(!t)return null;let n=t[e];if(!V2(n))return null;let r={activeTab:`input`,inputDraft:``};return B2(n.activeTab)&&(r.activeTab=n.activeTab),typeof n.inputDraft==`string`&&(r.inputDraft=n.inputDraft),r}function U2(){let e=H2();return B2(e.lastActiveTab)?e.lastActiveTab:`input`}var W2=class e{static _lastActiveTab=`input`;static _active=null;static _lastFocused=null;static _instances=new Set;static _onActiveChangeFn=null;static _mountTarget=null;static get activeInstance(){return e._active}static set onActiveChange(t){e._onActiveChangeFn=t}static set mountTarget(t){e._mountTarget=t,e._fabEl&&t&&t.appendChild(e._fabEl)}static get mountTarget(){return e._mountTarget}static _fabEl=null;static _fabSubscriberCount=0;static _ensureFab(t){if(e._fabEl){e._fabEl.parentElement!==t&&t.appendChild(e._fabEl);return}let n=document.createElement(`button`);n.type=`button`,n.title=`Open InputPanel`,n.replaceChildren(OZ(24)),Object.assign(n.style,{position:`fixed`,zIndex:`50`,width:`56px`,height:`56px`,borderRadius:`50%`,border:`2px solid currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,touchAction:`none`,userSelect:`none`,webkitUserSelect:`none`,webkitTouchCallout:`none`,cursor:`pointer`,boxShadow:`0 4px 12px rgba(0,0,0,0.3)`,background:`var(--primary, #e04a2f)`,color:`var(--primary-foreground, #fff)`,padding:`0`,margin:`0`,outline:`none`});let r=window.innerWidth-72,i=window.innerHeight-140;try{let e=localStorage.getItem(`input-panel-fab-pos`);if(e){let t=JSON.parse(e);r=t.x??r,i=t.y??i}}catch{}r=Math.max(0,Math.min(window.innerWidth-56,r)),i=Math.max(0,Math.min(window.innerHeight-56,i)),n.style.left=`${r}px`,n.style.top=`${i}px`;let a=!1,o=!1,s=0,c=0,l=0,u=0,d=()=>{let t=e._lastFocused,n=(t&&e._instances.has(t)?t:null)??[...e._instances].find(e=>e._terminal!=null)??null;n&&(e._lastFocused=n,n.open())};n.addEventListener(`pointerdown`,e=>{a=!0,o=!1,s=e.clientX,c=e.clientY,l=parseInt(n.style.left)||0,u=parseInt(n.style.top)||0,n.setPointerCapture(e.pointerId),e.preventDefault()}),n.addEventListener(`pointermove`,e=>{if(!a)return;let t=e.clientX-s,r=e.clientY-c;(Math.abs(t)>4||Math.abs(r)>4)&&(o=!0);let i=Math.max(0,Math.min(window.innerWidth-56,l+t)),d=Math.max(0,Math.min(window.innerHeight-56,u+r));n.style.left=`${i}px`,n.style.top=`${d}px`}),n.addEventListener(`pointerup`,()=>{if(a){a=!1;try{localStorage.setItem(`input-panel-fab-pos`,JSON.stringify({x:parseInt(n.style.left),y:parseInt(n.style.top)}))}catch{}o||d()}}),n.addEventListener(`pointercancel`,()=>{a=!1});let f=!1;n.addEventListener(`pointerdown`,()=>{f=!0},{capture:!0}),n.addEventListener(`click`,()=>{if(f){f=!1;return}d()}),n.addEventListener(`contextmenu`,e=>{e.preventDefault(),e.stopPropagation()}),n.addEventListener(`dragstart`,e=>{e.preventDefault()}),window.addEventListener(`resize`,()=>{let e=Math.min(parseInt(n.style.left)||0,window.innerWidth-56),t=Math.min(parseInt(n.style.top)||0,window.innerHeight-56);n.style.left=`${Math.max(0,e)}px`,n.style.top=`${Math.max(0,t)}px`}),t.appendChild(n),e._fabEl=n}static _setFabVisible(t){e._fabEl&&(e._fabEl.style.display=t&&e._fabSubscriberCount>0?`flex`:`none`)}_terminal=null;_panel=null;_cursorEl=null;_cursorPos={x:0,y:0};_isDragging=!1;_isOpen=!1;_edgeScrollTimer=null;_cleanups=[];_persistentCleanups=[];_listenersAttached=!1;_onInput;_onOpenCb;_onCloseCb;_getHistory;_addHistory;_subscribeHistory;_onSettingsChange;_platform;_defaultLayout;_showFab;_fabSubscribed;_panelSessionState;_stateKey;_hasOwnPersistedState;constructor(t){this._onInput=t?.onInput??(()=>{}),this._onOpenCb=t?.onOpen??null,this._onCloseCb=t?.onClose??null,this._getHistory=t?.getHistory??null,this._addHistory=t?.addHistory??null,this._subscribeHistory=t?.subscribeHistory??null,this._onSettingsChange=t?.onSettingsChange??null,this._platform=t?.platform??`common`,this._defaultLayout=t?.defaultLayout??`floating`,this._showFab=t?.showFab??!0,this._fabSubscribed=!1,this._stateKey=t?.stateKey?.trim()?t.stateKey:`default`,this._hasOwnPersistedState=!1,this._panelSessionState={activeTab:`input`,inputDraft:``};let n=ACe(this._stateKey);n?(this._panelSessionState=n,this._hasOwnPersistedState=!0):this._panelSessionState.activeTab=e._lastActiveTab||U2()}get isOpen(){return this._isOpen}set onOpen(e){this._onOpenCb=e}set onClose(e){this._onCloseCb=e}set onInput(e){this._onInput=e}setPlatform(e){this._platform=e,this._applyPlatformToPanel()}setDefaultLayout(e){this._defaultLayout=e}_persistPanelState(){e._lastActiveTab=this._panelSessionState.activeTab;let t=H2(),n={...t.sessions,[this._stateKey]:{activeTab:this._panelSessionState.activeTab,inputDraft:this._panelSessionState.inputDraft}};kCe({...t,lastActiveTab:this._panelSessionState.activeTab,sessions:n})}_getMountTarget(){return e._mountTarget??this._getTerminalHostElement()??document.body}_getTerminalHostElement(){let e=this._terminal?.element;return e instanceof HTMLElement?e.classList.contains(`xterm`)&&e.parentElement instanceof HTMLElement?e.parentElement:e:null}_detectTerminalEngine(){let e=this._terminal?.element;return e instanceof HTMLElement&&e.classList.contains(`xterm`)?`xterm`:`non-xterm`}activate(t){this._terminal=t,e._instances.add(this)}dispose(){this.close();for(let e of this._persistentCleanups)e();this._persistentCleanups=[],this._listenersAttached=!1,this._fabSubscribed&&(e._fabSubscriberCount=Math.max(0,e._fabSubscriberCount-1),this._fabSubscribed=!1,e._setFabVisible(e._active===null)),e._instances.delete(this),e._lastFocused===this&&(e._lastFocused=null),this._terminal=null}attachListeners(){if(this._listenersAttached||!this._terminal)return;let t=this._terminal.textarea;if(!t)return;this._listenersAttached=!0,this._showFab?(e._ensureFab(this._getMountTarget()),this._fabSubscribed||=(e._fabSubscriberCount+=1,!0),e._setFabVisible(!0)):e._fabSubscriberCount===0&&e._setFabVisible(!1),e._lastFocused||=this;let n=()=>{e._lastFocused=this,z2()&&!this._isOpen&&this.open()};t.addEventListener(`focus`,n),this._persistentCleanups.push(()=>t.removeEventListener(`focus`,n)),z2()&&t.setAttribute(`inputmode`,`none`)}open(){if(!this._terminal)return;if(this._isOpen){if(this._panel?.isConnected)return;this.close()}if(e._active&&e._active!==this&&e._active.close(),this._isOpen=!0,e._active=this,e._lastFocused=this,this._showFab&&e._setFabVisible(!1),this._suppressKeyboard(),!this._hasOwnPersistedState){let t=U2();this._panelSessionState.activeTab=t,e._lastActiveTab=t}let t=document.createElement(`input-panel`);t.setAttribute(`layout`,this._defaultLayout),this._applyPanelThemeBindings(t),t.activeTab=this._panelSessionState.activeTab;let n=document.createElement(`input-method-tab`);n.setAttribute(`slot`,`input`),n.value=this._panelSessionState.inputDraft,t.appendChild(n);let r=document.createElement(`virtual-keyboard-tab`);r.setAttribute(`slot`,`keys`),r.setAttribute(`floating`,``),r.setAttribute(`platform`,this._platform),t.appendChild(r);let i=document.createElement(`shortcut-tab`);i.setAttribute(`slot`,`shortcuts`),i.setAttribute(`platform`,this._platform),t.appendChild(i);let a=document.createElement(`virtual-trackpad-tab`);a.setAttribute(`slot`,`trackpad`),a.setAttribute(`floating`,``),t.appendChild(a),this._panel=t;let o=e=>{this._renderHistory(n,e)};if(this._getHistory&&this._getHistory().then(e=>o(e)).catch(()=>{}),this._subscribeHistory)try{let e=this._subscribeHistory(e=>{o(e)});this._cleanups.push(e)}catch{}this._on(t,`input-panel:close`,()=>this.close()),this._on(t,`input-panel:send`,e=>{let t=e.detail?.data;if(t&&this._onInput(t),e.composedPath()[0]===n&&this._addHistory&&t){let e=this._normalizeHistoryText(t);e&&Promise.resolve(this._addHistory(e)).then(()=>this._getHistory?.()).then(e=>{e&&o(e)}).catch(()=>{})}}),this._on(n,`input-panel:input-change`,e=>{let t=e.detail?.value;typeof t==`string`&&(this._panelSessionState.inputDraft=t,this._hasOwnPersistedState=!0,this._persistPanelState())}),this._on(t,`input-panel:tab-change`,e=>{let t=e.detail?.tab;B2(t)&&(this._panelSessionState.activeTab=t,this._hasOwnPersistedState=!0,this._persistPanelState()),t===`trackpad`?this._showCursor():this._hideCursor()}),this._on(t,`input-panel:settings-change`,e=>{if(!this._onSettingsChange)return;let t=e.detail;if(typeof t!=`object`||!t)return;let n=t;typeof n.fixedHeight!=`number`||typeof n.floatingWidth!=`number`||typeof n.floatingHeight!=`number`||typeof n.vibrationIntensity!=`number`||typeof n.historyLimit!=`number`||this._onSettingsChange({fixedHeight:n.fixedHeight,floatingWidth:n.floatingWidth,floatingHeight:n.floatingHeight,vibrationIntensity:n.vibrationIntensity,historyLimit:n.historyLimit})}),this._on(t,`trackpad:move`,e=>{let{dx:t,dy:n}=e.detail;this._moveCursor(t,n)}),this._on(t,`trackpad:tap`,()=>this._dispatchClick(1)),this._on(t,`trackpad:double-tap`,()=>this._dispatchDblClick()),this._on(t,`trackpad:long-press`,()=>this._dispatchRightClick()),this._on(t,`trackpad:two-finger-tap`,()=>this._dispatchRightClick()),this._on(t,`trackpad:drag-start`,()=>{this._isDragging=!0,this._dispatchMouse(`mousedown`,{detail:1})}),this._on(t,`trackpad:drag-move`,e=>{let{dx:t,dy:n}=e.detail;this._moveCursor(t,n),this._dispatchMouse(`mousemove`,{buttons:1}),this._updateEdgeScroll()}),this._on(t,`trackpad:drag-end`,()=>{this._isDragging=!1,this._stopEdgeScroll(),this._dispatchMouse(`mouseup`,{detail:1})}),this._on(t,`trackpad:scroll`,e=>{let{deltaY:t}=e.detail;this._dispatchWheel(t)}),this._getMountTarget().appendChild(t),this._createCursor(),this._focusTerminal(),this._onOpenCb?.(),e._onActiveChangeFn?.(this)}_applyPlatformToPanel(){if(!this._panel)return;let e=this._panel.querySelector(`virtual-keyboard-tab`),t=this._panel.querySelector(`shortcut-tab`);e?.setAttribute(`platform`,this._platform),t?.setAttribute(`platform`,this._platform)}_readThemeVar(e,t,n){for(let n of t){let t=e.getPropertyValue(n).trim();if(t)return t}return n}_applyPanelThemeBindings(e){let t=this._getTerminalHostElement()??this._getMountTarget(),n=getComputedStyle(t),r=this._readThemeVar(n,[`--input-panel-background`,`--terminal`,`--background`],`#1a1a1a`),i=this._readThemeVar(n,[`--input-panel-foreground`,`--terminal-foreground`,`--foreground`],`#ffffff`),a=this._readThemeVar(n,[`--input-panel-primary`,`--primary`],`#e04a2f`),o=this._readThemeVar(n,[`--input-panel-primary-foreground`,`--primary-foreground`],`#ffffff`),s=this._readThemeVar(n,[`--input-panel-border`,`--border`],`color-mix(in srgb, ${i} 24%, transparent)`),c=this._readThemeVar(n,[`--input-panel-muted`,`--muted`],`color-mix(in srgb, ${r} 86%, ${i} 14%)`),l=this._readThemeVar(n,[`--input-panel-muted-foreground`,`--muted-foreground`],`color-mix(in srgb, ${i} 62%, transparent)`);e.style.setProperty(`--input-panel-background`,r),e.style.setProperty(`--input-panel-foreground`,i),e.style.setProperty(`--input-panel-primary`,a),e.style.setProperty(`--input-panel-primary-foreground`,o),e.style.setProperty(`--input-panel-border`,s),e.style.setProperty(`--input-panel-muted`,c),e.style.setProperty(`--input-panel-muted-foreground`,l)}close(){if(this._isOpen){this._isOpen=!1,e._active===this&&(e._active=null),this._stopEdgeScroll();for(let e of this._cleanups)e();this._cleanups=[],this._panel?.remove(),this._panel=null,this._cursorEl?.remove(),this._cursorEl=null,z2()||this._restoreKeyboard(),this._showFab&&e._setFabVisible(!0),this._onCloseCb?.(),e._onActiveChangeFn?.(null)}}toggle(){if(this._isOpen){this.close();return}this.open()}syncFocusLifecycle(){if(e._lastFocused=this,this._isOpen&&!this._panel?.isConnected){this.open();return}if(e._active&&e._active!==this){this.open();return}this._isOpen&&this._focusTerminal()}_focusTerminal(){let e=this._terminal?.textarea;e&&(z2()&&e.setAttribute(`inputmode`,`none`),e.focus())}_createCursor(){let e=this._getTerminalHostElement();if(!e)return;let t=document.createElement(`div`);t.setAttribute(`data-input-panel-cursor`,`virtual-mouse`),t.setAttribute(`data-terminal-engine`,this._detectTerminalEngine()),t.setAttribute(`aria-hidden`,`true`),t.style.cssText=`position:absolute;z-index:10;pointer-events:none;opacity:0;transition:opacity 0.15s;color:#fff;`;let n=Ove(20);n.style.filter=`drop-shadow(0 0 1px rgba(0,0,0,0.9))`,t.replaceChildren(n),e.appendChild(t),this._cursorEl=t;let r=e.getBoundingClientRect();this._cursorPos={x:r.width/2,y:r.height/2},this._positionCursor()}_positionCursor(){this._cursorEl&&(this._cursorEl.style.left=`${this._cursorPos.x-4}px`,this._cursorEl.style.top=`${this._cursorPos.y-2}px`)}_showCursor(){if(this._cursorEl||this._createCursor(),this._cursorEl){let e=this._getTerminalHostElement();if(e){let t=e.getBoundingClientRect();this._cursorPos={x:t.width/2,y:t.height/2},this._positionCursor()}this._cursorEl.style.opacity=`1`}}_hideCursor(){this._cursorEl&&(this._cursorEl.style.opacity=`0.3`)}_moveCursor(e,t){let n=this._getTerminalHostElement();if(!n)return;let r=n.getBoundingClientRect();this._cursorPos.x=Math.max(0,Math.min(r.width,this._cursorPos.x+e*I2)),this._cursorPos.y=Math.max(0,Math.min(r.height,this._cursorPos.y+t*I2)),this._positionCursor()}_getClientCoords(){let e=this._getTerminalHostElement();if(!e)return null;let t=e.getBoundingClientRect();return{clientX:t.left+this._cursorPos.x,clientY:t.top+this._cursorPos.y}}_resolveTarget(e,t){let n=this._getTerminalHostElement();if(!n)return document.body;let r=document.elementFromPoint(e,t);return r&&n.contains(r)?r:n.querySelector(`.xterm-screen`)??n}_dispatchMouse(e,t={}){let n=this._getClientCoords();if(!n)return;let r=t.button??0,i=t.detail??1,a=t.buttons??(e===`mousedown`?r===0?1:r===2?2:4:0);this._resolveTarget(n.clientX,n.clientY).dispatchEvent(new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,detail:i,clientX:n.clientX,clientY:n.clientY,button:r,buttons:a}))}_dispatchClick(e){this._dispatchMouse(`mousedown`,{detail:e}),this._dispatchMouse(`mouseup`,{detail:e}),this._dispatchMouse(`click`,{detail:e})}_dispatchDblClick(){this._dispatchMouse(`mousedown`,{detail:2}),this._dispatchMouse(`mouseup`,{detail:2}),this._dispatchMouse(`click`,{detail:2}),this._dispatchMouse(`dblclick`,{detail:2})}_dispatchRightClick(){this._dispatchMouse(`mousedown`,{button:2}),this._dispatchMouse(`mouseup`,{button:2}),this._dispatchMouse(`contextmenu`,{button:2})}_dispatchWheel(e){let t=this._getClientCoords();t&&this._resolveTarget(t.clientX,t.clientY).dispatchEvent(new WheelEvent(`wheel`,{bubbles:!0,cancelable:!0,view:window,clientX:t.clientX,clientY:t.clientY,deltaY:e,deltaMode:WheelEvent.DOM_DELTA_PIXEL}))}_updateEdgeScroll(){let e=this._getTerminalHostElement();if(!e||!this._isDragging){this._stopEdgeScroll();return}let t=e.getBoundingClientRect(),n=this._cursorPos.y<L2,r=this._cursorPos.y>t.height-L2;if(!n&&!r){this._stopEdgeScroll();return}this._stopEdgeScroll(),this._edgeScrollTimer=setInterval(()=>{let e=this._getTerminalHostElement();if(!e||!this._isDragging){this._stopEdgeScroll();return}let t=e.getBoundingClientRect(),n=t.left+this._cursorPos.x,r=this._cursorPos.y<L2?t.top-R2:t.bottom+R2;this._resolveTarget(t.left+this._cursorPos.x,t.top+this._cursorPos.y).dispatchEvent(new MouseEvent(`mousemove`,{bubbles:!0,cancelable:!0,view:window,clientX:n,clientY:r,button:0,buttons:1}))},OCe)}_stopEdgeScroll(){this._edgeScrollTimer&&=(clearInterval(this._edgeScrollTimer),null)}_suppressKeyboard(){if(!z2())return;let e=this._terminal?.textarea;e&&e.setAttribute(`inputmode`,`none`)}_restoreKeyboard(){let e=this._terminal?.textarea;e&&e.removeAttribute(`inputmode`)}_on(e,t,n){e.addEventListener(t,n),this._cleanups.push(()=>e.removeEventListener(t,n))}_normalizeHistoryText(e){return e.replace(/[\r\n]+$/u,``).trim()||null}_renderHistory(e,t){if(e.querySelectorAll(`[data-input-history-root="true"]`).forEach(e=>e.remove()),t.length===0)return;let n=document.createElement(`div`);n.dataset.inputHistoryRoot=`true`,n.setAttribute(`slot`,`history`),n.style.display=`flex`,n.style.flexDirection=`column`,n.style.gap=`4px`,n.style.padding=`4px 0`;for(let e of t){let t=document.createElement(`button`);t.type=`button`,t.title=e.text,t.style.display=`flex`,t.style.alignItems=`center`,t.style.gap=`8px`,t.style.width=`100%`,t.style.padding=`4px 6px`,t.style.border=`1px solid transparent`,t.style.borderRadius=`4px`,t.style.background=`transparent`,t.style.color=`var(--foreground, #fff)`,t.style.fontFamily=`inherit`,t.style.fontSize=`12px`,t.style.textAlign=`left`;let r=document.createElement(`span`);r.textContent=new Date(e.time).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),r.style.opacity=`0.65`,r.style.fontSize=`10px`,r.style.flexShrink=`0`;let i=document.createElement(`span`);i.textContent=e.text,i.style.overflow=`hidden`,i.style.textOverflow=`ellipsis`,i.style.whiteSpace=`nowrap`,t.appendChild(r),t.appendChild(i),t.addEventListener(`click`,()=>{this._onInput(`${e.text}\n`)}),n.appendChild(t)}e.appendChild(n)}},G2=`xtermInputPanelSettings`,jCe=50,MCe=1e3,NCe=1,PCe=1,K2=`terminal-meta`;function q2(){return kl(`terminal-input-history`,window.location)}function FCe(){return kl(`openspecui-terminal`,window.location)}function J2(){return kl(`input-history`,window.location)}function Y2(){return kl(`terminal-input-history-fallback`,window.location)}function X2(e){return Math.max(NCe,Math.min(MCe,Math.round(e)))}function Z2(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(typeof n!=`object`||!n)continue;let e=n;if(typeof e.text!=`string`||typeof e.time!=`number`||!Number.isFinite(e.time))continue;let r=e.text.trim();r&&t.push({text:r,time:e.time})}return t}function Q2(e,t){let n=new Map;for(let t of e){let e=`${t.time}::${t.text}`;n.has(e)||n.set(e,t)}return[...n.values()].sort((e,t)=>t.time-e.time).slice(0,X2(t))}function $2(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]?.text!==t[n]?.text||e[n]?.time!==t[n]?.time)return!1;return!0}function e4(){try{let e=localStorage.getItem(G2);if(!e)return{};let t=JSON.parse(e);return typeof t!=`object`||!t?{}:t}catch{return{}}}function ICe(e){let t=e4();try{localStorage.setItem(G2,JSON.stringify({...t,...e}))}catch{}}async function t4(){return typeof window>`u`||!(`indexedDB`in window)?null:await new Promise(e=>{let t=window.indexedDB.open(FCe(),PCe);t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(K2)||e.createObjectStore(K2)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)})}async function LCe(){let e=await t4();return e?await new Promise(t=>{let n=e.transaction(K2,`readonly`),r=n.objectStore(K2).get(J2());r.onsuccess=()=>{t(Z2(r.result))},r.onerror=()=>t([]),n.oncomplete=()=>e.close(),n.onerror=()=>e.close(),n.onabort=()=>e.close()}):null}async function RCe(e){let t=await t4();return t?await new Promise(n=>{let r=t.transaction(K2,`readwrite`);r.objectStore(K2).put(e,J2()),r.oncomplete=()=>{t.close(),n(!0)},r.onerror=()=>{t.close(),n(!1)},r.onabort=()=>{t.close(),n(!1)}}):!1}function zCe(){try{let e=localStorage.getItem(Y2());return e?Z2(JSON.parse(e)):[]}catch{return[]}}function BCe(e){try{localStorage.setItem(Y2(),JSON.stringify(e))}catch{}}async function VCe(){return await LCe()||zCe()}async function n4(e){await RCe(e)||BCe(e)}var HCe=class{records=[];listeners=new Set;kvUnsubscribe=null;initPromise=null;subscribe(e){return this.listeners.add(e),this.ensureInitialized(),e(this.records),()=>{this.listeners.delete(e)}}async list(){return await this.ensureInitialized(),[...this.records]}getLimit(){let e=e4().historyLimit;return typeof e==`number`&&Number.isFinite(e)?X2(e):jCe}async setLimit(e){let t=X2(e);ICe({historyLimit:t}),await this.ensureInitialized();let n=Q2(this.records,t);await this.commit(n,{persistRemote:!0})}async add(e){let t=e.trim();if(!t)return;await this.ensureInitialized();let n=Q2([{text:t,time:Date.now()},...this.records],this.getLimit());await this.commit(n,{persistRemote:!0})}destroy(){this.kvUnsubscribe&&=(this.kvUnsubscribe(),null)}async ensureInitialized(){if(this.initPromise){await this.initPromise;return}this.initPromise=this.initialize(),await this.initPromise}async initialize(){if(this.records=Q2(await VCe(),this.getLimit()),this.emit(),!zl())try{let e=Z2(await jg.kv.get.query({key:q2()})),t=Q2([...this.records,...e],this.getLimit());$2(this.records,t)||(this.records=t,await n4(this.records),this.emit()),$2(e,this.records)||this.persistRemote(this.records);let n=jg.kv.subscribe.subscribe({key:q2()},{onData:e=>{this.onRemoteData(e)}});this.kvUnsubscribe=()=>n.unsubscribe()}catch{}}async onRemoteData(e){let t=Z2(e),n=Q2([...this.records,...t],this.getLimit());await this.commit(n,{persistRemote:!1})}async commit(e,t){$2(this.records,e)||(this.records=e,await n4(this.records),this.emit(),t.persistRemote&&!zl()&&this.persistRemote(this.records))}async persistRemote(e){try{await jg.kv.set.mutate({key:q2(),value:e})}catch{}}emit(){for(let e of this.listeners)e(this.records)}},r4=`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace`,UCe={fontSize:13,fontFamily:``,cursorBlink:!0,cursorStyle:`block`,scrollback:1e3,rendererEngine:`xterm`},i4=1500,a4=1e3,WCe=1e4,o4=`common`,GCe=512*1024,KCe=8,qCe=32,s4=13,JCe=800,YCe=[`JetBrains Mono`,`Fira Code`,`Source Code Pro`,`IBM Plex Mono`,`Inconsolata`,`Roboto Mono`,`Ubuntu Mono`,`Space Mono`],c4=new Set;function l4(e){try{return(new URL(e).pathname.split(`/`).pop()??``).replace(/\.[^.]+$/,``).replace(/[-_]/g,` `)||`CustomFont`}catch{return`CustomFont`}}async function XCe(e){let t=e.trim();if(!t)return``;if(!/^https?:\/\//i.test(t))return t;if(c4.has(t))return l4(t);try{let e=(await fetch(t,{method:`HEAD`})).headers.get(`content-type`)??``;if(e.includes(`text/css`)){let e=document.createElement(`link`);return e.rel=`stylesheet`,e.href=t,e.dataset.fontSrc=t,document.head.appendChild(e),c4.add(t),``}if(e.startsWith(`font/`)){let e=l4(t),n=document.createElement(`style`);return n.dataset.fontSrc=t,n.textContent=`@font-face { font-family: '${e}'; src: url('${t}'); }`,document.head.appendChild(n),c4.add(t),e}}catch{}return t}function ZCe(e){let t=`google:${e}`;if(c4.has(t))return;let n=navigator.language??``,r=/^zh\b/i.test(n)?`https://fonts.googleapis.cn`:`https://fonts.googleapis.com`,i=document.createElement(`link`);i.rel=`stylesheet`,i.href=`${r}/css2?family=${e.replace(/ /g,`+`)}&display=swap`,i.dataset.fontSrc=t,document.head.appendChild(i),c4.add(t)}var QCe=class{instances=new Map;listeners=new Set;idCounter=0;config={...UCe};snapshotCache=null;inputHistoryStore=new HCe;ghosttyModule=null;ghosttyInitPromise=null;ws=null;wsConnected=!1;reconnectTimer=null;reconnectDelay=a4;pendingCreates=[];pendingCloseSessionIds=new Set;serverToLocalSessionId=new Map;hasDiscoveredSessions=!1;inputPanelDefaultLayout=`floating`;createSession(e){let t=`term-${++this.idCounter}`,n=e?.label??`Shell ${this.idCounter}`,r=this.createTerminalInstance(t,{label:n,command:e?.command,args:e?.args,isDedicated:e?.isDedicated??!1,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl,restored:!1,serverSessionId:null,platform:o4});return this.instances.set(t,r),this._applyFonts(),this.bindTerminalInput(r),this.wsConnected&&this.ws?this.wsSend({type:`create`,requestId:t,cols:r.terminal.cols||80,rows:r.terminal.rows||24,command:e?.command,args:e?.args,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl}):(this.pendingCreates.push({requestId:t,command:e?.command,args:e?.args,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl,cols:r.terminal.cols||80,rows:r.terminal.rows||24}),this.ensureWsConnected()),this.notify(),t}createTerminalInstance(e,t){let{terminal:n,fitAddon:r,afterOpenHook:i,engine:a}=this.createRendererTerminal(),o=this.createInputPanelAddon(e,t.platform);return n.loadAddon(o),this.attachTerminalShortcuts(n,a),{id:e,serverSessionId:t.serverSessionId,terminal:n,fitAddon:r,inputPanelAddon:o,isConnected:!1,label:t.label,customTitle:null,processTitle:null,isDedicated:t.isDedicated,isExited:!1,exitCode:null,command:t.command,args:t.args,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,mountedContainer:null,resizeObserver:null,hasOpened:!1,afterOpenHook:i,pendingOutput:[],pendingOutputBytes:0,lastOutputTime:0,outputIdleTimer:null,restored:t.restored,platform:t.platform,rendererEngine:a}}getTerminalOptions(){return{cursorBlink:this.config.cursorBlink,cursorStyle:this.config.cursorStyle,fontSize:this.config.fontSize,fontFamily:r4,theme:{background:`transparent`},allowTransparency:!0,convertEol:!0,macOptionIsMeta:!0,macOptionClickForcesSelection:!0,scrollback:this.config.scrollback}}createRendererTerminal(){let e=this.getTerminalOptions();if(this.config.rendererEngine===`xterm`){let t=new W_e(e),n=new eK;return t.loadAddon(n),t.loadAddon(new oK),{terminal:t,fitAddon:n,afterOpenHook:null,engine:`xterm`}}let t=this.ghosttyModule;if(!t)throw Error(`ghostty-web is not initialized. Open Settings and switch engine again.`);let n=new t.Terminal(e),r=new t.FitAddon;return n.loadAddon(r),{terminal:n,fitAddon:r,afterOpenHook:()=>{let e=n;e.registerLinkProvider&&e.registerLinkProvider(new t.UrlRegexProvider(n))},engine:`ghostty`}}createInputPanelAddon(e,t){return new W2({onInput:t=>this.writeToSession(e,t),getHistory:async()=>this.inputHistoryStore.list(),addHistory:async e=>this.inputHistoryStore.add(e),subscribeHistory:e=>this.inputHistoryStore.subscribe(e),platform:t,defaultLayout:this.inputPanelDefaultLayout,showFab:!1,stateKey:e,onSettingsChange:async e=>{await this.inputHistoryStore.setLimit(e.historyLimit)}})}applyGhosttyBackground(e,t){if(e.rendererEngine!==`ghostty`)return;let n=this.resolveNearestOpaqueBackground(t),r=e.terminal.options.theme??{};e.terminal.options.allowTransparency=!1,e.terminal.options.theme={...r,background:n}}isTransparentColor(e){let t=e.trim().toLowerCase();return t.length===0||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0,0,0,0)`}resolveNearestOpaqueBackground(e){let t=e;for(;t;){let e=window.getComputedStyle(t).backgroundColor;if(!this.isTransparentColor(e))return e;t=t.parentElement}return`rgb(26, 26, 26)`}attachTerminalShortcuts(e,t){e.attachCustomKeyEventHandler(e=>{let n=e.metaKey||e.ctrlKey;if(e.type!==`keydown`||!n)return t===`xterm`;let r=!1;return(e.key===`=`||e.key===`+`)&&n&&(this.zoomFont(1),r=!0),e.key===`-`&&n&&!r&&(this.zoomFont(-1),r=!0),e.key===`0`&&n&&!r&&(this.resetFontSize(),r=!0),t===`xterm`?!r:r})}bindTerminalInput(e){e.terminal.onData(t=>{if(e.isExited){this.closeSession(e.id);return}let n=this.resolveServerSessionId(e.id);n&&this.wsSend({type:`input`,sessionId:n,data:t})})}isTerminalNotOpenedError(e){if(!(e instanceof Error))return!1;let t=e.message;return t.includes(`Terminal must be opened before use`)||t.includes(`Call terminal.open(parent) first`)}enqueuePendingOutput(e,t){if(t)for(e.pendingOutput.push(t),e.pendingOutputBytes+=t.length;e.pendingOutputBytes>GCe&&e.pendingOutput.length;){let t=e.pendingOutput.shift();if(!t)break;e.pendingOutputBytes-=t.length}}writeTerminalOutput(e,t){if(t){if(!e.hasOpened){this.enqueuePendingOutput(e,t);return}try{e.terminal.write(t)}catch(n){if(this.isTerminalNotOpenedError(n)){this.enqueuePendingOutput(e,t);return}console.error(`[terminal] failed to write output:`,n)}}}flushPendingOutput(e){if(!e.hasOpened||e.pendingOutput.length===0)return;let t=e.pendingOutput.join(``);e.pendingOutput=[],e.pendingOutputBytes=0,this.writeTerminalOutput(e,t)}replaceInstanceRenderer(e){let t=e.mountedContainer,n=e.serverSessionId;e.mountedContainer&&this.unmount(e.id),e.terminal.dispose();let{terminal:r,fitAddon:i,afterOpenHook:a,engine:o}=this.createRendererTerminal(),s=this.createInputPanelAddon(e.id,e.platform);r.loadAddon(s),this.attachTerminalShortcuts(r,o),e.terminal=r,e.fitAddon=i,e.inputPanelAddon=s,e.hasOpened=!1,e.afterOpenHook=a,e.mountedContainer=null,e.resizeObserver=null,e.rendererEngine=o,this.bindTerminalInput(e),t&&this.mount(e.id,t),n&&this.wsSend({type:`attach`,sessionId:n,cols:e.terminal.cols||80,rows:e.terminal.rows||24})}async ensureGhosttyModule(){return this.ghosttyModule?this.ghosttyModule:(this.ghosttyInitPromise||=q(()=>import(`./ghostty-web-PY5w9Rgq.js`).then(async e=>(await e.init(),this.ghosttyModule=e,e)),[]).finally(()=>{this.ghosttyInitPromise=null}),this.ghosttyInitPromise)}async setRendererEngine(e){if(e!==this.config.rendererEngine){e===`ghostty`&&await this.ensureGhosttyModule(),this.config.rendererEngine=e;for(let e of this.instances.values())this.replaceInstanceRenderer(e);this._applyFonts(),this.notify()}}closeSession(e,t){let n=this.instances.get(e);if(!n)return;let r=t?.triggerCloseCallback!==!1;if(n.mountedContainer&&this.unmount(e),n.outputIdleTimer&&=(clearTimeout(n.outputIdleTimer),null),this.pendingCreates=this.pendingCreates.filter(t=>t.requestId!==e),n.serverSessionId){let e=n.serverSessionId;this.serverToLocalSessionId.delete(e),this.wsConnected&&this.ws?.readyState===WebSocket.OPEN?this.wsSend({type:`close`,sessionId:e}):this.pendingCloseSessionIds.add(e)}n.terminal.dispose(),r&&this.runCloseCallback(n),this.instances.delete(e),this.notify()}closeAll(){for(let e of this.instances.keys())this.closeSession(e,{triggerCloseCallback:!1})}mount(e,t){let n=this.instances.get(e);if(!n)return;if(n.mountedContainer===t){requestAnimationFrame(()=>{try{n.fitAddon.fit()}catch{}});return}if(n.mountedContainer&&this.unmount(e),!n.hasOpened)this.applyGhosttyBackground(n,t),n.terminal.open(t),n.hasOpened=!0,n.afterOpenHook?.(),n.afterOpenHook=null,this.flushPendingOutput(n),n.inputPanelAddon.attachListeners();else{let e=n.terminal.element;e&&!e.contains(t)&&e.parentNode!==t&&t.appendChild(e),this.flushPendingOutput(n),this.applyGhosttyBackground(n,t)}n.mountedContainer=t,requestAnimationFrame(()=>{try{n.fitAddon.fit()}catch{}});let r=new ResizeObserver(()=>{try{if(n.fitAddon.fit(),n.terminal.cols&&n.terminal.rows){let t=this.resolveServerSessionId(e);if(!t)return;this.wsSend({type:`resize`,sessionId:t,cols:n.terminal.cols,rows:n.terminal.rows})}}catch{}});r.observe(t),n.resizeObserver=r,requestAnimationFrame(()=>{this.focusSession(e)})}unmount(e){let t=this.instances.get(e);!t||!t.mountedContainer||(t.resizeObserver&&=(t.resizeObserver.disconnect(),null),t.mountedContainer=null)}focusSession(e){let t=this.instances.get(e);if(!t||!t.hasOpened)return;let n=!1;try{t.terminal.focus?.(),n=!0}catch{}if(!n){let e=t.terminal.element;if(e instanceof HTMLElement)try{e.focus()}catch{}}t.inputPanelAddon.syncFocusLifecycle()}setCustomTitle(e,t){let n=this.instances.get(e);n&&(n.customTitle=t,this.notify())}getDisplayTitle(e){let t=this.instances.get(e);return t?t.customTitle??t.processTitle??t.label:``}getConfig(){return{...this.config}}applyConfig(e){let{rendererEngine:t,...n}=e;Object.assign(this.config,n);for(let e of this.instances.values()){let t=e.terminal;t.options.fontSize=this.config.fontSize,t.options.cursorBlink=this.config.cursorBlink,t.options.cursorStyle=this.config.cursorStyle,t.options.scrollback=this.config.scrollback}this._applyFonts(),t&&t!==this.config.rendererEngine&&this.setRendererEngine(t).catch(e=>{console.error(`[terminal] failed to switch renderer engine:`,e)}),this.notify()}async _applyFonts(){let e=this.config.fontFamily;if(!e){this._setFontFamily(r4);return}let t=e.split(/[,]+/).map(e=>e.trim()).filter(Boolean),n=[];for(let e of t)if(YCe.includes(e))ZCe(e),n.push(e);else{let t=await XCe(e);t&&n.push(t)}n.push(r4),this._setFontFamily(n.join(`, `))}_setFontFamily(e){for(let t of this.instances.values())if(t.terminal.options.fontFamily=e,t.mountedContainer)try{t.fitAddon.fit()}catch{}}configPersistTimer=null;persistFontSize(){this.configPersistTimer&&clearTimeout(this.configPersistTimer),this.configPersistTimer=setTimeout(()=>{this.configPersistTimer=null,q(async()=>{let{trpcClient:e}=await import(`./trpc-Z2U-lHEj.js`);return{trpcClient:e}},[]).then(({trpcClient:e})=>{e.config.update.mutate({terminal:{fontSize:this.config.fontSize}})}).catch(()=>{})},JCe)}zoomFont(e){let t=Math.min(qCe,Math.max(KCe,this.config.fontSize+e));t!==this.config.fontSize&&(this.applyConfig({fontSize:t}),this.persistFontSize())}resetFontSize(){this.config.fontSize!==s4&&(this.applyConfig({fontSize:s4}),this.persistFontSize())}writeToSession(e,t){let n=this.resolveServerSessionId(e);return n?this.wsSend({type:`input`,sessionId:n,data:t}):!1}openInputPanel(e){let t=[e?this.instances.get(e):void 0,...this.instances.values()],n=t.find(e=>e&&e.mountedContainer)?.id??t.find(e=>e)?.id;if(!n)return!1;this.focusSession(n);let r=this.instances.get(n);return r?(r.inputPanelAddon.open(),!0):!1}async addInputHistory(e){await this.inputHistoryStore.add(e)}resolveServerSessionId(e){let t=this.instances.get(e);return t?t.serverSessionId:null}getInstanceByServerSessionId(e){let t=this.serverToLocalSessionId.get(e)??e;return this.instances.get(t)}getLocalSessionIdByServerSessionId(e){return this.serverToLocalSessionId.get(e)??e}handleCreatedResponse(e){let t=this.instances.get(e.requestId);if(!t){this.wsSend({type:`close`,sessionId:e.sessionId});return}t.serverSessionId=e.sessionId,t.platform=e.platform,t.inputPanelAddon.setPlatform(e.platform),t.isConnected=!0,this.serverToLocalSessionId.set(e.sessionId,e.requestId),this.notify()}handleOutputResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);t&&(this.writeTerminalOutput(t,e.data),t.lastOutputTime=Date.now(),this.notify(),t.outputIdleTimer&&clearTimeout(t.outputIdleTimer),t.outputIdleTimer=setTimeout(()=>{t.outputIdleTimer=null,this.notify()},i4))}handleExitResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);if(t){if(t.isExited=!0,t.exitCode=e.exitCode,t.closeTip||t.isDedicated){let n=t.closeTip??`Press any key to close (equivalent to close action).`;this.writeTerminalOutput(t,`\r\n\x1b[90m[Process exited with code ${e.exitCode}. ${n}]\x1b[0m`)}this.notify()}}handleTitleResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);t&&(t.processTitle=e.title,this.notify())}handleBufferResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);!t||!e.data||this.writeTerminalOutput(t,e.data)}handleErrorResponse(e){if(e.code===`PTY_CREATE_FAILED`&&e.sessionId){let t=this.instances.get(e.sessionId);t&&!t.serverSessionId&&(t.isExited=!0,t.exitCode=-1,this.writeTerminalOutput(t,`\r\n\x1b[31m[Failed to start PTY: ${e.message}]\x1b[0m`),this.notify())}console.warn(`[pty] ${e.code}: ${e.message}`,e)}setInputPanelMountTarget(e){W2.mountTarget=e}setInputPanelDefaultLayout(e){this.inputPanelDefaultLayout=e;for(let t of this.instances.values())t.inputPanelAddon.setDefaultLayout(e)}getTerminalDimensions(e){let t=this.instances.get(e);return t?{cols:t.terminal.cols||80,rows:t.terminal.rows||24}:null}subscribe(e){return this.listeners.add(e),this.ensureWsConnected(),()=>{this.listeners.delete(e)}}getSnapshot(){if(this.snapshotCache)return this.snapshotCache;let e=[];for(let t of this.instances.values())e.push({id:t.id,label:t.label,customTitle:t.customTitle,processTitle:t.processTitle,displayTitle:t.customTitle??t.processTitle??t.label,isDedicated:t.isDedicated,isExited:t.isExited,exitCode:t.exitCode,outputActive:t.lastOutputTime>0&&Date.now()-t.lastOutputTime<i4,command:t.command,args:t.args,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,platform:t.platform});return this.snapshotCache={sessions:e},this.snapshotCache}notify(){this.snapshotCache=null;for(let e of this.listeners)e()}ensureWsConnected(){this.ws&&(this.ws.readyState===WebSocket.CONNECTING||this.ws.readyState===WebSocket.OPEN)||this.connectSharedWebSocket()}connectSharedWebSocket(){this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null);let e=new WebSocket(Fl());this.ws=e,e.onopen=()=>{this.wsConnected=!0,this.reconnectDelay=a4;for(let e of this.pendingCloseSessionIds)this.wsSend({type:`close`,sessionId:e});this.pendingCloseSessionIds.clear(),this.wsSend({type:`list`});for(let e of this.pendingCreates)this.wsSend({type:`create`,requestId:e.requestId,cols:e.cols,rows:e.rows,command:e.command,args:e.args,closeTip:e.closeTip,closeCallbackUrl:e.closeCallbackUrl});this.pendingCreates=[];for(let e of this.instances.values())if(!e.restored)continue;this.notify()},e.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}let n=YG.safeParse(t);n.success&&this.handleServerMessage(n.data)},e.onclose=()=>{this.wsConnected=!1,this.ws=null,this.notify(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,(this.listeners.size>0||this.instances.size>0)&&this.connectSharedWebSocket()},this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*1.5,WCe)},e.onerror=()=>{}}handleServerMessage(e){switch(e.type){case`list`:this.handleListResponse(e);break;case`created`:this.handleCreatedResponse(e);break;case`buffer`:this.handleBufferResponse(e);break;case`output`:this.handleOutputResponse(e);break;case`exit`:this.handleExitResponse(e);break;case`title`:this.handleTitleResponse(e);break;case`error`:this.handleErrorResponse(e);break}}handleListResponse(e){let t=new Set(e.sessions.map(e=>e.id));for(let t of e.sessions){let e=this.getLocalSessionIdByServerSessionId(t.id),n=this.instances.get(e);if(n)n.serverSessionId||=t.id;else{let e=t.title||`${t.command} ${t.args.join(` `)}`.trim();n=this.createTerminalInstance(t.id,{label:e.length>40?`${e.slice(0,37)}...`:e,command:t.command,args:t.args,isDedicated:!1,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,restored:!0,serverSessionId:t.id,platform:t.platform??o4}),t.isExited&&(n.isExited=!0,n.exitCode=t.exitCode),this.bindTerminalInput(n),this.instances.set(n.id,n),this._applyFonts()}n.closeTip=t.closeTip,n.closeCallbackUrl=t.closeCallbackUrl,n.platform=t.platform??o4,n.inputPanelAddon.setPlatform(n.platform),this.serverToLocalSessionId.set(t.id,n.id),this.wsSend({type:`attach`,sessionId:t.id,cols:n.terminal.cols||80,rows:n.terminal.rows||24})}for(let e of this.instances.values())e.restored&&e.serverSessionId&&!t.has(e.serverSessionId)&&!e.isExited&&(e.isExited=!0,e.exitCode=-1);this.hasDiscoveredSessions=!0,this.notify()}get discoveredSessions(){return this.hasDiscoveredSessions}runCloseCallback(e){if(!e.isExited)return;let t=$Ce(e.closeCallbackUrl,e.exitCode);t&&ewe(t)}wsSend(e){return this.ws?.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),!0):!1}};function $Ce(e,t){if(!e)return null;if(typeof e==`string`){let t=e.trim();return t.length>0?t:null}let n=e[t==null?`null`:String(t)];if(typeof n==`string`&&n.trim().length>0)return n.trim();let r=e[`*`];return typeof r==`string`&&r.trim().length>0?r.trim():null}function ewe(e){let t;try{t=new URL(e,window.location.origin)}catch{return}if(t.origin===window.location.origin){let e=`${t.pathname}${t.search}${t.hash}`,n=Mu.getAreaForPath(t.pathname);Mu.push(n,e,null);return}window.open(t.toString(),`_blank`,`noopener,noreferrer`)}new QCe;var twe=(0,G.createContext)(null);function nwe(){let e=(0,G.useContext)(twe);if(!e)throw Error(`useTerminalContext must be used within a TerminalProvider`);return e}function u4(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2)}function d4(e,t){return`${e}${t.length>0?` ${t.join(` `)}`:``}`}function rwe(e){return e.some(e=>e.status===`loading`||e.status===`running`)?`running`:e.some(e=>e.status===`error`)?`error`:e.length>0&&e.every(e=>e.status===`success`)?`success`:`idle`}function iwe(e={}){let[t,n]=(0,G.useState)([]),[r,i]=(0,G.useState)([]),[a,o]=(0,G.useState)(null),s=(0,G.useRef)(null),c=(0,G.useRef)(null),l=(0,G.useRef)([]),u=(0,G.useRef)(e);(0,G.useEffect)(()=>{u.current=e},[e]);let d=(0,G.useCallback)(e=>{let t=e(l.current);l.current=t,n(t)},[]);(0,G.useEffect)(()=>{l.current=t},[t]);let f=(0,G.useCallback)(()=>{s.current?.unsubscribe?.(),s.current=null,c.current=null,l.current=[],n([]),i([]),o(null)},[]),p=(0,G.useCallback)(()=>{s.current?.unsubscribe?.(),s.current=null;let e=c.current;e&&(d(t=>t.map(t=>t.id===e?{...t,status:`error`,exitCode:null}:t)),i(t=>[...t,{id:u4(),commandId:e,kind:`meta`,text:`Process cancelled by user`,tone:`error`}])),c.current=null},[d]),m=(0,G.useCallback)((e,t=[],n=-1)=>{let r=u4();return d(i=>{let a=[...i],o={id:r,command:e,args:t,status:`idle`,exitCode:null};return n>=0&&n<a.length?a.splice(n,0,o):a.push(o),a}),r},[]),h=(0,G.useCallback)(e=>{d(t=>t.filter(t=>t.id!==e)),i(t=>t.filter(t=>t.commandId!==e)),c.current===e&&p()},[p,d]),g=(0,G.useCallback)(e=>{s.current?.unsubscribe?.(),s.current=null,c.current=null,i([]),o(null),d(()=>e.map(e=>({id:u4(),command:e.command,args:e.args??[],status:`idle`,exitCode:null})))},[d]),_=(0,G.useCallback)(()=>[...l.current],[]),v=(0,G.useCallback)(e=>{i(t=>[...t,e])},[]),y=(0,G.useCallback)(async e=>{if(zl())return console.warn(`CLI runner is disabled in static mode`),null;let t=e??l.current.find(e=>e.status===`idle`)?.id,n=l.current.find(e=>e.id===t);if(!n)return null;s.current?.unsubscribe?.(),c.current=n.id,d(e=>e.map(e=>e.id===n.id?{...e,status:`loading`,exitCode:null}:e));let r=()=>{},i=new Promise(e=>{r=e}),a={data:new Set,error:new Set,close:new Set,exit:new Set},f=(e,t)=>{a[e].forEach(e=>e(t))},m={id:n.id,command:n.command,args:n.args,status:`loading`,exitCode:null,done:i,on:(e,t)=>(a[e].add(t),()=>a[e].delete(t)),cancel:()=>{p()}};u.current.onCreateProcess?.(m);let h=jg.cli.runCommandStream.subscribe({command:n.command,args:n.args},{onData:e=>{if(e.type===`command`){d(e=>e.map(e=>e.id===n.id?{...e,status:`running`}:e)),m.status=`running`,f(`data`,e.data??``);return}if(e.type===`stdout`&&e.data){v({id:u4(),commandId:n.id,kind:`stdout`,text:e.data}),f(`data`,e.data);return}if(e.type===`stderr`&&e.data){v({id:u4(),commandId:n.id,kind:`stderr`,text:e.data,tone:`error`}),f(`error`,e.data);return}if(e.type===`exit`){let t=e.exitCode??null;o(t);let i=t===0?`success`:`error`;d(e=>e.map(e=>e.id===n.id?{...e,status:i,exitCode:t}:e)),m.status=i,m.exitCode=t,v({id:u4(),commandId:n.id,kind:`meta`,text:`Process exited with code ${t??`unknown`}`,tone:t===0?`success`:`error`}),f(`close`,t),f(`exit`,t),r(t),s.current?.unsubscribe?.(),s.current=null,c.current=null}},onError:e=>{let t=e instanceof Error?e.message:String(e);d(e=>e.map(e=>e.id===n.id?{...e,status:`error`,exitCode:null}:e)),m.status=`error`,v({id:u4(),commandId:n.id,kind:`meta`,text:`Error: ${t}`,tone:`error`}),f(`error`,t),r(null),s.current?.unsubscribe?.(),s.current=null,c.current=null}});return m.status=`running`,s.current=h,m},[v,p,d]),b=(0,G.useCallback)(async()=>{let e=l.current.find(e=>e.status===`idle`);for(;e;){let t=await y(e.id);if(!t||await t.done!==0)break;e=l.current.find(e=>e.status===`idle`)}},[y]);return(0,G.useEffect)(()=>()=>{p()},[p]),{lines:(0,G.useMemo)(()=>t.flatMap(e=>{let t=e.status===`loading`?(0,K.jsx)(Qc,{className:`h-3 w-3 animate-spin text-sky-300`}):e.status===`running`?(0,K.jsxs)(`div`,{className:`flex items-center gap-1 text-amber-200`,children:[(0,K.jsx)(pl,{className:`h-3 w-3 animate-pulse`}),(0,K.jsx)(Qc,{className:`h-3 w-3 animate-spin`})]}):e.status===`success`?(0,K.jsx)(bc,{className:`h-3 w-3 text-green-400`}):e.status===`error`?(0,K.jsx)(Ec,{className:`h-3 w-3 text-red-400`}):null,n=e.status===`idle`?`# ${d4(e.command,e.args)}`:`$ ${d4(e.command,e.args)}`,i=[{id:`cmd-${e.id}`,kind:`html`,node:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:e.status===`running`?`terminal-shimmer`:e.status===`loading`?`animate-pulse text-blue-200`:e.status===`success`?`text-green-300`:e.status===`error`?`text-red-300`:`text-zinc-200`,children:n}),t]})}],a=r.filter(t=>t.commandId===e.id).map(e=>({id:e.id,kind:`ascii`,text:e.text,tone:e.tone}));return[...i,...a]}),[t,r]),status:(0,G.useMemo)(()=>rwe(t),[t]),exitCode:a,hasStarted:(0,G.useMemo)(()=>t.some(e=>e.status!==`idle`),[t]),commands:(0,G.useMemo)(()=>({add:m,remove:h,list:_,replaceAll:g,run:y,runAll:b}),[m,_,h,g,y,b]),reset:f,cancel:p}}var awe=`schema: spec-driven
1398
+ `}};customElements.define(`virtual-trackpad-tab`,TCe);var ECe=/^\/versions\/[^/]+(?:\/|$)/;function DCe(e){return ECe.test(e.pathname)&&new URLSearchParams(e.search).get(`session`)?.trim()||null}function F2(e,t=window.location){let n=DCe(t);return n?`hosted-session:${n}:${e}`:e}var I2=1.5,L2=30,OCe=50,R2=15;function z2(){return`ontouchstart`in window||navigator.maxTouchPoints>0}function B2(e){return e===`input`||e===`keys`||e===`shortcuts`||e===`trackpad`||e===`settings`}function V2(e){return typeof e==`object`&&!!e}function H2(){try{let e=localStorage.getItem(F2(`xtermInputPanelState`));if(!e)return{};let t=JSON.parse(e);return V2(t)?t:{}}catch{return{}}}function kCe(e){try{localStorage.setItem(F2(`xtermInputPanelState`),JSON.stringify(e))}catch{}}function ACe(e){let t=H2().sessions;if(!t)return null;let n=t[e];if(!V2(n))return null;let r={activeTab:`input`,inputDraft:``};return B2(n.activeTab)&&(r.activeTab=n.activeTab),typeof n.inputDraft==`string`&&(r.inputDraft=n.inputDraft),r}function U2(){let e=H2();return B2(e.lastActiveTab)?e.lastActiveTab:`input`}var W2=class e{static _lastActiveTab=`input`;static _active=null;static _lastFocused=null;static _instances=new Set;static _onActiveChangeFn=null;static _mountTarget=null;static get activeInstance(){return e._active}static set onActiveChange(t){e._onActiveChangeFn=t}static set mountTarget(t){e._mountTarget=t,e._fabEl&&t&&t.appendChild(e._fabEl)}static get mountTarget(){return e._mountTarget}static _fabEl=null;static _fabSubscriberCount=0;static _ensureFab(t){if(e._fabEl){e._fabEl.parentElement!==t&&t.appendChild(e._fabEl);return}let n=document.createElement(`button`);n.type=`button`,n.title=`Open InputPanel`,n.replaceChildren(OZ(24)),Object.assign(n.style,{position:`fixed`,zIndex:`50`,width:`56px`,height:`56px`,borderRadius:`50%`,border:`2px solid currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,touchAction:`none`,userSelect:`none`,webkitUserSelect:`none`,webkitTouchCallout:`none`,cursor:`pointer`,boxShadow:`0 4px 12px rgba(0,0,0,0.3)`,background:`var(--primary, #e04a2f)`,color:`var(--primary-foreground, #fff)`,padding:`0`,margin:`0`,outline:`none`});let r=window.innerWidth-72,i=window.innerHeight-140;try{let e=localStorage.getItem(`input-panel-fab-pos`);if(e){let t=JSON.parse(e);r=t.x??r,i=t.y??i}}catch{}r=Math.max(0,Math.min(window.innerWidth-56,r)),i=Math.max(0,Math.min(window.innerHeight-56,i)),n.style.left=`${r}px`,n.style.top=`${i}px`;let a=!1,o=!1,s=0,c=0,l=0,u=0,d=()=>{let t=e._lastFocused,n=(t&&e._instances.has(t)?t:null)??[...e._instances].find(e=>e._terminal!=null)??null;n&&(e._lastFocused=n,n.open())};n.addEventListener(`pointerdown`,e=>{a=!0,o=!1,s=e.clientX,c=e.clientY,l=parseInt(n.style.left)||0,u=parseInt(n.style.top)||0,n.setPointerCapture(e.pointerId),e.preventDefault()}),n.addEventListener(`pointermove`,e=>{if(!a)return;let t=e.clientX-s,r=e.clientY-c;(Math.abs(t)>4||Math.abs(r)>4)&&(o=!0);let i=Math.max(0,Math.min(window.innerWidth-56,l+t)),d=Math.max(0,Math.min(window.innerHeight-56,u+r));n.style.left=`${i}px`,n.style.top=`${d}px`}),n.addEventListener(`pointerup`,()=>{if(a){a=!1;try{localStorage.setItem(`input-panel-fab-pos`,JSON.stringify({x:parseInt(n.style.left),y:parseInt(n.style.top)}))}catch{}o||d()}}),n.addEventListener(`pointercancel`,()=>{a=!1});let f=!1;n.addEventListener(`pointerdown`,()=>{f=!0},{capture:!0}),n.addEventListener(`click`,()=>{if(f){f=!1;return}d()}),n.addEventListener(`contextmenu`,e=>{e.preventDefault(),e.stopPropagation()}),n.addEventListener(`dragstart`,e=>{e.preventDefault()}),window.addEventListener(`resize`,()=>{let e=Math.min(parseInt(n.style.left)||0,window.innerWidth-56),t=Math.min(parseInt(n.style.top)||0,window.innerHeight-56);n.style.left=`${Math.max(0,e)}px`,n.style.top=`${Math.max(0,t)}px`}),t.appendChild(n),e._fabEl=n}static _setFabVisible(t){e._fabEl&&(e._fabEl.style.display=t&&e._fabSubscriberCount>0?`flex`:`none`)}_terminal=null;_panel=null;_cursorEl=null;_cursorPos={x:0,y:0};_isDragging=!1;_isOpen=!1;_edgeScrollTimer=null;_cleanups=[];_persistentCleanups=[];_listenersAttached=!1;_onInput;_onOpenCb;_onCloseCb;_getHistory;_addHistory;_subscribeHistory;_onSettingsChange;_platform;_defaultLayout;_showFab;_fabSubscribed;_panelSessionState;_stateKey;_hasOwnPersistedState;constructor(t){this._onInput=t?.onInput??(()=>{}),this._onOpenCb=t?.onOpen??null,this._onCloseCb=t?.onClose??null,this._getHistory=t?.getHistory??null,this._addHistory=t?.addHistory??null,this._subscribeHistory=t?.subscribeHistory??null,this._onSettingsChange=t?.onSettingsChange??null,this._platform=t?.platform??`common`,this._defaultLayout=t?.defaultLayout??`floating`,this._showFab=t?.showFab??!0,this._fabSubscribed=!1,this._stateKey=t?.stateKey?.trim()?t.stateKey:`default`,this._hasOwnPersistedState=!1,this._panelSessionState={activeTab:`input`,inputDraft:``};let n=ACe(this._stateKey);n?(this._panelSessionState=n,this._hasOwnPersistedState=!0):this._panelSessionState.activeTab=e._lastActiveTab||U2()}get isOpen(){return this._isOpen}set onOpen(e){this._onOpenCb=e}set onClose(e){this._onCloseCb=e}set onInput(e){this._onInput=e}setPlatform(e){this._platform=e,this._applyPlatformToPanel()}setDefaultLayout(e){this._defaultLayout=e}_persistPanelState(){e._lastActiveTab=this._panelSessionState.activeTab;let t=H2(),n={...t.sessions,[this._stateKey]:{activeTab:this._panelSessionState.activeTab,inputDraft:this._panelSessionState.inputDraft}};kCe({...t,lastActiveTab:this._panelSessionState.activeTab,sessions:n})}_getMountTarget(){return e._mountTarget??this._getTerminalHostElement()??document.body}_getTerminalHostElement(){let e=this._terminal?.element;return e instanceof HTMLElement?e.classList.contains(`xterm`)&&e.parentElement instanceof HTMLElement?e.parentElement:e:null}_detectTerminalEngine(){let e=this._terminal?.element;return e instanceof HTMLElement&&e.classList.contains(`xterm`)?`xterm`:`non-xterm`}activate(t){this._terminal=t,e._instances.add(this)}dispose(){this.close();for(let e of this._persistentCleanups)e();this._persistentCleanups=[],this._listenersAttached=!1,this._fabSubscribed&&(e._fabSubscriberCount=Math.max(0,e._fabSubscriberCount-1),this._fabSubscribed=!1,e._setFabVisible(e._active===null)),e._instances.delete(this),e._lastFocused===this&&(e._lastFocused=null),this._terminal=null}attachListeners(){if(this._listenersAttached||!this._terminal)return;let t=this._terminal.textarea;if(!t)return;this._listenersAttached=!0,this._showFab?(e._ensureFab(this._getMountTarget()),this._fabSubscribed||=(e._fabSubscriberCount+=1,!0),e._setFabVisible(!0)):e._fabSubscriberCount===0&&e._setFabVisible(!1),e._lastFocused||=this;let n=()=>{e._lastFocused=this,z2()&&!this._isOpen&&this.open()};t.addEventListener(`focus`,n),this._persistentCleanups.push(()=>t.removeEventListener(`focus`,n)),z2()&&t.setAttribute(`inputmode`,`none`)}open(){if(!this._terminal)return;if(this._isOpen){if(this._panel?.isConnected)return;this.close()}if(e._active&&e._active!==this&&e._active.close(),this._isOpen=!0,e._active=this,e._lastFocused=this,this._showFab&&e._setFabVisible(!1),this._suppressKeyboard(),!this._hasOwnPersistedState){let t=U2();this._panelSessionState.activeTab=t,e._lastActiveTab=t}let t=document.createElement(`input-panel`);t.setAttribute(`layout`,this._defaultLayout),this._applyPanelThemeBindings(t),t.activeTab=this._panelSessionState.activeTab;let n=document.createElement(`input-method-tab`);n.setAttribute(`slot`,`input`),n.value=this._panelSessionState.inputDraft,t.appendChild(n);let r=document.createElement(`virtual-keyboard-tab`);r.setAttribute(`slot`,`keys`),r.setAttribute(`floating`,``),r.setAttribute(`platform`,this._platform),t.appendChild(r);let i=document.createElement(`shortcut-tab`);i.setAttribute(`slot`,`shortcuts`),i.setAttribute(`platform`,this._platform),t.appendChild(i);let a=document.createElement(`virtual-trackpad-tab`);a.setAttribute(`slot`,`trackpad`),a.setAttribute(`floating`,``),t.appendChild(a),this._panel=t;let o=e=>{this._renderHistory(n,e)};if(this._getHistory&&this._getHistory().then(e=>o(e)).catch(()=>{}),this._subscribeHistory)try{let e=this._subscribeHistory(e=>{o(e)});this._cleanups.push(e)}catch{}this._on(t,`input-panel:close`,()=>this.close()),this._on(t,`input-panel:send`,e=>{let t=e.detail?.data;if(t&&this._onInput(t),e.composedPath()[0]===n&&this._addHistory&&t){let e=this._normalizeHistoryText(t);e&&Promise.resolve(this._addHistory(e)).then(()=>this._getHistory?.()).then(e=>{e&&o(e)}).catch(()=>{})}}),this._on(n,`input-panel:input-change`,e=>{let t=e.detail?.value;typeof t==`string`&&(this._panelSessionState.inputDraft=t,this._hasOwnPersistedState=!0,this._persistPanelState())}),this._on(t,`input-panel:tab-change`,e=>{let t=e.detail?.tab;B2(t)&&(this._panelSessionState.activeTab=t,this._hasOwnPersistedState=!0,this._persistPanelState()),t===`trackpad`?this._showCursor():this._hideCursor()}),this._on(t,`input-panel:settings-change`,e=>{if(!this._onSettingsChange)return;let t=e.detail;if(typeof t!=`object`||!t)return;let n=t;typeof n.fixedHeight!=`number`||typeof n.floatingWidth!=`number`||typeof n.floatingHeight!=`number`||typeof n.vibrationIntensity!=`number`||typeof n.historyLimit!=`number`||this._onSettingsChange({fixedHeight:n.fixedHeight,floatingWidth:n.floatingWidth,floatingHeight:n.floatingHeight,vibrationIntensity:n.vibrationIntensity,historyLimit:n.historyLimit})}),this._on(t,`trackpad:move`,e=>{let{dx:t,dy:n}=e.detail;this._moveCursor(t,n)}),this._on(t,`trackpad:tap`,()=>this._dispatchClick(1)),this._on(t,`trackpad:double-tap`,()=>this._dispatchDblClick()),this._on(t,`trackpad:long-press`,()=>this._dispatchRightClick()),this._on(t,`trackpad:two-finger-tap`,()=>this._dispatchRightClick()),this._on(t,`trackpad:drag-start`,()=>{this._isDragging=!0,this._dispatchMouse(`mousedown`,{detail:1})}),this._on(t,`trackpad:drag-move`,e=>{let{dx:t,dy:n}=e.detail;this._moveCursor(t,n),this._dispatchMouse(`mousemove`,{buttons:1}),this._updateEdgeScroll()}),this._on(t,`trackpad:drag-end`,()=>{this._isDragging=!1,this._stopEdgeScroll(),this._dispatchMouse(`mouseup`,{detail:1})}),this._on(t,`trackpad:scroll`,e=>{let{deltaY:t}=e.detail;this._dispatchWheel(t)}),this._getMountTarget().appendChild(t),this._createCursor(),this._focusTerminal(),this._onOpenCb?.(),e._onActiveChangeFn?.(this)}_applyPlatformToPanel(){if(!this._panel)return;let e=this._panel.querySelector(`virtual-keyboard-tab`),t=this._panel.querySelector(`shortcut-tab`);e?.setAttribute(`platform`,this._platform),t?.setAttribute(`platform`,this._platform)}_readThemeVar(e,t,n){for(let n of t){let t=e.getPropertyValue(n).trim();if(t)return t}return n}_applyPanelThemeBindings(e){let t=this._getTerminalHostElement()??this._getMountTarget(),n=getComputedStyle(t),r=this._readThemeVar(n,[`--input-panel-background`,`--terminal`,`--background`],`#1a1a1a`),i=this._readThemeVar(n,[`--input-panel-foreground`,`--terminal-foreground`,`--foreground`],`#ffffff`),a=this._readThemeVar(n,[`--input-panel-primary`,`--primary`],`#e04a2f`),o=this._readThemeVar(n,[`--input-panel-primary-foreground`,`--primary-foreground`],`#ffffff`),s=this._readThemeVar(n,[`--input-panel-border`,`--border`],`color-mix(in srgb, ${i} 24%, transparent)`),c=this._readThemeVar(n,[`--input-panel-muted`,`--muted`],`color-mix(in srgb, ${r} 86%, ${i} 14%)`),l=this._readThemeVar(n,[`--input-panel-muted-foreground`,`--muted-foreground`],`color-mix(in srgb, ${i} 62%, transparent)`);e.style.setProperty(`--input-panel-background`,r),e.style.setProperty(`--input-panel-foreground`,i),e.style.setProperty(`--input-panel-primary`,a),e.style.setProperty(`--input-panel-primary-foreground`,o),e.style.setProperty(`--input-panel-border`,s),e.style.setProperty(`--input-panel-muted`,c),e.style.setProperty(`--input-panel-muted-foreground`,l)}close(){if(this._isOpen){this._isOpen=!1,e._active===this&&(e._active=null),this._stopEdgeScroll();for(let e of this._cleanups)e();this._cleanups=[],this._panel?.remove(),this._panel=null,this._cursorEl?.remove(),this._cursorEl=null,z2()||this._restoreKeyboard(),this._showFab&&e._setFabVisible(!0),this._onCloseCb?.(),e._onActiveChangeFn?.(null)}}toggle(){if(this._isOpen){this.close();return}this.open()}syncFocusLifecycle(){if(e._lastFocused=this,this._isOpen&&!this._panel?.isConnected){this.open();return}if(e._active&&e._active!==this){this.open();return}this._isOpen&&this._focusTerminal()}_focusTerminal(){let e=this._terminal?.textarea;e&&(z2()&&e.setAttribute(`inputmode`,`none`),e.focus())}_createCursor(){let e=this._getTerminalHostElement();if(!e)return;let t=document.createElement(`div`);t.setAttribute(`data-input-panel-cursor`,`virtual-mouse`),t.setAttribute(`data-terminal-engine`,this._detectTerminalEngine()),t.setAttribute(`aria-hidden`,`true`),t.style.cssText=`position:absolute;z-index:10;pointer-events:none;opacity:0;transition:opacity 0.15s;color:#fff;`;let n=Ove(20);n.style.filter=`drop-shadow(0 0 1px rgba(0,0,0,0.9))`,t.replaceChildren(n),e.appendChild(t),this._cursorEl=t;let r=e.getBoundingClientRect();this._cursorPos={x:r.width/2,y:r.height/2},this._positionCursor()}_positionCursor(){this._cursorEl&&(this._cursorEl.style.left=`${this._cursorPos.x-4}px`,this._cursorEl.style.top=`${this._cursorPos.y-2}px`)}_showCursor(){if(this._cursorEl||this._createCursor(),this._cursorEl){let e=this._getTerminalHostElement();if(e){let t=e.getBoundingClientRect();this._cursorPos={x:t.width/2,y:t.height/2},this._positionCursor()}this._cursorEl.style.opacity=`1`}}_hideCursor(){this._cursorEl&&(this._cursorEl.style.opacity=`0.3`)}_moveCursor(e,t){let n=this._getTerminalHostElement();if(!n)return;let r=n.getBoundingClientRect();this._cursorPos.x=Math.max(0,Math.min(r.width,this._cursorPos.x+e*I2)),this._cursorPos.y=Math.max(0,Math.min(r.height,this._cursorPos.y+t*I2)),this._positionCursor()}_getClientCoords(){let e=this._getTerminalHostElement();if(!e)return null;let t=e.getBoundingClientRect();return{clientX:t.left+this._cursorPos.x,clientY:t.top+this._cursorPos.y}}_resolveTarget(e,t){let n=this._getTerminalHostElement();if(!n)return document.body;let r=document.elementFromPoint(e,t);return r&&n.contains(r)?r:n.querySelector(`.xterm-screen`)??n}_dispatchMouse(e,t={}){let n=this._getClientCoords();if(!n)return;let r=t.button??0,i=t.detail??1,a=t.buttons??(e===`mousedown`?r===0?1:r===2?2:4:0);this._resolveTarget(n.clientX,n.clientY).dispatchEvent(new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,detail:i,clientX:n.clientX,clientY:n.clientY,button:r,buttons:a}))}_dispatchClick(e){this._dispatchMouse(`mousedown`,{detail:e}),this._dispatchMouse(`mouseup`,{detail:e}),this._dispatchMouse(`click`,{detail:e})}_dispatchDblClick(){this._dispatchMouse(`mousedown`,{detail:2}),this._dispatchMouse(`mouseup`,{detail:2}),this._dispatchMouse(`click`,{detail:2}),this._dispatchMouse(`dblclick`,{detail:2})}_dispatchRightClick(){this._dispatchMouse(`mousedown`,{button:2}),this._dispatchMouse(`mouseup`,{button:2}),this._dispatchMouse(`contextmenu`,{button:2})}_dispatchWheel(e){let t=this._getClientCoords();t&&this._resolveTarget(t.clientX,t.clientY).dispatchEvent(new WheelEvent(`wheel`,{bubbles:!0,cancelable:!0,view:window,clientX:t.clientX,clientY:t.clientY,deltaY:e,deltaMode:WheelEvent.DOM_DELTA_PIXEL}))}_updateEdgeScroll(){let e=this._getTerminalHostElement();if(!e||!this._isDragging){this._stopEdgeScroll();return}let t=e.getBoundingClientRect(),n=this._cursorPos.y<L2,r=this._cursorPos.y>t.height-L2;if(!n&&!r){this._stopEdgeScroll();return}this._stopEdgeScroll(),this._edgeScrollTimer=setInterval(()=>{let e=this._getTerminalHostElement();if(!e||!this._isDragging){this._stopEdgeScroll();return}let t=e.getBoundingClientRect(),n=t.left+this._cursorPos.x,r=this._cursorPos.y<L2?t.top-R2:t.bottom+R2;this._resolveTarget(t.left+this._cursorPos.x,t.top+this._cursorPos.y).dispatchEvent(new MouseEvent(`mousemove`,{bubbles:!0,cancelable:!0,view:window,clientX:n,clientY:r,button:0,buttons:1}))},OCe)}_stopEdgeScroll(){this._edgeScrollTimer&&=(clearInterval(this._edgeScrollTimer),null)}_suppressKeyboard(){if(!z2())return;let e=this._terminal?.textarea;e&&e.setAttribute(`inputmode`,`none`)}_restoreKeyboard(){let e=this._terminal?.textarea;e&&e.removeAttribute(`inputmode`)}_on(e,t,n){e.addEventListener(t,n),this._cleanups.push(()=>e.removeEventListener(t,n))}_normalizeHistoryText(e){return e.replace(/[\r\n]+$/u,``).trim()||null}_renderHistory(e,t){if(e.querySelectorAll(`[data-input-history-root="true"]`).forEach(e=>e.remove()),t.length===0)return;let n=document.createElement(`div`);n.dataset.inputHistoryRoot=`true`,n.setAttribute(`slot`,`history`),n.style.display=`flex`,n.style.flexDirection=`column`,n.style.gap=`4px`,n.style.padding=`4px 0`;for(let e of t){let t=document.createElement(`button`);t.type=`button`,t.title=e.text,t.style.display=`flex`,t.style.alignItems=`center`,t.style.gap=`8px`,t.style.width=`100%`,t.style.padding=`4px 6px`,t.style.border=`1px solid transparent`,t.style.borderRadius=`4px`,t.style.background=`transparent`,t.style.color=`var(--foreground, #fff)`,t.style.fontFamily=`inherit`,t.style.fontSize=`12px`,t.style.textAlign=`left`;let r=document.createElement(`span`);r.textContent=new Date(e.time).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),r.style.opacity=`0.65`,r.style.fontSize=`10px`,r.style.flexShrink=`0`;let i=document.createElement(`span`);i.textContent=e.text,i.style.overflow=`hidden`,i.style.textOverflow=`ellipsis`,i.style.whiteSpace=`nowrap`,t.appendChild(r),t.appendChild(i),t.addEventListener(`click`,()=>{this._onInput(`${e.text}\n`)}),n.appendChild(t)}e.appendChild(n)}},G2=`xtermInputPanelSettings`,jCe=50,MCe=1e3,NCe=1,PCe=1,K2=`terminal-meta`;function q2(){return kl(`terminal-input-history`,window.location)}function FCe(){return kl(`openspecui-terminal`,window.location)}function J2(){return kl(`input-history`,window.location)}function Y2(){return kl(`terminal-input-history-fallback`,window.location)}function X2(e){return Math.max(NCe,Math.min(MCe,Math.round(e)))}function Z2(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(typeof n!=`object`||!n)continue;let e=n;if(typeof e.text!=`string`||typeof e.time!=`number`||!Number.isFinite(e.time))continue;let r=e.text.trim();r&&t.push({text:r,time:e.time})}return t}function Q2(e,t){let n=new Map;for(let t of e){let e=`${t.time}::${t.text}`;n.has(e)||n.set(e,t)}return[...n.values()].sort((e,t)=>t.time-e.time).slice(0,X2(t))}function $2(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]?.text!==t[n]?.text||e[n]?.time!==t[n]?.time)return!1;return!0}function e4(){try{let e=localStorage.getItem(G2);if(!e)return{};let t=JSON.parse(e);return typeof t!=`object`||!t?{}:t}catch{return{}}}function ICe(e){let t=e4();try{localStorage.setItem(G2,JSON.stringify({...t,...e}))}catch{}}async function t4(){return typeof window>`u`||!(`indexedDB`in window)?null:await new Promise(e=>{let t=window.indexedDB.open(FCe(),PCe);t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(K2)||e.createObjectStore(K2)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)})}async function LCe(){let e=await t4();return e?await new Promise(t=>{let n=e.transaction(K2,`readonly`),r=n.objectStore(K2).get(J2());r.onsuccess=()=>{t(Z2(r.result))},r.onerror=()=>t([]),n.oncomplete=()=>e.close(),n.onerror=()=>e.close(),n.onabort=()=>e.close()}):null}async function RCe(e){let t=await t4();return t?await new Promise(n=>{let r=t.transaction(K2,`readwrite`);r.objectStore(K2).put(e,J2()),r.oncomplete=()=>{t.close(),n(!0)},r.onerror=()=>{t.close(),n(!1)},r.onabort=()=>{t.close(),n(!1)}}):!1}function zCe(){try{let e=localStorage.getItem(Y2());return e?Z2(JSON.parse(e)):[]}catch{return[]}}function BCe(e){try{localStorage.setItem(Y2(),JSON.stringify(e))}catch{}}async function VCe(){return await LCe()||zCe()}async function n4(e){await RCe(e)||BCe(e)}var HCe=class{records=[];listeners=new Set;kvUnsubscribe=null;initPromise=null;subscribe(e){return this.listeners.add(e),this.ensureInitialized(),e(this.records),()=>{this.listeners.delete(e)}}async list(){return await this.ensureInitialized(),[...this.records]}getLimit(){let e=e4().historyLimit;return typeof e==`number`&&Number.isFinite(e)?X2(e):jCe}async setLimit(e){let t=X2(e);ICe({historyLimit:t}),await this.ensureInitialized();let n=Q2(this.records,t);await this.commit(n,{persistRemote:!0})}async add(e){let t=e.trim();if(!t)return;await this.ensureInitialized();let n=Q2([{text:t,time:Date.now()},...this.records],this.getLimit());await this.commit(n,{persistRemote:!0})}destroy(){this.kvUnsubscribe&&=(this.kvUnsubscribe(),null)}async ensureInitialized(){if(this.initPromise){await this.initPromise;return}this.initPromise=this.initialize(),await this.initPromise}async initialize(){if(this.records=Q2(await VCe(),this.getLimit()),this.emit(),!zl())try{let e=Z2(await jg.kv.get.query({key:q2()})),t=Q2([...this.records,...e],this.getLimit());$2(this.records,t)||(this.records=t,await n4(this.records),this.emit()),$2(e,this.records)||this.persistRemote(this.records);let n=jg.kv.subscribe.subscribe({key:q2()},{onData:e=>{this.onRemoteData(e)}});this.kvUnsubscribe=()=>n.unsubscribe()}catch{}}async onRemoteData(e){let t=Z2(e),n=Q2([...this.records,...t],this.getLimit());await this.commit(n,{persistRemote:!1})}async commit(e,t){$2(this.records,e)||(this.records=e,await n4(this.records),this.emit(),t.persistRemote&&!zl()&&this.persistRemote(this.records))}async persistRemote(e){try{await jg.kv.set.mutate({key:q2(),value:e})}catch{}}emit(){for(let e of this.listeners)e(this.records)}},r4=`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace`,UCe={fontSize:13,fontFamily:``,cursorBlink:!0,cursorStyle:`block`,scrollback:1e3,rendererEngine:`xterm`},i4=1500,a4=1e3,WCe=1e4,o4=`common`,GCe=512*1024,KCe=8,qCe=32,s4=13,JCe=800,YCe=[`JetBrains Mono`,`Fira Code`,`Source Code Pro`,`IBM Plex Mono`,`Inconsolata`,`Roboto Mono`,`Ubuntu Mono`,`Space Mono`],c4=new Set;function l4(e){try{return(new URL(e).pathname.split(`/`).pop()??``).replace(/\.[^.]+$/,``).replace(/[-_]/g,` `)||`CustomFont`}catch{return`CustomFont`}}async function XCe(e){let t=e.trim();if(!t)return``;if(!/^https?:\/\//i.test(t))return t;if(c4.has(t))return l4(t);try{let e=(await fetch(t,{method:`HEAD`})).headers.get(`content-type`)??``;if(e.includes(`text/css`)){let e=document.createElement(`link`);return e.rel=`stylesheet`,e.href=t,e.dataset.fontSrc=t,document.head.appendChild(e),c4.add(t),``}if(e.startsWith(`font/`)){let e=l4(t),n=document.createElement(`style`);return n.dataset.fontSrc=t,n.textContent=`@font-face { font-family: '${e}'; src: url('${t}'); }`,document.head.appendChild(n),c4.add(t),e}}catch{}return t}function ZCe(e){let t=`google:${e}`;if(c4.has(t))return;let n=navigator.language??``,r=/^zh\b/i.test(n)?`https://fonts.googleapis.cn`:`https://fonts.googleapis.com`,i=document.createElement(`link`);i.rel=`stylesheet`,i.href=`${r}/css2?family=${e.replace(/ /g,`+`)}&display=swap`,i.dataset.fontSrc=t,document.head.appendChild(i),c4.add(t)}var QCe=class{instances=new Map;listeners=new Set;idCounter=0;config={...UCe};snapshotCache=null;inputHistoryStore=new HCe;ghosttyModule=null;ghosttyInitPromise=null;ws=null;wsConnected=!1;reconnectTimer=null;reconnectDelay=a4;pendingCreates=[];pendingCloseSessionIds=new Set;serverToLocalSessionId=new Map;hasDiscoveredSessions=!1;inputPanelDefaultLayout=`floating`;createSession(e){let t=`term-${++this.idCounter}`,n=e?.label??`Shell ${this.idCounter}`,r=this.createTerminalInstance(t,{label:n,command:e?.command,args:e?.args,isDedicated:e?.isDedicated??!1,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl,restored:!1,serverSessionId:null,platform:o4});return this.instances.set(t,r),this._applyFonts(),this.bindTerminalInput(r),this.wsConnected&&this.ws?this.wsSend({type:`create`,requestId:t,cols:r.terminal.cols||80,rows:r.terminal.rows||24,command:e?.command,args:e?.args,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl}):(this.pendingCreates.push({requestId:t,command:e?.command,args:e?.args,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl,cols:r.terminal.cols||80,rows:r.terminal.rows||24}),this.ensureWsConnected()),this.notify(),t}createTerminalInstance(e,t){let{terminal:n,fitAddon:r,afterOpenHook:i,engine:a}=this.createRendererTerminal(),o=this.createInputPanelAddon(e,t.platform);return n.loadAddon(o),this.attachTerminalShortcuts(n,a),{id:e,serverSessionId:t.serverSessionId,terminal:n,fitAddon:r,inputPanelAddon:o,isConnected:!1,label:t.label,customTitle:null,processTitle:null,isDedicated:t.isDedicated,isExited:!1,exitCode:null,command:t.command,args:t.args,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,mountedContainer:null,resizeObserver:null,hasOpened:!1,afterOpenHook:i,pendingOutput:[],pendingOutputBytes:0,lastOutputTime:0,outputIdleTimer:null,restored:t.restored,platform:t.platform,rendererEngine:a}}getTerminalOptions(){return{cursorBlink:this.config.cursorBlink,cursorStyle:this.config.cursorStyle,fontSize:this.config.fontSize,fontFamily:r4,theme:{background:`transparent`},allowTransparency:!0,convertEol:!0,macOptionIsMeta:!0,macOptionClickForcesSelection:!0,scrollback:this.config.scrollback}}createRendererTerminal(){let e=this.getTerminalOptions();if(this.config.rendererEngine===`xterm`){let t=new W_e(e),n=new eK;return t.loadAddon(n),t.loadAddon(new oK),{terminal:t,fitAddon:n,afterOpenHook:null,engine:`xterm`}}let t=this.ghosttyModule;if(!t)throw Error(`ghostty-web is not initialized. Open Settings and switch engine again.`);let n=new t.Terminal(e),r=new t.FitAddon;return n.loadAddon(r),{terminal:n,fitAddon:r,afterOpenHook:()=>{let e=n;e.registerLinkProvider&&e.registerLinkProvider(new t.UrlRegexProvider(n))},engine:`ghostty`}}createInputPanelAddon(e,t){return new W2({onInput:t=>this.writeToSession(e,t),getHistory:async()=>this.inputHistoryStore.list(),addHistory:async e=>this.inputHistoryStore.add(e),subscribeHistory:e=>this.inputHistoryStore.subscribe(e),platform:t,defaultLayout:this.inputPanelDefaultLayout,showFab:!1,stateKey:e,onSettingsChange:async e=>{await this.inputHistoryStore.setLimit(e.historyLimit)}})}applyGhosttyBackground(e,t){if(e.rendererEngine!==`ghostty`)return;let n=this.resolveNearestOpaqueBackground(t),r=e.terminal.options.theme??{};e.terminal.options.allowTransparency=!1,e.terminal.options.theme={...r,background:n}}isTransparentColor(e){let t=e.trim().toLowerCase();return t.length===0||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0,0,0,0)`}resolveNearestOpaqueBackground(e){let t=e;for(;t;){let e=window.getComputedStyle(t).backgroundColor;if(!this.isTransparentColor(e))return e;t=t.parentElement}return`rgb(26, 26, 26)`}attachTerminalShortcuts(e,t){e.attachCustomKeyEventHandler(e=>{let n=e.metaKey||e.ctrlKey;if(e.type!==`keydown`||!n)return t===`xterm`;let r=!1;return(e.key===`=`||e.key===`+`)&&n&&(this.zoomFont(1),r=!0),e.key===`-`&&n&&!r&&(this.zoomFont(-1),r=!0),e.key===`0`&&n&&!r&&(this.resetFontSize(),r=!0),t===`xterm`?!r:r})}bindTerminalInput(e){e.terminal.onData(t=>{if(e.isExited){this.closeSession(e.id);return}let n=this.resolveServerSessionId(e.id);n&&this.wsSend({type:`input`,sessionId:n,data:t})})}isTerminalNotOpenedError(e){if(!(e instanceof Error))return!1;let t=e.message;return t.includes(`Terminal must be opened before use`)||t.includes(`Call terminal.open(parent) first`)}enqueuePendingOutput(e,t){if(t)for(e.pendingOutput.push(t),e.pendingOutputBytes+=t.length;e.pendingOutputBytes>GCe&&e.pendingOutput.length;){let t=e.pendingOutput.shift();if(!t)break;e.pendingOutputBytes-=t.length}}writeTerminalOutput(e,t){if(t){if(!e.hasOpened){this.enqueuePendingOutput(e,t);return}try{e.terminal.write(t)}catch(n){if(this.isTerminalNotOpenedError(n)){this.enqueuePendingOutput(e,t);return}console.error(`[terminal] failed to write output:`,n)}}}flushPendingOutput(e){if(!e.hasOpened||e.pendingOutput.length===0)return;let t=e.pendingOutput.join(``);e.pendingOutput=[],e.pendingOutputBytes=0,this.writeTerminalOutput(e,t)}replaceInstanceRenderer(e){let t=e.mountedContainer,n=e.serverSessionId;e.mountedContainer&&this.unmount(e.id),e.terminal.dispose();let{terminal:r,fitAddon:i,afterOpenHook:a,engine:o}=this.createRendererTerminal(),s=this.createInputPanelAddon(e.id,e.platform);r.loadAddon(s),this.attachTerminalShortcuts(r,o),e.terminal=r,e.fitAddon=i,e.inputPanelAddon=s,e.hasOpened=!1,e.afterOpenHook=a,e.mountedContainer=null,e.resizeObserver=null,e.rendererEngine=o,this.bindTerminalInput(e),t&&this.mount(e.id,t),n&&this.wsSend({type:`attach`,sessionId:n,cols:e.terminal.cols||80,rows:e.terminal.rows||24})}async ensureGhosttyModule(){return this.ghosttyModule?this.ghosttyModule:(this.ghosttyInitPromise||=q(()=>import(`./ghostty-web-DoANeMT4.js`).then(async e=>(await e.init(),this.ghosttyModule=e,e)),[]).finally(()=>{this.ghosttyInitPromise=null}),this.ghosttyInitPromise)}async setRendererEngine(e){if(e!==this.config.rendererEngine){e===`ghostty`&&await this.ensureGhosttyModule(),this.config.rendererEngine=e;for(let e of this.instances.values())this.replaceInstanceRenderer(e);this._applyFonts(),this.notify()}}closeSession(e,t){let n=this.instances.get(e);if(!n)return;let r=t?.triggerCloseCallback!==!1;if(n.mountedContainer&&this.unmount(e),n.outputIdleTimer&&=(clearTimeout(n.outputIdleTimer),null),this.pendingCreates=this.pendingCreates.filter(t=>t.requestId!==e),n.serverSessionId){let e=n.serverSessionId;this.serverToLocalSessionId.delete(e),this.wsConnected&&this.ws?.readyState===WebSocket.OPEN?this.wsSend({type:`close`,sessionId:e}):this.pendingCloseSessionIds.add(e)}n.terminal.dispose(),r&&this.runCloseCallback(n),this.instances.delete(e),this.notify()}closeAll(){for(let e of this.instances.keys())this.closeSession(e,{triggerCloseCallback:!1})}mount(e,t){let n=this.instances.get(e);if(!n)return;if(n.mountedContainer===t){requestAnimationFrame(()=>{try{n.fitAddon.fit()}catch{}});return}if(n.mountedContainer&&this.unmount(e),!n.hasOpened)this.applyGhosttyBackground(n,t),n.terminal.open(t),n.hasOpened=!0,n.afterOpenHook?.(),n.afterOpenHook=null,this.flushPendingOutput(n),n.inputPanelAddon.attachListeners();else{let e=n.terminal.element;e&&!e.contains(t)&&e.parentNode!==t&&t.appendChild(e),this.flushPendingOutput(n),this.applyGhosttyBackground(n,t)}n.mountedContainer=t,requestAnimationFrame(()=>{try{n.fitAddon.fit()}catch{}});let r=new ResizeObserver(()=>{try{if(n.fitAddon.fit(),n.terminal.cols&&n.terminal.rows){let t=this.resolveServerSessionId(e);if(!t)return;this.wsSend({type:`resize`,sessionId:t,cols:n.terminal.cols,rows:n.terminal.rows})}}catch{}});r.observe(t),n.resizeObserver=r,requestAnimationFrame(()=>{this.focusSession(e)})}unmount(e){let t=this.instances.get(e);!t||!t.mountedContainer||(t.resizeObserver&&=(t.resizeObserver.disconnect(),null),t.mountedContainer=null)}focusSession(e){let t=this.instances.get(e);if(!t||!t.hasOpened)return;let n=!1;try{t.terminal.focus?.(),n=!0}catch{}if(!n){let e=t.terminal.element;if(e instanceof HTMLElement)try{e.focus()}catch{}}t.inputPanelAddon.syncFocusLifecycle()}setCustomTitle(e,t){let n=this.instances.get(e);n&&(n.customTitle=t,this.notify())}getDisplayTitle(e){let t=this.instances.get(e);return t?t.customTitle??t.processTitle??t.label:``}getConfig(){return{...this.config}}applyConfig(e){let{rendererEngine:t,...n}=e;Object.assign(this.config,n);for(let e of this.instances.values()){let t=e.terminal;t.options.fontSize=this.config.fontSize,t.options.cursorBlink=this.config.cursorBlink,t.options.cursorStyle=this.config.cursorStyle,t.options.scrollback=this.config.scrollback}this._applyFonts(),t&&t!==this.config.rendererEngine&&this.setRendererEngine(t).catch(e=>{console.error(`[terminal] failed to switch renderer engine:`,e)}),this.notify()}async _applyFonts(){let e=this.config.fontFamily;if(!e){this._setFontFamily(r4);return}let t=e.split(/[,]+/).map(e=>e.trim()).filter(Boolean),n=[];for(let e of t)if(YCe.includes(e))ZCe(e),n.push(e);else{let t=await XCe(e);t&&n.push(t)}n.push(r4),this._setFontFamily(n.join(`, `))}_setFontFamily(e){for(let t of this.instances.values())if(t.terminal.options.fontFamily=e,t.mountedContainer)try{t.fitAddon.fit()}catch{}}configPersistTimer=null;persistFontSize(){this.configPersistTimer&&clearTimeout(this.configPersistTimer),this.configPersistTimer=setTimeout(()=>{this.configPersistTimer=null,q(async()=>{let{trpcClient:e}=await import(`./trpc-T5xQ21pb.js`);return{trpcClient:e}},[]).then(({trpcClient:e})=>{e.config.update.mutate({terminal:{fontSize:this.config.fontSize}})}).catch(()=>{})},JCe)}zoomFont(e){let t=Math.min(qCe,Math.max(KCe,this.config.fontSize+e));t!==this.config.fontSize&&(this.applyConfig({fontSize:t}),this.persistFontSize())}resetFontSize(){this.config.fontSize!==s4&&(this.applyConfig({fontSize:s4}),this.persistFontSize())}writeToSession(e,t){let n=this.resolveServerSessionId(e);return n?this.wsSend({type:`input`,sessionId:n,data:t}):!1}openInputPanel(e){let t=[e?this.instances.get(e):void 0,...this.instances.values()],n=t.find(e=>e&&e.mountedContainer)?.id??t.find(e=>e)?.id;if(!n)return!1;this.focusSession(n);let r=this.instances.get(n);return r?(r.inputPanelAddon.open(),!0):!1}async addInputHistory(e){await this.inputHistoryStore.add(e)}resolveServerSessionId(e){let t=this.instances.get(e);return t?t.serverSessionId:null}getInstanceByServerSessionId(e){let t=this.serverToLocalSessionId.get(e)??e;return this.instances.get(t)}getLocalSessionIdByServerSessionId(e){return this.serverToLocalSessionId.get(e)??e}handleCreatedResponse(e){let t=this.instances.get(e.requestId);if(!t){this.wsSend({type:`close`,sessionId:e.sessionId});return}t.serverSessionId=e.sessionId,t.platform=e.platform,t.inputPanelAddon.setPlatform(e.platform),t.isConnected=!0,this.serverToLocalSessionId.set(e.sessionId,e.requestId),this.notify()}handleOutputResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);t&&(this.writeTerminalOutput(t,e.data),t.lastOutputTime=Date.now(),this.notify(),t.outputIdleTimer&&clearTimeout(t.outputIdleTimer),t.outputIdleTimer=setTimeout(()=>{t.outputIdleTimer=null,this.notify()},i4))}handleExitResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);if(t){if(t.isExited=!0,t.exitCode=e.exitCode,t.closeTip||t.isDedicated){let n=t.closeTip??`Press any key to close (equivalent to close action).`;this.writeTerminalOutput(t,`\r\n\x1b[90m[Process exited with code ${e.exitCode}. ${n}]\x1b[0m`)}this.notify()}}handleTitleResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);t&&(t.processTitle=e.title,this.notify())}handleBufferResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);!t||!e.data||this.writeTerminalOutput(t,e.data)}handleErrorResponse(e){if(e.code===`PTY_CREATE_FAILED`&&e.sessionId){let t=this.instances.get(e.sessionId);t&&!t.serverSessionId&&(t.isExited=!0,t.exitCode=-1,this.writeTerminalOutput(t,`\r\n\x1b[31m[Failed to start PTY: ${e.message}]\x1b[0m`),this.notify())}console.warn(`[pty] ${e.code}: ${e.message}`,e)}setInputPanelMountTarget(e){W2.mountTarget=e}setInputPanelDefaultLayout(e){this.inputPanelDefaultLayout=e;for(let t of this.instances.values())t.inputPanelAddon.setDefaultLayout(e)}getTerminalDimensions(e){let t=this.instances.get(e);return t?{cols:t.terminal.cols||80,rows:t.terminal.rows||24}:null}subscribe(e){return this.listeners.add(e),this.ensureWsConnected(),()=>{this.listeners.delete(e)}}getSnapshot(){if(this.snapshotCache)return this.snapshotCache;let e=[];for(let t of this.instances.values())e.push({id:t.id,label:t.label,customTitle:t.customTitle,processTitle:t.processTitle,displayTitle:t.customTitle??t.processTitle??t.label,isDedicated:t.isDedicated,isExited:t.isExited,exitCode:t.exitCode,outputActive:t.lastOutputTime>0&&Date.now()-t.lastOutputTime<i4,command:t.command,args:t.args,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,platform:t.platform});return this.snapshotCache={sessions:e},this.snapshotCache}notify(){this.snapshotCache=null;for(let e of this.listeners)e()}ensureWsConnected(){this.ws&&(this.ws.readyState===WebSocket.CONNECTING||this.ws.readyState===WebSocket.OPEN)||this.connectSharedWebSocket()}connectSharedWebSocket(){this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null);let e=new WebSocket(Fl());this.ws=e,e.onopen=()=>{this.wsConnected=!0,this.reconnectDelay=a4;for(let e of this.pendingCloseSessionIds)this.wsSend({type:`close`,sessionId:e});this.pendingCloseSessionIds.clear(),this.wsSend({type:`list`});for(let e of this.pendingCreates)this.wsSend({type:`create`,requestId:e.requestId,cols:e.cols,rows:e.rows,command:e.command,args:e.args,closeTip:e.closeTip,closeCallbackUrl:e.closeCallbackUrl});this.pendingCreates=[];for(let e of this.instances.values())if(!e.restored)continue;this.notify()},e.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}let n=YG.safeParse(t);n.success&&this.handleServerMessage(n.data)},e.onclose=()=>{this.wsConnected=!1,this.ws=null,this.notify(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,(this.listeners.size>0||this.instances.size>0)&&this.connectSharedWebSocket()},this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*1.5,WCe)},e.onerror=()=>{}}handleServerMessage(e){switch(e.type){case`list`:this.handleListResponse(e);break;case`created`:this.handleCreatedResponse(e);break;case`buffer`:this.handleBufferResponse(e);break;case`output`:this.handleOutputResponse(e);break;case`exit`:this.handleExitResponse(e);break;case`title`:this.handleTitleResponse(e);break;case`error`:this.handleErrorResponse(e);break}}handleListResponse(e){let t=new Set(e.sessions.map(e=>e.id));for(let t of e.sessions){let e=this.getLocalSessionIdByServerSessionId(t.id),n=this.instances.get(e);if(n)n.serverSessionId||=t.id;else{let e=t.title||`${t.command} ${t.args.join(` `)}`.trim();n=this.createTerminalInstance(t.id,{label:e.length>40?`${e.slice(0,37)}...`:e,command:t.command,args:t.args,isDedicated:!1,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,restored:!0,serverSessionId:t.id,platform:t.platform??o4}),t.isExited&&(n.isExited=!0,n.exitCode=t.exitCode),this.bindTerminalInput(n),this.instances.set(n.id,n),this._applyFonts()}n.closeTip=t.closeTip,n.closeCallbackUrl=t.closeCallbackUrl,n.platform=t.platform??o4,n.inputPanelAddon.setPlatform(n.platform),this.serverToLocalSessionId.set(t.id,n.id),this.wsSend({type:`attach`,sessionId:t.id,cols:n.terminal.cols||80,rows:n.terminal.rows||24})}for(let e of this.instances.values())e.restored&&e.serverSessionId&&!t.has(e.serverSessionId)&&!e.isExited&&(e.isExited=!0,e.exitCode=-1);this.hasDiscoveredSessions=!0,this.notify()}get discoveredSessions(){return this.hasDiscoveredSessions}runCloseCallback(e){if(!e.isExited)return;let t=$Ce(e.closeCallbackUrl,e.exitCode);t&&ewe(t)}wsSend(e){return this.ws?.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),!0):!1}};function $Ce(e,t){if(!e)return null;if(typeof e==`string`){let t=e.trim();return t.length>0?t:null}let n=e[t==null?`null`:String(t)];if(typeof n==`string`&&n.trim().length>0)return n.trim();let r=e[`*`];return typeof r==`string`&&r.trim().length>0?r.trim():null}function ewe(e){let t;try{t=new URL(e,window.location.origin)}catch{return}if(t.origin===window.location.origin){let e=`${t.pathname}${t.search}${t.hash}`,n=Mu.getAreaForPath(t.pathname);Mu.push(n,e,null);return}window.open(t.toString(),`_blank`,`noopener,noreferrer`)}new QCe;var twe=(0,G.createContext)(null);function nwe(){let e=(0,G.useContext)(twe);if(!e)throw Error(`useTerminalContext must be used within a TerminalProvider`);return e}function u4(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2)}function d4(e,t){return`${e}${t.length>0?` ${t.join(` `)}`:``}`}function rwe(e){return e.some(e=>e.status===`loading`||e.status===`running`)?`running`:e.some(e=>e.status===`error`)?`error`:e.length>0&&e.every(e=>e.status===`success`)?`success`:`idle`}function iwe(e={}){let[t,n]=(0,G.useState)([]),[r,i]=(0,G.useState)([]),[a,o]=(0,G.useState)(null),s=(0,G.useRef)(null),c=(0,G.useRef)(null),l=(0,G.useRef)([]),u=(0,G.useRef)(e);(0,G.useEffect)(()=>{u.current=e},[e]);let d=(0,G.useCallback)(e=>{let t=e(l.current);l.current=t,n(t)},[]);(0,G.useEffect)(()=>{l.current=t},[t]);let f=(0,G.useCallback)(()=>{s.current?.unsubscribe?.(),s.current=null,c.current=null,l.current=[],n([]),i([]),o(null)},[]),p=(0,G.useCallback)(()=>{s.current?.unsubscribe?.(),s.current=null;let e=c.current;e&&(d(t=>t.map(t=>t.id===e?{...t,status:`error`,exitCode:null}:t)),i(t=>[...t,{id:u4(),commandId:e,kind:`meta`,text:`Process cancelled by user`,tone:`error`}])),c.current=null},[d]),m=(0,G.useCallback)((e,t=[],n=-1)=>{let r=u4();return d(i=>{let a=[...i],o={id:r,command:e,args:t,status:`idle`,exitCode:null};return n>=0&&n<a.length?a.splice(n,0,o):a.push(o),a}),r},[]),h=(0,G.useCallback)(e=>{d(t=>t.filter(t=>t.id!==e)),i(t=>t.filter(t=>t.commandId!==e)),c.current===e&&p()},[p,d]),g=(0,G.useCallback)(e=>{s.current?.unsubscribe?.(),s.current=null,c.current=null,i([]),o(null),d(()=>e.map(e=>({id:u4(),command:e.command,args:e.args??[],status:`idle`,exitCode:null})))},[d]),_=(0,G.useCallback)(()=>[...l.current],[]),v=(0,G.useCallback)(e=>{i(t=>[...t,e])},[]),y=(0,G.useCallback)(async e=>{if(zl())return console.warn(`CLI runner is disabled in static mode`),null;let t=e??l.current.find(e=>e.status===`idle`)?.id,n=l.current.find(e=>e.id===t);if(!n)return null;s.current?.unsubscribe?.(),c.current=n.id,d(e=>e.map(e=>e.id===n.id?{...e,status:`loading`,exitCode:null}:e));let r=()=>{},i=new Promise(e=>{r=e}),a={data:new Set,error:new Set,close:new Set,exit:new Set},f=(e,t)=>{a[e].forEach(e=>e(t))},m={id:n.id,command:n.command,args:n.args,status:`loading`,exitCode:null,done:i,on:(e,t)=>(a[e].add(t),()=>a[e].delete(t)),cancel:()=>{p()}};u.current.onCreateProcess?.(m);let h=jg.cli.runCommandStream.subscribe({command:n.command,args:n.args},{onData:e=>{if(e.type===`command`){d(e=>e.map(e=>e.id===n.id?{...e,status:`running`}:e)),m.status=`running`,f(`data`,e.data??``);return}if(e.type===`stdout`&&e.data){v({id:u4(),commandId:n.id,kind:`stdout`,text:e.data}),f(`data`,e.data);return}if(e.type===`stderr`&&e.data){v({id:u4(),commandId:n.id,kind:`stderr`,text:e.data,tone:`error`}),f(`error`,e.data);return}if(e.type===`exit`){let t=e.exitCode??null;o(t);let i=t===0?`success`:`error`;d(e=>e.map(e=>e.id===n.id?{...e,status:i,exitCode:t}:e)),m.status=i,m.exitCode=t,v({id:u4(),commandId:n.id,kind:`meta`,text:`Process exited with code ${t??`unknown`}`,tone:t===0?`success`:`error`}),f(`close`,t),f(`exit`,t),r(t),s.current?.unsubscribe?.(),s.current=null,c.current=null}},onError:e=>{let t=e instanceof Error?e.message:String(e);d(e=>e.map(e=>e.id===n.id?{...e,status:`error`,exitCode:null}:e)),m.status=`error`,v({id:u4(),commandId:n.id,kind:`meta`,text:`Error: ${t}`,tone:`error`}),f(`error`,t),r(null),s.current?.unsubscribe?.(),s.current=null,c.current=null}});return m.status=`running`,s.current=h,m},[v,p,d]),b=(0,G.useCallback)(async()=>{let e=l.current.find(e=>e.status===`idle`);for(;e;){let t=await y(e.id);if(!t||await t.done!==0)break;e=l.current.find(e=>e.status===`idle`)}},[y]);return(0,G.useEffect)(()=>()=>{p()},[p]),{lines:(0,G.useMemo)(()=>t.flatMap(e=>{let t=e.status===`loading`?(0,K.jsx)(Qc,{className:`h-3 w-3 animate-spin text-sky-300`}):e.status===`running`?(0,K.jsxs)(`div`,{className:`flex items-center gap-1 text-amber-200`,children:[(0,K.jsx)(pl,{className:`h-3 w-3 animate-pulse`}),(0,K.jsx)(Qc,{className:`h-3 w-3 animate-spin`})]}):e.status===`success`?(0,K.jsx)(bc,{className:`h-3 w-3 text-green-400`}):e.status===`error`?(0,K.jsx)(Ec,{className:`h-3 w-3 text-red-400`}):null,n=e.status===`idle`?`# ${d4(e.command,e.args)}`:`$ ${d4(e.command,e.args)}`,i=[{id:`cmd-${e.id}`,kind:`html`,node:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:e.status===`running`?`terminal-shimmer`:e.status===`loading`?`animate-pulse text-blue-200`:e.status===`success`?`text-green-300`:e.status===`error`?`text-red-300`:`text-zinc-200`,children:n}),t]})}],a=r.filter(t=>t.commandId===e.id).map(e=>({id:e.id,kind:`ascii`,text:e.text,tone:e.tone}));return[...i,...a]}),[t,r]),status:(0,G.useMemo)(()=>rwe(t),[t]),exitCode:a,hasStarted:(0,G.useMemo)(()=>t.some(e=>e.status!==`idle`),[t]),commands:(0,G.useMemo)(()=>({add:m,remove:h,list:_,replaceAll:g,run:y,runAll:b}),[m,_,h,g,y,b]),reset:f,cancel:p}}var awe=`schema: spec-driven
1399
1399
 
1400
1400
  context: |
1401
1401