@openspecui/web 2.3.0 → 2.3.2

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 (67) hide show
  1. package/dist/assets/CanvasRenderer-XYe2KglB.js +1 -0
  2. package/dist/assets/WebGLRenderer-DCMbi58z.js +1 -0
  3. package/dist/assets/WebGPURenderer-D8qkuqdr.js +1 -0
  4. package/dist/assets/browserAll-haNDWq66.js +1 -0
  5. package/dist/assets/{dist-DqguTNq4.js → dist-704BMcqW.js} +1 -1
  6. package/dist/assets/{dist-DvfObUx5.js → dist-AzZzg9Or.js} +1 -1
  7. package/dist/assets/{dist-CraUKwGy.js → dist-BLkBtxRp.js} +1 -1
  8. package/dist/assets/dist-BXHMHEwl.js +1 -0
  9. package/dist/assets/{dist-DgzjR5qp.js → dist-BYskKa8I.js} +1 -1
  10. package/dist/assets/{dist-SC7MIRsO.js → dist-CHbFRWhr.js} +1 -1
  11. package/dist/assets/dist-D0pwQ8q9.js +1 -0
  12. package/dist/assets/{dist-CK4bj0tT.js → dist-D3tpHX6Y.js} +1 -1
  13. package/dist/assets/{dist-Ct-vbIRy.js → dist-DICpu_MT.js} +1 -1
  14. package/dist/assets/dist-D_Ftxw8J.js +1 -0
  15. package/dist/assets/{dist-h9bFpRHp.js → dist-DjPJlCHP.js} +1 -1
  16. package/dist/assets/{dist-CH6WDgeP.js → dist-NxlD47Et.js} +1 -1
  17. package/dist/assets/{ghostty-web-DZbZZN9b.js → ghostty-web-C70d-U4t.js} +1 -1
  18. package/dist/assets/{index-DosGv8Nv.css → index-C5SoNGIA.css} +1 -1
  19. package/dist/assets/{index-BkBydwAZ.js → index-Djyctzdp.js} +8 -8
  20. package/dist/assets/{init-BO6_2hKs.js → init-BWnHltxK.js} +1 -1
  21. package/dist/assets/trpc-C7hf8_bp.js +1 -0
  22. package/dist/assets/webworkerAll-BXCHpnO9.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-BVt34cwv.js +1 -0
  26. package/dist-ssg/client/assets/WebGLRenderer-DTGXjggz.js +1 -0
  27. package/dist-ssg/client/assets/WebGPURenderer-9B_42fBK.js +1 -0
  28. package/dist-ssg/client/assets/browserAll-DNt0Yfet.js +1 -0
  29. package/dist-ssg/client/assets/{dist-aUY3cdfE.js → dist-Bl--njTk.js} +1 -1
  30. package/dist-ssg/client/assets/{dist-D8yzgcpb.js → dist-C65ij9xh.js} +1 -1
  31. package/dist-ssg/client/assets/{dist-DzrhzQF_.js → dist-C887n21g.js} +1 -1
  32. package/dist-ssg/client/assets/dist-CkOzcD72.js +1 -0
  33. package/dist-ssg/client/assets/{dist-qafSs3YP.js → dist-Dsknr6vA.js} +1 -1
  34. package/dist-ssg/client/assets/dist-DuL-Iyhd.js +1 -0
  35. package/dist-ssg/client/assets/{dist-CTFiFTLm.js → dist-Dv6uiUoE.js} +1 -1
  36. package/dist-ssg/client/assets/{dist-DQaovcNP.js → dist-TuIRzaj8.js} +1 -1
  37. package/dist-ssg/client/assets/{dist-rgfEROCe.js → dist-X2a3RXr4.js} +1 -1
  38. package/dist-ssg/client/assets/dist-_NPWTu8A.js +1 -0
  39. package/dist-ssg/client/assets/{dist-BT7ACiv-.js → dist-eTaUIlfT.js} +1 -1
  40. package/dist-ssg/client/assets/{dist-CVpTA_1S.js → dist-hHeeK4R0.js} +1 -1
  41. package/dist-ssg/client/assets/{ghostty-web-DgYpfa64.js → ghostty-web-CHBQyH7_.js} +1 -1
  42. package/dist-ssg/client/assets/{index-w4HnnnSJ.css → index-BE9cyYzu.css} +1 -1
  43. package/dist-ssg/client/assets/{index.ssg-00zfGukh.js → index.ssg-DkyqyrXf.js} +7 -7
  44. package/dist-ssg/client/assets/{init-N4W3Zz98.js → init-BRd1iFqg.js} +1 -1
  45. package/dist-ssg/client/assets/trpc-BX7m8KYM.js +1 -0
  46. package/dist-ssg/client/assets/webworkerAll-C_Psgpip.js +1 -0
  47. package/dist-ssg/client/index.ssg.html +2 -2
  48. package/dist-ssg/server/entry-server.js +22 -19
  49. package/package.json +1 -1
  50. package/dist/assets/CanvasRenderer-DlccoNGZ.js +0 -1
  51. package/dist/assets/WebGLRenderer-CRsk8Oep.js +0 -1
  52. package/dist/assets/WebGPURenderer-DleHwYhm.js +0 -1
  53. package/dist/assets/browserAll-g91G1xuK.js +0 -1
  54. package/dist/assets/dist-BDjysUX7.js +0 -1
  55. package/dist/assets/dist-BeKzKJnQ.js +0 -1
  56. package/dist/assets/dist-Bs-YyISV.js +0 -1
  57. package/dist/assets/trpc-CX2a7AL8.js +0 -1
  58. package/dist/assets/webworkerAll-zjFEff_7.js +0 -1
  59. package/dist-ssg/client/assets/CanvasRenderer-Cg9iNpF9.js +0 -1
  60. package/dist-ssg/client/assets/WebGLRenderer-DuCBgcig.js +0 -1
  61. package/dist-ssg/client/assets/WebGPURenderer-BtRuO5eR.js +0 -1
  62. package/dist-ssg/client/assets/browserAll-SlkyrnP3.js +0 -1
  63. package/dist-ssg/client/assets/dist-2evWpv-5.js +0 -1
  64. package/dist-ssg/client/assets/dist-BEDuZVjL.js +0 -1
  65. package/dist-ssg/client/assets/dist-Dysku16A.js +0 -1
  66. package/dist-ssg/client/assets/trpc-DMzWZWPi.js +0 -1
  67. package/dist-ssg/client/assets/webworkerAll-Cpui2nNu.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-BEDuZVjL.js","assets/dist-CLKxKEQH.js","assets/dist-qafSs3YP.js","assets/dist--FTL3P_Y.js","assets/dist-BiexWhMB.js","assets/dist-BT7ACiv-.js","assets/dist-2evWpv-5.js","assets/dist-D8yzgcpb.js","assets/dist-CTFiFTLm.js","assets/dist-CVpTA_1S.js","assets/dist-DzrhzQF_.js","assets/dist-ExQdmG6u.js","assets/dist-BNF0fuPB.js","assets/dist-DQaovcNP.js","assets/dist-CRs-U2qz.js","assets/dist-CbIYKZT0.js","assets/dist-Dysku16A.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-rgfEROCe.js","assets/dist-aUY3cdfE.js","assets/browserAll-SlkyrnP3.js","assets/Geometry-CNDxiJq_.js","assets/init-N4W3Zz98.js","assets/webworkerAll-Cpui2nNu.js","assets/WebGPURenderer-BtRuO5eR.js","assets/WebGLRenderer-DuCBgcig.js","assets/CanvasRenderer-Cg9iNpF9.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-_NPWTu8A.js","assets/dist-CLKxKEQH.js","assets/dist-Dsknr6vA.js","assets/dist--FTL3P_Y.js","assets/dist-BiexWhMB.js","assets/dist-eTaUIlfT.js","assets/dist-DuL-Iyhd.js","assets/dist-C65ij9xh.js","assets/dist-Dv6uiUoE.js","assets/dist-hHeeK4R0.js","assets/dist-C887n21g.js","assets/dist-ExQdmG6u.js","assets/dist-BNF0fuPB.js","assets/dist-TuIRzaj8.js","assets/dist-CRs-U2qz.js","assets/dist-CbIYKZT0.js","assets/dist-CkOzcD72.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-X2a3RXr4.js","assets/dist-Bl--njTk.js","assets/browserAll-DNt0Yfet.js","assets/Geometry-CNDxiJq_.js","assets/init-BRd1iFqg.js","assets/webworkerAll-C_Psgpip.js","assets/WebGPURenderer-9B_42fBK.js","assets/WebGLRenderer-DTGXjggz.js","assets/CanvasRenderer-BVt34cwv.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}}}})),eee=n(((e,t)=>{t.exports=Vn()})),Hn=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`})),Un=n(((e,t)=>{t.exports=Hn()})),Wn=n((e=>{var t=Un();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`})),Gn=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=Wn()})),Kn=n((e=>{var t=eee(),n=Un(),r=Gn();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)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(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=qd(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),rp._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)(yl,{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 Cl=/^\/versions\/[^/]+(?:\/|$)/;function wl(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 Tl(e,t){return new URLSearchParams(e).get(t)?.trim()||null}function El(e){return Cl.test(e)}function Dl(e){let t=El(e.pathname);return{hosted:t,apiBaseUrl:wl(Tl(e.search,`api`)??``),sessionId:t?Tl(e.search,`session`):null}}function Ol(e,t){let n=Dl(t);return n.hosted&&n.sessionId?`hosted-session:${n.sessionId}:${e}`:e}function kl(){return typeof window<`u`&&window.location!==void 0}function Al(){return kl()?Dl(window.location):{hosted:!1,apiBaseUrl:null,sessionId:null}}function jl(){return kl()?Al().apiBaseUrl??``:``}function Ml(e){if(!kl())return``;let t=jl();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 Nl(){return Ml(`/trpc`)}function Pl(){return Ml(`/ws/pty`)}function Fl(){let e=jl();return e?`${e}/trpc`:`/trpc`}function Il(){let e=jl();return e?`${e}/api/health`:`/api/health`}var Ll=null;typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0&&(Ll=!0,console.log(`[static-mode] Detected static export mode (via flag)`));function Rl(){return Ll===!0}function zl(e){Ll=e}var Bl=null;function Vl(){return Bl===null?typeof window<`u`&&window.__OPENSPEC_BASE_PATH__||`./`:Bl}function Hl(){return typeof window<`u`&&window.__INITIAL_DATA__?window.__INITIAL_DATA__:null}var Ul=`modulepreload`,Wl=function(e){return`/`+e},Gl={},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=Wl(t,n),t in Gl)return;Gl[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`:Ul,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)})},Kl=[`/dashboard`,`/config`,`/git`,`/specs`,`/changes`,`/archive`,`/settings`,`/terminal`],ql=[`/dashboard`,`/config`,`/specs`,`/changes`,`/archive`,`/settings`],Jl=Rl()?[]:[`/git`,`/terminal`],Yl=[`/search`,`/opsx-new`,`/opsx-propose`,`/opsx-verify`,`/opsx-compose`];function Xl(){return Ol(`nav-layout`,window.location)}function Zl(e){return Ol(`nav-layout:${encodeURIComponent(e)}`,window.location)}var Ql=300;function $l(e){return Kl.includes(e)}function eu(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&$l(e)):[]}function tu(e){if(typeof e!=`object`||!e)return null;let t=e;return!Array.isArray(t.mainTabs)||!Array.isArray(t.bottomTabs)?null:{mainTabs:eu(t.mainTabs),bottomTabs:eu(t.bottomTabs),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}function nu(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 ru(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:nu(t,i)}}function iu(e){let t=e.trim();if(!t||t===`./`||t===`.`)return`/`;let n=t.startsWith(`/`)?t:`/${t}`;return(n.endsWith(`/`)?n:`${n}/`).replace(/\/+/g,`/`)}function au(e,t){return t===`/`?e||`/`:e===t.slice(0,-1)?`/`:e.startsWith(t)?e.slice(t.length-1)||`/`:e||`/`}function ou(e,t){if(t===`/`)return e||`/`;let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`?t.slice(0,-1)||`/`:`${t.slice(0,-1)}${n}`}function su(e){if(typeof window>`u`)return e;let t=new URL(e,window.location.origin),n=iu(Vl());return t.pathname=au(t.pathname,n),`${t.pathname}${t.search}${t.hash}`}function cu(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 lu(e){for(let t of Kl)if(e===t||e.startsWith(t+`/`))return t;return null}function uu(e,t){if(t===`pop`)return null;let n=t===`main`?e.mainLocation:e.bottomLocation,r=t===`main`?e.mainTabs:e.bottomTabs,i=lu(n.pathname);return i&&r.includes(i)?i:null}function du(e){return Yl.some(t=>e===t||e.startsWith(t+`/`))}function fu(e,t){if(du(t))return`pop`;let n=lu(t);return n&&e.bottomTabs.includes(n)?`bottom`:`main`}function pu(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 Kl)t.has(e)||(Jl.includes(e)?r.push(e):n.push(e));return{mainTabs:n,bottomTabs:r}}function mu(e,t){if(t.length===0)return ru(`/`);let n=lu(e.pathname);return n&&!t.includes(n)?ru(`/`):e}function hu(e,t){if(t.length===0)return ru(`/`);if(e.pathname===`/`)return ru(`/`,e.state);let n=lu(e.pathname);return!n||!t.includes(n)?ru(`/`):e}function gu(e){return e.pathname===`/`?ru(`/`,e.state):du(e.pathname)?e:ru(`/`)}function _u(e){let t=pu({mainTabs:e.mainTabs,bottomTabs:e.bottomTabs});return{...e,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,mainLocation:mu(e.mainLocation,t.mainTabs),bottomLocation:hu(e.bottomLocation,t.bottomTabs),popLocation:gu(e.popLocation)}}function vu(e,t){let n=new URL(e.href),r=iu(Vl());n.pathname=au(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=ru(`${n.pathname}${n.search}${n.hash}`,o?.main),c=ru(i??`/`,o?.bottom),l=ru(a??`/`,o?.pop);if(!i&&!a){let e=fu(t,s.pathname);e===`bottom`?(c=s,s=ru(`/`,o?.main)):e===`pop`&&(l=s,s=ru(`/`,o?.main))}return{main:mu(s,t.mainTabs),bottom:hu(c,t.bottomTabs),pop:gu(l)}}function yu(e){let t=new URL(window.location.href),n=new URL(e.mainLocation.href,window.location.origin),r=iu(Vl());return n.pathname=ou(n.pathname,r),cu(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 bu(e,t){return e.length===t.length?e.every((e,n)=>e===t[n]):!1}function xu(){return{mainTabs:[...ql],bottomTabs:[...Jl],updatedAt:0,mainLocation:ru(`/dashboard`),bottomLocation:ru(`/`),popLocation:ru(`/`)}}function Su(){try{let e=localStorage.getItem(Xl());return e?tu(JSON.parse(e)):null}catch{return null}}function Cu(e){try{let t=localStorage.getItem(e);return t?tu(JSON.parse(t)):null}catch{return null}}function wu(e,t=Xl()){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function Tu(e){let t=lu(e.pathname);return!t||e.pathname===t?e:t===`/changes`||t===`/specs`||t===`/archive`?ru(t,e.state):e}var Eu=[({prevState:e,nextState:t,event:n})=>{if(n.type!==`MOVE_TAB`)return t;let r=e.bottomTabs.includes(n.tabId)?`bottom`:`main`;if(uu(e,r)!==n.tabId)return t;let i=r===`main`?e.mainLocation:e.bottomLocation,a=ru(i.href,i.state);return n.targetArea===`main`?{...t,mainLocation:a}:{...t,bottomLocation:a}},({nextState:e})=>e.mainTabs.length===0||uu(e,`main`)!=null?e:{...e,mainLocation:ru(e.mainTabs[0])}];function Du(e,t,n){let r=t;for(let t of Eu)r=t({prevState:e,nextState:r,event:n});return r}function Ou(e,t){switch(t.type){case`NAVIGATE`:{let n=t.sourceArea===`pop`?`pop`:fu(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 lu((n===`main`?e.mainLocation:e.bottomLocation).pathname)===t.tabId&&(n===`main`?s=ru(`/`):c=ru(`/`)),{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 bu(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?lu(e.bottomLocation.pathname)===t.tabId?{nextState:{...e,bottomLocation:ru(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}:lu(e.mainLocation.pathname)===t.tabId?{nextState:{...e,mainLocation:ru(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}}case`ACTIVATE_BOTTOM`:return fu(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:ru(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`ACTIVATE_POP`:return fu(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:ru(`/`)},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=pu(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 ku(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 Au(e,t,n){let r=[...e];for(let e of[`main`,`bottom`,`pop`])ku(t,n,e)&&(r.some(t=>t.area===e)||r.push({area:e,type:`REPLACE`}));return r}var ju=new class{mainHistory=null;bottomHistory=null;popHistory=null;state=xu();listeners=new Set;snapshotCache=null;persistTimer=null;kvUnsubscribe=null;initialized=!1;storageKey=typeof window>`u`?`nav-layout`:Ol(`nav-layout`,window.location);constructor(){if(typeof window>`u`)return;let e=Rl()?null:Su();if(e!=null){let t=pu(e);this.state={...this.state,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,updatedAt:e.updatedAt}}let t=vu(window.location,this.state),n=_u({...this.state,mainLocation:t.main,bottomLocation:t.bottom,popLocation:t.pop});n=_u(Du(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:ru(su(t),n)})}replace(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`REPLACE`,location:ru(su(t),n)})}createHref(e,t,n){if(typeof window>`u`)return t;let{nextState:r}=this.computeTransition({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:ru(su(t),n)});return yu(r)}get mainTabs(){return this.state.mainTabs}get bottomTabs(){return this.state.bottomTabs}getAreaForPath(e){return fu(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:ru(e)})}deactivateBottom(){this.dispatch({type:`DEACTIVATE_BOTTOM`})}activatePop(e){this.dispatch({type:`ACTIVATE_POP`,location:ru(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=lu(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||Rl())){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-DMzWZWPi.js`);return{trpcClient:e}},[]),n=tu(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=tu(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=vu(window.location,this.state);this.dispatch({type:`POPSTATE`,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})};computeTransition(e){let t=Ou(this.state,e);if(!t.changed)return{transition:t,nextState:this.state};let n=Du(this.state,t.nextState,e);return n=_u(n),{transition:t,nextState:n}}dispatch(e){if(typeof window<`u`&&e.type!==`POPSTATE`&&this.mainHistory==null){let e=vu(window.location,this.state);this.state=_u({...this.state,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})}let t=Ou(this.state,e);if(!t.changed)return;let n=this.state,r=Du(n,t.nextState,e);r=_u(r),this.state=r,t.persist===`local_and_remote`?this.persistLayout():t.persist===`local_only`&&(this.cancelPersistTimer(),wu({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt},this.storageKey));let i=t.urlAction??(ku(n,this.state,`main`)||ku(n,this.state,`bottom`)||ku(n,this.state,`pop`)?`REPLACE`:void 0);i&&this.syncToUrl(i);let a=Au(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=yu(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=yu(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},wu({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-DMzWZWPi.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(()=>{})},Ql)}async resolveProjectScopedStorageKey(){try{let e=await fetch(Il());if(!e.ok)return null;let t=await e.json();return typeof t.projectDir!=`string`||t.projectDir.length===0?null:Zl(t.projectDir)}catch{return null}}rebindProjectScopedLayout(e){let t=Cu(e);if(t){let e=pu(t);this.state=_u({...this.state,mainTabs:e.mainTabs,bottomTabs:e.bottomTabs,updatedAt:t.updatedAt}),this.normalizeUrl();return}this.state=_u({...this.state,mainLocation:Tu(this.state.mainLocation),bottomLocation:Tu(this.state.bottomLocation),updatedAt:0}),this.normalizeUrl(),this.notifyListeners()}};typeof window<`u`&&!Rl()&&ju.init();function Mu(){return(0,G.useSyncExternalStore)(e=>ju.subscribe(e),()=>ju.getSnapshot(),()=>ju.getSnapshot())}function Nu(e,t){return t.updatedAt-e.updatedAt||e.id.localeCompare(t.id)}function Pu(e){return[...e].sort(Nu)}function Fu(e,t=10){return Pu(e).slice(0,Math.max(0,Math.trunc(t)))}var Iu=`project`,Lu=/^[A-Za-z]:\//;function Ru(e){return e.replace(/\\/g,`/`).replace(/\/+$/g,``)}function zu(e){return e.startsWith(`/`)||Lu.test(e)}function Bu(e){return e.replace(/^\.?\//,``)}function Vu(e){return Ru(e).split(`/`).filter(Boolean)}function Hu(e){let t=Ru(e),n=/(?:^|\/)node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(@[^/]+\/[^/]+|[^/]+)(\/.*)?/.exec(t),r=n?.[1];return r?`npm:${r}${n[2]??``}`:null}function Uu(e){return`${Iu}:${Bu(e)}`}function Wu(e,t){let n=Ru(e),r=Ru(t),i=n.toLowerCase(),a=r.toLowerCase();return a===i||a.startsWith(`${i}/`)}function Gu(e,t){let n=Vu(e),r=Vu(t),i=0;for(;i<n.length&&i<r.length&&n[i]?.toLowerCase()===r[i]?.toLowerCase();)i+=1;return r.slice(i).join(`/`)}function Ku(e){let t=Vu(e),n=t.lastIndexOf(`openspec`);return n<0?null:t.slice(n).join(`/`)}function qu(e,t){let n=Ru(e),r=Hu(n);return(t?.source===`package`||r)&&r?r:zu(n)?t?.projectDir&&Wu(t.projectDir,n)?Uu(Gu(t.projectDir,n)):Uu(Ku(n)||Vu(n).slice(-4).join(`/`)):Uu(n)}var Ju=Symbol.for(`yaml.alias`),Yu=Symbol.for(`yaml.document`),Xu=Symbol.for(`yaml.map`),Zu=Symbol.for(`yaml.pair`),Qu=Symbol.for(`yaml.scalar`),$u=Symbol.for(`yaml.seq`),ed=Symbol.for(`yaml.node.type`),td=e=>!!e&&typeof e==`object`&&e[ed]===Ju,nd=e=>!!e&&typeof e==`object`&&e[ed]===Yu,rd=e=>!!e&&typeof e==`object`&&e[ed]===Xu,id=e=>!!e&&typeof e==`object`&&e[ed]===Zu,ad=e=>!!e&&typeof e==`object`&&e[ed]===Qu,od=e=>!!e&&typeof e==`object`&&e[ed]===$u;function sd(e){if(e&&typeof e==`object`)switch(e[ed]){case Xu:case $u:return!0}return!1}function cd(e){if(e&&typeof e==`object`)switch(e[ed]){case Ju:case Xu:case Qu:case $u:return!0}return!1}var ld=e=>(ad(e)||sd(e))&&!!e.anchor,ud=Symbol(`break visit`),dd=Symbol(`skip children`),fd=Symbol(`remove node`);function pd(e,t){let n=_d(t);nd(e)?md(null,e.contents,n,Object.freeze([e]))===fd&&(e.contents=null):md(null,e,n,Object.freeze([]))}pd.BREAK=ud,pd.SKIP=dd,pd.REMOVE=fd;function md(e,t,n,r){let i=vd(e,t,n,r);if(cd(i)||id(i))return yd(e,r,i),md(e,i,n,r);if(typeof i!=`symbol`){if(sd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=md(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===ud)return ud;else i===fd&&(t.items.splice(e,1),--e)}}else if(id(t)){r=Object.freeze(r.concat(t));let e=md(`key`,t.key,n,r);if(e===ud)return ud;e===fd&&(t.key=null);let i=md(`value`,t.value,n,r);if(i===ud)return ud;i===fd&&(t.value=null)}}return i}async function hd(e,t){let n=_d(t);nd(e)?await gd(null,e.contents,n,Object.freeze([e]))===fd&&(e.contents=null):await gd(null,e,n,Object.freeze([]))}hd.BREAK=ud,hd.SKIP=dd,hd.REMOVE=fd;async function gd(e,t,n,r){let i=await vd(e,t,n,r);if(cd(i)||id(i))return yd(e,r,i),gd(e,i,n,r);if(typeof i!=`symbol`){if(sd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await gd(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===ud)return ud;else i===fd&&(t.items.splice(e,1),--e)}}else if(id(t)){r=Object.freeze(r.concat(t));let e=await gd(`key`,t.key,n,r);if(e===ud)return ud;e===fd&&(t.key=null);let i=await gd(`value`,t.value,n,r);if(i===ud)return ud;i===fd&&(t.value=null)}}return i}function _d(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 vd(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(rd(t))return n.Map?.(e,t,r);if(od(t))return n.Seq?.(e,t,r);if(id(t))return n.Pair?.(e,t,r);if(ad(t))return n.Scalar?.(e,t,r);if(td(t))return n.Alias?.(e,t,r)}function yd(e,t,n){let r=t[t.length-1];if(sd(r))r.items[e]=n;else if(id(r))e===`key`?r.key=n:r.value=n;else if(nd(r))r.contents=n;else{let e=td(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var bd={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},xd=e=>e.replace(/[!,[\]{}]/g,e=>bd[e]),Sd=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+xd(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&&cd(e.contents)){let t={};pd(e.contents,(e,n)=>{cd(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)(yl,{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 Cl=/^\/versions\/[^/]+(?:\/|$)/;function wl(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 Tl(e,t){return new URLSearchParams(e).get(t)?.trim()||null}function El(e){return Cl.test(e)}function Dl(e){let t=El(e.pathname);return{hosted:t,apiBaseUrl:wl(Tl(e.search,`api`)??``),sessionId:t?Tl(e.search,`session`):null}}function Ol(e,t){let n=Dl(t);return n.hosted&&n.sessionId?`hosted-session:${n.sessionId}:${e}`:e}function kl(){return typeof window<`u`&&window.location!==void 0}function Al(){return kl()?Dl(window.location):{hosted:!1,apiBaseUrl:null,sessionId:null}}function jl(){return kl()?Al().apiBaseUrl??``:``}function Ml(e){if(!kl())return``;let t=jl();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 Nl(){return Ml(`/trpc`)}function Pl(){return Ml(`/ws/pty`)}function Fl(){let e=jl();return e?`${e}/trpc`:`/trpc`}function Il(){let e=jl();return e?`${e}/api/health`:`/api/health`}var Ll=null;typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0&&(Ll=!0,console.log(`[static-mode] Detected static export mode (via flag)`));function Rl(){return Ll===!0}function zl(e){Ll=e}var Bl=null;function Vl(){return Bl===null?typeof window<`u`&&window.__OPENSPEC_BASE_PATH__||`./`:Bl}function Hl(){return typeof window<`u`&&window.__INITIAL_DATA__?window.__INITIAL_DATA__:null}var Ul=`modulepreload`,Wl=function(e){return`/`+e},Gl={},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=Wl(t,n),t in Gl)return;Gl[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`:Ul,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)})},Kl=[`/dashboard`,`/config`,`/git`,`/specs`,`/changes`,`/archive`,`/settings`,`/terminal`],ql=[`/dashboard`,`/config`,`/specs`,`/changes`,`/archive`,`/settings`],Jl=Rl()?[]:[`/git`,`/terminal`],Yl=[`/search`,`/opsx-new`,`/opsx-propose`,`/opsx-verify`,`/opsx-compose`];function Xl(){return Ol(`nav-layout`,window.location)}function Zl(e){return Ol(`nav-layout:${encodeURIComponent(e)}`,window.location)}var Ql=300;function $l(e){return Kl.includes(e)}function eu(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&$l(e)):[]}function tu(e){if(typeof e!=`object`||!e)return null;let t=e;return!Array.isArray(t.mainTabs)||!Array.isArray(t.bottomTabs)?null:{mainTabs:eu(t.mainTabs),bottomTabs:eu(t.bottomTabs),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}function nu(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 ru(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:nu(t,i)}}function iu(e){let t=e.trim();if(!t||t===`./`||t===`.`)return`/`;let n=t.startsWith(`/`)?t:`/${t}`;return(n.endsWith(`/`)?n:`${n}/`).replace(/\/+/g,`/`)}function au(e,t){return t===`/`?e||`/`:e===t.slice(0,-1)?`/`:e.startsWith(t)?e.slice(t.length-1)||`/`:e||`/`}function ou(e,t){if(t===`/`)return e||`/`;let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`?t.slice(0,-1)||`/`:`${t.slice(0,-1)}${n}`}function su(e){if(typeof window>`u`)return e;let t=new URL(e,window.location.origin),n=iu(Vl());return t.pathname=au(t.pathname,n),`${t.pathname}${t.search}${t.hash}`}function cu(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 lu(e){for(let t of Kl)if(e===t||e.startsWith(t+`/`))return t;return null}function uu(e,t){if(t===`pop`)return null;let n=t===`main`?e.mainLocation:e.bottomLocation,r=t===`main`?e.mainTabs:e.bottomTabs,i=lu(n.pathname);return i&&r.includes(i)?i:null}function du(e){return Yl.some(t=>e===t||e.startsWith(t+`/`))}function fu(e,t){if(du(t))return`pop`;let n=lu(t);return n&&e.bottomTabs.includes(n)?`bottom`:`main`}function pu(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 Kl)t.has(e)||(Jl.includes(e)?r.push(e):n.push(e));return{mainTabs:n,bottomTabs:r}}function mu(e,t){if(t.length===0)return ru(`/`);let n=lu(e.pathname);return n&&!t.includes(n)?ru(`/`):e}function hu(e,t){if(t.length===0)return ru(`/`);if(e.pathname===`/`)return ru(`/`,e.state);let n=lu(e.pathname);return!n||!t.includes(n)?ru(`/`):e}function gu(e){return e.pathname===`/`?ru(`/`,e.state):du(e.pathname)?e:ru(`/`)}function _u(e){let t=pu({mainTabs:e.mainTabs,bottomTabs:e.bottomTabs});return{...e,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,mainLocation:mu(e.mainLocation,t.mainTabs),bottomLocation:hu(e.bottomLocation,t.bottomTabs),popLocation:gu(e.popLocation)}}function vu(e,t){let n=new URL(e.href),r=iu(Vl());n.pathname=au(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=ru(`${n.pathname}${n.search}${n.hash}`,o?.main),c=ru(i??`/`,o?.bottom),l=ru(a??`/`,o?.pop);if(!i&&!a){let e=fu(t,s.pathname);e===`bottom`?(c=s,s=ru(`/`,o?.main)):e===`pop`&&(l=s,s=ru(`/`,o?.main))}return{main:mu(s,t.mainTabs),bottom:hu(c,t.bottomTabs),pop:gu(l)}}function yu(e){let t=new URL(window.location.href),n=new URL(e.mainLocation.href,window.location.origin),r=iu(Vl());return n.pathname=ou(n.pathname,r),cu(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 bu(e,t){return e.length===t.length?e.every((e,n)=>e===t[n]):!1}function xu(){return{mainTabs:[...ql],bottomTabs:[...Jl],updatedAt:0,mainLocation:ru(`/dashboard`),bottomLocation:ru(`/`),popLocation:ru(`/`)}}function Su(){try{let e=localStorage.getItem(Xl());return e?tu(JSON.parse(e)):null}catch{return null}}function Cu(e){try{let t=localStorage.getItem(e);return t?tu(JSON.parse(t)):null}catch{return null}}function wu(e,t=Xl()){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function Tu(e){let t=lu(e.pathname);return!t||e.pathname===t?e:t===`/changes`||t===`/specs`||t===`/archive`?ru(t,e.state):e}var Eu=[({prevState:e,nextState:t,event:n})=>{if(n.type!==`MOVE_TAB`)return t;let r=e.bottomTabs.includes(n.tabId)?`bottom`:`main`;if(uu(e,r)!==n.tabId)return t;let i=r===`main`?e.mainLocation:e.bottomLocation,a=ru(i.href,i.state);return n.targetArea===`main`?{...t,mainLocation:a}:{...t,bottomLocation:a}},({nextState:e})=>e.mainTabs.length===0||uu(e,`main`)!=null?e:{...e,mainLocation:ru(e.mainTabs[0])}];function Du(e,t,n){let r=t;for(let t of Eu)r=t({prevState:e,nextState:r,event:n});return r}function Ou(e,t){switch(t.type){case`NAVIGATE`:{let n=t.sourceArea===`pop`?`pop`:fu(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 lu((n===`main`?e.mainLocation:e.bottomLocation).pathname)===t.tabId&&(n===`main`?s=ru(`/`):c=ru(`/`)),{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 bu(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?lu(e.bottomLocation.pathname)===t.tabId?{nextState:{...e,bottomLocation:ru(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}:lu(e.mainLocation.pathname)===t.tabId?{nextState:{...e,mainLocation:ru(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}}case`ACTIVATE_BOTTOM`:return fu(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:ru(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`ACTIVATE_POP`:return fu(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:ru(`/`)},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=pu(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 ku(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 Au(e,t,n){let r=[...e];for(let e of[`main`,`bottom`,`pop`])ku(t,n,e)&&(r.some(t=>t.area===e)||r.push({area:e,type:`REPLACE`}));return r}var ju=new class{mainHistory=null;bottomHistory=null;popHistory=null;state=xu();listeners=new Set;snapshotCache=null;persistTimer=null;kvUnsubscribe=null;initialized=!1;storageKey=typeof window>`u`?`nav-layout`:Ol(`nav-layout`,window.location);constructor(){if(typeof window>`u`)return;let e=Rl()?null:Su();if(e!=null){let t=pu(e);this.state={...this.state,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,updatedAt:e.updatedAt}}let t=vu(window.location,this.state),n=_u({...this.state,mainLocation:t.main,bottomLocation:t.bottom,popLocation:t.pop});n=_u(Du(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:ru(su(t),n)})}replace(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`REPLACE`,location:ru(su(t),n)})}createHref(e,t,n){if(typeof window>`u`)return t;let{nextState:r}=this.computeTransition({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:ru(su(t),n)});return yu(r)}get mainTabs(){return this.state.mainTabs}get bottomTabs(){return this.state.bottomTabs}getAreaForPath(e){return fu(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:ru(e)})}deactivateBottom(){this.dispatch({type:`DEACTIVATE_BOTTOM`})}activatePop(e){this.dispatch({type:`ACTIVATE_POP`,location:ru(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=lu(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||Rl())){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-BX7m8KYM.js`);return{trpcClient:e}},[]),n=tu(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=tu(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=vu(window.location,this.state);this.dispatch({type:`POPSTATE`,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})};computeTransition(e){let t=Ou(this.state,e);if(!t.changed)return{transition:t,nextState:this.state};let n=Du(this.state,t.nextState,e);return n=_u(n),{transition:t,nextState:n}}dispatch(e){if(typeof window<`u`&&e.type!==`POPSTATE`&&this.mainHistory==null){let e=vu(window.location,this.state);this.state=_u({...this.state,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})}let t=Ou(this.state,e);if(!t.changed)return;let n=this.state,r=Du(n,t.nextState,e);r=_u(r),this.state=r,t.persist===`local_and_remote`?this.persistLayout():t.persist===`local_only`&&(this.cancelPersistTimer(),wu({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt},this.storageKey));let i=t.urlAction??(ku(n,this.state,`main`)||ku(n,this.state,`bottom`)||ku(n,this.state,`pop`)?`REPLACE`:void 0);i&&this.syncToUrl(i);let a=Au(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=yu(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=yu(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},wu({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-BX7m8KYM.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(()=>{})},Ql)}async resolveProjectScopedStorageKey(){try{let e=await fetch(Il());if(!e.ok)return null;let t=await e.json();return typeof t.projectDir!=`string`||t.projectDir.length===0?null:Zl(t.projectDir)}catch{return null}}rebindProjectScopedLayout(e){let t=Cu(e);if(t){let e=pu(t);this.state=_u({...this.state,mainTabs:e.mainTabs,bottomTabs:e.bottomTabs,updatedAt:t.updatedAt}),this.normalizeUrl();return}this.state=_u({...this.state,mainLocation:Tu(this.state.mainLocation),bottomLocation:Tu(this.state.bottomLocation),updatedAt:0}),this.normalizeUrl(),this.notifyListeners()}};typeof window<`u`&&!Rl()&&ju.init();function Mu(){return(0,G.useSyncExternalStore)(e=>ju.subscribe(e),()=>ju.getSnapshot(),()=>ju.getSnapshot())}function Nu(e,t){return t.updatedAt-e.updatedAt||e.id.localeCompare(t.id)}function Pu(e){return[...e].sort(Nu)}function Fu(e,t=10){return Pu(e).slice(0,Math.max(0,Math.trunc(t)))}var Iu=`project`,Lu=/^[A-Za-z]:\//;function Ru(e){return e.replace(/\\/g,`/`).replace(/\/+$/g,``)}function zu(e){return e.startsWith(`/`)||Lu.test(e)}function Bu(e){return e.replace(/^\.?\//,``)}function Vu(e){return Ru(e).split(`/`).filter(Boolean)}function Hu(e){let t=Ru(e),n=/(?:^|\/)node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(@[^/]+\/[^/]+|[^/]+)(\/.*)?/.exec(t),r=n?.[1];return r?`npm:${r}${n[2]??``}`:null}function Uu(e){return`${Iu}:${Bu(e)}`}function Wu(e,t){let n=Ru(e),r=Ru(t),i=n.toLowerCase(),a=r.toLowerCase();return a===i||a.startsWith(`${i}/`)}function Gu(e,t){let n=Vu(e),r=Vu(t),i=0;for(;i<n.length&&i<r.length&&n[i]?.toLowerCase()===r[i]?.toLowerCase();)i+=1;return r.slice(i).join(`/`)}function Ku(e){let t=Vu(e),n=t.lastIndexOf(`openspec`);return n<0?null:t.slice(n).join(`/`)}function qu(e,t){let n=Ru(e),r=Hu(n);return(t?.source===`package`||r)&&r?r:zu(n)?t?.projectDir&&Wu(t.projectDir,n)?Uu(Gu(t.projectDir,n)):Uu(Ku(n)||Vu(n).slice(-4).join(`/`)):Uu(n)}var Ju=Symbol.for(`yaml.alias`),Yu=Symbol.for(`yaml.document`),Xu=Symbol.for(`yaml.map`),Zu=Symbol.for(`yaml.pair`),Qu=Symbol.for(`yaml.scalar`),$u=Symbol.for(`yaml.seq`),ed=Symbol.for(`yaml.node.type`),td=e=>!!e&&typeof e==`object`&&e[ed]===Ju,nd=e=>!!e&&typeof e==`object`&&e[ed]===Yu,rd=e=>!!e&&typeof e==`object`&&e[ed]===Xu,id=e=>!!e&&typeof e==`object`&&e[ed]===Zu,ad=e=>!!e&&typeof e==`object`&&e[ed]===Qu,od=e=>!!e&&typeof e==`object`&&e[ed]===$u;function sd(e){if(e&&typeof e==`object`)switch(e[ed]){case Xu:case $u:return!0}return!1}function cd(e){if(e&&typeof e==`object`)switch(e[ed]){case Ju:case Xu:case Qu:case $u:return!0}return!1}var ld=e=>(ad(e)||sd(e))&&!!e.anchor,ud=Symbol(`break visit`),dd=Symbol(`skip children`),fd=Symbol(`remove node`);function pd(e,t){let n=_d(t);nd(e)?md(null,e.contents,n,Object.freeze([e]))===fd&&(e.contents=null):md(null,e,n,Object.freeze([]))}pd.BREAK=ud,pd.SKIP=dd,pd.REMOVE=fd;function md(e,t,n,r){let i=vd(e,t,n,r);if(cd(i)||id(i))return yd(e,r,i),md(e,i,n,r);if(typeof i!=`symbol`){if(sd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=md(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===ud)return ud;else i===fd&&(t.items.splice(e,1),--e)}}else if(id(t)){r=Object.freeze(r.concat(t));let e=md(`key`,t.key,n,r);if(e===ud)return ud;e===fd&&(t.key=null);let i=md(`value`,t.value,n,r);if(i===ud)return ud;i===fd&&(t.value=null)}}return i}async function hd(e,t){let n=_d(t);nd(e)?await gd(null,e.contents,n,Object.freeze([e]))===fd&&(e.contents=null):await gd(null,e,n,Object.freeze([]))}hd.BREAK=ud,hd.SKIP=dd,hd.REMOVE=fd;async function gd(e,t,n,r){let i=await vd(e,t,n,r);if(cd(i)||id(i))return yd(e,r,i),gd(e,i,n,r);if(typeof i!=`symbol`){if(sd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await gd(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===ud)return ud;else i===fd&&(t.items.splice(e,1),--e)}}else if(id(t)){r=Object.freeze(r.concat(t));let e=await gd(`key`,t.key,n,r);if(e===ud)return ud;e===fd&&(t.key=null);let i=await gd(`value`,t.value,n,r);if(i===ud)return ud;i===fd&&(t.value=null)}}return i}function _d(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 vd(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(rd(t))return n.Map?.(e,t,r);if(od(t))return n.Seq?.(e,t,r);if(id(t))return n.Pair?.(e,t,r);if(ad(t))return n.Scalar?.(e,t,r);if(td(t))return n.Alias?.(e,t,r)}function yd(e,t,n){let r=t[t.length-1];if(sd(r))r.items[e]=n;else if(id(r))e===`key`?r.key=n:r.value=n;else if(nd(r))r.contents=n;else{let e=td(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var bd={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},xd=e=>e.replace(/[!,[\]{}]/g,e=>bd[e]),Sd=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+xd(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&&cd(e.contents)){let t={};pd(e.contents,(e,n)=>{cd(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
  `)}};Sd.defaultYaml={explicit:!1,version:`1.2`},Sd.defaultTags={"!!":`tag:yaml.org,2002:`};function Cd(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 wd(e){let t=new Set;return pd(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function Td(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Ed(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=wd(e);let a=Td(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(ad(t.node)||sd(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 Dd(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=Dd(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=Dd(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=Dd(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=Dd(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function Od(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Od(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!ld(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 kd=class{constructor(e){Object.defineProperty(this,ed,{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(!nd(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=Od(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Dd(i,{"":o},``,o):o}},Ad=class extends kd{constructor(e){super(Ju),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=[],pd(e,{Node:(e,t)=>{(td(t)||ld(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||=(Od(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=jd(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(Cd(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 jd(e,t,n){if(td(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(sd(t)){let r=0;for(let i of t.items){let t=jd(e,i,n);t>r&&(r=t)}return r}else if(id(t)){let r=jd(e,t.key,n),i=jd(e,t.value,n);return Math.max(r,i)}return 1}var Md=e=>!e||typeof e!=`function`&&typeof e!=`object`,Nd=class extends kd{constructor(e){super(Qu),this.value=e}toJSON(e,t){return t?.keep?this.value:Od(this.value,e,t)}toString(){return String(this.value)}};Nd.BLOCK_FOLDED=`BLOCK_FOLDED`,Nd.BLOCK_LITERAL=`BLOCK_LITERAL`,Nd.PLAIN=`PLAIN`,Nd.QUOTE_DOUBLE=`QUOTE_DOUBLE`,Nd.QUOTE_SINGLE=`QUOTE_SINGLE`;var Pd=`tag:yaml.org,2002:`;function Fd(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 Id(e,t,n){if(nd(e)&&(e=e.contents),cd(e))return e;if(id(e)){let t=n.schema[Xu].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 Ad(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=Pd+t.slice(2));let l=Fd(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new Nd(e);return c&&(c.node=t),t}l=e instanceof Map?o[Xu]:Symbol.iterator in Object(e)?o[$u]:o[Xu]}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 Nd(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Ld(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 Id(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var Rd=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,zd=class extends kd{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=>cd(t)||id(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Rd(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(sd(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Ld(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(sd(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&&ad(i)?i.value:i:sd(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!id(t))return!1;let n=t.value;return n==null||e&&ad(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 sd(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(sd(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Ld(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Bd=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Vd(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Hd=(e,t,n)=>e.endsWith(`
48
48
  `)?Vd(n,t):n.includes(`
49
49
  `)?`
@@ -360,7 +360,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
360
360
  `+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=mk(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=zO;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==`
361
361
  `?``:t;else{let e=t.indexOf(`
362
362
  `);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=uO.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],qO,qO,(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(dk(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?VO(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=dk(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`?ZO(this.parser.getNodeType(e),t,n,r):new XO(e,t)}get buffer(){return new JO(this.parser.nodeSet)}};function VO(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=VO(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 HO=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 BO(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let n=WO(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(UO(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(UO(n.props)&&(r=r.extend(...n.props)),UO(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(UO(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?GO(s,e.before):e.after?GO(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(UO(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?GO(l,e.before):e.after?GO(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 uk(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 UO(e){return e!=null&&e.length>0}function WO(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=WO(e[0]);if(e.length==1)return t;let n=WO(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||qO).concat(t||qO),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 GO(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var KO=[w.none];for(let e=1,t;t=Y[e];e++)KO[e]=w.define({id:e,name:t,props:e>=Y.Escape?[]:[[ge.group,e in mO?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var qO=[],JO=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})}},YO=class{constructor(e,t,n,r=qO){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 JO(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},XO=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 qO}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 ZO(e,t,n,r){return new YO(e,t,n,r)}var QO={resolve:`Emphasis`,mark:`EmphasisMark`},$O={resolve:`Emphasis`,mark:`EmphasisMark`},ek={},tk={},nk=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},rk=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,ik=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{ik=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var ak={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(rk.charCodeAt(t)==r)return e.append(ZO(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(ZO(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(ZO(Y.InlineCode,n,r+1,[ZO(Y.CodeMark,n,n+i),ZO(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(ZO(Y.Autolink,n,n+1+i[0].length,[ZO(Y.LinkMark,n,n+1),ZO(Y.URL,n+1,n+i[0].length),ZO(Y.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(ZO(Y.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(ZO(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(ZO(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=ik.test(i),s=ik.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 nk(t==95?QO:$O,n,r,(f?1:0)|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(ZO(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(ZO(Y.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new nk(ek,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new nk(tk,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 nk&&(r.type==ek||r.type==tk)){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]=ok(e,i,r.type==ek?Y.Link:Y.Image,r.from,n+1);if(r.type==ek)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof nk&&t.type==ek&&(t.side=0)}return a.to}}return-1}};function ok(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(ZO(Y.LinkMark,r,r+(n==Y.Image?2:1))),t.push(ZO(Y.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=sk(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=ck(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(ZO(Y.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(ZO(Y.LinkMark,n,s)))}else if(o==91){let n=lk(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return ZO(n,r,s,t)}function sk(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 ZO(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(hO(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?ZO(Y.URL,t+n,i+n):i==e.length?null:!1}}function ck(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 ZO(Y.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function lk(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:ZO(Y.LinkLabel,t+n,a+1+n);else{if(r&&!hO(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var uk=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 nk(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 nk&&(t.type==ek||t.type==tk))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 nk&&n.type.resolve&&n.side&2))continue;let r=n.type==QO||n.type==$O,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof nk&&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 YO&&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 nk(a.type,a.from,l,a.side):null,(this.parts[t]=r&&n.to!=u?new nk(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 YO&&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 nk&&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 nk?t:null}skipSpace(e){return gO(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?ZO(this.parser.getNodeType(e),t,n,r):new XO(e,t)}};uk.linkStart=ek,uk.imageStart=tk;function dk(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 YO&&(n[r]=new YO(t.type,t.from,t.to,dk(t.children,[e])))}else n.splice(r++,0,e)}return n}var fk=[Y.CodeBlock,Y.ListItem,Y.OrderedList,Y.BulletList],pk=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)!=`
363
- `;)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=mk(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`)&&(fk.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 mk(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 hk=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}),gk=new HO(new C(KO).extend(hk),Object.keys(NO).map(e=>NO[e]),Object.keys(NO).map(e=>LO[e]),Object.keys(NO),RO,mO,Object.keys(ak).map(e=>ak[e]),Object.keys(ak),[]);function _k(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 vk(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:_k(e.node,e.from,e.to)};return null})}}var yk={resolve:`Strikethrough`,mark:`StrikethroughMark`},bk={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=ik.test(r),c=ik.test(i);return e.addDelimiter(yk,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function xk(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 Sk(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 Ck=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,wk=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)&&Ck.test(r=t.text.slice(t.pos))){let i=[];xk(e,n.content,0,i,n.start)==xk(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=[];xk(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}},Tk={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 Sk(t.content,0)?new wk:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof wk)||!Sk(t.text,t.basePos))return!1;let r=e.peekLine();return Ck.test(r)&&xk(e,t.text,t.basePos)==xk(e,r,t.basePos)},before:`SetextHeading`}]},Ek=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}},Dk={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 Ek:null},after:`SetextHeading`}]},Ok=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,kk=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Ak=/[\w-]+\.[\w-]+($|\/)/,jk=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Mk=/\/[a-zA-Z\d@.]+/gy;function Nk(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Pk(e,t){kk.lastIndex=t;let n=kk.exec(e);if(!n||Ak.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==`)`&&Nk(e,t,r,`)`)>Nk(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 Fk(e,t){jk.lastIndex=t;let n=jk.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 Ik=[Tk,Dk,bk,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Ok.lastIndex=r;let i=Ok.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Pk(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Fk(e.text,r):(a=Fk(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Mk.lastIndex=a,i=Mk.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 Lk(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)),hO(s))break}return-1}}var Rk={defineNodes:[{name:`Superscript`,style:A.special(A.content)},{name:`SuperscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Superscript`,parse:Lk(94,`Superscript`,`SuperscriptMark`)}]},zk={defineNodes:[{name:`Subscript`,style:A.special(A.content)},{name:`SubscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Subscript`,parse:Lk(126,`Subscript`,`SubscriptMark`)}]},Bk={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))}}]},Vk=55,Hk=1,Uk=56,Wk=2,Gk=57,Kk=3,qk=4,Jk=5,Yk=6,Xk=7,Zk=8,Qk=9,$k=10,eA=11,tA=12,nA=13,rA=58,iA=14,aA=15,oA=59,sA=21,cA=23,lA=24,uA=25,dA=27,fA=28,pA=29,mA=32,hA=35,gA=37,_A=38,vA=0,yA=1,bA={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},xA={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},SA={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 CA(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var wA=null,TA=null,EA=0;function DA(e,t){let n=e.pos+t;if(EA==n&&TA==e)return wA;let r=e.peek(t),i=``;for(;CA(r);)i+=String.fromCharCode(r),r=e.peek(++t);return TA=e,EA=n,wA=i?i.toLowerCase():r==jA||r==MA?void 0:null}var OA=60,kA=62,AA=47,jA=63,MA=33,NA=45;function PA(e,t){this.name=e,this.parent=t}var FA=[Yk,$k,Xk,Zk,Qk],IA=new Me({start:null,shift(e,t,n,r){return FA.indexOf(t)>-1?new PA(DA(r,1)||``,e):e},reduce(e,t){return t==sA&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Yk||i==gA?new PA(DA(r,1)||``,e):e},strict:!1}),LA=new Se((e,t)=>{if(e.next!=OA){e.next<0&&t.context&&e.acceptToken(rA);return}e.advance();let n=e.next==AA;n&&e.advance();let r=DA(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?aA:iA);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(eA);if(i&&xA[i])return e.acceptToken(rA,-2);if(t.dialectEnabled(vA))return e.acceptToken(tA);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(nA)}else{if(r==`script`)return e.acceptToken(Xk);if(r==`style`)return e.acceptToken(Zk);if(r==`textarea`)return e.acceptToken(Qk);if(bA.hasOwnProperty(r))return e.acceptToken($k);i&&SA[i]&&SA[i][r]?e.acceptToken(rA,-1):e.acceptToken(Yk)}},{contextual:!0}),RA=new Se(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(oA);break}if(e.next==NA)t++;else if(e.next==kA&&t>=2){n>=3&&e.acceptToken(oA,-2);break}else t=0;e.advance()}});function zA(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var BA=new Se((e,t)=>{if(e.next==AA&&e.peek(1)==kA){let n=t.dialectEnabled(yA)||zA(t.context);e.acceptToken(n?Jk:qk,2)}else e.next==kA&&e.acceptToken(qk,1)});function VA(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==OA||a==1&&i.next==AA||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==kA){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 HA=VA(`script`,Vk,Hk),UA=VA(`style`,Uk,Wk),WA=VA(`textarea`,Gk,Kk),GA=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}),KA=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:IA,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:[GA],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:[HA,UA,WA,BA,LA,RA,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function qA(e,t){let n=Object.create(null);for(let r of e.getChildren(lA)){let e=r.getChild(uA),i=r.getChild(dA)||r.getChild(fA);e&&(n[t.read(e.from,e.to)]=i?i.type.id==dA?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function JA(e,t){let n=e.getChild(cA);return n?t.read(n.from,n.to):` `}function YA(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=qA(e.node.parent.firstChild,t)))return{parser:i.parser};return null}function XA(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==pA)return YA(e,t,n);if(s==mA)return YA(e,t,r);if(s==hA)return YA(e,t,i);if(s==sA&&a.length){let n=e.node,r=n.firstChild,i=r&&JA(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=qA(r,t)))){let t=n.lastChild,i=t.type.id==_A?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==lA){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!=JA(n.parent,t))continue;let e=n.lastChild;if(e.type.id==dA){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==fA)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var ZA=122,QA=1,$A=123,ej=124,tj=2,nj=125,rj=3,ij=4,aj=[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],oj=58,sj=40,cj=95,lj=91,uj=45,Qde=46,$de=35,efe=37,tfe=38,nfe=92,rfe=10,ife=42;function dj(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function fj(e){return e>=48&&e<=57}function pj(e){return fj(e)||e>=97&&e<=102||e>=65&&e<=70}var mj=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(dj(c)||c==uj||c==cj||a&&fj(c))!a&&(c!=uj||s>0)&&(a=!0),o===s&&c==uj&&o++,r.advance();else if(c==nfe&&r.peek(1)!=rfe){if(r.advance(),pj(r.next)){do r.advance();while(pj(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(tj)?t:c==sj?n:e);break}}},afe=new Se(mj($A,tj,ej)),ofe=new Se(mj(nj,rj,ij)),sfe=new Se(e=>{if(aj.includes(e.peek(-1))){let{next:t}=e;(dj(t)||t==cj||t==$de||t==Qde||t==ife||t==lj||t==oj&&dj(e.peek(1))||t==uj||t==tfe)&&e.acceptToken(ZA)}}),cfe=new Se(e=>{if(!aj.includes(e.peek(-1))){let{next:t}=e;if(t==efe&&(e.advance(),e.acceptToken(QA)),dj(t)){do e.advance();while(dj(e.next)||fj(e.next));e.acceptToken(QA)}}}),lfe=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}),ufe={__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},dfe={__proto__:null,or:98,and:98,not:106,only:106,layer:170},ffe={__proto__:null,selector:112,layer:166},pfe={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},mfe={__proto__:null,to:207},hfe=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:[lfe],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:[sfe,cfe,afe,ofe,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=>ufe[e]||-1},{term:125,get:e=>dfe[e]||-1},{term:4,get:e=>ffe[e]||-1},{term:25,get:e=>pfe[e]||-1},{term:123,get:e=>mfe[e]||-1}],tokenPrec:1963}),hj=null;function gj(){if(!hj&&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)));hj=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return hj||[]}var _j=`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})),vj=`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}))),gfe=`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})),_fe=[`@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})),yj=/^(\w[\w-]*|-\w[\w-]*|)$/,vfe=/^-(-[\w-]*)?$/;function yfe(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 bj=new O,bfe=[`Declaration`];function xfe(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function xj(e,t,n){if(t.to-t.from>4096){let r=bj.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(a.IncludeAnonymous);if(s.firstChild())do for(let t of xj(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t));while(s.nextSibling());return bj.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(bfe)&&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 Sj=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:gj(),validFor:yj};if(i.name==`ValueName`)return{from:i.from,options:vj,validFor:yj};if(i.name==`PseudoClassName`)return{from:i.from,options:_j,validFor:yj};if(e(i)||(t.explicit||a)&&yfe(i,n.doc))return{from:e(i)||a?i.from:r,options:xj(n.doc,xfe(i),e),validFor:vfe};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:gj(),validFor:yj};return{from:i.from,options:gfe,validFor:yj}}if(i.name==`AtKeyword`)return{from:i.from,options:_fe,validFor:yj};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:_j,validFor:yj}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:vj,validFor:yj}:o.name==`Block`||o.name==`Styles`?{from:r,options:gj(),validFor:yj}:null},Cj=Sj(e=>e.name==`VariableName`),wj=Ae.define({name:`css`,parser:hfe.configure({props:[l.add({Declaration:fe()}),s.add({"Block KeyframeList":ze})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function Tj(){return new Ne(wj,wj.data.of({autocomplete:Cj}))}var Ej=[`_blank`,`_self`,`_top`,`_parent`],Dj=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],Oj=[`get`,`post`,`put`,`delete`],kj=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],Aj=[`true`,`false`],jj={},Sfe={a:{attrs:{href:null,ping:null,type:null,media:null,target:Ej,hreflang:null}},abbr:jj,address:jj,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:jj,aside:jj,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:jj,base:{attrs:{href:null,target:Ej}},bdi:jj,bdo:jj,blockquote:{attrs:{cite:null}},body:jj,br:jj,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:kj,formmethod:Oj,formnovalidate:[`novalidate`],formtarget:Ej,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:jj,center:jj,cite:jj,code:jj,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:jj,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:jj,div:jj,dl:jj,dt:jj,em:jj,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:jj,figure:jj,footer:jj,form:{attrs:{action:null,name:null,"accept-charset":Dj,autocomplete:[`on`,`off`],enctype:kj,method:Oj,novalidate:[`novalidate`],target:Ej}},h1:jj,h2:jj,h3:jj,h4:jj,h5:jj,h6:jj,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:jj,hgroup:jj,hr:jj,html:{attrs:{manifest:null}},i:jj,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:kj,formmethod:Oj,formnovalidate:[`novalidate`],formtarget:Ej,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:jj,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:jj,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:jj,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:Dj,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:jj,noscript:jj,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:jj,param:{attrs:{name:null,value:null}},pre:jj,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:jj,rt:jj,ruby:jj,samp:jj,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:Dj}},section:jj,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:jj,source:{attrs:{src:null,type:null,media:null}},span:jj,strong:jj,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:jj,summary:jj,sup:jj,table:jj,tbody:jj,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:jj,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:jj,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:jj,time:{attrs:{datetime:null}},title:jj,tr:jj,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:jj,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:jj},Mj={accesskey:null,class:null,contenteditable:Aj,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:Aj,autocorrect:Aj,autocapitalize:Aj,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":Aj,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":Aj,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":Aj,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":Aj,"aria-hidden":Aj,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":Aj,"aria-multiselectable":Aj,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":Aj,"aria-relevant":null,"aria-required":Aj,"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},Nj=`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 Nj)Mj[e]=null;var Pj=class{constructor(e,t){this.tags={...Sfe,...e},this.globalAttrs={...Mj,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};Pj.default=new Pj;function Fj(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 Ij(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function Lj(e,t,n){return n.tags[Fj(e,Ij(t))]?.children||n.allTags}function Rj(e,t){let n=[];for(let r=Ij(t);r&&!r.type.isTop;r=Ij(r.parent)){let i=Fj(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 zj=/^[:\-\.\w\u00b7-\uffff]*$/;function Bj(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=Ij(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:Lj(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(Rj(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Vj(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:Rj(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:zj}}function Cfe(e,t,n,r){let i=[],a=0;for(let r of Lj(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of Rj(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function wfe(e,t,n,r,i){let a=Ij(n),o=a?t.tags[Fj(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:zj}}function Tfe(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=Ij(n),i=r?t.tags[Fj(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 Hj(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)?Vj(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`?Vj(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?wfe(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?Tfe(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?Cfe(n,e,i,r):null}function Uj(e){return Hj(Pj.default,e)}function Wj(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new Pj(t,n):Pj.default;return e=>Hj(r,e)}var Efe=Ke.parser.configure({top:`SingleExpression`}),Gj=[{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:Efe},{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:wj.parser}],Kj=[{name:`style`,parser:wj.parser.configure({top:`Styles`})}].concat(Nj.map(e=>({name:e,parser:Ke.parser}))),qj=Ae.define({name:`html`,parser:KA.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:`-_`}}),Jj=qj.configure({wrap:XA(Gj,Kj)});function Yj(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=XA((e.nestedLanguages||[]).concat(Gj),(e.nestedAttributes||[]).concat(Kj))),new Ne(n?qj.configure({wrap:n,dialect:t}):t?Jj.configure({dialect:t}):Jj,[Jj.data.of({autocomplete:Wj(e)}),e.autoCloseTags===!1?[]:Zj,We().support,Tj().support])}var Xj=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),Zj=I.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!Jj.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=Fj(o.doc,t.parent,n))&&!Xj.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=Fj(o.doc,e,n))&&!Xj.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)}),Qj=te({commentTokens:{block:{open:`<!--`,close:`-->`}}}),$j=new ge,eM=gk.configure({props:[s.add(e=>!e.is(`Block`)||e.is(`Document`)||tM(e)!=null||Dfe(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),$j.add(tM),l.add({Document:()=>null}),he.add({Document:Qj})]});function tM(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Dfe(e){return e.name==`OrderedList`||e.name==`BulletList`}function Ofe(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=tM(e.type))!=null&&r<=t)break;n=e}return n.to}var kfe=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($j);if(e==null)continue;let t=Ofe(r,e);if(t>n)return{from:n,to:t}}return null});function nM(e){return new H(Qj,e,[],`markdown`)}var rM=nM(eM),iM=nM(eM.configure([Ik,zk,Rk,Bk,{props:[s.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function Afe(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 aM=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(+sM(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function oM(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 aM(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 aM(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 aM(i.parent,s,s+t,a[1],e,n,i))}}return r}function sM(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function cM(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=sM(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 lM(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 uM=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!iM.isActiveAt(t,n.from,-1)&&!iM.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=oM(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`&&cM(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&cM(e.item,i,r),{range:le.cursor(t+n.length),changes:r}}else{let e=pM(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`&&cM(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=lM(m,t),jfe(l.node,t.doc)&&(m=pM(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)},dM=uM();function fM(e){return e.name==`QuoteMark`||e.name==`ListMark`}function jfe(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 pM(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 lM(r,t)}function Mfe(e,t){let n=e.resolveInner(t,-1),r=t;fM(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(fM(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var mM=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&iM.isActiveAt(e,t.from)){let t=a.lineAt(i),r=oM(Mfe(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=lM(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)},hM=[{key:`Enter`,run:dM},{key:`Backspace`,run:mM}],gM=Yj({matchClosingTags:!1});function _M(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=rM,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=gM}=e;if(!(a instanceof HO))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],u=[c.support,kfe],d;s&&u.push(yM),n instanceof Ne?(u.push(n.support),d=n.language):n&&(d=n);let f=t||d?Afe(t,d):void 0;l.push(vk({codeParser:f,htmlParser:c.language.parser})),i&&u.push(de.high(r.of(hM)));let p=nM(a.configure(l));return o&&u.push(p.data.of({autocomplete:Nfe})),new Ne(p,u)}function Nfe(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:Pfe(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var vM=null;function Pfe(){if(vM)return vM;let e=Uj(new Ze(Ee.create({extensions:gM}),0,!0));return vM=e?e.options:[]}var Ffe=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,yM=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),!iM.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||Ffe.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)}}),bM=63,xM=64,Ife=1,Lfe=2,SM=3,Rfe=4,CM=5,zfe=6,Bfe=7,wM=65,Vfe=66,Hfe=8,Ufe=9,Wfe=10,Gfe=11,Kfe=12,TM=13,qfe=19,Jfe=20,Yfe=29,Xfe=33,Zfe=34,Qfe=47,$fe=0,EM=1,DM=2,OM=3,kM=4,AM=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}};AM.top=new AM(null,-1,$fe);function jM(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(NM(t)||t==-1)return n}}function MM(e){return e==32||e==9}function NM(e){return e==10||e==13}function PM(e){return MM(e)||NM(e)}function FM(e){return e<0||PM(e)}var epe=new Me({start:AM.top,reduce(e,t){return e.type==OM&&(t==Jfe||t==Zfe)?e.parent:e},shift(e,t,n,r){if(t==SM)return new AM(e,jM(r,r.pos),EM);if(t==wM||t==CM)return new AM(e,jM(r,r.pos),DM);if(t==bM)return e.parent;if(t==qfe||t==Xfe)return new AM(e,0,OM);if(t==TM&&e.type==kM)return e.parent;if(t==Qfe){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new AM(e,e.depth+ +t[0],kM)}return e},hash(e){return e.hash}});function IM(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&FM(e.peek(n+3))}var tpe=new Se((e,t)=>{if(e.next==-1&&t.canShift(xM))return e.acceptToken(xM);let n=e.peek(-1);if((NM(n)||n<0)&&t.context.type!=OM){if(IM(e,45))if(t.canShift(bM))e.acceptToken(bM);else return e.acceptToken(Ife,3);if(IM(e,46))if(t.canShift(bM))e.acceptToken(bM);else return e.acceptToken(Lfe,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==EM&&(e.next!=45||!FM(e.peek(1))))&&e.next!=-1&&!NM(e.next)&&e.next!=35&&e.acceptToken(bM,-n)}},{contextual:!0}),npe=new Se((e,t)=>{if(t.context.type==OM){e.next==63&&(e.advance(),FM(e.next)&&e.acceptToken(Bfe));return}if(e.next==45)e.advance(),FM(e.next)&&e.acceptToken(t.context.type==EM&&t.context.depth==jM(e,e.pos-1)?Rfe:SM);else if(e.next==63)e.advance(),FM(e.next)&&e.acceptToken(t.context.type==DM&&t.context.depth==jM(e,e.pos-1)?zfe:CM);else{let n=e.pos;for(;;)if(MM(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)zM(e);else if(e.next==38)BM(e);else if(e.next==42){BM(e);break}else if(e.next==39||e.next==34){if(VM(e,!0))break;return}else if(e.next==91||e.next==123){if(!ipe(e))return;break}else{WM(e,!0,!1,0);break}for(;MM(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(Yfe))return;FM(e.peek(1))&&e.acceptTokenTo(t.context.type==DM&&t.context.depth==jM(e,n)?Vfe:wM,n)}}},{contextual:!0});function rpe(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 LM(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function RM(e,t){return e.next==37?(e.advance(),LM(e.next)&&e.advance(),LM(e.next)&&e.advance(),!0):rpe(e.next)||t&&e.next==44?(e.advance(),!0):!1}function zM(e){if(e.advance(),e.next==60){for(e.advance();;)if(!RM(e,!0)){e.next==62&&e.advance();break}}else for(;RM(e,!1););}function BM(e){for(e.advance();!FM(e.next)&&HM(e.tag)!=`f`;)e.advance()}function VM(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(NM(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function ipe(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(!VM(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||NM(e.next))return!1;else e.advance()}var ape=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function HM(e){return e<33?`u`:e>125?`s`:ape[e-33]}function UM(e,t){let n=HM(e);return n!=`u`&&!(t&&n==`f`)}function WM(e,t,n,r){if(HM(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&UM(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;PM(a);){if(NM(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?UM(e.peek(o+1),n):a==35?e.peek(o-1)!=32:UM(a,n)))||!n&&s<=r||s==0&&!n&&(IM(e,45,o)||IM(e,46,o)))break;if(t&&HM(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var ope=new Se((e,t)=>{if(e.next==33)zM(e),e.acceptToken(Kfe);else if(e.next==38||e.next==42){let t=e.next==38?Wfe:Gfe;BM(e),e.acceptToken(t)}else e.next==39||e.next==34?(VM(e,!1),e.acceptToken(Ufe)):WM(e,!1,t.context.type==OM,t.context.depth)&&e.acceptToken(Hfe)}),spe=new Se((e,t)=>{let n=t.context.type==kM?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(IM(e,45,i)||IM(e,46,i))||!NM(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=NM(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(TM,r)}),cpe=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}),lpe=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:epe,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[cpe],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:[tpe,npe,ope,spe,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),upe=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}),GM=Ae.define({name:`yaml`,parser:lpe.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 KM(){return new Ne(GM)}Ae.define({name:`yaml-frontmatter`,parser:upe.configure({props:[b({DashLine:A.meta})]})});function X(e){return new Ne(ce.define(e))}function qM(e){return q(()=>import(`./dist-DVFW0GyF.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([98,99,100]))}var dpe=[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 qM(`Cassandra`)}}),U.of({name:`CSS`,extensions:[`css`],load(){return q(()=>import(`./dist-BEDuZVjL.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-qafSs3YP.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-BT7ACiv-.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-2evWpv-5.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-D8yzgcpb.js`).then(e=>e.less()),__vite__mapDeps([109,100]))}}),U.of({name:`Liquid`,extensions:[`liquid`],load(){return q(()=>import(`./dist-CTFiFTLm.js`).then(e=>e.liquid()),__vite__mapDeps([110,105,1,99,100]))}}),U.of({name:`MariaDB SQL`,load(){return qM(`MariaSQL`)}}),U.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return q(()=>import(`./dist-CVpTA_1S.js`).then(e=>e.markdown()),__vite__mapDeps([111,105,1,99,100]))}}),U.of({name:`MS SQL`,load(){return qM(`MSSQL`)}}),U.of({name:`MySQL`,load(){return qM(`MySQL`)}}),U.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return q(()=>import(`./dist-DzrhzQF_.js`).then(e=>e.php()),__vite__mapDeps([112,105,1,99,100]))}}),U.of({name:`PLSQL`,extensions:[`pls`],load(){return qM(`PLSQL`)}}),U.of({name:`PostgreSQL`,load(){return qM(`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-DQaovcNP.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([115,100]))}}),U.of({name:`SCSS`,extensions:[`scss`],load(){return q(()=>import(`./dist-DQaovcNP.js`).then(e=>e.sass()),__vite__mapDeps([115,100]))}}),U.of({name:`SQL`,extensions:[`sql`],load(){return qM(`StandardSQL`)}}),U.of({name:`SQLite`,load(){return qM(`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-Dysku16A.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-rgfEROCe.js`).then(e=>e.vue()),__vite__mapDeps([125,105,1,99,100]))}}),U.of({name:`Angular Template`,load(){return q(()=>import(`./dist-aUY3cdfE.js`).then(e=>e.angular()),__vite__mapDeps([126,105,1,99,100]))}})],JM={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},fpe={borderLeftWidth:`2px`},YM={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},XM={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},ZM={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ppe={borderRadius:`2px`},QM={borderRadius:`2px`},$M={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},eN={width:`12px`,height:`12px`,borderRadius:`6px`},tN={borderRadius:`4px`,padding:`2px 6px`},nN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},rN=`#0d1117`,iN=`#c9d1d9`,aN=`#264F78`,oN=`#8b949e`,sN=`#ffffff`,cN=`#7ee787`,lN=`#d2a8ff`,uN=`#79c0ff`,dN=`#ff7b72`,fN=`#a5d6ff`,mpe=`#2c333a`,hpe=`#3c444d`,pN=`#ffab70`,mN=`#161b22`,hN=`#30363d`,gpe=`#21262d`,gN=`#f97583`,_pe=`#2d333b1a`,_N=`#21262d`,vN=sN,yN=aN,vpe=`#3a587a75`,bN=`#4d90fe`,xN=`#d29922`,ype=`#3a587a55`,SN=`#58a6ff`,bpe=`#bc8cff`,CN=`#2ea04350`,wN=`#f8514940`,TN=`#7ee787`,EN=`#ff7b72`,DN=[I.theme({"&":{color:iN,backgroundColor:rN,fontSize:JM.fontSize,fontFamily:JM.fontFamily},".cm-content":{caretColor:vN,lineHeight:JM.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:vN,borderLeftWidth:fpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${vN}99`,color:rN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:yN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#3a587a`,outline:`1px solid ${uN}`,color:iN,borderRadius:tN.borderRadius,"& span":{color:iN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:bN,color:sN,padding:tN.padding,"& span":{color:sN}},".cm-search.cm-panel.cm-textfield":{color:iN,borderRadius:tN.borderRadius,padding:tN.padding},".cm-panels":{backgroundColor:_N,color:iN,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${hN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${hN}`},".cm-panel button":{backgroundColor:_N,color:iN,border:ZM.border,borderRadius:ZM.borderRadius,padding:ZM.padding},".cm-panel button:hover":{backgroundColor:mpe},".cm-activeLine":{backgroundColor:_pe,borderRadius:ppe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:mN,color:oN,border:XM.border,borderRight:`1px solid #30363d`,paddingRight:XM.paddingRight},".cm-activeLineGutter":{backgroundColor:gpe,color:iN,fontWeight:XM.fontWeight},".cm-lineNumbers":{fontSize:XM.fontSize,lineHeight:XM.lineHeight},".cm-foldGutter":{fontSize:XM.fontSize,lineHeight:XM.lineHeight},".cm-foldGutter .cm-gutterElement":{color:oN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:iN},".cm-insertedLine":{textDecoration:YM.insertedTextDecoration,backgroundColor:CN,color:TN,padding:YM.insertedLinePadding,borderRadius:YM.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:YM.insertedTextDecoration,backgroundColor:`${CN} !important`,color:TN,padding:YM.insertedLinePadding,borderRadius:YM.borderRadious,border:`1px solid ${TN}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:YM.deletedTextDecoration,backgroundColor:wN,color:EN,padding:YM.insertedLinePadding,borderRadius:YM.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:YM.deletedTextDecoration,backgroundColor:`${wN} !important`,color:EN,padding:YM.insertedLinePadding,borderRadius:YM.borderRadious,border:`1px solid ${EN}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:_N,border:`1px solid ${hN}`,borderRadius:nN.borderRadius,padding:nN.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:_N,border:`none`},"& > ul > li":{padding:nN.padding,lineHeight:nN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:yN,color:sN,borderRadius:nN.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:oN,paddingRight:nN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:oN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:_N,borderBottomColor:_N},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${gN}`},"&-warning":{borderLeft:`3px solid ${xN}`},"&-info":{borderLeft:`3px solid ${SN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${gN}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${xN}`},".cm-matchingBracket":{backgroundColor:vpe,outline:`1px solid ${bN}`,borderRadius:QM.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9758340`,outline:`1px solid ${gN}`,borderRadius:QM.borderRadius},".cm-selectionMatch":{backgroundColor:ype,outline:`1px solid ${aN}50`,borderRadius:QM.borderRadius},".cm-foldPlaceholder":{backgroundColor:_N,color:oN,border:`1px dotted ${hN}70`,borderRadius:$M.borderRadius,padding:$M.padding,margin:$M.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${rN}, 0 0 0 3px ${SN}40`},"& .cm-scroller::-webkit-scrollbar":{width:eN.width,height:eN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:mN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:hN,borderRadius:eN.borderRadius,border:`3px solid ${mN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:hpe},".cm-ghostText":{opacity:`0.5`,color:oN}},{dark:!0}),D(B.define([{tag:A.keyword,color:dN,fontWeight:`bold`},{tag:A.controlKeyword,color:dN,fontWeight:`bold`},{tag:A.moduleKeyword,color:dN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:uN},{tag:[A.variableName],color:uN},{tag:[A.propertyName],color:lN,fontStyle:`normal`},{tag:[A.typeName],color:dN},{tag:[A.className],color:lN,fontStyle:`italic`},{tag:[A.namespace],color:uN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:iN},{tag:[A.bracket],color:oN},{tag:[A.brace],color:oN},{tag:[A.punctuation],color:oN},{tag:[A.function(A.variableName),A.labelName],color:cN},{tag:[A.definition(A.variableName)],color:uN},{tag:A.number,color:pN},{tag:A.changed,color:pN},{tag:A.annotation,color:gN,fontStyle:`italic`},{tag:A.modifier,color:pN,fontStyle:`italic`},{tag:A.self,color:pN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:pN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:pN},{tag:[A.processingInstruction,A.inserted],color:cN},{tag:[A.special(A.string),A.regexp],color:fN},{tag:A.string,color:fN},{tag:A.definition(A.typeName),color:dN,fontWeight:`bold`},{tag:A.meta,color:oN},{tag:A.comment,fontStyle:`italic`,color:oN},{tag:A.docComment,fontStyle:`italic`,color:oN},{tag:[A.tagName],color:cN},{tag:[A.attributeName],color:lN},{tag:[A.heading],fontWeight:`bold`,color:uN},{tag:[A.strong],fontWeight:`bold`,color:uN},{tag:[A.emphasis],fontStyle:`italic`,color:fN},{tag:[A.link],color:bpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:SN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:iN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${gN}`},{tag:[A.strikethrough],color:gN,textDecoration:`line-through`},{tag:A.constant(A.name),color:pN},{tag:A.deleted,color:gN},{tag:A.squareBracket,color:oN},{tag:A.angleBracket,color:oN},{tag:A.monospace,color:iN},{tag:[A.contentSeparator],color:uN},{tag:A.quote,color:oN}]))],ON={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},xpe={borderLeftWidth:`2px`},kN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},AN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},jN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Spe={borderRadius:`2px`},MN={borderRadius:`2px`},NN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},PN={width:`12px`,height:`12px`,borderRadius:`6px`},FN={borderRadius:`4px`,padding:`2px 6px`},IN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},LN=`#ffffff`,RN=`#24292e`,zN=`#BBDFFF`,BN=`#6e7781`,VN=`#f6f8fa`,Cpe=`#116329`,HN=`#6a737d`,UN=`#6f42c1`,WN=`#005cc5`,GN=`#d73a49`,KN=`#032f62`,qN=`#22863a`,JN=`#e36209`,wpe=`#f1f8ff`,YN=`#e1e4e8`,Tpe=`#f8f9fa`,XN=`#cb2431`,Epe=`#BBDFFF20`,ZN=Tpe,QN=RN,Dpe=zN,Ope=`#e8f0fe`,kpe=`#0366d6`,$N=`#b08800`,eP=`#79b8ff40`,tP=`#0969da`,Ape=`#8250df`,nP=`#e6ffec80`,rP=`#ffebe980`,iP=`#0f6d31`,aP=`#cf222e`,oP=[I.theme({"&":{color:RN,backgroundColor:LN,fontSize:ON.fontSize,fontFamily:ON.fontFamily},".cm-content":{caretColor:QN,lineHeight:ON.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:QN,borderLeftWidth:xpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${QN}99`,color:LN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Dpe,color:RN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#daebff`,outline:`1px solid ${WN}`,color:RN,borderRadius:FN.borderRadius,"& span":{color:RN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#79b8ff`,color:LN,padding:FN.padding,"& span":{color:LN}},".cm-search.cm-panel.cm-textfield":{color:RN,borderRadius:FN.borderRadius,padding:FN.padding},".cm-panels":{backgroundColor:VN,color:BN,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${YN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${YN}`},".cm-panel button":{backgroundColor:LN,color:RN,border:jN.border,borderRadius:jN.borderRadius,padding:jN.padding},".cm-panel button:hover":{backgroundColor:`#f5f5f5`},".cm-activeLine":{backgroundColor:Epe,borderRadius:Spe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:VN,color:BN,border:AN.border,borderRight:`1px solid ${YN}`,paddingRight:AN.paddingRight},".cm-activeLineGutter":{backgroundColor:wpe,color:RN,fontWeight:AN.fontWeight},".cm-lineNumbers":{fontSize:AN.fontSize,lineHeight:AN.lineHeight},".cm-foldGutter":{fontSize:AN.fontSize,lineHeight:AN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:BN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:RN},".cm-insertedLine":{textDecoration:kN.insertedTextDecoration,backgroundColor:nP,color:iP,padding:kN.insertedLinePadding,borderRadius:kN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:kN.insertedTextDecoration,backgroundColor:`${nP} !important`,color:iP,padding:kN.insertedLinePadding,borderRadius:kN.borderRadious,border:`1px solid ${iP}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:kN.deletedTextDecoration,backgroundColor:rP,color:aP,padding:kN.insertedLinePadding,borderRadius:kN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:kN.deletedTextDecoration,backgroundColor:`${rP} !important`,color:aP,padding:kN.insertedLinePadding,borderRadius:kN.borderRadious,border:`1px solid ${aP}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:ZN,border:`1px solid ${YN}`,borderRadius:IN.borderRadius,padding:IN.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:ZN,border:`none`},"& > ul > li":{padding:IN.padding,lineHeight:IN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#0366d630`,color:RN,borderRadius:IN.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:`#0366d615`},"& > ul > li > span.cm-completionIcon":{color:BN,paddingRight:IN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:BN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ZN,borderBottomColor:ZN},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${XN}`},"&-warning":{borderLeft:`3px solid ${$N}`},"&-info":{borderLeft:`3px solid ${tP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${XN}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${$N}`},".cm-matchingBracket":{backgroundColor:Ope,outline:`1px solid ${kpe}80`,borderRadius:MN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ffeef080`,outline:`1px solid ${XN}`,borderRadius:MN.borderRadius},".cm-selectionMatch":{backgroundColor:eP,outline:`1px solid ${zN}50`,borderRadius:MN.borderRadius},".cm-foldPlaceholder":{backgroundColor:eP,color:BN,border:`1px dotted ${YN}70`,borderRadius:NN.borderRadius,padding:NN.padding,margin:NN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${LN}, 0 0 0 3px ${tP}40`},"& .cm-scroller::-webkit-scrollbar":{width:PN.width,height:PN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:YN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:RN,borderRadius:PN.borderRadius,border:`3px solid ${YN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:HN},".cm-ghostText":{opacity:`0.5`,color:`#959da5`}},{dark:!1}),D(B.define([{tag:A.keyword,color:GN,fontWeight:`bold`},{tag:A.controlKeyword,color:GN,fontWeight:`bold`},{tag:A.moduleKeyword,color:GN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:WN},{tag:[A.variableName],color:WN},{tag:[A.propertyName],color:UN,fontStyle:`normal`},{tag:[A.typeName],color:GN},{tag:[A.className],color:UN,fontStyle:`italic`},{tag:[A.namespace],color:WN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:RN},{tag:[A.bracket],color:HN},{tag:[A.brace],color:HN},{tag:[A.punctuation],color:HN},{tag:[A.function(A.variableName),A.labelName],color:qN},{tag:[A.definition(A.variableName)],color:WN},{tag:A.number,color:JN},{tag:A.changed,color:JN},{tag:A.annotation,color:XN,fontStyle:`italic`},{tag:A.modifier,color:JN,fontStyle:`italic`},{tag:A.self,color:JN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:JN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:JN},{tag:[A.processingInstruction,A.inserted],color:qN},{tag:[A.special(A.string),A.regexp],color:KN},{tag:A.string,color:KN},{tag:A.definition(A.typeName),color:GN,fontWeight:`bold`},{tag:A.meta,color:HN},{tag:A.comment,fontStyle:`italic`,color:HN},{tag:A.docComment,fontStyle:`italic`,color:HN},{tag:[A.tagName],color:Cpe},{tag:[A.attributeName],color:UN},{tag:[A.heading],fontWeight:`bold`,color:WN},{tag:[A.strong],fontWeight:`bold`,color:WN},{tag:[A.emphasis],fontStyle:`italic`,color:KN},{tag:[A.link],color:Ape,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:tP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:RN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${XN}`},{tag:[A.strikethrough],color:XN,textDecoration:`line-through`},{tag:A.constant(A.name),color:JN},{tag:A.deleted,color:XN},{tag:A.squareBracket,color:HN},{tag:A.angleBracket,color:HN},{tag:A.monospace,color:RN},{tag:[A.contentSeparator],color:WN},{tag:A.quote,color:HN}]))],sP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},jpe={borderLeftWidth:`2px`},cP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},lP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},uP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Mpe={borderRadius:`2px`},dP={borderRadius:`2px`},fP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},pP={width:`12px`,height:`12px`,borderRadius:`6px`},mP={borderRadius:`4px`,padding:`2px 6px`},hP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},gP=`#282828`,_P=`#3c3836`,vP=`#504945`,yP=`#665c54`,Npe=`#7c6f64`,bP=`#928374`,xP=`#fbf1c7`,SP=`#ebdbb2`,CP=`#fb4934`,wP=`#b8bb26`,TP=`#fabd2f`,EP=`#83a598`,DP=`#d3869b`,OP=`#8ec07c`,kP=`#fe8019`,AP=CP,Ppe=_P,Fpe=`#3c383660`,Ipe=gP,jP=_P,MP=vP,Lpe=`#665c5480`,NP=kP,Rpe=`#504945cc`,zpe=TP,PP=TP,FP=EP,Bpe=DP,IP=`#32361a80`,LP=`#3c1f1e80`,RP=`#b8bb26`,zP=`#fb4934`,Vpe=[I.theme({"&":{color:SP,backgroundColor:Ipe,fontSize:sP.fontSize,fontFamily:sP.fontFamily},".cm-content":{caretColor:NP,lineHeight:sP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:NP,borderLeftWidth:jpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${NP}99`,color:gP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:MP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#b57614cc`,outline:`1px solid ${TP}`,color:xP,borderRadius:mP.borderRadius,"& span":{color:xP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:kP,color:gP,padding:mP.padding,"& span":{color:gP}},".cm-search.cm-panel.cm-textfield":{color:SP,borderRadius:mP.borderRadius,padding:mP.padding},".cm-panels":{backgroundColor:jP,color:SP,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${yP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${yP}`},".cm-panel button":{backgroundColor:jP,color:SP,border:uP.border,borderRadius:uP.borderRadius,padding:uP.padding},".cm-panel button:hover":{backgroundColor:vP},".cm-activeLine":{backgroundColor:Fpe,borderRadius:Mpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:_P,color:bP,border:lP.border,borderRight:`1px solid ${vP}`,paddingRight:lP.paddingRight},".cm-activeLineGutter":{backgroundColor:Ppe,color:SP,fontWeight:lP.fontWeight},".cm-lineNumbers":{fontSize:lP.fontSize,lineHeight:lP.lineHeight},".cm-foldGutter":{fontSize:lP.fontSize,lineHeight:lP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:bP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:SP},".cm-insertedLine":{textDecoration:cP.insertedTextDecoration,backgroundColor:IP,color:RP,padding:cP.insertedLinePadding,borderRadius:cP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:cP.insertedTextDecoration,backgroundColor:`${IP} !important`,color:RP,padding:cP.insertedLinePadding,borderRadius:cP.borderRadious,border:`1px solid ${RP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:cP.deletedTextDecoration,backgroundColor:LP,color:zP,padding:cP.insertedLinePadding,borderRadius:cP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:cP.deletedTextDecoration,backgroundColor:`${LP} !important`,color:zP,padding:cP.insertedLinePadding,borderRadius:cP.borderRadious,border:`1px solid ${zP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:jP,border:`1px solid ${yP}`,borderRadius:hP.borderRadius,padding:hP.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:jP,border:`none`},"& > ul > li":{padding:hP.padding,lineHeight:hP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:MP,color:xP,borderRadius:hP.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:bP,paddingRight:hP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:bP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:jP,borderBottomColor:jP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${AP}`},"&-warning":{borderLeft:`3px solid ${PP}`},"&-info":{borderLeft:`3px solid ${FP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${AP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${PP}`},".cm-matchingBracket":{backgroundColor:Rpe,outline:`1px solid ${zpe}`,borderRadius:dP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#cc241d55`,outline:`1px solid ${AP}`,borderRadius:dP.borderRadius},".cm-selectionMatch":{backgroundColor:Lpe,outline:`1px solid ${yP}`,borderRadius:dP.borderRadius},".cm-foldPlaceholder":{backgroundColor:jP,color:bP,border:`1px dotted ${yP}`,borderRadius:fP.borderRadius,padding:fP.padding,margin:fP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${gP}, 0 0 0 3px ${kP}40`},"& .cm-scroller::-webkit-scrollbar":{width:pP.width,height:pP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:_P},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:yP,borderRadius:pP.borderRadius,border:`3px solid ${_P}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Npe},".cm-ghostText":{opacity:`0.5`,color:bP}},{dark:!0}),D(B.define([{tag:A.keyword,color:CP,fontWeight:`bold`},{tag:A.controlKeyword,color:CP,fontWeight:`bold`},{tag:A.moduleKeyword,color:CP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:EP},{tag:[A.variableName],color:EP},{tag:[A.propertyName],color:OP,fontStyle:`normal`},{tag:[A.typeName],color:OP},{tag:[A.className],color:TP,fontStyle:`italic`},{tag:[A.namespace],color:EP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:SP},{tag:[A.bracket],color:bP},{tag:[A.brace],color:bP},{tag:[A.punctuation],color:bP},{tag:[A.function(A.variableName),A.labelName],color:TP},{tag:[A.definition(A.variableName)],color:EP},{tag:A.number,color:DP},{tag:A.changed,color:DP},{tag:A.annotation,color:AP,fontStyle:`italic`},{tag:A.modifier,color:DP,fontStyle:`italic`},{tag:A.self,color:DP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:kP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:kP},{tag:[A.processingInstruction,A.inserted],color:wP},{tag:[A.special(A.string),A.regexp],color:wP},{tag:A.string,color:wP},{tag:A.definition(A.typeName),color:OP,fontWeight:`bold`},{tag:A.meta,color:bP},{tag:A.comment,fontStyle:`italic`,color:bP},{tag:A.docComment,fontStyle:`italic`,color:bP},{tag:[A.tagName],color:CP},{tag:[A.attributeName],color:TP},{tag:[A.heading],fontWeight:`bold`,color:TP},{tag:[A.strong],fontWeight:`bold`,color:TP},{tag:[A.emphasis],fontStyle:`italic`,color:wP},{tag:[A.link],color:Bpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:FP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:SP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${AP}`},{tag:[A.strikethrough],color:AP,textDecoration:`line-through`},{tag:A.constant(A.name),color:kP},{tag:A.deleted,color:AP},{tag:A.squareBracket,color:bP},{tag:A.angleBracket,color:bP},{tag:A.monospace,color:SP},{tag:[A.contentSeparator],color:EP},{tag:A.quote,color:bP}]))],BP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Hpe={borderLeftWidth:`2px`},VP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},HP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},UP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Upe={borderRadius:`2px`},WP={borderRadius:`2px`},GP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},KP={width:`12px`,height:`12px`,borderRadius:`6px`},qP={borderRadius:`4px`,padding:`2px 6px`},JP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},YP=`#3c3836`,Wpe=`#504945`,Gpe=`#665c54`,XP=`#7c6f64`,ZP=`#928374`,QP=`#fbf1c7`,$P=`#ebdbb2`,eF=`#d5c4a1`,tF=`#bdae93`,Kpe=`#a89984`,nF=`#9d0006`,rF=`#79740e`,iF=`#b57614`,aF=`#076678`,oF=`#8f3f71`,sF=`#427b58`,cF=`#af3a03`,lF=nF,qpe=$P,Jpe=`#ffc42e25`,Ype=QP,uF=$P,Xpe=qpe,Zpe=`#ffc42e40`,dF=cF,Qpe=`#d5c4a180`,$pe=cF,fF=iF,pF=aF,eme=oF,mF=`#d8e5bc80`,hF=`#f7cfcf80`,gF=`#79740e`,_F=`#9d0006`,tme=[I.theme({"&":{color:YP,backgroundColor:Ype,fontSize:BP.fontSize,fontFamily:BP.fontFamily},".cm-content":{caretColor:dF,lineHeight:BP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:dF,borderLeftWidth:Hpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${dF}99`,color:QP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Xpe,color:YP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#ffc42e80`,outline:`1px solid ${cF}`,color:YP,borderRadius:qP.borderRadius,"& span":{color:YP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:cF,color:QP,padding:qP.padding,"& span":{color:QP}},".cm-search.cm-panel.cm-textfield":{color:YP,borderRadius:qP.borderRadius,padding:qP.padding},".cm-panels":{backgroundColor:$P,color:Wpe,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${tF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${tF}`},".cm-panel button":{backgroundColor:QP,color:YP,border:UP.border,borderRadius:UP.borderRadius,padding:UP.padding},".cm-panel button:hover":{backgroundColor:eF},".cm-activeLine":{backgroundColor:Jpe,borderRadius:Upe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:$P,color:XP,border:HP.border,borderRight:`1px solid ${tF}`,paddingRight:HP.paddingRight},".cm-activeLineGutter":{backgroundColor:eF,color:YP,fontWeight:HP.fontWeight},".cm-lineNumbers":{fontSize:HP.fontSize,lineHeight:HP.lineHeight},".cm-foldGutter":{fontSize:HP.fontSize,lineHeight:HP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:XP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:YP},".cm-insertedLine":{textDecoration:VP.insertedTextDecoration,backgroundColor:mF,color:gF,padding:VP.insertedLinePadding,borderRadius:VP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:VP.insertedTextDecoration,backgroundColor:`${mF} !important`,color:gF,padding:VP.insertedLinePadding,borderRadius:VP.borderRadious,border:`1px solid ${gF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:VP.deletedTextDecoration,backgroundColor:hF,color:_F,padding:VP.insertedLinePadding,borderRadius:VP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:VP.deletedTextDecoration,backgroundColor:`${hF} !important`,color:_F,padding:VP.insertedLinePadding,borderRadius:VP.borderRadious,border:`1px solid ${_F}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:uF,border:`1px solid ${tF}`,borderRadius:JP.borderRadius,padding:JP.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:uF,border:`none`},"& > ul > li":{padding:JP.padding,lineHeight:JP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:cF+`30`,color:YP,borderRadius:JP.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:cF+`15`},"& > ul > li > span.cm-completionIcon":{color:XP,paddingRight:JP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:XP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:uF,borderBottomColor:uF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${lF}`},"&-warning":{borderLeft:`3px solid ${fF}`},"&-info":{borderLeft:`3px solid ${pF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${lF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${fF}`},".cm-matchingBracket":{backgroundColor:Qpe,outline:`1px solid ${$pe}`,borderRadius:WP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#fb492740`,outline:`1px solid ${lF}`,borderRadius:WP.borderRadius},".cm-selectionMatch":{backgroundColor:Zpe,outline:`1px solid ${tF}`,borderRadius:WP.borderRadius},".cm-foldPlaceholder":{backgroundColor:`transparent`,color:Gpe,border:`1px dotted ${tF}`,borderRadius:GP.borderRadius,padding:GP.padding,margin:GP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${QP}, 0 0 0 3px ${cF}40`},"& .cm-scroller::-webkit-scrollbar":{width:KP.width,height:KP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:QP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:tF,borderRadius:KP.borderRadius,border:`3px solid ${QP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Kpe},".cm-ghostText":{opacity:`0.5`,color:ZP}},{dark:!1}),D(B.define([{tag:A.keyword,color:nF,fontWeight:`bold`},{tag:A.controlKeyword,color:nF,fontWeight:`bold`},{tag:A.moduleKeyword,color:nF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:aF},{tag:[A.variableName],color:aF},{tag:[A.propertyName],color:sF,fontStyle:`normal`},{tag:[A.typeName],color:sF},{tag:[A.className],color:iF,fontStyle:`italic`},{tag:[A.namespace],color:aF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:YP},{tag:[A.bracket],color:ZP},{tag:[A.brace],color:ZP},{tag:[A.punctuation],color:ZP},{tag:[A.function(A.variableName),A.labelName],color:iF},{tag:[A.definition(A.variableName)],color:aF},{tag:A.number,color:oF},{tag:A.changed,color:oF},{tag:A.annotation,color:lF,fontStyle:`italic`},{tag:A.modifier,color:oF,fontStyle:`italic`},{tag:A.self,color:oF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:cF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:cF},{tag:[A.processingInstruction,A.inserted],color:rF},{tag:[A.special(A.string),A.regexp],color:rF},{tag:A.string,color:rF},{tag:A.definition(A.typeName),color:sF,fontWeight:`bold`},{tag:A.meta,color:ZP},{tag:A.comment,fontStyle:`italic`,color:ZP},{tag:A.docComment,fontStyle:`italic`,color:ZP},{tag:[A.tagName],color:nF},{tag:[A.attributeName],color:iF},{tag:[A.heading],fontWeight:`bold`,color:iF},{tag:[A.strong],fontWeight:`bold`,color:iF},{tag:[A.emphasis],fontStyle:`italic`,color:rF},{tag:[A.link],color:eme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:pF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:YP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${lF}`},{tag:[A.strikethrough],color:lF,textDecoration:`line-through`},{tag:A.constant(A.name),color:cF},{tag:A.deleted,color:lF},{tag:A.squareBracket,color:ZP},{tag:A.angleBracket,color:ZP},{tag:A.monospace,color:YP},{tag:[A.contentSeparator],color:aF},{tag:A.quote,color:ZP}]))],vF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},nme={borderLeftWidth:`2px`},yF={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},bF={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},xF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},rme={borderRadius:`2px`},SF={borderRadius:`2px`},CF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},wF={width:`12px`,height:`12px`,borderRadius:`6px`},TF={borderRadius:`4px`,padding:`2px 6px`},EF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},DF=`#212121`,OF=`#505d64`,kF=`#606f7a`,AF=`#707d8b`,ime=`#a0a4ae`,jF=`#bdbdbd`,MF=`#e0e0e0`,ame=`#202325`,NF=`#ff5f52`,PF=`#ff6e40`,ome=`#fa5788`,FF=`#facf4e`,IF=`#ffad42`,LF=`#56c8d8`,RF=`#7186f0`,zF=`#cf6edf`,sme=`#6abf69`,cme=`#99d066`,lme=`#4ebaaa`,BF=NF,VF=ame,ume=`#2d333b30`,HF=DF,UF=OF,WF=`#ffffff1f`,dme=`#4A707A80`,GF=ime,fme=`#39496650`,pme=LF,KF=IF,qF=LF,mme=zF,JF=`#1e3d2780`,YF=`#4e282880`,XF=`#6abf69`,ZF=`#ff5f52`,hme=[I.theme({"&":{color:jF,backgroundColor:HF,fontSize:vF.fontSize,fontFamily:vF.fontFamily},".cm-content":{caretColor:GF,lineHeight:vF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:GF,borderLeftWidth:nme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${GF}99`,color:HF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:WF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#394966cc`,outline:`1px solid ${LF}`,color:MF,borderRadius:TF.borderRadius,"& span":{color:MF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:LF,color:HF,padding:TF.padding,"& span":{color:HF}},".cm-search.cm-panel.cm-textfield":{color:jF,borderRadius:TF.borderRadius,padding:TF.padding},".cm-panels":{backgroundColor:DF,color:jF,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${AF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${AF}`},".cm-panel button":{backgroundColor:UF,color:jF,border:xF.border,borderRadius:xF.borderRadius,padding:xF.padding},".cm-panel button:hover":{backgroundColor:kF},".cm-activeLine":{backgroundColor:ume,borderRadius:rme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:VF,color:AF,border:bF.border,borderRight:`1px solid ${OF}`,paddingRight:bF.paddingRight},".cm-activeLineGutter":{backgroundColor:`#252a2c`,color:jF,fontWeight:bF.fontWeight},".cm-lineNumbers":{fontSize:bF.fontSize,lineHeight:bF.lineHeight},".cm-foldGutter":{fontSize:bF.fontSize,lineHeight:bF.lineHeight},".cm-foldGutter .cm-gutterElement":{color:AF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:jF},".cm-insertedLine":{textDecoration:yF.insertedTextDecoration,backgroundColor:JF,color:XF,padding:yF.insertedLinePadding,borderRadius:yF.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:yF.insertedTextDecoration,backgroundColor:`${JF} !important`,color:XF,padding:yF.insertedLinePadding,borderRadius:yF.borderRadious,border:`1px solid ${XF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:yF.deletedTextDecoration,backgroundColor:YF,color:ZF,padding:yF.insertedLinePadding,borderRadius:yF.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:yF.deletedTextDecoration,backgroundColor:`${YF} !important`,color:ZF,padding:yF.insertedLinePadding,borderRadius:yF.borderRadious,border:`1px solid ${ZF}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:UF,border:`1px solid ${AF}`,borderRadius:EF.borderRadius,padding:EF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:UF,border:`none`},"& > ul > li":{padding:EF.padding,lineHeight:EF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:WF,color:MF,borderRadius:EF.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:AF,paddingRight:EF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:AF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:UF,borderBottomColor:UF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${BF}`},"&-warning":{borderLeft:`3px solid ${KF}`},"&-info":{borderLeft:`3px solid ${qF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${BF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${KF}`},".cm-matchingBracket":{backgroundColor:fme,outline:`1px solid ${pme}`,borderRadius:SF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ff5f5240`,outline:`1px solid ${BF}`,borderRadius:SF.borderRadius},".cm-selectionMatch":{backgroundColor:dme,outline:`1px solid ${kF}50`,borderRadius:SF.borderRadius},".cm-foldPlaceholder":{backgroundColor:UF,color:AF,border:`1px dotted ${AF}70`,borderRadius:CF.borderRadius,padding:CF.padding,margin:CF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${HF}, 0 0 0 3px ${LF}40`},"& .cm-scroller::-webkit-scrollbar":{width:wF.width,height:wF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:VF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:kF,borderRadius:wF.borderRadius,border:`3px solid ${VF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:AF},".cm-ghostText":{opacity:`0.5`,color:AF}},{dark:!0}),D(B.define([{tag:A.keyword,color:NF,fontWeight:`bold`},{tag:A.controlKeyword,color:NF,fontWeight:`bold`},{tag:A.moduleKeyword,color:NF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:RF},{tag:[A.variableName],color:cme},{tag:[A.propertyName],color:zF,fontStyle:`normal`},{tag:[A.typeName],color:NF},{tag:[A.className],color:FF,fontStyle:`italic`},{tag:[A.namespace],color:RF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:jF},{tag:[A.bracket],color:AF},{tag:[A.brace],color:AF},{tag:[A.punctuation],color:AF},{tag:[A.function(A.variableName)],color:LF},{tag:[A.labelName],color:LF,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:LF},{tag:[A.definition(A.variableName)],color:RF},{tag:A.number,color:FF},{tag:A.changed,color:FF},{tag:A.annotation,color:BF,fontStyle:`italic`},{tag:A.modifier,color:PF,fontStyle:`italic`},{tag:A.self,color:PF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:PF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:PF},{tag:[A.processingInstruction,A.inserted],color:sme},{tag:[A.special(A.string),A.regexp],color:ome},{tag:A.string,color:IF},{tag:A.definition(A.typeName),color:NF,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:zF},{tag:[A.attributeName],color:FF},{tag:[A.heading],fontWeight:`bold`,color:lme},{tag:A.heading1,color:FF},{tag:A.heading2,color:IF},{tag:A.heading3,color:LF},{tag:A.heading4,color:RF},{tag:A.heading5,color:zF},{tag:A.heading6,color:NF},{tag:[A.strong],fontWeight:`bold`,color:RF},{tag:[A.emphasis],fontStyle:`italic`,color:IF},{tag:[A.link],color:mme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:qF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:jF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${BF}`},{tag:[A.strikethrough],color:BF,textDecoration:`line-through`},{tag:A.constant(A.name),color:PF},{tag:A.deleted,color:BF},{tag:A.squareBracket,color:AF},{tag:A.angleBracket,color:AF},{tag:A.monospace,color:jF},{tag:[A.contentSeparator],color:RF},{tag:A.quote,color:AF}]))],QF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},gme={borderLeftWidth:`2px`},$F={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},eI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},tI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},_me={borderRadius:`2px`},nI={borderRadius:`2px`},rI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},iI={width:`12px`,height:`12px`,borderRadius:`6px`},aI={borderRadius:`4px`,padding:`2px 6px`},oI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},vme=`#ffffff`,sI=`#f5f5f5`,cI=`#212121`,lI=`#757575`,uI=`#9e9e9e`,dI=`#424242`,yme=`#eeeeee`,fI=`#fafafa`,pI=`#f44336`,mI=`#ff3e00`,hI=`#FF00E9FF`,bme=`#ffc107`,gI=`#ff9800`,_I=`#00acc1`,vI=`#3949ab`,yI=`#8e24aa`,bI=`#43a047`,xI=`#00897b`,SI=`#1e88e5`,CI=pI,xme=`#00000008`,wI=vme,TI=sI,Sme=`#DDEEFF`,Cme=`#90a4ae26`,EI=uI,wme=`#DDEEFF80`,Tme=_I,DI=gI,OI=_I,Eme=yI,kI=`#ECEFF180`,AI=`#e6ffed80`,jI=`#ffebe980`,MI=`#28a745`,NI=`#d73a49`,Dme=[I.theme({"&":{color:cI,backgroundColor:wI,fontSize:QF.fontSize,fontFamily:QF.fontFamily},".cm-content":{caretColor:EI,lineHeight:QF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:EI,borderLeftWidth:gme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${cI}99`,color:wI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Sme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#FFA72680`,outline:`1px solid ${bme}`,color:cI,borderRadius:aI.borderRadius,"& span":{color:cI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:_I,color:wI,padding:aI.padding,"& span":{color:wI}},".cm-search.cm-panel.cm-textfield":{color:cI,borderRadius:aI.borderRadius,padding:aI.padding},".cm-panels":{backgroundColor:yme,color:cI,borderRadius:`4px`,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${uI}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${uI}`},".cm-panel button":{backgroundColor:TI,color:cI,border:tI.border,borderRadius:tI.borderRadius,padding:tI.padding},".cm-panel button:hover":{backgroundColor:`#CFD8DC`},".cm-activeLine":{backgroundColor:xme,borderRadius:_me.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:fI,color:lI,border:eI.border,borderRight:`1px solid ${uI}`,paddingRight:eI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#E0E0E0`,color:cI,fontWeight:eI.fontWeight},".cm-lineNumbers":{fontSize:eI.fontSize,lineHeight:eI.lineHeight},".cm-foldGutter":{fontSize:eI.fontSize,lineHeight:eI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:lI,cursor:`pointer`,transition:`color 0.15s ease`},".cm-foldGutter .cm-gutterElement:hover":{color:cI},".cm-insertedLine":{textDecoration:$F.insertedTextDecoration,backgroundColor:AI,color:MI,padding:$F.insertedLinePadding,borderRadius:$F.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:$F.insertedTextDecoration,backgroundColor:`${AI} !important`,color:MI,padding:$F.insertedLinePadding,borderRadius:$F.borderRadious,border:`1px solid ${MI}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:$F.deletedTextDecoration,backgroundColor:jI,color:NI,padding:$F.insertedLinePadding,borderRadius:$F.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:$F.deletedTextDecoration,backgroundColor:`${jI} !important`,color:NI,padding:$F.insertedLinePadding,borderRadius:$F.borderRadious,border:`1px solid ${NI}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:TI,border:`1px solid ${uI}`,borderRadius:oI.borderRadius,padding:oI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:TI,border:`none`},"& > ul > li":{padding:oI.padding,lineHeight:oI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:kI,color:cI,borderRadius:oI.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:kI},"& > ul > li > span.cm-completionIcon":{color:lI,paddingRight:oI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:lI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:TI,borderBottomColor:TI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${CI}`},"&-warning":{borderLeft:`3px solid ${DI}`},"&-info":{borderLeft:`3px solid ${OI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${CI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${DI}`},".cm-matchingBracket":{backgroundColor:wme,outline:`1px solid ${Tme}`,borderRadius:nI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${CI}20`,outline:`1px solid ${CI}`,borderRadius:nI.borderRadius},".cm-selectionMatch":{backgroundColor:Cme,outline:`1px solid ${lI}30`,borderRadius:nI.borderRadius},".cm-foldPlaceholder":{backgroundColor:sI,color:lI,border:`1px dotted ${lI}70`,borderRadius:rI.borderRadius,padding:rI.padding,margin:rI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${wI}, 0 0 0 3px ${_I}40`},"& .cm-scroller::-webkit-scrollbar":{width:iI.width,height:iI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:fI},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:lI,borderRadius:iI.borderRadius,border:`3px solid ${fI}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:cI},".cm-ghostText":{opacity:`0.5`,color:lI}},{dark:!1}),D(B.define([{tag:A.keyword,color:_I,fontWeight:`bold`},{tag:A.controlKeyword,color:_I,fontWeight:`bold`},{tag:A.moduleKeyword,color:_I,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:dI},{tag:[A.variableName],color:dI},{tag:[A.propertyName],color:xI,fontStyle:`normal`},{tag:[A.typeName],color:gI},{tag:[A.className],color:gI,fontStyle:`italic`},{tag:[A.namespace],color:vI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:vI},{tag:[A.bracket],color:yI},{tag:[A.brace],color:yI},{tag:[A.punctuation],color:lI},{tag:[A.function(A.variableName)],color:mI},{tag:[A.labelName],color:SI,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:mI},{tag:[A.definition(A.variableName)],color:hI},{tag:A.number,color:gI},{tag:A.changed,color:gI},{tag:A.annotation,color:CI,fontStyle:`italic`},{tag:A.modifier,color:gI,fontStyle:`italic`},{tag:A.self,color:gI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:gI},{tag:[A.atom,A.bool],color:yI},{tag:[A.processingInstruction,A.inserted],color:bI},{tag:A.string,color:bI},{tag:[A.special(A.string),A.regexp],color:hI},{tag:A.definition(A.typeName),color:hI,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:hI},{tag:A.meta,color:lI},{tag:A.comment,fontStyle:`italic`,color:lI},{tag:A.docComment,fontStyle:`italic`,color:lI},{tag:[A.tagName],color:mI},{tag:[A.attributeName],color:dI},{tag:[A.heading],fontWeight:`bold`,color:xI},{tag:A.heading1,color:SI},{tag:A.heading2,color:gI},{tag:A.heading3,color:_I},{tag:A.heading4,color:vI},{tag:A.heading5,color:yI},{tag:A.heading6,color:bI},{tag:[A.strong],fontWeight:`bold`,color:vI},{tag:[A.emphasis],fontStyle:`italic`,color:gI},{tag:[A.link],color:Eme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:OI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:cI,textDecoration:`underline wavy`,borderBottom:`1px dotted ${pI}`},{tag:[A.strikethrough],color:CI,textDecoration:`line-through`},{tag:A.constant(A.name),color:mI},{tag:A.deleted,color:CI},{tag:A.squareBracket,color:pI},{tag:A.angleBracket,color:cI},{tag:A.monospace,color:cI},{tag:[A.contentSeparator],color:_I},{tag:A.quote,color:bI}]))],PI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Ome={borderLeftWidth:`2px`},FI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},II={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},LI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},kme={borderRadius:`2px`},RI={borderRadius:`2px`},zI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},BI={width:`12px`,height:`12px`,borderRadius:`6px`},VI={borderRadius:`4px`,padding:`2px 6px`},HI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},UI=`#272822`,WI=`#f8f8f2`,GI=`#88846f`,Ame=`#f8f8f0`,KI=`#F92672`,qI=`#FD971F`,JI=`#66D9EF`,YI=`#E6DB74`,XI=`#AE81FF`,ZI=`#A6E22E`,QI=`#F44747`,$I=`#414339`,jme=`#3e3d3257`,eL=`#34352f`,tL=`#49483E`,Mme=`#75715e70`,nL=Ame,Nme=`#75715E55`,Pme=JI,rL=qI,iL=JI,Fme=XI,aL=`#3d4d3880`,oL=`#4d393980`,sL=`#A6E22E`,cL=`#F92672`,Ime=[I.theme({"&":{color:WI,backgroundColor:UI,fontSize:PI.fontSize,fontFamily:PI.fontFamily},".cm-content":{caretColor:nL,lineHeight:PI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:nL,borderLeftWidth:Ome.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${nL}99`,color:UI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:tL},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#49483E99`,outline:`1px solid ${YI}`,color:WI,borderRadius:VI.borderRadius,"& span":{color:WI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:KI,color:UI,padding:VI.padding,"& span":{color:UI}},".cm-search.cm-panel.cm-textfield":{color:WI,borderRadius:VI.borderRadius,padding:VI.padding},".cm-panels":{backgroundColor:$I,color:WI,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${GI}80`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${GI}80`},".cm-panel button":{backgroundColor:eL,color:WI,border:LI.border,borderRadius:LI.borderRadius,padding:LI.padding},".cm-panel button:hover":{backgroundColor:`#49483E`},".cm-activeLine":{backgroundColor:jme,borderRadius:kme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:$I,color:GI,border:II.border,borderRight:`1px solid #3e3d32`,paddingRight:II.paddingRight},".cm-activeLineGutter":{backgroundColor:`#35352c`,color:WI,fontWeight:II.fontWeight},".cm-lineNumbers":{fontSize:II.fontSize,lineHeight:II.lineHeight},".cm-foldGutter":{fontSize:II.fontSize,lineHeight:II.lineHeight},".cm-foldGutter .cm-gutterElement":{color:GI,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:WI},".cm-insertedLine":{textDecoration:FI.insertedTextDecoration,backgroundColor:aL,color:sL,padding:FI.insertedLinePadding,borderRadius:FI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:FI.insertedTextDecoration,backgroundColor:`${aL} !important`,color:sL,padding:FI.insertedLinePadding,borderRadius:FI.borderRadious,border:`1px solid ${sL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:FI.deletedTextDecoration,backgroundColor:oL,color:cL,padding:FI.insertedLinePadding,borderRadius:FI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:FI.deletedTextDecoration,backgroundColor:`${oL} !important`,color:cL,padding:FI.insertedLinePadding,borderRadius:FI.borderRadious,border:`1px solid ${cL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:eL,border:`1px solid #49483E`,borderRadius:HI.borderRadius,padding:HI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.4)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:eL,border:`none`},"& > ul > li":{padding:HI.padding,lineHeight:HI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:tL,color:WI,borderRadius:HI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:GI,paddingRight:HI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:GI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:eL,borderBottomColor:eL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${QI}`},"&-warning":{borderLeft:`3px solid ${rL}`},"&-info":{borderLeft:`3px solid ${iL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${QI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${rL}`},".cm-matchingBracket":{backgroundColor:Nme,outline:`1px solid ${Pme}`,borderRadius:RI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9267240`,outline:`1px solid ${QI}`,borderRadius:RI.borderRadius},".cm-selectionMatch":{backgroundColor:Mme,outline:`1px solid ${GI}50`,borderRadius:RI.borderRadius},".cm-foldPlaceholder":{backgroundColor:eL,color:GI,border:`1px dotted ${GI}70`,borderRadius:zI.borderRadius,padding:zI.padding,margin:zI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${UI}, 0 0 0 3px ${JI}40`},"& .cm-scroller::-webkit-scrollbar":{width:BI.width,height:BI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:$I},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#49483E`,borderRadius:BI.borderRadius,border:`3px solid ${$I}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#5a594d`},".cm-ghostText":{opacity:`0.5`,color:GI}},{dark:!0}),D(B.define([{tag:A.keyword,color:KI,fontWeight:`bold`},{tag:A.controlKeyword,color:KI,fontWeight:`bold`},{tag:A.moduleKeyword,color:KI,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:qI},{tag:[A.variableName],color:qI},{tag:[A.propertyName],color:ZI,fontStyle:`normal`},{tag:[A.typeName],color:JI,fontStyle:`italic`},{tag:[A.className],color:ZI,fontStyle:`italic`},{tag:[A.namespace],color:qI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:KI},{tag:[A.bracket],color:WI},{tag:[A.brace],color:WI},{tag:[A.punctuation],color:WI},{tag:[A.function(A.variableName),A.labelName],color:JI},{tag:[A.definition(A.function(A.variableName))],color:JI},{tag:[A.definition(A.variableName)],color:qI},{tag:A.number,color:XI},{tag:A.changed,color:XI},{tag:A.annotation,color:QI,fontStyle:`italic`},{tag:A.modifier,color:XI,fontStyle:`italic`},{tag:A.self,color:XI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:XI},{tag:[A.atom,A.bool,A.special(A.variableName)],color:XI},{tag:[A.processingInstruction,A.inserted],color:ZI},{tag:[A.special(A.string),A.regexp],color:YI},{tag:A.string,color:YI},{tag:A.definition(A.typeName),color:JI,fontWeight:`bold`},{tag:A.meta,color:GI},{tag:A.comment,fontStyle:`italic`,color:GI},{tag:A.docComment,fontStyle:`italic`,color:GI},{tag:[A.tagName],color:KI},{tag:[A.attributeName],color:ZI},{tag:[A.heading],fontWeight:`bold`,color:ZI},{tag:[A.strong],fontWeight:`bold`,color:qI},{tag:[A.emphasis],fontStyle:`italic`,color:qI},{tag:[A.link],color:Fme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:iL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:WI,textDecoration:`underline wavy`,borderBottom:`1px wavy ${QI}`},{tag:[A.strikethrough],color:QI,textDecoration:`line-through`},{tag:A.constant(A.name),color:XI},{tag:A.deleted,color:QI},{tag:A.squareBracket,color:WI},{tag:A.angleBracket,color:WI},{tag:A.monospace,color:WI},{tag:[A.contentSeparator],color:qI},{tag:A.quote,color:GI}]))],lL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Lme={borderLeftWidth:`2px`},uL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},dL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},fL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Rme={borderRadius:`2px`},pL={borderRadius:`2px`},mL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},hL={width:`12px`,height:`12px`,borderRadius:`6px`},gL={borderRadius:`4px`,padding:`2px 6px`},_L={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},zme=`#2e3440`,vL=`#3b4252`,yL=`#434c5e`,bL=`#4c566a`,xL=`#d8dee9`,SL=`#eceff4`,CL=`#8fbcbb`,wL=`#88c0d0`,TL=`#81a1c1`,EL=`#5e81ac`,DL=`#bf616a`,OL=`#d08770`,kL=`#ebcb8b`,AL=`#a3be8c`,jL=`#b48ead`,Bme=`#d30102`,ML=`#252a33`,Vme=`#3b425277`,NL=zme,PL=vL,Hme=yL,Ume=`#4c566a80`,FL=xL,Wme=`#4c566a55`,Gme=wL,IL=kL,LL=TL,Kme=jL,RL=`#3b4a3880`,zL=`#4a393a80`,BL=`#a3be8c`,VL=`#bf616a`,qme=[I.theme({"&":{color:xL,backgroundColor:NL,fontSize:lL.fontSize,fontFamily:lL.fontFamily},".cm-content":{caretColor:FL,lineHeight:lL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:FL,borderLeftWidth:Lme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${FL}99`,color:NL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Hme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#5e81ac80`,outline:`1px solid ${CL}`,color:xL,borderRadius:gL.borderRadius,"& span":{color:xL}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:TL,color:SL,padding:gL.padding,"& span":{color:SL}},".cm-search.cm-panel.cm-textfield":{color:xL,borderRadius:gL.borderRadius,padding:gL.padding},".cm-panels":{backgroundColor:ML,color:xL,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${bL}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${bL}`},".cm-panel button":{backgroundColor:PL,color:xL,border:fL.border,borderRadius:fL.borderRadius,padding:fL.padding},".cm-panel button:hover":{backgroundColor:yL},".cm-activeLine":{backgroundColor:Vme,borderRadius:Rme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:ML,color:bL,border:dL.border,borderRight:`1px solid ${yL}`,paddingRight:dL.paddingRight},".cm-activeLineGutter":{backgroundColor:vL,color:xL,fontWeight:dL.fontWeight},".cm-lineNumbers":{fontSize:dL.fontSize,lineHeight:dL.lineHeight},".cm-foldGutter":{fontSize:dL.fontSize,lineHeight:dL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:bL,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:xL},".cm-insertedLine":{textDecoration:uL.insertedTextDecoration,backgroundColor:RL,color:BL,padding:uL.insertedLinePadding,borderRadius:uL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:uL.insertedTextDecoration,backgroundColor:`${RL} !important`,color:BL,padding:uL.insertedLinePadding,borderRadius:uL.borderRadious,border:`1px solid ${BL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:uL.deletedTextDecoration,backgroundColor:zL,color:VL,padding:uL.insertedLinePadding,borderRadius:uL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:uL.deletedTextDecoration,backgroundColor:`${zL} !important`,color:VL,padding:uL.insertedLinePadding,borderRadius:uL.borderRadious,border:`1px solid ${VL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:PL,border:`1px solid ${bL}`,borderRadius:_L.borderRadius,padding:_L.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:PL,border:`none`},"& > ul > li":{padding:_L.padding,lineHeight:_L.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:yL,color:SL,borderRadius:_L.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:bL,paddingRight:_L.paddingRight},"& > ul > li > span.cm-completionDetail":{color:bL,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:PL,borderBottomColor:PL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${DL}`},"&-warning":{borderLeft:`3px solid ${IL}`},"&-info":{borderLeft:`3px solid ${LL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${DL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${IL}`},".cm-matchingBracket":{backgroundColor:Wme,outline:`1px solid ${Gme}`,borderRadius:pL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${DL}40`,outline:`1px solid ${Bme}`,borderRadius:pL.borderRadius},".cm-selectionMatch":{backgroundColor:Ume,outline:`1px solid ${yL}50`,borderRadius:pL.borderRadius},".cm-foldPlaceholder":{backgroundColor:PL,color:bL,border:`1px dotted ${bL}70`,borderRadius:mL.borderRadius,padding:mL.padding,margin:mL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${NL}, 0 0 0 3px ${wL}40`},"& .cm-scroller::-webkit-scrollbar":{width:hL.width,height:hL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:ML},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:yL,borderRadius:hL.borderRadius,border:`3px solid ${ML}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:bL},".cm-ghostText":{opacity:`0.5`,color:bL}},{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:wL},{tag:[A.variableName],color:xL},{tag:[A.propertyName],color:wL,fontStyle:`normal`},{tag:[A.typeName],color:kL},{tag:[A.className],color:kL,fontStyle:`italic`},{tag:[A.namespace],color:TL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:jL},{tag:[A.bracket],color:xL},{tag:[A.brace],color:CL},{tag:[A.punctuation],color:xL},{tag:[A.function(A.variableName),A.labelName],color:CL},{tag:[A.definition(A.function(A.variableName))],color:CL},{tag:[A.definition(A.variableName)],color:OL},{tag:A.number,color:OL},{tag:A.changed,color:jL},{tag:A.annotation,color:DL,fontStyle:`italic`},{tag:A.modifier,color:jL,fontStyle:`italic`},{tag:A.self,color:jL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:OL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:jL},{tag:[A.processingInstruction,A.inserted],color:CL},{tag:[A.special(A.string),A.regexp],color:jL},{tag:A.string,color:AL},{tag:A.definition(A.typeName),color:kL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:AL},{tag:A.meta,color:bL},{tag:A.comment,fontStyle:`italic`,color:bL},{tag:A.docComment,fontStyle:`italic`,color:bL},{tag:[A.tagName],color:DL},{tag:[A.attributeName],color:kL},{tag:[A.heading],fontWeight:`bold`,color:TL},{tag:[A.strong],fontWeight:`bold`,color:wL},{tag:[A.emphasis],fontStyle:`italic`,color:kL},{tag:[A.link],color:Kme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:LL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:xL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${DL}`},{tag:[A.strikethrough],color:DL,textDecoration:`line-through`},{tag:A.constant(A.name),color:OL},{tag:A.deleted,color:DL},{tag:A.squareBracket,color:DL},{tag:A.angleBracket,color:OL},{tag:A.monospace,color:xL,fontStyle:`italic`},{tag:[A.contentSeparator],color:TL},{tag:A.quote,color:jL}]))],HL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Jme={borderLeftWidth:`2px`},UL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},WL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},GL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Yme={borderRadius:`2px`},KL={borderRadius:`2px`},qL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},JL={width:`12px`,height:`12px`,borderRadius:`6px`},YL={borderRadius:`4px`,padding:`2px 6px`},XL={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Xme=`#e1e2e7`,ZL=`#3760bf`,QL=`#99a7df`,$L=`#848cb5`,Zme=`#8c91a8`,eR=`#3760bf`,tR=`#e9e9ec`,nR=`#d5d6db`,rR=`#f52a65`,iR=`#b15c00`,aR=`#8c6c3e`,oR=`#587539`,sR=`#007197`,cR=`#2e7de9`,lR=`#7847bd`,Qme=`#9854f1`,uR=rR,dR=nR,$me=`#5F5FAF5A`,fR=Xme,pR=tR,mR=`#99a7df40`,ehe=`#99a7df60`,hR=ZL,the=`#0e639c20`,nhe=sR,gR=iR,_R=sR,rhe=lR,vR=`#58753920`,yR=`#f52a6520`,bR=`#587539`,xR=`#f52a65`,ihe=[I.theme({"&":{color:eR,backgroundColor:fR,fontSize:HL.fontSize,fontFamily:HL.fontFamily},".cm-content":{caretColor:hR,lineHeight:HL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:hR,borderLeftWidth:Jme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${hR}99`,color:fR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:mR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#0e639c40`,outline:`1px solid ${sR}`,color:eR,borderRadius:YL.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:sR,color:fR,padding:YL.padding,"& span":{color:fR}},".cm-search.cm-panel.cm-textfield":{color:eR,borderRadius:YL.borderRadius,padding:YL.padding},".cm-panels":{backgroundColor:tR,color:eR,borderRadius:`4px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.1)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${$L}30`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${$L}30`},".cm-panel button":{backgroundColor:pR,color:eR,border:GL.border,borderRadius:GL.borderRadius,padding:GL.padding},".cm-panel button:hover":{backgroundColor:nR,border:`1px solid ${QL}`},".cm-activeLine":{backgroundColor:$me,borderRadius:Yme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:dR,color:$L,border:WL.border,borderRight:`1px solid ${nR}`,paddingRight:WL.paddingRight},".cm-activeLineGutter":{color:ZL,fontWeight:WL.fontWeight},".cm-lineNumbers":{fontSize:WL.fontSize,lineHeight:WL.lineHeight},".cm-foldGutter":{fontSize:WL.fontSize,lineHeight:WL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:$L,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:ZL},".cm-insertedLine":{textDecoration:UL.insertedTextDecoration,backgroundColor:vR,color:bR,padding:UL.insertedLinePadding,borderRadius:UL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:UL.insertedTextDecoration,backgroundColor:`${vR} !important`,color:bR,padding:UL.insertedLinePadding,borderRadius:UL.borderRadious,border:`1px solid ${bR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:UL.deletedTextDecoration,backgroundColor:yR,color:xR,padding:UL.insertedLinePadding,borderRadius:UL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:UL.deletedTextDecoration,backgroundColor:`${yR} !important`,color:xR,padding:UL.insertedLinePadding,borderRadius:UL.borderRadious,border:`1px solid ${xR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:pR,border:`1px solid ${Zme}40`,borderRadius:XL.borderRadius,padding:XL.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:pR,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:XL.padding,lineHeight:XL.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:mR,color:ZL,borderRadius:XL.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:$L,paddingRight:XL.paddingRight},"& > ul > li > span.cm-completionDetail":{color:$L,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:pR,borderBottomColor:pR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${uR}`},"&-warning":{borderLeft:`3px solid ${gR}`},"&-info":{borderLeft:`3px solid ${_R}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${uR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${gR}`},".cm-matchingBracket":{backgroundColor:the,outline:`1px solid ${nhe}`,borderRadius:KL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${rR}20`,outline:`1px solid ${uR}`,borderRadius:KL.borderRadius},".cm-selectionMatch":{backgroundColor:ehe,outline:`1px solid ${QL}50`,borderRadius:KL.borderRadius},".cm-foldPlaceholder":{backgroundColor:pR,color:$L,border:`1px dotted ${$L}70`,borderRadius:qL.borderRadius,padding:qL.padding,margin:qL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${fR}, 0 0 0 3px ${sR}40`},"& .cm-scroller::-webkit-scrollbar":{width:JL.width,height:JL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:dR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:$L,borderRadius:JL.borderRadius,border:`3px solid ${dR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:QL},".cm-ghostText":{opacity:`0.5`,color:$L}},{dark:!1}),D(B.define([{tag:A.keyword,color:sR,fontWeight:`bold`},{tag:A.controlKeyword,color:sR,fontWeight:`bold`},{tag:A.moduleKeyword,color:sR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:cR},{tag:[A.variableName],color:ZL},{tag:[A.propertyName],color:cR,fontStyle:`normal`},{tag:[A.typeName],color:sR},{tag:[A.className],color:aR,fontStyle:`italic`},{tag:[A.namespace],color:lR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:lR},{tag:[A.bracket],color:$L},{tag:[A.brace],color:$L},{tag:[A.punctuation],color:$L},{tag:[A.function(A.variableName)],color:sR},{tag:[A.labelName],color:lR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:sR},{tag:[A.definition(A.variableName)],color:cR},{tag:A.number,color:iR},{tag:A.changed,color:iR},{tag:A.annotation,color:uR,fontStyle:`italic`},{tag:A.modifier,color:iR,fontStyle:`italic`},{tag:A.self,color:iR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:iR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:iR},{tag:[A.processingInstruction,A.inserted],color:oR},{tag:[A.special(A.string),A.regexp],color:Qme},{tag:A.string,color:oR},{tag:A.definition(A.typeName),color:sR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:cR},{tag:A.meta,color:$L},{tag:A.comment,fontStyle:`italic`,color:$L},{tag:A.docComment,fontStyle:`italic`,color:$L},{tag:[A.tagName],color:lR},{tag:[A.attributeName],color:aR},{tag:[A.heading],fontWeight:`bold`,color:iR},{tag:A.heading1,color:iR,fontWeight:`bold`},{tag:A.heading2,color:iR},{tag:A.heading3,color:iR},{tag:A.heading4,color:sR},{tag:A.heading5,color:sR},{tag:A.heading6,color:sR},{tag:[A.strong],fontWeight:`bold`,color:ZL},{tag:[A.emphasis],fontStyle:`italic`,color:oR},{tag:[A.link],color:rhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:_R,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:ZL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${uR}`},{tag:[A.strikethrough],color:uR,textDecoration:`line-through`},{tag:A.constant(A.name),color:iR},{tag:A.deleted,color:uR},{tag:A.squareBracket,color:$L},{tag:A.angleBracket,color:$L},{tag:A.monospace,color:ZL},{tag:[A.contentSeparator],color:cR},{tag:A.quote,color:$L}]))],SR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},ahe={borderLeftWidth:`2px`},CR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},wR={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},TR={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ohe={borderRadius:`2px`},ER={borderRadius:`2px`},DR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},OR={width:`12px`,height:`12px`,borderRadius:`6px`},kR={borderRadius:`4px`,padding:`2px 6px`},AR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},she=`#24283b`,jR=`#414868`,MR=`#565f89`,NR=`#c0caf5`,PR=`#282e44`,FR=`#1f2335`,che=`#f7768e`,IR=`#ff9e64`,LR=`#e0af68`,RR=`#9ece6a`,zR=`#2ac3de`,BR=`#7aa2f7`,VR=`#bb9af7`,HR=`#f7768e`,UR=FR,lhe=`#292e427a`,WR=she,GR=PR,KR=`#6f7bb630`,uhe=`#6f7bb650`,qR=NR,dhe=`#3d59a150`,fhe=BR,JR=IR,YR=zR,phe=VR,XR=`#3b4a3880`,ZR=`#4a393a80`,QR=`#9ece6a`,$R=`#f7768e`,mhe=[I.theme({"&":{color:NR,backgroundColor:WR,fontSize:SR.fontSize,fontFamily:SR.fontFamily},".cm-content":{caretColor:qR,lineHeight:SR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:qR,borderLeftWidth:ahe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${qR}99`,color:WR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:KR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#7aa2f740`,outline:`1px solid ${BR}`,color:NR,borderRadius:kR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:BR,color:WR,padding:kR.padding,"& span":{color:WR}},".cm-search.cm-panel.cm-textfield":{color:NR,borderRadius:kR.borderRadius,padding:kR.padding},".cm-panels":{backgroundColor:PR,color:NR,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${MR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${MR}`},".cm-panel button":{backgroundColor:GR,color:NR,border:TR.border,borderRadius:TR.borderRadius,padding:TR.padding},".cm-panel button:hover":{backgroundColor:FR},".cm-activeLine":{backgroundColor:lhe,borderRadius:ohe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:UR,color:MR,border:wR.border,borderRight:`1px solid ${FR}`,paddingRight:wR.paddingRight},".cm-activeLineGutter":{backgroundColor:FR,color:NR,fontWeight:wR.fontWeight},".cm-lineNumbers":{fontSize:wR.fontSize,lineHeight:wR.lineHeight},".cm-foldGutter":{fontSize:wR.fontSize,lineHeight:wR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:MR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:NR},".cm-insertedLine":{textDecoration:CR.insertedTextDecoration,backgroundColor:XR,color:QR,padding:CR.insertedLinePadding,borderRadius:CR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:CR.insertedTextDecoration,backgroundColor:`${XR} !important`,color:QR,padding:CR.insertedLinePadding,borderRadius:CR.borderRadious,border:`1px solid ${QR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:CR.deletedTextDecoration,backgroundColor:ZR,color:$R,padding:CR.insertedLinePadding,borderRadius:CR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:CR.deletedTextDecoration,backgroundColor:`${ZR} !important`,color:$R,padding:CR.insertedLinePadding,borderRadius:CR.borderRadious,border:`1px solid ${$R}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:GR,border:`1px solid ${MR}`,borderRadius:AR.borderRadius,padding:AR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:GR,border:`none`},"& > ul > li":{padding:AR.padding,lineHeight:AR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:KR,color:NR,borderRadius:AR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:MR,paddingRight:AR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:MR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:GR,borderBottomColor:GR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${HR}`},"&-warning":{borderLeft:`3px solid ${JR}`},"&-info":{borderLeft:`3px solid ${YR}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${HR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${JR}`},".cm-matchingBracket":{backgroundColor:dhe,outline:`1px solid ${fhe}`,borderRadius:ER.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${che}20`,outline:`1px solid ${HR}`,borderRadius:ER.borderRadius},".cm-selectionMatch":{backgroundColor:uhe,outline:`1px solid ${jR}50`,borderRadius:ER.borderRadius},".cm-foldPlaceholder":{backgroundColor:GR,color:MR,border:`1px dotted ${MR}70`,borderRadius:DR.borderRadius,padding:DR.padding,margin:DR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${WR}, 0 0 0 3px ${BR}40`},"& .cm-scroller::-webkit-scrollbar":{width:OR.width,height:OR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:UR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:jR,borderRadius:OR.borderRadius,border:`3px solid ${UR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:MR},".cm-ghostText":{opacity:`0.5`,color:MR}},{dark:!0}),D(B.define([{tag:A.keyword,color:VR,fontWeight:`bold`},{tag:A.controlKeyword,color:VR,fontWeight:`bold`},{tag:A.moduleKeyword,color:VR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:NR},{tag:[A.variableName],color:NR},{tag:[A.propertyName],color:BR,fontStyle:`normal`},{tag:[A.typeName],color:zR},{tag:[A.className],color:LR,fontStyle:`italic`},{tag:[A.namespace],color:BR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:VR},{tag:[A.bracket],color:MR},{tag:[A.brace],color:MR},{tag:[A.punctuation],color:MR},{tag:[A.function(A.variableName)],color:BR},{tag:[A.labelName],color:BR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:BR},{tag:[A.definition(A.variableName)],color:NR},{tag:A.number,color:IR},{tag:A.changed,color:IR},{tag:A.annotation,color:HR,fontStyle:`italic`},{tag:A.modifier,color:IR,fontStyle:`italic`},{tag:A.self,color:IR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:VR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:IR},{tag:[A.processingInstruction,A.inserted],color:RR},{tag:[A.special(A.string),A.regexp],color:`#b4f9f8`},{tag:A.string,color:RR},{tag:A.definition(A.typeName),color:zR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:NR},{tag:A.meta,color:MR},{tag:A.comment,fontStyle:`italic`,color:MR},{tag:A.docComment,fontStyle:`italic`,color:MR},{tag:[A.tagName],color:VR},{tag:[A.attributeName],color:LR},{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:NR},{tag:[A.emphasis],fontStyle:`italic`,color:zR},{tag:[A.link],color:phe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:YR,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:NR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${HR}`},{tag:[A.strikethrough],color:HR,textDecoration:`line-through`},{tag:A.constant(A.name),color:IR},{tag:A.deleted,color:HR},{tag:A.squareBracket,color:MR},{tag:A.angleBracket,color:MR},{tag:A.monospace,color:NR},{tag:[A.contentSeparator],color:BR},{tag:A.quote,color:MR}]))],ez={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},hhe={borderLeftWidth:`2px`},tz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},nz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},rz={borderRadius:`4px`,padding:`2px 10px`},ghe={borderRadius:`2px`},iz={borderRadius:`2px`},az={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},oz={width:`12px`,height:`12px`,borderRadius:`6px`},sz={borderRadius:`4px`,padding:`2px 6px`},cz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},_he=`#1e1e1e`,lz=`#252526`,uz=`#2d2d30`,dz=`#838383`,vhe=`#c6c6c6`,fz=`#d4d4d4`,pz=`#e9e9e9`,yhe=`#1c1c1c`,mz=`#569cd6`,bhe=`#c586c0`,hz=`#9cdcfe`,gz=`#4ec9b0`,_z=`#dcdcaa`,xhe=`#b5cea8`,vz=`#ce9178`,yz=`#f44747`,bz=`#d7ba7d`,xz=`#6a9955`,Sz=yz,Cz=`#FFFFFF08`,wz=_he,Tz=lz,She=`#264F7899`,Che=`#72a1ff59`,Ez=vhe,whe=`#ffffff15`,The=mz,Dz=bz,Oz=`#3794ff`,Ehe=`#c586c0`,kz=`#1e3f1e80`,Az=`#4b1c1c80`,jz=`#6cc26f`,Mz=`#f14c4c`,Dhe=[I.theme({"&":{color:fz,backgroundColor:wz,fontSize:ez.fontSize,fontFamily:ez.fontFamily},".cm-content":{caretColor:Ez,lineHeight:ez.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ez,borderLeftWidth:hhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${Ez}99`,color:wz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:She},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#72a1ff40`,outline:`1px solid ${mz}90`,color:pz,borderRadius:sz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#3794ff90`,color:pz,padding:sz.padding,"& span":{color:pz}},".cm-search.cm-panel.cm-textfield":{color:fz,borderRadius:sz.borderRadius,padding:sz.padding},".cm-panels":{backgroundColor:lz,color:fz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.45)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${uz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${uz}`},".cm-panel button":{backgroundColor:uz,color:fz,border:`1px solid ${uz}`,borderRadius:rz.borderRadius,padding:rz.padding},".cm-panel button:hover":{backgroundColor:`#3a3a3a`,border:`1px solid ${dz}80`},".cm-activeLine":{backgroundColor:Cz,borderRadius:ghe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yhe,color:dz,border:`none`,borderRight:`1px solid ${uz}`,paddingRight:nz.paddingRight},".cm-activeLineGutter":{backgroundColor:Cz,color:pz,fontWeight:nz.fontWeight},".cm-lineNumbers":{fontSize:nz.fontSize,lineHeight:nz.lineHeight},".cm-foldGutter":{fontSize:nz.fontSize,lineHeight:nz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:dz,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:pz},".cm-insertedLine":{textDecoration:tz.insertedTextDecoration,backgroundColor:kz,color:jz,padding:tz.insertedLinePadding,borderRadius:tz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:tz.insertedTextDecoration,backgroundColor:`${kz} !important`,color:jz,padding:tz.insertedLinePadding,borderRadius:tz.borderRadious,border:`1px solid ${jz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:tz.deletedTextDecoration,backgroundColor:Az,color:Mz,padding:tz.insertedLinePadding,borderRadius:tz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:tz.deletedTextDecoration,backgroundColor:`${Az} !important`,color:Mz,padding:tz.insertedLinePadding,borderRadius:tz.borderRadious,border:`1px solid ${Mz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:Tz,border:`1px solid ${uz}`,borderRadius:cz.borderRadius,padding:cz.padding,boxShadow:`0 3px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:Tz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:cz.padding,lineHeight:cz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#04395e`,color:pz,borderRadius:cz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:dz,paddingRight:cz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:dz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Tz,borderBottomColor:Tz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${Sz}`},"&-warning":{borderLeft:`3px solid ${Dz}`},"&-info":{borderLeft:`3px solid ${Oz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${Sz}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${Dz}`},".cm-matchingBracket":{backgroundColor:whe,outline:`1px solid ${The}80`,borderRadius:iz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${yz}40`,outline:`1px solid ${Sz}`,borderRadius:iz.borderRadius},".cm-selectionMatch":{backgroundColor:Che,outline:`1px solid ${uz}70`,borderRadius:iz.borderRadius},".cm-foldPlaceholder":{backgroundColor:Tz,color:dz,border:`1px dotted ${dz}70`,borderRadius:az.borderRadius,padding:az.padding,margin:az.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${uz}`},"& .cm-scroller::-webkit-scrollbar":{width:oz.width,height:oz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:wz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#424242`,borderRadius:oz.borderRadius,border:`3px solid ${wz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#525252`},".cm-ghostText":{opacity:`0.5`,color:dz}},{dark:!0}),D(B.define([{tag:A.keyword,color:mz,fontWeight:`bold`},{tag:A.controlKeyword,color:bhe,fontWeight:`bold`},{tag:A.moduleKeyword,color:mz,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:fz},{tag:[A.variableName],color:hz},{tag:[A.propertyName],color:hz,fontStyle:`normal`},{tag:[A.typeName],color:gz},{tag:[A.className],color:gz,fontStyle:`normal`},{tag:[A.namespace],color:fz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:fz},{tag:[A.bracket],color:fz},{tag:[A.brace],color:fz},{tag:[A.punctuation],color:fz},{tag:[A.function(A.variableName)],color:_z},{tag:[A.labelName],color:_z,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:_z},{tag:[A.definition(A.variableName)],color:hz},{tag:A.number,color:xhe},{tag:A.changed,color:bz},{tag:A.annotation,color:bz,fontStyle:`italic`},{tag:A.modifier,color:mz,fontStyle:`normal`},{tag:A.self,color:mz},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:hz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:mz},{tag:[A.processingInstruction,A.inserted],color:vz},{tag:[A.special(A.string),A.regexp],color:`#d16969`},{tag:A.string,color:vz},{tag:A.definition(A.typeName),color:gz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:fz},{tag:A.meta,color:dz},{tag:A.comment,fontStyle:`italic`,color:xz},{tag:A.docComment,fontStyle:`italic`,color:xz},{tag:[A.tagName],color:mz},{tag:[A.attributeName],color:hz},{tag:[A.heading],fontWeight:`bold`,color:mz},{tag:A.heading1,color:mz,fontWeight:`bold`},{tag:A.heading2,color:mz},{tag:A.heading3,color:mz},{tag:A.heading4,color:mz},{tag:A.heading5,color:mz},{tag:A.heading6,color:mz},{tag:[A.strong],fontWeight:`bold`,color:mz},{tag:[A.emphasis],fontStyle:`italic`,color:gz},{tag:[A.link],color:Ehe,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:Oz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:fz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${Sz}`},{tag:[A.strikethrough],color:Sz,textDecoration:`line-through`},{tag:A.constant(A.name),color:hz},{tag:A.deleted,color:Sz},{tag:A.squareBracket,color:fz},{tag:A.angleBracket,color:fz},{tag:A.monospace,color:fz},{tag:[A.contentSeparator],color:fz},{tag:A.quote,color:xz}]))],Nz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Ohe={borderLeftWidth:`2px`},Pz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},Fz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},Iz={borderRadius:`4px`,padding:`2px 10px`},khe={borderRadius:`2px`},Lz={borderRadius:`2px`},Rz={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},zz={width:`12px`,height:`12px`,borderRadius:`6px`},Bz={borderRadius:`4px`,padding:`2px 6px`},Vz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Ahe=`#ffffff`,Hz=`#f3f3f3`,Uz=`#d6d6d6`,Wz=`#6b6b6b`,Gz=`#000000`,Kz=`#383a42`,qz=`#1f1f1f`,Jz=`#f5f5f5`,Yz=`#0064ff`,Xz=`#af00db`,Zz=`#0070c1`,Qz=`#267f99`,$z=`#795e26`,eB=`#098658`,tB=`#a31515`,nB=`#e51400`,rB=`#795e26`,iB=`#008000`,aB=nB,oB=`#99999926`,sB=Ahe,cB=Hz,lB=`#add6ff`,uB=`#a8ac9480`,dB=Gz,fB=`#007acc20`,pB=`#007acc`,mB=`#bf8803`,hB=`#006ab1`,gB=`#9e46d0`,_B=`#ddfbe0`,vB=`#ffebec`,yB=`#22863a`,bB=`#e51400`,xB=[I.theme({"&":{color:Kz,backgroundColor:sB,fontSize:Nz.fontSize,fontFamily:Nz.fontFamily},".cm-content":{caretColor:dB,lineHeight:Nz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:dB,borderLeftWidth:Ohe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${dB}99`,color:sB},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lB},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#bbdefb`,outline:`1px solid ${Zz}90`,color:qz,borderRadius:Bz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#90caf9`,color:qz,padding:Bz.padding,"& span":{color:qz}},".cm-search.cm-panel.cm-textfield":{color:Kz,borderRadius:Bz.borderRadius,padding:Bz.padding},".cm-panels":{backgroundColor:Hz,color:Kz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${Uz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${Uz}`},".cm-panel button":{backgroundColor:sB,color:Kz,border:`1px solid ${Uz}`,borderRadius:Iz.borderRadius,padding:Iz.padding},".cm-panel button:hover":{backgroundColor:`#e8e8e8`,border:`1px solid ${Wz}80`},".cm-activeLine":{backgroundColor:oB,borderRadius:khe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:Jz,color:`#237893`,border:`none`,borderRight:`1px solid ${Uz}`,paddingRight:Fz.paddingRight},".cm-activeLineGutter":{backgroundColor:oB,color:`#0b216f`,fontWeight:Fz.fontWeight},".cm-lineNumbers":{fontSize:Fz.fontSize,lineHeight:Fz.lineHeight},".cm-foldGutter":{fontSize:Fz.fontSize,lineHeight:Fz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:`#237893`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`#0b216f`},".cm-insertedLine":{textDecoration:Pz.insertedTextDecoration,backgroundColor:_B,color:yB,padding:Pz.insertedLinePadding,borderRadius:Pz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:Pz.insertedTextDecoration,backgroundColor:`${_B} !important`,color:yB,padding:Pz.insertedLinePadding,borderRadius:Pz.borderRadious,border:`1px solid ${yB}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:Pz.deletedTextDecoration,backgroundColor:vB,color:bB,padding:Pz.insertedLinePadding,borderRadius:Pz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:Pz.deletedTextDecoration,backgroundColor:`${vB} !important`,color:bB,padding:Pz.insertedLinePadding,borderRadius:Pz.borderRadious,border:`1px solid ${bB}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:cB,border:`1px solid ${Uz}`,borderRadius:Vz.borderRadius,padding:Vz.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:cB,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:Vz.padding,lineHeight:Vz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#dcebfc`,color:qz,borderRadius:Vz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:Wz,paddingRight:Vz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:Wz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:cB,borderBottomColor:cB},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${aB}`},"&-warning":{borderLeft:`3px solid ${mB}`},"&-info":{borderLeft:`3px solid ${hB}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${aB}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${mB}`},".cm-matchingBracket":{backgroundColor:fB,outline:`1px solid ${pB}80`,borderRadius:Lz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${nB}20`,outline:`1px solid ${aB}`,borderRadius:Lz.borderRadius},".cm-selectionMatch":{backgroundColor:uB,outline:`1px solid ${Uz}70`,borderRadius:Lz.borderRadius},".cm-foldPlaceholder":{backgroundColor:cB,color:Wz,border:`1px dotted ${Wz}70`,borderRadius:Rz.borderRadius,padding:Rz.padding,margin:Rz.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${Uz}`},"& .cm-scroller::-webkit-scrollbar":{width:zz.width,height:zz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:sB},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#dadada`,borderRadius:zz.borderRadius,border:`3px solid ${sB}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#cccccc`},".cm-ghostText":{opacity:`0.5`,color:Wz}},{dark:!1}),D(B.define([{tag:A.keyword,color:Yz,fontWeight:`bold`},{tag:A.controlKeyword,color:Xz,fontWeight:`bold`},{tag:A.moduleKeyword,color:Yz,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:Kz},{tag:[A.variableName],color:Zz},{tag:[A.propertyName],color:Zz,fontStyle:`normal`},{tag:[A.typeName],color:Qz},{tag:[A.className],color:Qz,fontStyle:`normal`},{tag:[A.namespace],color:Kz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:Kz},{tag:[A.bracket],color:Kz},{tag:[A.brace],color:Kz},{tag:[A.punctuation],color:Kz},{tag:[A.function(A.variableName)],color:$z},{tag:[A.labelName],color:$z,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:$z},{tag:[A.definition(A.variableName)],color:Zz},{tag:A.number,color:eB},{tag:A.changed,color:rB},{tag:A.annotation,color:rB,fontStyle:`italic`},{tag:A.modifier,color:Yz,fontStyle:`normal`},{tag:A.self,color:Yz},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:Zz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:Yz},{tag:[A.processingInstruction,A.inserted],color:tB},{tag:[A.special(A.string),A.regexp],color:Xz},{tag:A.string,color:tB},{tag:A.definition(A.typeName),color:Qz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:Kz},{tag:A.meta,color:Wz},{tag:A.comment,fontStyle:`italic`,color:iB},{tag:A.docComment,fontStyle:`italic`,color:iB},{tag:[A.tagName],color:Yz},{tag:[A.attributeName],color:Zz},{tag:[A.heading],fontWeight:`bold`,color:Yz},{tag:A.heading1,color:Yz,fontWeight:`bold`},{tag:A.heading2,color:Yz},{tag:A.heading3,color:Yz},{tag:A.heading4,color:Yz},{tag:A.heading5,color:Yz},{tag:A.heading6,color:Yz},{tag:[A.strong],fontWeight:`bold`,color:Yz},{tag:[A.emphasis],fontStyle:`italic`,color:Zz},{tag:[A.link],color:gB,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:hB,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:Kz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${aB}`},{tag:[A.strikethrough],color:aB,textDecoration:`line-through`},{tag:A.constant(A.name),color:Zz},{tag:A.deleted,color:aB},{tag:A.squareBracket,color:Kz},{tag:A.angleBracket,color:Kz},{tag:A.monospace,color:Kz},{tag:[A.contentSeparator],color:Kz},{tag:A.quote,color:iB}]))];function SB(){return SB=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},SB.apply(null,arguments)}function CB(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 wB=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,TB=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(wB(e)):wB,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`&&(TB.prototype[Symbol.iterator]=function(){return this});var EB={from:-1,to:-1,match:/.*/.exec(``)},DB=`gm`+(/x/.unicode==null?``:`u`),OB=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=EB,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new jB(e,t,n,r,i);this.re=new RegExp(t,DB+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=NB(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=NB(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}}},kB=new WeakMap,AB=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=kB.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return kB.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)),kB.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},jB=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=EB,this.matchPos=NB(e,r),this.re=new RegExp(t,DB+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=AB.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=NB(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=AB.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(OB.prototype[Symbol.iterator]=jB.prototype[Symbol.iterator]=function(){return this});function MB(e){try{return new RegExp(e,DB),!0}catch{return!1}}function NB(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 PB(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:FB.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:FB.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:[FB.of(!1),I.scrollIntoView(f.from,{y:`center`})],selection:f}),e.focus()}return{dom:n}}var FB=V.define(),IB=Be.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(FB)&&(e=n.value);return e},provide:e=>ne.from(e,e=>e?PB:null)}),LB=e=>{let t=De(e,PB);if(!t){let n=[FB.of(!0)];e.state.field(IB,!1)??n.push(V.appendConfig.of([IB,RB])),e.dispatch({effects:n}),t=De(e,PB)}return t&&t.dom.querySelector(`input`).select(),!0},RB=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},BB=xe.define({combine(e){return f(e,zB,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function VB(e){let t=[qB,KB];return e&&t.push(BB.of(e)),t}var HB=Ve.mark({class:`cm-selectionMatch`}),UB=Ve.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function WB(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 GB(e,t,n,r){return e(t.sliceDoc(n,n+1))==oe.Word&&e(t.sliceDoc(r-1,r))==oe.Word}var KB=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(BB),{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),!(WB(o,n,i.from,i.to)&&GB(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 TB(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||WB(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(UB.range(r,a)):(r>=i.to||a<=i.from)&&s.push(HB.range(r,a)),s.length>t.maxMatches))return Ve.none}}return Ve.set(s)}},{decorations:e=>e.decorations}),qB=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),JB=({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 YB(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 TB(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new TB(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 XB=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return JB({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=YB(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},ZB=xe.define({combine(e){return f(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new kV(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),QB=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||MB(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`?`
363
+ `;)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=mk(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`)&&(fk.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 mk(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 hk=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}),gk=new HO(new C(KO).extend(hk),Object.keys(NO).map(e=>NO[e]),Object.keys(NO).map(e=>LO[e]),Object.keys(NO),RO,mO,Object.keys(ak).map(e=>ak[e]),Object.keys(ak),[]);function _k(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 vk(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:_k(e.node,e.from,e.to)};return null})}}var yk={resolve:`Strikethrough`,mark:`StrikethroughMark`},bk={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=ik.test(r),c=ik.test(i);return e.addDelimiter(yk,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function xk(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 Sk(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 Ck=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,wk=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)&&Ck.test(r=t.text.slice(t.pos))){let i=[];xk(e,n.content,0,i,n.start)==xk(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=[];xk(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}},Tk={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 Sk(t.content,0)?new wk:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof wk)||!Sk(t.text,t.basePos))return!1;let r=e.peekLine();return Ck.test(r)&&xk(e,t.text,t.basePos)==xk(e,r,t.basePos)},before:`SetextHeading`}]},Ek=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}},Dk={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 Ek:null},after:`SetextHeading`}]},Ok=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,kk=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Ak=/[\w-]+\.[\w-]+($|\/)/,jk=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Mk=/\/[a-zA-Z\d@.]+/gy;function Nk(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Pk(e,t){kk.lastIndex=t;let n=kk.exec(e);if(!n||Ak.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==`)`&&Nk(e,t,r,`)`)>Nk(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 Fk(e,t){jk.lastIndex=t;let n=jk.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 Ik=[Tk,Dk,bk,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Ok.lastIndex=r;let i=Ok.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Pk(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Fk(e.text,r):(a=Fk(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Mk.lastIndex=a,i=Mk.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 Lk(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)),hO(s))break}return-1}}var Rk={defineNodes:[{name:`Superscript`,style:A.special(A.content)},{name:`SuperscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Superscript`,parse:Lk(94,`Superscript`,`SuperscriptMark`)}]},zk={defineNodes:[{name:`Subscript`,style:A.special(A.content)},{name:`SubscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Subscript`,parse:Lk(126,`Subscript`,`SubscriptMark`)}]},Bk={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))}}]},Vk=55,Hk=1,Uk=56,Wk=2,Gk=57,Kk=3,qk=4,Jk=5,Yk=6,Xk=7,Zk=8,Qk=9,$k=10,eA=11,tA=12,nA=13,rA=58,iA=14,aA=15,oA=59,sA=21,cA=23,lA=24,uA=25,dA=27,fA=28,pA=29,mA=32,hA=35,gA=37,_A=38,vA=0,yA=1,bA={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},xA={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},SA={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 CA(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var wA=null,TA=null,EA=0;function DA(e,t){let n=e.pos+t;if(EA==n&&TA==e)return wA;let r=e.peek(t),i=``;for(;CA(r);)i+=String.fromCharCode(r),r=e.peek(++t);return TA=e,EA=n,wA=i?i.toLowerCase():r==jA||r==MA?void 0:null}var OA=60,kA=62,AA=47,jA=63,MA=33,NA=45;function PA(e,t){this.name=e,this.parent=t}var FA=[Yk,$k,Xk,Zk,Qk],IA=new Me({start:null,shift(e,t,n,r){return FA.indexOf(t)>-1?new PA(DA(r,1)||``,e):e},reduce(e,t){return t==sA&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Yk||i==gA?new PA(DA(r,1)||``,e):e},strict:!1}),LA=new Se((e,t)=>{if(e.next!=OA){e.next<0&&t.context&&e.acceptToken(rA);return}e.advance();let n=e.next==AA;n&&e.advance();let r=DA(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?aA:iA);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(eA);if(i&&xA[i])return e.acceptToken(rA,-2);if(t.dialectEnabled(vA))return e.acceptToken(tA);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(nA)}else{if(r==`script`)return e.acceptToken(Xk);if(r==`style`)return e.acceptToken(Zk);if(r==`textarea`)return e.acceptToken(Qk);if(bA.hasOwnProperty(r))return e.acceptToken($k);i&&SA[i]&&SA[i][r]?e.acceptToken(rA,-1):e.acceptToken(Yk)}},{contextual:!0}),RA=new Se(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(oA);break}if(e.next==NA)t++;else if(e.next==kA&&t>=2){n>=3&&e.acceptToken(oA,-2);break}else t=0;e.advance()}});function zA(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var BA=new Se((e,t)=>{if(e.next==AA&&e.peek(1)==kA){let n=t.dialectEnabled(yA)||zA(t.context);e.acceptToken(n?Jk:qk,2)}else e.next==kA&&e.acceptToken(qk,1)});function VA(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==OA||a==1&&i.next==AA||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==kA){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 HA=VA(`script`,Vk,Hk),UA=VA(`style`,Uk,Wk),WA=VA(`textarea`,Gk,Kk),GA=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}),KA=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:IA,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:[GA],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:[HA,UA,WA,BA,LA,RA,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function qA(e,t){let n=Object.create(null);for(let r of e.getChildren(lA)){let e=r.getChild(uA),i=r.getChild(dA)||r.getChild(fA);e&&(n[t.read(e.from,e.to)]=i?i.type.id==dA?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function JA(e,t){let n=e.getChild(cA);return n?t.read(n.from,n.to):` `}function YA(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=qA(e.node.parent.firstChild,t)))return{parser:i.parser};return null}function XA(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==pA)return YA(e,t,n);if(s==mA)return YA(e,t,r);if(s==hA)return YA(e,t,i);if(s==sA&&a.length){let n=e.node,r=n.firstChild,i=r&&JA(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=qA(r,t)))){let t=n.lastChild,i=t.type.id==_A?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==lA){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!=JA(n.parent,t))continue;let e=n.lastChild;if(e.type.id==dA){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==fA)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var ZA=122,QA=1,$A=123,ej=124,tj=2,nj=125,rj=3,ij=4,aj=[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],oj=58,sj=40,cj=95,lj=91,uj=45,Qde=46,$de=35,efe=37,tfe=38,nfe=92,rfe=10,ife=42;function dj(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function fj(e){return e>=48&&e<=57}function pj(e){return fj(e)||e>=97&&e<=102||e>=65&&e<=70}var mj=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(dj(c)||c==uj||c==cj||a&&fj(c))!a&&(c!=uj||s>0)&&(a=!0),o===s&&c==uj&&o++,r.advance();else if(c==nfe&&r.peek(1)!=rfe){if(r.advance(),pj(r.next)){do r.advance();while(pj(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(tj)?t:c==sj?n:e);break}}},afe=new Se(mj($A,tj,ej)),ofe=new Se(mj(nj,rj,ij)),sfe=new Se(e=>{if(aj.includes(e.peek(-1))){let{next:t}=e;(dj(t)||t==cj||t==$de||t==Qde||t==ife||t==lj||t==oj&&dj(e.peek(1))||t==uj||t==tfe)&&e.acceptToken(ZA)}}),cfe=new Se(e=>{if(!aj.includes(e.peek(-1))){let{next:t}=e;if(t==efe&&(e.advance(),e.acceptToken(QA)),dj(t)){do e.advance();while(dj(e.next)||fj(e.next));e.acceptToken(QA)}}}),lfe=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}),ufe={__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},dfe={__proto__:null,or:98,and:98,not:106,only:106,layer:170},ffe={__proto__:null,selector:112,layer:166},pfe={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},mfe={__proto__:null,to:207},hfe=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:[lfe],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:[sfe,cfe,afe,ofe,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=>ufe[e]||-1},{term:125,get:e=>dfe[e]||-1},{term:4,get:e=>ffe[e]||-1},{term:25,get:e=>pfe[e]||-1},{term:123,get:e=>mfe[e]||-1}],tokenPrec:1963}),hj=null;function gj(){if(!hj&&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)));hj=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return hj||[]}var _j=`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})),vj=`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}))),gfe=`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})),_fe=[`@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})),yj=/^(\w[\w-]*|-\w[\w-]*|)$/,vfe=/^-(-[\w-]*)?$/;function yfe(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 bj=new O,bfe=[`Declaration`];function xfe(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function xj(e,t,n){if(t.to-t.from>4096){let r=bj.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(a.IncludeAnonymous);if(s.firstChild())do for(let t of xj(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t));while(s.nextSibling());return bj.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(bfe)&&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 Sj=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:gj(),validFor:yj};if(i.name==`ValueName`)return{from:i.from,options:vj,validFor:yj};if(i.name==`PseudoClassName`)return{from:i.from,options:_j,validFor:yj};if(e(i)||(t.explicit||a)&&yfe(i,n.doc))return{from:e(i)||a?i.from:r,options:xj(n.doc,xfe(i),e),validFor:vfe};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:gj(),validFor:yj};return{from:i.from,options:gfe,validFor:yj}}if(i.name==`AtKeyword`)return{from:i.from,options:_fe,validFor:yj};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:_j,validFor:yj}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:vj,validFor:yj}:o.name==`Block`||o.name==`Styles`?{from:r,options:gj(),validFor:yj}:null},Cj=Sj(e=>e.name==`VariableName`),wj=Ae.define({name:`css`,parser:hfe.configure({props:[l.add({Declaration:fe()}),s.add({"Block KeyframeList":ze})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function Tj(){return new Ne(wj,wj.data.of({autocomplete:Cj}))}var Ej=[`_blank`,`_self`,`_top`,`_parent`],Dj=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],Oj=[`get`,`post`,`put`,`delete`],kj=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],Aj=[`true`,`false`],jj={},Sfe={a:{attrs:{href:null,ping:null,type:null,media:null,target:Ej,hreflang:null}},abbr:jj,address:jj,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:jj,aside:jj,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:jj,base:{attrs:{href:null,target:Ej}},bdi:jj,bdo:jj,blockquote:{attrs:{cite:null}},body:jj,br:jj,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:kj,formmethod:Oj,formnovalidate:[`novalidate`],formtarget:Ej,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:jj,center:jj,cite:jj,code:jj,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:jj,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:jj,div:jj,dl:jj,dt:jj,em:jj,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:jj,figure:jj,footer:jj,form:{attrs:{action:null,name:null,"accept-charset":Dj,autocomplete:[`on`,`off`],enctype:kj,method:Oj,novalidate:[`novalidate`],target:Ej}},h1:jj,h2:jj,h3:jj,h4:jj,h5:jj,h6:jj,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:jj,hgroup:jj,hr:jj,html:{attrs:{manifest:null}},i:jj,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:kj,formmethod:Oj,formnovalidate:[`novalidate`],formtarget:Ej,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:jj,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:jj,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:jj,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:Dj,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:jj,noscript:jj,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:jj,param:{attrs:{name:null,value:null}},pre:jj,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:jj,rt:jj,ruby:jj,samp:jj,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:Dj}},section:jj,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:jj,source:{attrs:{src:null,type:null,media:null}},span:jj,strong:jj,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:jj,summary:jj,sup:jj,table:jj,tbody:jj,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:jj,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:jj,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:jj,time:{attrs:{datetime:null}},title:jj,tr:jj,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:jj,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:jj},Mj={accesskey:null,class:null,contenteditable:Aj,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:Aj,autocorrect:Aj,autocapitalize:Aj,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":Aj,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":Aj,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":Aj,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":Aj,"aria-hidden":Aj,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":Aj,"aria-multiselectable":Aj,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":Aj,"aria-relevant":null,"aria-required":Aj,"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},Nj=`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 Nj)Mj[e]=null;var Pj=class{constructor(e,t){this.tags={...Sfe,...e},this.globalAttrs={...Mj,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};Pj.default=new Pj;function Fj(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 Ij(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function Lj(e,t,n){return n.tags[Fj(e,Ij(t))]?.children||n.allTags}function Rj(e,t){let n=[];for(let r=Ij(t);r&&!r.type.isTop;r=Ij(r.parent)){let i=Fj(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 zj=/^[:\-\.\w\u00b7-\uffff]*$/;function Bj(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=Ij(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:Lj(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(Rj(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Vj(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:Rj(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:zj}}function Cfe(e,t,n,r){let i=[],a=0;for(let r of Lj(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of Rj(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function wfe(e,t,n,r,i){let a=Ij(n),o=a?t.tags[Fj(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:zj}}function Tfe(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=Ij(n),i=r?t.tags[Fj(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 Hj(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)?Vj(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`?Vj(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?wfe(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?Tfe(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?Cfe(n,e,i,r):null}function Uj(e){return Hj(Pj.default,e)}function Wj(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new Pj(t,n):Pj.default;return e=>Hj(r,e)}var Efe=Ke.parser.configure({top:`SingleExpression`}),Gj=[{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:Efe},{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:wj.parser}],Kj=[{name:`style`,parser:wj.parser.configure({top:`Styles`})}].concat(Nj.map(e=>({name:e,parser:Ke.parser}))),qj=Ae.define({name:`html`,parser:KA.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:`-_`}}),Jj=qj.configure({wrap:XA(Gj,Kj)});function Yj(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=XA((e.nestedLanguages||[]).concat(Gj),(e.nestedAttributes||[]).concat(Kj))),new Ne(n?qj.configure({wrap:n,dialect:t}):t?Jj.configure({dialect:t}):Jj,[Jj.data.of({autocomplete:Wj(e)}),e.autoCloseTags===!1?[]:Zj,We().support,Tj().support])}var Xj=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),Zj=I.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!Jj.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=Fj(o.doc,t.parent,n))&&!Xj.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=Fj(o.doc,e,n))&&!Xj.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)}),Qj=te({commentTokens:{block:{open:`<!--`,close:`-->`}}}),$j=new ge,eM=gk.configure({props:[s.add(e=>!e.is(`Block`)||e.is(`Document`)||tM(e)!=null||Dfe(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),$j.add(tM),l.add({Document:()=>null}),he.add({Document:Qj})]});function tM(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Dfe(e){return e.name==`OrderedList`||e.name==`BulletList`}function Ofe(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=tM(e.type))!=null&&r<=t)break;n=e}return n.to}var kfe=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($j);if(e==null)continue;let t=Ofe(r,e);if(t>n)return{from:n,to:t}}return null});function nM(e){return new H(Qj,e,[],`markdown`)}var rM=nM(eM),iM=nM(eM.configure([Ik,zk,Rk,Bk,{props:[s.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function Afe(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 aM=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(+sM(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function oM(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 aM(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 aM(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 aM(i.parent,s,s+t,a[1],e,n,i))}}return r}function sM(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function cM(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=sM(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 lM(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 uM=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!iM.isActiveAt(t,n.from,-1)&&!iM.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=oM(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`&&cM(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&cM(e.item,i,r),{range:le.cursor(t+n.length),changes:r}}else{let e=pM(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`&&cM(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=lM(m,t),jfe(l.node,t.doc)&&(m=pM(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)},dM=uM();function fM(e){return e.name==`QuoteMark`||e.name==`ListMark`}function jfe(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 pM(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 lM(r,t)}function Mfe(e,t){let n=e.resolveInner(t,-1),r=t;fM(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(fM(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var mM=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&iM.isActiveAt(e,t.from)){let t=a.lineAt(i),r=oM(Mfe(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=lM(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)},hM=[{key:`Enter`,run:dM},{key:`Backspace`,run:mM}],gM=Yj({matchClosingTags:!1});function _M(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=rM,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=gM}=e;if(!(a instanceof HO))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],u=[c.support,kfe],d;s&&u.push(yM),n instanceof Ne?(u.push(n.support),d=n.language):n&&(d=n);let f=t||d?Afe(t,d):void 0;l.push(vk({codeParser:f,htmlParser:c.language.parser})),i&&u.push(de.high(r.of(hM)));let p=nM(a.configure(l));return o&&u.push(p.data.of({autocomplete:Nfe})),new Ne(p,u)}function Nfe(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:Pfe(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var vM=null;function Pfe(){if(vM)return vM;let e=Uj(new Ze(Ee.create({extensions:gM}),0,!0));return vM=e?e.options:[]}var Ffe=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,yM=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),!iM.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||Ffe.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)}}),bM=63,xM=64,Ife=1,Lfe=2,SM=3,Rfe=4,CM=5,zfe=6,Bfe=7,wM=65,Vfe=66,Hfe=8,Ufe=9,Wfe=10,Gfe=11,Kfe=12,TM=13,qfe=19,Jfe=20,Yfe=29,Xfe=33,Zfe=34,Qfe=47,$fe=0,EM=1,DM=2,OM=3,kM=4,AM=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}};AM.top=new AM(null,-1,$fe);function jM(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(NM(t)||t==-1)return n}}function MM(e){return e==32||e==9}function NM(e){return e==10||e==13}function PM(e){return MM(e)||NM(e)}function FM(e){return e<0||PM(e)}var epe=new Me({start:AM.top,reduce(e,t){return e.type==OM&&(t==Jfe||t==Zfe)?e.parent:e},shift(e,t,n,r){if(t==SM)return new AM(e,jM(r,r.pos),EM);if(t==wM||t==CM)return new AM(e,jM(r,r.pos),DM);if(t==bM)return e.parent;if(t==qfe||t==Xfe)return new AM(e,0,OM);if(t==TM&&e.type==kM)return e.parent;if(t==Qfe){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new AM(e,e.depth+ +t[0],kM)}return e},hash(e){return e.hash}});function IM(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&FM(e.peek(n+3))}var tpe=new Se((e,t)=>{if(e.next==-1&&t.canShift(xM))return e.acceptToken(xM);let n=e.peek(-1);if((NM(n)||n<0)&&t.context.type!=OM){if(IM(e,45))if(t.canShift(bM))e.acceptToken(bM);else return e.acceptToken(Ife,3);if(IM(e,46))if(t.canShift(bM))e.acceptToken(bM);else return e.acceptToken(Lfe,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==EM&&(e.next!=45||!FM(e.peek(1))))&&e.next!=-1&&!NM(e.next)&&e.next!=35&&e.acceptToken(bM,-n)}},{contextual:!0}),npe=new Se((e,t)=>{if(t.context.type==OM){e.next==63&&(e.advance(),FM(e.next)&&e.acceptToken(Bfe));return}if(e.next==45)e.advance(),FM(e.next)&&e.acceptToken(t.context.type==EM&&t.context.depth==jM(e,e.pos-1)?Rfe:SM);else if(e.next==63)e.advance(),FM(e.next)&&e.acceptToken(t.context.type==DM&&t.context.depth==jM(e,e.pos-1)?zfe:CM);else{let n=e.pos;for(;;)if(MM(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)zM(e);else if(e.next==38)BM(e);else if(e.next==42){BM(e);break}else if(e.next==39||e.next==34){if(VM(e,!0))break;return}else if(e.next==91||e.next==123){if(!ipe(e))return;break}else{WM(e,!0,!1,0);break}for(;MM(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(Yfe))return;FM(e.peek(1))&&e.acceptTokenTo(t.context.type==DM&&t.context.depth==jM(e,n)?Vfe:wM,n)}}},{contextual:!0});function rpe(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 LM(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function RM(e,t){return e.next==37?(e.advance(),LM(e.next)&&e.advance(),LM(e.next)&&e.advance(),!0):rpe(e.next)||t&&e.next==44?(e.advance(),!0):!1}function zM(e){if(e.advance(),e.next==60){for(e.advance();;)if(!RM(e,!0)){e.next==62&&e.advance();break}}else for(;RM(e,!1););}function BM(e){for(e.advance();!FM(e.next)&&HM(e.tag)!=`f`;)e.advance()}function VM(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(NM(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function ipe(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(!VM(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||NM(e.next))return!1;else e.advance()}var ape=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function HM(e){return e<33?`u`:e>125?`s`:ape[e-33]}function UM(e,t){let n=HM(e);return n!=`u`&&!(t&&n==`f`)}function WM(e,t,n,r){if(HM(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&UM(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;PM(a);){if(NM(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?UM(e.peek(o+1),n):a==35?e.peek(o-1)!=32:UM(a,n)))||!n&&s<=r||s==0&&!n&&(IM(e,45,o)||IM(e,46,o)))break;if(t&&HM(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var ope=new Se((e,t)=>{if(e.next==33)zM(e),e.acceptToken(Kfe);else if(e.next==38||e.next==42){let t=e.next==38?Wfe:Gfe;BM(e),e.acceptToken(t)}else e.next==39||e.next==34?(VM(e,!1),e.acceptToken(Ufe)):WM(e,!1,t.context.type==OM,t.context.depth)&&e.acceptToken(Hfe)}),spe=new Se((e,t)=>{let n=t.context.type==kM?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(IM(e,45,i)||IM(e,46,i))||!NM(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=NM(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(TM,r)}),cpe=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}),lpe=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:epe,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[cpe],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:[tpe,npe,ope,spe,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),upe=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}),GM=Ae.define({name:`yaml`,parser:lpe.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 KM(){return new Ne(GM)}Ae.define({name:`yaml-frontmatter`,parser:upe.configure({props:[b({DashLine:A.meta})]})});function X(e){return new Ne(ce.define(e))}function qM(e){return q(()=>import(`./dist-DVFW0GyF.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([98,99,100]))}var dpe=[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 qM(`Cassandra`)}}),U.of({name:`CSS`,extensions:[`css`],load(){return q(()=>import(`./dist-_NPWTu8A.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-Dsknr6vA.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-eTaUIlfT.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-DuL-Iyhd.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-C65ij9xh.js`).then(e=>e.less()),__vite__mapDeps([109,100]))}}),U.of({name:`Liquid`,extensions:[`liquid`],load(){return q(()=>import(`./dist-Dv6uiUoE.js`).then(e=>e.liquid()),__vite__mapDeps([110,105,1,99,100]))}}),U.of({name:`MariaDB SQL`,load(){return qM(`MariaSQL`)}}),U.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return q(()=>import(`./dist-hHeeK4R0.js`).then(e=>e.markdown()),__vite__mapDeps([111,105,1,99,100]))}}),U.of({name:`MS SQL`,load(){return qM(`MSSQL`)}}),U.of({name:`MySQL`,load(){return qM(`MySQL`)}}),U.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return q(()=>import(`./dist-C887n21g.js`).then(e=>e.php()),__vite__mapDeps([112,105,1,99,100]))}}),U.of({name:`PLSQL`,extensions:[`pls`],load(){return qM(`PLSQL`)}}),U.of({name:`PostgreSQL`,load(){return qM(`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-TuIRzaj8.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([115,100]))}}),U.of({name:`SCSS`,extensions:[`scss`],load(){return q(()=>import(`./dist-TuIRzaj8.js`).then(e=>e.sass()),__vite__mapDeps([115,100]))}}),U.of({name:`SQL`,extensions:[`sql`],load(){return qM(`StandardSQL`)}}),U.of({name:`SQLite`,load(){return qM(`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-CkOzcD72.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-X2a3RXr4.js`).then(e=>e.vue()),__vite__mapDeps([125,105,1,99,100]))}}),U.of({name:`Angular Template`,load(){return q(()=>import(`./dist-Bl--njTk.js`).then(e=>e.angular()),__vite__mapDeps([126,105,1,99,100]))}})],JM={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},fpe={borderLeftWidth:`2px`},YM={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},XM={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},ZM={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ppe={borderRadius:`2px`},QM={borderRadius:`2px`},$M={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},eN={width:`12px`,height:`12px`,borderRadius:`6px`},tN={borderRadius:`4px`,padding:`2px 6px`},nN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},rN=`#0d1117`,iN=`#c9d1d9`,aN=`#264F78`,oN=`#8b949e`,sN=`#ffffff`,cN=`#7ee787`,lN=`#d2a8ff`,uN=`#79c0ff`,dN=`#ff7b72`,fN=`#a5d6ff`,mpe=`#2c333a`,hpe=`#3c444d`,pN=`#ffab70`,mN=`#161b22`,hN=`#30363d`,gpe=`#21262d`,gN=`#f97583`,_pe=`#2d333b1a`,_N=`#21262d`,vN=sN,yN=aN,vpe=`#3a587a75`,bN=`#4d90fe`,xN=`#d29922`,ype=`#3a587a55`,SN=`#58a6ff`,bpe=`#bc8cff`,CN=`#2ea04350`,wN=`#f8514940`,TN=`#7ee787`,EN=`#ff7b72`,DN=[I.theme({"&":{color:iN,backgroundColor:rN,fontSize:JM.fontSize,fontFamily:JM.fontFamily},".cm-content":{caretColor:vN,lineHeight:JM.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:vN,borderLeftWidth:fpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${vN}99`,color:rN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:yN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#3a587a`,outline:`1px solid ${uN}`,color:iN,borderRadius:tN.borderRadius,"& span":{color:iN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:bN,color:sN,padding:tN.padding,"& span":{color:sN}},".cm-search.cm-panel.cm-textfield":{color:iN,borderRadius:tN.borderRadius,padding:tN.padding},".cm-panels":{backgroundColor:_N,color:iN,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${hN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${hN}`},".cm-panel button":{backgroundColor:_N,color:iN,border:ZM.border,borderRadius:ZM.borderRadius,padding:ZM.padding},".cm-panel button:hover":{backgroundColor:mpe},".cm-activeLine":{backgroundColor:_pe,borderRadius:ppe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:mN,color:oN,border:XM.border,borderRight:`1px solid #30363d`,paddingRight:XM.paddingRight},".cm-activeLineGutter":{backgroundColor:gpe,color:iN,fontWeight:XM.fontWeight},".cm-lineNumbers":{fontSize:XM.fontSize,lineHeight:XM.lineHeight},".cm-foldGutter":{fontSize:XM.fontSize,lineHeight:XM.lineHeight},".cm-foldGutter .cm-gutterElement":{color:oN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:iN},".cm-insertedLine":{textDecoration:YM.insertedTextDecoration,backgroundColor:CN,color:TN,padding:YM.insertedLinePadding,borderRadius:YM.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:YM.insertedTextDecoration,backgroundColor:`${CN} !important`,color:TN,padding:YM.insertedLinePadding,borderRadius:YM.borderRadious,border:`1px solid ${TN}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:YM.deletedTextDecoration,backgroundColor:wN,color:EN,padding:YM.insertedLinePadding,borderRadius:YM.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:YM.deletedTextDecoration,backgroundColor:`${wN} !important`,color:EN,padding:YM.insertedLinePadding,borderRadius:YM.borderRadious,border:`1px solid ${EN}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:_N,border:`1px solid ${hN}`,borderRadius:nN.borderRadius,padding:nN.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:_N,border:`none`},"& > ul > li":{padding:nN.padding,lineHeight:nN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:yN,color:sN,borderRadius:nN.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:oN,paddingRight:nN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:oN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:_N,borderBottomColor:_N},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${gN}`},"&-warning":{borderLeft:`3px solid ${xN}`},"&-info":{borderLeft:`3px solid ${SN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${gN}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${xN}`},".cm-matchingBracket":{backgroundColor:vpe,outline:`1px solid ${bN}`,borderRadius:QM.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9758340`,outline:`1px solid ${gN}`,borderRadius:QM.borderRadius},".cm-selectionMatch":{backgroundColor:ype,outline:`1px solid ${aN}50`,borderRadius:QM.borderRadius},".cm-foldPlaceholder":{backgroundColor:_N,color:oN,border:`1px dotted ${hN}70`,borderRadius:$M.borderRadius,padding:$M.padding,margin:$M.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${rN}, 0 0 0 3px ${SN}40`},"& .cm-scroller::-webkit-scrollbar":{width:eN.width,height:eN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:mN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:hN,borderRadius:eN.borderRadius,border:`3px solid ${mN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:hpe},".cm-ghostText":{opacity:`0.5`,color:oN}},{dark:!0}),D(B.define([{tag:A.keyword,color:dN,fontWeight:`bold`},{tag:A.controlKeyword,color:dN,fontWeight:`bold`},{tag:A.moduleKeyword,color:dN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:uN},{tag:[A.variableName],color:uN},{tag:[A.propertyName],color:lN,fontStyle:`normal`},{tag:[A.typeName],color:dN},{tag:[A.className],color:lN,fontStyle:`italic`},{tag:[A.namespace],color:uN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:iN},{tag:[A.bracket],color:oN},{tag:[A.brace],color:oN},{tag:[A.punctuation],color:oN},{tag:[A.function(A.variableName),A.labelName],color:cN},{tag:[A.definition(A.variableName)],color:uN},{tag:A.number,color:pN},{tag:A.changed,color:pN},{tag:A.annotation,color:gN,fontStyle:`italic`},{tag:A.modifier,color:pN,fontStyle:`italic`},{tag:A.self,color:pN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:pN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:pN},{tag:[A.processingInstruction,A.inserted],color:cN},{tag:[A.special(A.string),A.regexp],color:fN},{tag:A.string,color:fN},{tag:A.definition(A.typeName),color:dN,fontWeight:`bold`},{tag:A.meta,color:oN},{tag:A.comment,fontStyle:`italic`,color:oN},{tag:A.docComment,fontStyle:`italic`,color:oN},{tag:[A.tagName],color:cN},{tag:[A.attributeName],color:lN},{tag:[A.heading],fontWeight:`bold`,color:uN},{tag:[A.strong],fontWeight:`bold`,color:uN},{tag:[A.emphasis],fontStyle:`italic`,color:fN},{tag:[A.link],color:bpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:SN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:iN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${gN}`},{tag:[A.strikethrough],color:gN,textDecoration:`line-through`},{tag:A.constant(A.name),color:pN},{tag:A.deleted,color:gN},{tag:A.squareBracket,color:oN},{tag:A.angleBracket,color:oN},{tag:A.monospace,color:iN},{tag:[A.contentSeparator],color:uN},{tag:A.quote,color:oN}]))],ON={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},xpe={borderLeftWidth:`2px`},kN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},AN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},jN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Spe={borderRadius:`2px`},MN={borderRadius:`2px`},NN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},PN={width:`12px`,height:`12px`,borderRadius:`6px`},FN={borderRadius:`4px`,padding:`2px 6px`},IN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},LN=`#ffffff`,RN=`#24292e`,zN=`#BBDFFF`,BN=`#6e7781`,VN=`#f6f8fa`,Cpe=`#116329`,HN=`#6a737d`,UN=`#6f42c1`,WN=`#005cc5`,GN=`#d73a49`,KN=`#032f62`,qN=`#22863a`,JN=`#e36209`,wpe=`#f1f8ff`,YN=`#e1e4e8`,Tpe=`#f8f9fa`,XN=`#cb2431`,Epe=`#BBDFFF20`,ZN=Tpe,QN=RN,Dpe=zN,Ope=`#e8f0fe`,kpe=`#0366d6`,$N=`#b08800`,eP=`#79b8ff40`,tP=`#0969da`,Ape=`#8250df`,nP=`#e6ffec80`,rP=`#ffebe980`,iP=`#0f6d31`,aP=`#cf222e`,oP=[I.theme({"&":{color:RN,backgroundColor:LN,fontSize:ON.fontSize,fontFamily:ON.fontFamily},".cm-content":{caretColor:QN,lineHeight:ON.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:QN,borderLeftWidth:xpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${QN}99`,color:LN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Dpe,color:RN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#daebff`,outline:`1px solid ${WN}`,color:RN,borderRadius:FN.borderRadius,"& span":{color:RN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#79b8ff`,color:LN,padding:FN.padding,"& span":{color:LN}},".cm-search.cm-panel.cm-textfield":{color:RN,borderRadius:FN.borderRadius,padding:FN.padding},".cm-panels":{backgroundColor:VN,color:BN,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${YN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${YN}`},".cm-panel button":{backgroundColor:LN,color:RN,border:jN.border,borderRadius:jN.borderRadius,padding:jN.padding},".cm-panel button:hover":{backgroundColor:`#f5f5f5`},".cm-activeLine":{backgroundColor:Epe,borderRadius:Spe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:VN,color:BN,border:AN.border,borderRight:`1px solid ${YN}`,paddingRight:AN.paddingRight},".cm-activeLineGutter":{backgroundColor:wpe,color:RN,fontWeight:AN.fontWeight},".cm-lineNumbers":{fontSize:AN.fontSize,lineHeight:AN.lineHeight},".cm-foldGutter":{fontSize:AN.fontSize,lineHeight:AN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:BN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:RN},".cm-insertedLine":{textDecoration:kN.insertedTextDecoration,backgroundColor:nP,color:iP,padding:kN.insertedLinePadding,borderRadius:kN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:kN.insertedTextDecoration,backgroundColor:`${nP} !important`,color:iP,padding:kN.insertedLinePadding,borderRadius:kN.borderRadious,border:`1px solid ${iP}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:kN.deletedTextDecoration,backgroundColor:rP,color:aP,padding:kN.insertedLinePadding,borderRadius:kN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:kN.deletedTextDecoration,backgroundColor:`${rP} !important`,color:aP,padding:kN.insertedLinePadding,borderRadius:kN.borderRadious,border:`1px solid ${aP}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:ZN,border:`1px solid ${YN}`,borderRadius:IN.borderRadius,padding:IN.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:ZN,border:`none`},"& > ul > li":{padding:IN.padding,lineHeight:IN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#0366d630`,color:RN,borderRadius:IN.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:`#0366d615`},"& > ul > li > span.cm-completionIcon":{color:BN,paddingRight:IN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:BN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ZN,borderBottomColor:ZN},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${XN}`},"&-warning":{borderLeft:`3px solid ${$N}`},"&-info":{borderLeft:`3px solid ${tP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${XN}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${$N}`},".cm-matchingBracket":{backgroundColor:Ope,outline:`1px solid ${kpe}80`,borderRadius:MN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ffeef080`,outline:`1px solid ${XN}`,borderRadius:MN.borderRadius},".cm-selectionMatch":{backgroundColor:eP,outline:`1px solid ${zN}50`,borderRadius:MN.borderRadius},".cm-foldPlaceholder":{backgroundColor:eP,color:BN,border:`1px dotted ${YN}70`,borderRadius:NN.borderRadius,padding:NN.padding,margin:NN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${LN}, 0 0 0 3px ${tP}40`},"& .cm-scroller::-webkit-scrollbar":{width:PN.width,height:PN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:YN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:RN,borderRadius:PN.borderRadius,border:`3px solid ${YN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:HN},".cm-ghostText":{opacity:`0.5`,color:`#959da5`}},{dark:!1}),D(B.define([{tag:A.keyword,color:GN,fontWeight:`bold`},{tag:A.controlKeyword,color:GN,fontWeight:`bold`},{tag:A.moduleKeyword,color:GN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:WN},{tag:[A.variableName],color:WN},{tag:[A.propertyName],color:UN,fontStyle:`normal`},{tag:[A.typeName],color:GN},{tag:[A.className],color:UN,fontStyle:`italic`},{tag:[A.namespace],color:WN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:RN},{tag:[A.bracket],color:HN},{tag:[A.brace],color:HN},{tag:[A.punctuation],color:HN},{tag:[A.function(A.variableName),A.labelName],color:qN},{tag:[A.definition(A.variableName)],color:WN},{tag:A.number,color:JN},{tag:A.changed,color:JN},{tag:A.annotation,color:XN,fontStyle:`italic`},{tag:A.modifier,color:JN,fontStyle:`italic`},{tag:A.self,color:JN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:JN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:JN},{tag:[A.processingInstruction,A.inserted],color:qN},{tag:[A.special(A.string),A.regexp],color:KN},{tag:A.string,color:KN},{tag:A.definition(A.typeName),color:GN,fontWeight:`bold`},{tag:A.meta,color:HN},{tag:A.comment,fontStyle:`italic`,color:HN},{tag:A.docComment,fontStyle:`italic`,color:HN},{tag:[A.tagName],color:Cpe},{tag:[A.attributeName],color:UN},{tag:[A.heading],fontWeight:`bold`,color:WN},{tag:[A.strong],fontWeight:`bold`,color:WN},{tag:[A.emphasis],fontStyle:`italic`,color:KN},{tag:[A.link],color:Ape,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:tP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:RN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${XN}`},{tag:[A.strikethrough],color:XN,textDecoration:`line-through`},{tag:A.constant(A.name),color:JN},{tag:A.deleted,color:XN},{tag:A.squareBracket,color:HN},{tag:A.angleBracket,color:HN},{tag:A.monospace,color:RN},{tag:[A.contentSeparator],color:WN},{tag:A.quote,color:HN}]))],sP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},jpe={borderLeftWidth:`2px`},cP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},lP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},uP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Mpe={borderRadius:`2px`},dP={borderRadius:`2px`},fP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},pP={width:`12px`,height:`12px`,borderRadius:`6px`},mP={borderRadius:`4px`,padding:`2px 6px`},hP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},gP=`#282828`,_P=`#3c3836`,vP=`#504945`,yP=`#665c54`,Npe=`#7c6f64`,bP=`#928374`,xP=`#fbf1c7`,SP=`#ebdbb2`,CP=`#fb4934`,wP=`#b8bb26`,TP=`#fabd2f`,EP=`#83a598`,DP=`#d3869b`,OP=`#8ec07c`,kP=`#fe8019`,AP=CP,Ppe=_P,Fpe=`#3c383660`,Ipe=gP,jP=_P,MP=vP,Lpe=`#665c5480`,NP=kP,Rpe=`#504945cc`,zpe=TP,PP=TP,FP=EP,Bpe=DP,IP=`#32361a80`,LP=`#3c1f1e80`,RP=`#b8bb26`,zP=`#fb4934`,Vpe=[I.theme({"&":{color:SP,backgroundColor:Ipe,fontSize:sP.fontSize,fontFamily:sP.fontFamily},".cm-content":{caretColor:NP,lineHeight:sP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:NP,borderLeftWidth:jpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${NP}99`,color:gP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:MP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#b57614cc`,outline:`1px solid ${TP}`,color:xP,borderRadius:mP.borderRadius,"& span":{color:xP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:kP,color:gP,padding:mP.padding,"& span":{color:gP}},".cm-search.cm-panel.cm-textfield":{color:SP,borderRadius:mP.borderRadius,padding:mP.padding},".cm-panels":{backgroundColor:jP,color:SP,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${yP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${yP}`},".cm-panel button":{backgroundColor:jP,color:SP,border:uP.border,borderRadius:uP.borderRadius,padding:uP.padding},".cm-panel button:hover":{backgroundColor:vP},".cm-activeLine":{backgroundColor:Fpe,borderRadius:Mpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:_P,color:bP,border:lP.border,borderRight:`1px solid ${vP}`,paddingRight:lP.paddingRight},".cm-activeLineGutter":{backgroundColor:Ppe,color:SP,fontWeight:lP.fontWeight},".cm-lineNumbers":{fontSize:lP.fontSize,lineHeight:lP.lineHeight},".cm-foldGutter":{fontSize:lP.fontSize,lineHeight:lP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:bP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:SP},".cm-insertedLine":{textDecoration:cP.insertedTextDecoration,backgroundColor:IP,color:RP,padding:cP.insertedLinePadding,borderRadius:cP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:cP.insertedTextDecoration,backgroundColor:`${IP} !important`,color:RP,padding:cP.insertedLinePadding,borderRadius:cP.borderRadious,border:`1px solid ${RP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:cP.deletedTextDecoration,backgroundColor:LP,color:zP,padding:cP.insertedLinePadding,borderRadius:cP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:cP.deletedTextDecoration,backgroundColor:`${LP} !important`,color:zP,padding:cP.insertedLinePadding,borderRadius:cP.borderRadious,border:`1px solid ${zP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:jP,border:`1px solid ${yP}`,borderRadius:hP.borderRadius,padding:hP.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:jP,border:`none`},"& > ul > li":{padding:hP.padding,lineHeight:hP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:MP,color:xP,borderRadius:hP.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:bP,paddingRight:hP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:bP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:jP,borderBottomColor:jP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${AP}`},"&-warning":{borderLeft:`3px solid ${PP}`},"&-info":{borderLeft:`3px solid ${FP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${AP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${PP}`},".cm-matchingBracket":{backgroundColor:Rpe,outline:`1px solid ${zpe}`,borderRadius:dP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#cc241d55`,outline:`1px solid ${AP}`,borderRadius:dP.borderRadius},".cm-selectionMatch":{backgroundColor:Lpe,outline:`1px solid ${yP}`,borderRadius:dP.borderRadius},".cm-foldPlaceholder":{backgroundColor:jP,color:bP,border:`1px dotted ${yP}`,borderRadius:fP.borderRadius,padding:fP.padding,margin:fP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${gP}, 0 0 0 3px ${kP}40`},"& .cm-scroller::-webkit-scrollbar":{width:pP.width,height:pP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:_P},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:yP,borderRadius:pP.borderRadius,border:`3px solid ${_P}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Npe},".cm-ghostText":{opacity:`0.5`,color:bP}},{dark:!0}),D(B.define([{tag:A.keyword,color:CP,fontWeight:`bold`},{tag:A.controlKeyword,color:CP,fontWeight:`bold`},{tag:A.moduleKeyword,color:CP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:EP},{tag:[A.variableName],color:EP},{tag:[A.propertyName],color:OP,fontStyle:`normal`},{tag:[A.typeName],color:OP},{tag:[A.className],color:TP,fontStyle:`italic`},{tag:[A.namespace],color:EP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:SP},{tag:[A.bracket],color:bP},{tag:[A.brace],color:bP},{tag:[A.punctuation],color:bP},{tag:[A.function(A.variableName),A.labelName],color:TP},{tag:[A.definition(A.variableName)],color:EP},{tag:A.number,color:DP},{tag:A.changed,color:DP},{tag:A.annotation,color:AP,fontStyle:`italic`},{tag:A.modifier,color:DP,fontStyle:`italic`},{tag:A.self,color:DP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:kP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:kP},{tag:[A.processingInstruction,A.inserted],color:wP},{tag:[A.special(A.string),A.regexp],color:wP},{tag:A.string,color:wP},{tag:A.definition(A.typeName),color:OP,fontWeight:`bold`},{tag:A.meta,color:bP},{tag:A.comment,fontStyle:`italic`,color:bP},{tag:A.docComment,fontStyle:`italic`,color:bP},{tag:[A.tagName],color:CP},{tag:[A.attributeName],color:TP},{tag:[A.heading],fontWeight:`bold`,color:TP},{tag:[A.strong],fontWeight:`bold`,color:TP},{tag:[A.emphasis],fontStyle:`italic`,color:wP},{tag:[A.link],color:Bpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:FP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:SP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${AP}`},{tag:[A.strikethrough],color:AP,textDecoration:`line-through`},{tag:A.constant(A.name),color:kP},{tag:A.deleted,color:AP},{tag:A.squareBracket,color:bP},{tag:A.angleBracket,color:bP},{tag:A.monospace,color:SP},{tag:[A.contentSeparator],color:EP},{tag:A.quote,color:bP}]))],BP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Hpe={borderLeftWidth:`2px`},VP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},HP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},UP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Upe={borderRadius:`2px`},WP={borderRadius:`2px`},GP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},KP={width:`12px`,height:`12px`,borderRadius:`6px`},qP={borderRadius:`4px`,padding:`2px 6px`},JP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},YP=`#3c3836`,Wpe=`#504945`,Gpe=`#665c54`,XP=`#7c6f64`,ZP=`#928374`,QP=`#fbf1c7`,$P=`#ebdbb2`,eF=`#d5c4a1`,tF=`#bdae93`,Kpe=`#a89984`,nF=`#9d0006`,rF=`#79740e`,iF=`#b57614`,aF=`#076678`,oF=`#8f3f71`,sF=`#427b58`,cF=`#af3a03`,lF=nF,qpe=$P,Jpe=`#ffc42e25`,Ype=QP,uF=$P,Xpe=qpe,Zpe=`#ffc42e40`,dF=cF,Qpe=`#d5c4a180`,$pe=cF,fF=iF,pF=aF,eme=oF,mF=`#d8e5bc80`,hF=`#f7cfcf80`,gF=`#79740e`,_F=`#9d0006`,tme=[I.theme({"&":{color:YP,backgroundColor:Ype,fontSize:BP.fontSize,fontFamily:BP.fontFamily},".cm-content":{caretColor:dF,lineHeight:BP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:dF,borderLeftWidth:Hpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${dF}99`,color:QP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Xpe,color:YP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#ffc42e80`,outline:`1px solid ${cF}`,color:YP,borderRadius:qP.borderRadius,"& span":{color:YP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:cF,color:QP,padding:qP.padding,"& span":{color:QP}},".cm-search.cm-panel.cm-textfield":{color:YP,borderRadius:qP.borderRadius,padding:qP.padding},".cm-panels":{backgroundColor:$P,color:Wpe,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${tF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${tF}`},".cm-panel button":{backgroundColor:QP,color:YP,border:UP.border,borderRadius:UP.borderRadius,padding:UP.padding},".cm-panel button:hover":{backgroundColor:eF},".cm-activeLine":{backgroundColor:Jpe,borderRadius:Upe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:$P,color:XP,border:HP.border,borderRight:`1px solid ${tF}`,paddingRight:HP.paddingRight},".cm-activeLineGutter":{backgroundColor:eF,color:YP,fontWeight:HP.fontWeight},".cm-lineNumbers":{fontSize:HP.fontSize,lineHeight:HP.lineHeight},".cm-foldGutter":{fontSize:HP.fontSize,lineHeight:HP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:XP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:YP},".cm-insertedLine":{textDecoration:VP.insertedTextDecoration,backgroundColor:mF,color:gF,padding:VP.insertedLinePadding,borderRadius:VP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:VP.insertedTextDecoration,backgroundColor:`${mF} !important`,color:gF,padding:VP.insertedLinePadding,borderRadius:VP.borderRadious,border:`1px solid ${gF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:VP.deletedTextDecoration,backgroundColor:hF,color:_F,padding:VP.insertedLinePadding,borderRadius:VP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:VP.deletedTextDecoration,backgroundColor:`${hF} !important`,color:_F,padding:VP.insertedLinePadding,borderRadius:VP.borderRadious,border:`1px solid ${_F}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:uF,border:`1px solid ${tF}`,borderRadius:JP.borderRadius,padding:JP.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:uF,border:`none`},"& > ul > li":{padding:JP.padding,lineHeight:JP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:cF+`30`,color:YP,borderRadius:JP.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:cF+`15`},"& > ul > li > span.cm-completionIcon":{color:XP,paddingRight:JP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:XP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:uF,borderBottomColor:uF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${lF}`},"&-warning":{borderLeft:`3px solid ${fF}`},"&-info":{borderLeft:`3px solid ${pF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${lF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${fF}`},".cm-matchingBracket":{backgroundColor:Qpe,outline:`1px solid ${$pe}`,borderRadius:WP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#fb492740`,outline:`1px solid ${lF}`,borderRadius:WP.borderRadius},".cm-selectionMatch":{backgroundColor:Zpe,outline:`1px solid ${tF}`,borderRadius:WP.borderRadius},".cm-foldPlaceholder":{backgroundColor:`transparent`,color:Gpe,border:`1px dotted ${tF}`,borderRadius:GP.borderRadius,padding:GP.padding,margin:GP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${QP}, 0 0 0 3px ${cF}40`},"& .cm-scroller::-webkit-scrollbar":{width:KP.width,height:KP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:QP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:tF,borderRadius:KP.borderRadius,border:`3px solid ${QP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Kpe},".cm-ghostText":{opacity:`0.5`,color:ZP}},{dark:!1}),D(B.define([{tag:A.keyword,color:nF,fontWeight:`bold`},{tag:A.controlKeyword,color:nF,fontWeight:`bold`},{tag:A.moduleKeyword,color:nF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:aF},{tag:[A.variableName],color:aF},{tag:[A.propertyName],color:sF,fontStyle:`normal`},{tag:[A.typeName],color:sF},{tag:[A.className],color:iF,fontStyle:`italic`},{tag:[A.namespace],color:aF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:YP},{tag:[A.bracket],color:ZP},{tag:[A.brace],color:ZP},{tag:[A.punctuation],color:ZP},{tag:[A.function(A.variableName),A.labelName],color:iF},{tag:[A.definition(A.variableName)],color:aF},{tag:A.number,color:oF},{tag:A.changed,color:oF},{tag:A.annotation,color:lF,fontStyle:`italic`},{tag:A.modifier,color:oF,fontStyle:`italic`},{tag:A.self,color:oF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:cF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:cF},{tag:[A.processingInstruction,A.inserted],color:rF},{tag:[A.special(A.string),A.regexp],color:rF},{tag:A.string,color:rF},{tag:A.definition(A.typeName),color:sF,fontWeight:`bold`},{tag:A.meta,color:ZP},{tag:A.comment,fontStyle:`italic`,color:ZP},{tag:A.docComment,fontStyle:`italic`,color:ZP},{tag:[A.tagName],color:nF},{tag:[A.attributeName],color:iF},{tag:[A.heading],fontWeight:`bold`,color:iF},{tag:[A.strong],fontWeight:`bold`,color:iF},{tag:[A.emphasis],fontStyle:`italic`,color:rF},{tag:[A.link],color:eme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:pF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:YP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${lF}`},{tag:[A.strikethrough],color:lF,textDecoration:`line-through`},{tag:A.constant(A.name),color:cF},{tag:A.deleted,color:lF},{tag:A.squareBracket,color:ZP},{tag:A.angleBracket,color:ZP},{tag:A.monospace,color:YP},{tag:[A.contentSeparator],color:aF},{tag:A.quote,color:ZP}]))],vF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},nme={borderLeftWidth:`2px`},yF={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},bF={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},xF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},rme={borderRadius:`2px`},SF={borderRadius:`2px`},CF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},wF={width:`12px`,height:`12px`,borderRadius:`6px`},TF={borderRadius:`4px`,padding:`2px 6px`},EF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},DF=`#212121`,OF=`#505d64`,kF=`#606f7a`,AF=`#707d8b`,ime=`#a0a4ae`,jF=`#bdbdbd`,MF=`#e0e0e0`,ame=`#202325`,NF=`#ff5f52`,PF=`#ff6e40`,ome=`#fa5788`,FF=`#facf4e`,IF=`#ffad42`,LF=`#56c8d8`,RF=`#7186f0`,zF=`#cf6edf`,sme=`#6abf69`,cme=`#99d066`,lme=`#4ebaaa`,BF=NF,VF=ame,ume=`#2d333b30`,HF=DF,UF=OF,WF=`#ffffff1f`,dme=`#4A707A80`,GF=ime,fme=`#39496650`,pme=LF,KF=IF,qF=LF,mme=zF,JF=`#1e3d2780`,YF=`#4e282880`,XF=`#6abf69`,ZF=`#ff5f52`,hme=[I.theme({"&":{color:jF,backgroundColor:HF,fontSize:vF.fontSize,fontFamily:vF.fontFamily},".cm-content":{caretColor:GF,lineHeight:vF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:GF,borderLeftWidth:nme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${GF}99`,color:HF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:WF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#394966cc`,outline:`1px solid ${LF}`,color:MF,borderRadius:TF.borderRadius,"& span":{color:MF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:LF,color:HF,padding:TF.padding,"& span":{color:HF}},".cm-search.cm-panel.cm-textfield":{color:jF,borderRadius:TF.borderRadius,padding:TF.padding},".cm-panels":{backgroundColor:DF,color:jF,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${AF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${AF}`},".cm-panel button":{backgroundColor:UF,color:jF,border:xF.border,borderRadius:xF.borderRadius,padding:xF.padding},".cm-panel button:hover":{backgroundColor:kF},".cm-activeLine":{backgroundColor:ume,borderRadius:rme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:VF,color:AF,border:bF.border,borderRight:`1px solid ${OF}`,paddingRight:bF.paddingRight},".cm-activeLineGutter":{backgroundColor:`#252a2c`,color:jF,fontWeight:bF.fontWeight},".cm-lineNumbers":{fontSize:bF.fontSize,lineHeight:bF.lineHeight},".cm-foldGutter":{fontSize:bF.fontSize,lineHeight:bF.lineHeight},".cm-foldGutter .cm-gutterElement":{color:AF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:jF},".cm-insertedLine":{textDecoration:yF.insertedTextDecoration,backgroundColor:JF,color:XF,padding:yF.insertedLinePadding,borderRadius:yF.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:yF.insertedTextDecoration,backgroundColor:`${JF} !important`,color:XF,padding:yF.insertedLinePadding,borderRadius:yF.borderRadious,border:`1px solid ${XF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:yF.deletedTextDecoration,backgroundColor:YF,color:ZF,padding:yF.insertedLinePadding,borderRadius:yF.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:yF.deletedTextDecoration,backgroundColor:`${YF} !important`,color:ZF,padding:yF.insertedLinePadding,borderRadius:yF.borderRadious,border:`1px solid ${ZF}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:UF,border:`1px solid ${AF}`,borderRadius:EF.borderRadius,padding:EF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:UF,border:`none`},"& > ul > li":{padding:EF.padding,lineHeight:EF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:WF,color:MF,borderRadius:EF.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:AF,paddingRight:EF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:AF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:UF,borderBottomColor:UF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${BF}`},"&-warning":{borderLeft:`3px solid ${KF}`},"&-info":{borderLeft:`3px solid ${qF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${BF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${KF}`},".cm-matchingBracket":{backgroundColor:fme,outline:`1px solid ${pme}`,borderRadius:SF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ff5f5240`,outline:`1px solid ${BF}`,borderRadius:SF.borderRadius},".cm-selectionMatch":{backgroundColor:dme,outline:`1px solid ${kF}50`,borderRadius:SF.borderRadius},".cm-foldPlaceholder":{backgroundColor:UF,color:AF,border:`1px dotted ${AF}70`,borderRadius:CF.borderRadius,padding:CF.padding,margin:CF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${HF}, 0 0 0 3px ${LF}40`},"& .cm-scroller::-webkit-scrollbar":{width:wF.width,height:wF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:VF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:kF,borderRadius:wF.borderRadius,border:`3px solid ${VF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:AF},".cm-ghostText":{opacity:`0.5`,color:AF}},{dark:!0}),D(B.define([{tag:A.keyword,color:NF,fontWeight:`bold`},{tag:A.controlKeyword,color:NF,fontWeight:`bold`},{tag:A.moduleKeyword,color:NF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:RF},{tag:[A.variableName],color:cme},{tag:[A.propertyName],color:zF,fontStyle:`normal`},{tag:[A.typeName],color:NF},{tag:[A.className],color:FF,fontStyle:`italic`},{tag:[A.namespace],color:RF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:jF},{tag:[A.bracket],color:AF},{tag:[A.brace],color:AF},{tag:[A.punctuation],color:AF},{tag:[A.function(A.variableName)],color:LF},{tag:[A.labelName],color:LF,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:LF},{tag:[A.definition(A.variableName)],color:RF},{tag:A.number,color:FF},{tag:A.changed,color:FF},{tag:A.annotation,color:BF,fontStyle:`italic`},{tag:A.modifier,color:PF,fontStyle:`italic`},{tag:A.self,color:PF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:PF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:PF},{tag:[A.processingInstruction,A.inserted],color:sme},{tag:[A.special(A.string),A.regexp],color:ome},{tag:A.string,color:IF},{tag:A.definition(A.typeName),color:NF,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:zF},{tag:[A.attributeName],color:FF},{tag:[A.heading],fontWeight:`bold`,color:lme},{tag:A.heading1,color:FF},{tag:A.heading2,color:IF},{tag:A.heading3,color:LF},{tag:A.heading4,color:RF},{tag:A.heading5,color:zF},{tag:A.heading6,color:NF},{tag:[A.strong],fontWeight:`bold`,color:RF},{tag:[A.emphasis],fontStyle:`italic`,color:IF},{tag:[A.link],color:mme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:qF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:jF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${BF}`},{tag:[A.strikethrough],color:BF,textDecoration:`line-through`},{tag:A.constant(A.name),color:PF},{tag:A.deleted,color:BF},{tag:A.squareBracket,color:AF},{tag:A.angleBracket,color:AF},{tag:A.monospace,color:jF},{tag:[A.contentSeparator],color:RF},{tag:A.quote,color:AF}]))],QF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},gme={borderLeftWidth:`2px`},$F={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},eI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},tI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},_me={borderRadius:`2px`},nI={borderRadius:`2px`},rI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},iI={width:`12px`,height:`12px`,borderRadius:`6px`},aI={borderRadius:`4px`,padding:`2px 6px`},oI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},vme=`#ffffff`,sI=`#f5f5f5`,cI=`#212121`,lI=`#757575`,uI=`#9e9e9e`,dI=`#424242`,yme=`#eeeeee`,fI=`#fafafa`,pI=`#f44336`,mI=`#ff3e00`,hI=`#FF00E9FF`,bme=`#ffc107`,gI=`#ff9800`,_I=`#00acc1`,vI=`#3949ab`,yI=`#8e24aa`,bI=`#43a047`,xI=`#00897b`,SI=`#1e88e5`,CI=pI,xme=`#00000008`,wI=vme,TI=sI,Sme=`#DDEEFF`,Cme=`#90a4ae26`,EI=uI,wme=`#DDEEFF80`,Tme=_I,DI=gI,OI=_I,Eme=yI,kI=`#ECEFF180`,AI=`#e6ffed80`,jI=`#ffebe980`,MI=`#28a745`,NI=`#d73a49`,Dme=[I.theme({"&":{color:cI,backgroundColor:wI,fontSize:QF.fontSize,fontFamily:QF.fontFamily},".cm-content":{caretColor:EI,lineHeight:QF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:EI,borderLeftWidth:gme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${cI}99`,color:wI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Sme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#FFA72680`,outline:`1px solid ${bme}`,color:cI,borderRadius:aI.borderRadius,"& span":{color:cI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:_I,color:wI,padding:aI.padding,"& span":{color:wI}},".cm-search.cm-panel.cm-textfield":{color:cI,borderRadius:aI.borderRadius,padding:aI.padding},".cm-panels":{backgroundColor:yme,color:cI,borderRadius:`4px`,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${uI}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${uI}`},".cm-panel button":{backgroundColor:TI,color:cI,border:tI.border,borderRadius:tI.borderRadius,padding:tI.padding},".cm-panel button:hover":{backgroundColor:`#CFD8DC`},".cm-activeLine":{backgroundColor:xme,borderRadius:_me.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:fI,color:lI,border:eI.border,borderRight:`1px solid ${uI}`,paddingRight:eI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#E0E0E0`,color:cI,fontWeight:eI.fontWeight},".cm-lineNumbers":{fontSize:eI.fontSize,lineHeight:eI.lineHeight},".cm-foldGutter":{fontSize:eI.fontSize,lineHeight:eI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:lI,cursor:`pointer`,transition:`color 0.15s ease`},".cm-foldGutter .cm-gutterElement:hover":{color:cI},".cm-insertedLine":{textDecoration:$F.insertedTextDecoration,backgroundColor:AI,color:MI,padding:$F.insertedLinePadding,borderRadius:$F.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:$F.insertedTextDecoration,backgroundColor:`${AI} !important`,color:MI,padding:$F.insertedLinePadding,borderRadius:$F.borderRadious,border:`1px solid ${MI}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:$F.deletedTextDecoration,backgroundColor:jI,color:NI,padding:$F.insertedLinePadding,borderRadius:$F.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:$F.deletedTextDecoration,backgroundColor:`${jI} !important`,color:NI,padding:$F.insertedLinePadding,borderRadius:$F.borderRadious,border:`1px solid ${NI}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:TI,border:`1px solid ${uI}`,borderRadius:oI.borderRadius,padding:oI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:TI,border:`none`},"& > ul > li":{padding:oI.padding,lineHeight:oI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:kI,color:cI,borderRadius:oI.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:kI},"& > ul > li > span.cm-completionIcon":{color:lI,paddingRight:oI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:lI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:TI,borderBottomColor:TI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${CI}`},"&-warning":{borderLeft:`3px solid ${DI}`},"&-info":{borderLeft:`3px solid ${OI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${CI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${DI}`},".cm-matchingBracket":{backgroundColor:wme,outline:`1px solid ${Tme}`,borderRadius:nI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${CI}20`,outline:`1px solid ${CI}`,borderRadius:nI.borderRadius},".cm-selectionMatch":{backgroundColor:Cme,outline:`1px solid ${lI}30`,borderRadius:nI.borderRadius},".cm-foldPlaceholder":{backgroundColor:sI,color:lI,border:`1px dotted ${lI}70`,borderRadius:rI.borderRadius,padding:rI.padding,margin:rI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${wI}, 0 0 0 3px ${_I}40`},"& .cm-scroller::-webkit-scrollbar":{width:iI.width,height:iI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:fI},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:lI,borderRadius:iI.borderRadius,border:`3px solid ${fI}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:cI},".cm-ghostText":{opacity:`0.5`,color:lI}},{dark:!1}),D(B.define([{tag:A.keyword,color:_I,fontWeight:`bold`},{tag:A.controlKeyword,color:_I,fontWeight:`bold`},{tag:A.moduleKeyword,color:_I,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:dI},{tag:[A.variableName],color:dI},{tag:[A.propertyName],color:xI,fontStyle:`normal`},{tag:[A.typeName],color:gI},{tag:[A.className],color:gI,fontStyle:`italic`},{tag:[A.namespace],color:vI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:vI},{tag:[A.bracket],color:yI},{tag:[A.brace],color:yI},{tag:[A.punctuation],color:lI},{tag:[A.function(A.variableName)],color:mI},{tag:[A.labelName],color:SI,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:mI},{tag:[A.definition(A.variableName)],color:hI},{tag:A.number,color:gI},{tag:A.changed,color:gI},{tag:A.annotation,color:CI,fontStyle:`italic`},{tag:A.modifier,color:gI,fontStyle:`italic`},{tag:A.self,color:gI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:gI},{tag:[A.atom,A.bool],color:yI},{tag:[A.processingInstruction,A.inserted],color:bI},{tag:A.string,color:bI},{tag:[A.special(A.string),A.regexp],color:hI},{tag:A.definition(A.typeName),color:hI,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:hI},{tag:A.meta,color:lI},{tag:A.comment,fontStyle:`italic`,color:lI},{tag:A.docComment,fontStyle:`italic`,color:lI},{tag:[A.tagName],color:mI},{tag:[A.attributeName],color:dI},{tag:[A.heading],fontWeight:`bold`,color:xI},{tag:A.heading1,color:SI},{tag:A.heading2,color:gI},{tag:A.heading3,color:_I},{tag:A.heading4,color:vI},{tag:A.heading5,color:yI},{tag:A.heading6,color:bI},{tag:[A.strong],fontWeight:`bold`,color:vI},{tag:[A.emphasis],fontStyle:`italic`,color:gI},{tag:[A.link],color:Eme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:OI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:cI,textDecoration:`underline wavy`,borderBottom:`1px dotted ${pI}`},{tag:[A.strikethrough],color:CI,textDecoration:`line-through`},{tag:A.constant(A.name),color:mI},{tag:A.deleted,color:CI},{tag:A.squareBracket,color:pI},{tag:A.angleBracket,color:cI},{tag:A.monospace,color:cI},{tag:[A.contentSeparator],color:_I},{tag:A.quote,color:bI}]))],PI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Ome={borderLeftWidth:`2px`},FI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},II={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},LI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},kme={borderRadius:`2px`},RI={borderRadius:`2px`},zI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},BI={width:`12px`,height:`12px`,borderRadius:`6px`},VI={borderRadius:`4px`,padding:`2px 6px`},HI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},UI=`#272822`,WI=`#f8f8f2`,GI=`#88846f`,Ame=`#f8f8f0`,KI=`#F92672`,qI=`#FD971F`,JI=`#66D9EF`,YI=`#E6DB74`,XI=`#AE81FF`,ZI=`#A6E22E`,QI=`#F44747`,$I=`#414339`,jme=`#3e3d3257`,eL=`#34352f`,tL=`#49483E`,Mme=`#75715e70`,nL=Ame,Nme=`#75715E55`,Pme=JI,rL=qI,iL=JI,Fme=XI,aL=`#3d4d3880`,oL=`#4d393980`,sL=`#A6E22E`,cL=`#F92672`,Ime=[I.theme({"&":{color:WI,backgroundColor:UI,fontSize:PI.fontSize,fontFamily:PI.fontFamily},".cm-content":{caretColor:nL,lineHeight:PI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:nL,borderLeftWidth:Ome.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${nL}99`,color:UI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:tL},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#49483E99`,outline:`1px solid ${YI}`,color:WI,borderRadius:VI.borderRadius,"& span":{color:WI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:KI,color:UI,padding:VI.padding,"& span":{color:UI}},".cm-search.cm-panel.cm-textfield":{color:WI,borderRadius:VI.borderRadius,padding:VI.padding},".cm-panels":{backgroundColor:$I,color:WI,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${GI}80`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${GI}80`},".cm-panel button":{backgroundColor:eL,color:WI,border:LI.border,borderRadius:LI.borderRadius,padding:LI.padding},".cm-panel button:hover":{backgroundColor:`#49483E`},".cm-activeLine":{backgroundColor:jme,borderRadius:kme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:$I,color:GI,border:II.border,borderRight:`1px solid #3e3d32`,paddingRight:II.paddingRight},".cm-activeLineGutter":{backgroundColor:`#35352c`,color:WI,fontWeight:II.fontWeight},".cm-lineNumbers":{fontSize:II.fontSize,lineHeight:II.lineHeight},".cm-foldGutter":{fontSize:II.fontSize,lineHeight:II.lineHeight},".cm-foldGutter .cm-gutterElement":{color:GI,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:WI},".cm-insertedLine":{textDecoration:FI.insertedTextDecoration,backgroundColor:aL,color:sL,padding:FI.insertedLinePadding,borderRadius:FI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:FI.insertedTextDecoration,backgroundColor:`${aL} !important`,color:sL,padding:FI.insertedLinePadding,borderRadius:FI.borderRadious,border:`1px solid ${sL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:FI.deletedTextDecoration,backgroundColor:oL,color:cL,padding:FI.insertedLinePadding,borderRadius:FI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:FI.deletedTextDecoration,backgroundColor:`${oL} !important`,color:cL,padding:FI.insertedLinePadding,borderRadius:FI.borderRadious,border:`1px solid ${cL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:eL,border:`1px solid #49483E`,borderRadius:HI.borderRadius,padding:HI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.4)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:eL,border:`none`},"& > ul > li":{padding:HI.padding,lineHeight:HI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:tL,color:WI,borderRadius:HI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:GI,paddingRight:HI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:GI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:eL,borderBottomColor:eL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${QI}`},"&-warning":{borderLeft:`3px solid ${rL}`},"&-info":{borderLeft:`3px solid ${iL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${QI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${rL}`},".cm-matchingBracket":{backgroundColor:Nme,outline:`1px solid ${Pme}`,borderRadius:RI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9267240`,outline:`1px solid ${QI}`,borderRadius:RI.borderRadius},".cm-selectionMatch":{backgroundColor:Mme,outline:`1px solid ${GI}50`,borderRadius:RI.borderRadius},".cm-foldPlaceholder":{backgroundColor:eL,color:GI,border:`1px dotted ${GI}70`,borderRadius:zI.borderRadius,padding:zI.padding,margin:zI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${UI}, 0 0 0 3px ${JI}40`},"& .cm-scroller::-webkit-scrollbar":{width:BI.width,height:BI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:$I},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#49483E`,borderRadius:BI.borderRadius,border:`3px solid ${$I}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#5a594d`},".cm-ghostText":{opacity:`0.5`,color:GI}},{dark:!0}),D(B.define([{tag:A.keyword,color:KI,fontWeight:`bold`},{tag:A.controlKeyword,color:KI,fontWeight:`bold`},{tag:A.moduleKeyword,color:KI,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:qI},{tag:[A.variableName],color:qI},{tag:[A.propertyName],color:ZI,fontStyle:`normal`},{tag:[A.typeName],color:JI,fontStyle:`italic`},{tag:[A.className],color:ZI,fontStyle:`italic`},{tag:[A.namespace],color:qI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:KI},{tag:[A.bracket],color:WI},{tag:[A.brace],color:WI},{tag:[A.punctuation],color:WI},{tag:[A.function(A.variableName),A.labelName],color:JI},{tag:[A.definition(A.function(A.variableName))],color:JI},{tag:[A.definition(A.variableName)],color:qI},{tag:A.number,color:XI},{tag:A.changed,color:XI},{tag:A.annotation,color:QI,fontStyle:`italic`},{tag:A.modifier,color:XI,fontStyle:`italic`},{tag:A.self,color:XI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:XI},{tag:[A.atom,A.bool,A.special(A.variableName)],color:XI},{tag:[A.processingInstruction,A.inserted],color:ZI},{tag:[A.special(A.string),A.regexp],color:YI},{tag:A.string,color:YI},{tag:A.definition(A.typeName),color:JI,fontWeight:`bold`},{tag:A.meta,color:GI},{tag:A.comment,fontStyle:`italic`,color:GI},{tag:A.docComment,fontStyle:`italic`,color:GI},{tag:[A.tagName],color:KI},{tag:[A.attributeName],color:ZI},{tag:[A.heading],fontWeight:`bold`,color:ZI},{tag:[A.strong],fontWeight:`bold`,color:qI},{tag:[A.emphasis],fontStyle:`italic`,color:qI},{tag:[A.link],color:Fme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:iL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:WI,textDecoration:`underline wavy`,borderBottom:`1px wavy ${QI}`},{tag:[A.strikethrough],color:QI,textDecoration:`line-through`},{tag:A.constant(A.name),color:XI},{tag:A.deleted,color:QI},{tag:A.squareBracket,color:WI},{tag:A.angleBracket,color:WI},{tag:A.monospace,color:WI},{tag:[A.contentSeparator],color:qI},{tag:A.quote,color:GI}]))],lL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Lme={borderLeftWidth:`2px`},uL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},dL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},fL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Rme={borderRadius:`2px`},pL={borderRadius:`2px`},mL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},hL={width:`12px`,height:`12px`,borderRadius:`6px`},gL={borderRadius:`4px`,padding:`2px 6px`},_L={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},zme=`#2e3440`,vL=`#3b4252`,yL=`#434c5e`,bL=`#4c566a`,xL=`#d8dee9`,SL=`#eceff4`,CL=`#8fbcbb`,wL=`#88c0d0`,TL=`#81a1c1`,EL=`#5e81ac`,DL=`#bf616a`,OL=`#d08770`,kL=`#ebcb8b`,AL=`#a3be8c`,jL=`#b48ead`,Bme=`#d30102`,ML=`#252a33`,Vme=`#3b425277`,NL=zme,PL=vL,Hme=yL,Ume=`#4c566a80`,FL=xL,Wme=`#4c566a55`,Gme=wL,IL=kL,LL=TL,Kme=jL,RL=`#3b4a3880`,zL=`#4a393a80`,BL=`#a3be8c`,VL=`#bf616a`,qme=[I.theme({"&":{color:xL,backgroundColor:NL,fontSize:lL.fontSize,fontFamily:lL.fontFamily},".cm-content":{caretColor:FL,lineHeight:lL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:FL,borderLeftWidth:Lme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${FL}99`,color:NL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Hme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#5e81ac80`,outline:`1px solid ${CL}`,color:xL,borderRadius:gL.borderRadius,"& span":{color:xL}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:TL,color:SL,padding:gL.padding,"& span":{color:SL}},".cm-search.cm-panel.cm-textfield":{color:xL,borderRadius:gL.borderRadius,padding:gL.padding},".cm-panels":{backgroundColor:ML,color:xL,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${bL}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${bL}`},".cm-panel button":{backgroundColor:PL,color:xL,border:fL.border,borderRadius:fL.borderRadius,padding:fL.padding},".cm-panel button:hover":{backgroundColor:yL},".cm-activeLine":{backgroundColor:Vme,borderRadius:Rme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:ML,color:bL,border:dL.border,borderRight:`1px solid ${yL}`,paddingRight:dL.paddingRight},".cm-activeLineGutter":{backgroundColor:vL,color:xL,fontWeight:dL.fontWeight},".cm-lineNumbers":{fontSize:dL.fontSize,lineHeight:dL.lineHeight},".cm-foldGutter":{fontSize:dL.fontSize,lineHeight:dL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:bL,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:xL},".cm-insertedLine":{textDecoration:uL.insertedTextDecoration,backgroundColor:RL,color:BL,padding:uL.insertedLinePadding,borderRadius:uL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:uL.insertedTextDecoration,backgroundColor:`${RL} !important`,color:BL,padding:uL.insertedLinePadding,borderRadius:uL.borderRadious,border:`1px solid ${BL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:uL.deletedTextDecoration,backgroundColor:zL,color:VL,padding:uL.insertedLinePadding,borderRadius:uL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:uL.deletedTextDecoration,backgroundColor:`${zL} !important`,color:VL,padding:uL.insertedLinePadding,borderRadius:uL.borderRadious,border:`1px solid ${VL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:PL,border:`1px solid ${bL}`,borderRadius:_L.borderRadius,padding:_L.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:PL,border:`none`},"& > ul > li":{padding:_L.padding,lineHeight:_L.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:yL,color:SL,borderRadius:_L.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:bL,paddingRight:_L.paddingRight},"& > ul > li > span.cm-completionDetail":{color:bL,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:PL,borderBottomColor:PL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${DL}`},"&-warning":{borderLeft:`3px solid ${IL}`},"&-info":{borderLeft:`3px solid ${LL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${DL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${IL}`},".cm-matchingBracket":{backgroundColor:Wme,outline:`1px solid ${Gme}`,borderRadius:pL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${DL}40`,outline:`1px solid ${Bme}`,borderRadius:pL.borderRadius},".cm-selectionMatch":{backgroundColor:Ume,outline:`1px solid ${yL}50`,borderRadius:pL.borderRadius},".cm-foldPlaceholder":{backgroundColor:PL,color:bL,border:`1px dotted ${bL}70`,borderRadius:mL.borderRadius,padding:mL.padding,margin:mL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${NL}, 0 0 0 3px ${wL}40`},"& .cm-scroller::-webkit-scrollbar":{width:hL.width,height:hL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:ML},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:yL,borderRadius:hL.borderRadius,border:`3px solid ${ML}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:bL},".cm-ghostText":{opacity:`0.5`,color:bL}},{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:wL},{tag:[A.variableName],color:xL},{tag:[A.propertyName],color:wL,fontStyle:`normal`},{tag:[A.typeName],color:kL},{tag:[A.className],color:kL,fontStyle:`italic`},{tag:[A.namespace],color:TL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:jL},{tag:[A.bracket],color:xL},{tag:[A.brace],color:CL},{tag:[A.punctuation],color:xL},{tag:[A.function(A.variableName),A.labelName],color:CL},{tag:[A.definition(A.function(A.variableName))],color:CL},{tag:[A.definition(A.variableName)],color:OL},{tag:A.number,color:OL},{tag:A.changed,color:jL},{tag:A.annotation,color:DL,fontStyle:`italic`},{tag:A.modifier,color:jL,fontStyle:`italic`},{tag:A.self,color:jL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:OL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:jL},{tag:[A.processingInstruction,A.inserted],color:CL},{tag:[A.special(A.string),A.regexp],color:jL},{tag:A.string,color:AL},{tag:A.definition(A.typeName),color:kL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:AL},{tag:A.meta,color:bL},{tag:A.comment,fontStyle:`italic`,color:bL},{tag:A.docComment,fontStyle:`italic`,color:bL},{tag:[A.tagName],color:DL},{tag:[A.attributeName],color:kL},{tag:[A.heading],fontWeight:`bold`,color:TL},{tag:[A.strong],fontWeight:`bold`,color:wL},{tag:[A.emphasis],fontStyle:`italic`,color:kL},{tag:[A.link],color:Kme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:LL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:xL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${DL}`},{tag:[A.strikethrough],color:DL,textDecoration:`line-through`},{tag:A.constant(A.name),color:OL},{tag:A.deleted,color:DL},{tag:A.squareBracket,color:DL},{tag:A.angleBracket,color:OL},{tag:A.monospace,color:xL,fontStyle:`italic`},{tag:[A.contentSeparator],color:TL},{tag:A.quote,color:jL}]))],HL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Jme={borderLeftWidth:`2px`},UL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},WL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},GL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Yme={borderRadius:`2px`},KL={borderRadius:`2px`},qL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},JL={width:`12px`,height:`12px`,borderRadius:`6px`},YL={borderRadius:`4px`,padding:`2px 6px`},XL={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Xme=`#e1e2e7`,ZL=`#3760bf`,QL=`#99a7df`,$L=`#848cb5`,Zme=`#8c91a8`,eR=`#3760bf`,tR=`#e9e9ec`,nR=`#d5d6db`,rR=`#f52a65`,iR=`#b15c00`,aR=`#8c6c3e`,oR=`#587539`,sR=`#007197`,cR=`#2e7de9`,lR=`#7847bd`,Qme=`#9854f1`,uR=rR,dR=nR,$me=`#5F5FAF5A`,fR=Xme,pR=tR,mR=`#99a7df40`,ehe=`#99a7df60`,hR=ZL,the=`#0e639c20`,nhe=sR,gR=iR,_R=sR,rhe=lR,vR=`#58753920`,yR=`#f52a6520`,bR=`#587539`,xR=`#f52a65`,ihe=[I.theme({"&":{color:eR,backgroundColor:fR,fontSize:HL.fontSize,fontFamily:HL.fontFamily},".cm-content":{caretColor:hR,lineHeight:HL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:hR,borderLeftWidth:Jme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${hR}99`,color:fR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:mR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#0e639c40`,outline:`1px solid ${sR}`,color:eR,borderRadius:YL.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:sR,color:fR,padding:YL.padding,"& span":{color:fR}},".cm-search.cm-panel.cm-textfield":{color:eR,borderRadius:YL.borderRadius,padding:YL.padding},".cm-panels":{backgroundColor:tR,color:eR,borderRadius:`4px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.1)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${$L}30`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${$L}30`},".cm-panel button":{backgroundColor:pR,color:eR,border:GL.border,borderRadius:GL.borderRadius,padding:GL.padding},".cm-panel button:hover":{backgroundColor:nR,border:`1px solid ${QL}`},".cm-activeLine":{backgroundColor:$me,borderRadius:Yme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:dR,color:$L,border:WL.border,borderRight:`1px solid ${nR}`,paddingRight:WL.paddingRight},".cm-activeLineGutter":{color:ZL,fontWeight:WL.fontWeight},".cm-lineNumbers":{fontSize:WL.fontSize,lineHeight:WL.lineHeight},".cm-foldGutter":{fontSize:WL.fontSize,lineHeight:WL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:$L,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:ZL},".cm-insertedLine":{textDecoration:UL.insertedTextDecoration,backgroundColor:vR,color:bR,padding:UL.insertedLinePadding,borderRadius:UL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:UL.insertedTextDecoration,backgroundColor:`${vR} !important`,color:bR,padding:UL.insertedLinePadding,borderRadius:UL.borderRadious,border:`1px solid ${bR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:UL.deletedTextDecoration,backgroundColor:yR,color:xR,padding:UL.insertedLinePadding,borderRadius:UL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:UL.deletedTextDecoration,backgroundColor:`${yR} !important`,color:xR,padding:UL.insertedLinePadding,borderRadius:UL.borderRadious,border:`1px solid ${xR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:pR,border:`1px solid ${Zme}40`,borderRadius:XL.borderRadius,padding:XL.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:pR,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:XL.padding,lineHeight:XL.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:mR,color:ZL,borderRadius:XL.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:$L,paddingRight:XL.paddingRight},"& > ul > li > span.cm-completionDetail":{color:$L,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:pR,borderBottomColor:pR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${uR}`},"&-warning":{borderLeft:`3px solid ${gR}`},"&-info":{borderLeft:`3px solid ${_R}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${uR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${gR}`},".cm-matchingBracket":{backgroundColor:the,outline:`1px solid ${nhe}`,borderRadius:KL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${rR}20`,outline:`1px solid ${uR}`,borderRadius:KL.borderRadius},".cm-selectionMatch":{backgroundColor:ehe,outline:`1px solid ${QL}50`,borderRadius:KL.borderRadius},".cm-foldPlaceholder":{backgroundColor:pR,color:$L,border:`1px dotted ${$L}70`,borderRadius:qL.borderRadius,padding:qL.padding,margin:qL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${fR}, 0 0 0 3px ${sR}40`},"& .cm-scroller::-webkit-scrollbar":{width:JL.width,height:JL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:dR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:$L,borderRadius:JL.borderRadius,border:`3px solid ${dR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:QL},".cm-ghostText":{opacity:`0.5`,color:$L}},{dark:!1}),D(B.define([{tag:A.keyword,color:sR,fontWeight:`bold`},{tag:A.controlKeyword,color:sR,fontWeight:`bold`},{tag:A.moduleKeyword,color:sR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:cR},{tag:[A.variableName],color:ZL},{tag:[A.propertyName],color:cR,fontStyle:`normal`},{tag:[A.typeName],color:sR},{tag:[A.className],color:aR,fontStyle:`italic`},{tag:[A.namespace],color:lR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:lR},{tag:[A.bracket],color:$L},{tag:[A.brace],color:$L},{tag:[A.punctuation],color:$L},{tag:[A.function(A.variableName)],color:sR},{tag:[A.labelName],color:lR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:sR},{tag:[A.definition(A.variableName)],color:cR},{tag:A.number,color:iR},{tag:A.changed,color:iR},{tag:A.annotation,color:uR,fontStyle:`italic`},{tag:A.modifier,color:iR,fontStyle:`italic`},{tag:A.self,color:iR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:iR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:iR},{tag:[A.processingInstruction,A.inserted],color:oR},{tag:[A.special(A.string),A.regexp],color:Qme},{tag:A.string,color:oR},{tag:A.definition(A.typeName),color:sR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:cR},{tag:A.meta,color:$L},{tag:A.comment,fontStyle:`italic`,color:$L},{tag:A.docComment,fontStyle:`italic`,color:$L},{tag:[A.tagName],color:lR},{tag:[A.attributeName],color:aR},{tag:[A.heading],fontWeight:`bold`,color:iR},{tag:A.heading1,color:iR,fontWeight:`bold`},{tag:A.heading2,color:iR},{tag:A.heading3,color:iR},{tag:A.heading4,color:sR},{tag:A.heading5,color:sR},{tag:A.heading6,color:sR},{tag:[A.strong],fontWeight:`bold`,color:ZL},{tag:[A.emphasis],fontStyle:`italic`,color:oR},{tag:[A.link],color:rhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:_R,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:ZL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${uR}`},{tag:[A.strikethrough],color:uR,textDecoration:`line-through`},{tag:A.constant(A.name),color:iR},{tag:A.deleted,color:uR},{tag:A.squareBracket,color:$L},{tag:A.angleBracket,color:$L},{tag:A.monospace,color:ZL},{tag:[A.contentSeparator],color:cR},{tag:A.quote,color:$L}]))],SR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},ahe={borderLeftWidth:`2px`},CR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},wR={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},TR={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ohe={borderRadius:`2px`},ER={borderRadius:`2px`},DR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},OR={width:`12px`,height:`12px`,borderRadius:`6px`},kR={borderRadius:`4px`,padding:`2px 6px`},AR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},she=`#24283b`,jR=`#414868`,MR=`#565f89`,NR=`#c0caf5`,PR=`#282e44`,FR=`#1f2335`,che=`#f7768e`,IR=`#ff9e64`,LR=`#e0af68`,RR=`#9ece6a`,zR=`#2ac3de`,BR=`#7aa2f7`,VR=`#bb9af7`,HR=`#f7768e`,UR=FR,lhe=`#292e427a`,WR=she,GR=PR,KR=`#6f7bb630`,uhe=`#6f7bb650`,qR=NR,dhe=`#3d59a150`,fhe=BR,JR=IR,YR=zR,phe=VR,XR=`#3b4a3880`,ZR=`#4a393a80`,QR=`#9ece6a`,$R=`#f7768e`,mhe=[I.theme({"&":{color:NR,backgroundColor:WR,fontSize:SR.fontSize,fontFamily:SR.fontFamily},".cm-content":{caretColor:qR,lineHeight:SR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:qR,borderLeftWidth:ahe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${qR}99`,color:WR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:KR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#7aa2f740`,outline:`1px solid ${BR}`,color:NR,borderRadius:kR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:BR,color:WR,padding:kR.padding,"& span":{color:WR}},".cm-search.cm-panel.cm-textfield":{color:NR,borderRadius:kR.borderRadius,padding:kR.padding},".cm-panels":{backgroundColor:PR,color:NR,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${MR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${MR}`},".cm-panel button":{backgroundColor:GR,color:NR,border:TR.border,borderRadius:TR.borderRadius,padding:TR.padding},".cm-panel button:hover":{backgroundColor:FR},".cm-activeLine":{backgroundColor:lhe,borderRadius:ohe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:UR,color:MR,border:wR.border,borderRight:`1px solid ${FR}`,paddingRight:wR.paddingRight},".cm-activeLineGutter":{backgroundColor:FR,color:NR,fontWeight:wR.fontWeight},".cm-lineNumbers":{fontSize:wR.fontSize,lineHeight:wR.lineHeight},".cm-foldGutter":{fontSize:wR.fontSize,lineHeight:wR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:MR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:NR},".cm-insertedLine":{textDecoration:CR.insertedTextDecoration,backgroundColor:XR,color:QR,padding:CR.insertedLinePadding,borderRadius:CR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:CR.insertedTextDecoration,backgroundColor:`${XR} !important`,color:QR,padding:CR.insertedLinePadding,borderRadius:CR.borderRadious,border:`1px solid ${QR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:CR.deletedTextDecoration,backgroundColor:ZR,color:$R,padding:CR.insertedLinePadding,borderRadius:CR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:CR.deletedTextDecoration,backgroundColor:`${ZR} !important`,color:$R,padding:CR.insertedLinePadding,borderRadius:CR.borderRadious,border:`1px solid ${$R}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:GR,border:`1px solid ${MR}`,borderRadius:AR.borderRadius,padding:AR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:GR,border:`none`},"& > ul > li":{padding:AR.padding,lineHeight:AR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:KR,color:NR,borderRadius:AR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:MR,paddingRight:AR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:MR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:GR,borderBottomColor:GR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${HR}`},"&-warning":{borderLeft:`3px solid ${JR}`},"&-info":{borderLeft:`3px solid ${YR}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${HR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${JR}`},".cm-matchingBracket":{backgroundColor:dhe,outline:`1px solid ${fhe}`,borderRadius:ER.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${che}20`,outline:`1px solid ${HR}`,borderRadius:ER.borderRadius},".cm-selectionMatch":{backgroundColor:uhe,outline:`1px solid ${jR}50`,borderRadius:ER.borderRadius},".cm-foldPlaceholder":{backgroundColor:GR,color:MR,border:`1px dotted ${MR}70`,borderRadius:DR.borderRadius,padding:DR.padding,margin:DR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${WR}, 0 0 0 3px ${BR}40`},"& .cm-scroller::-webkit-scrollbar":{width:OR.width,height:OR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:UR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:jR,borderRadius:OR.borderRadius,border:`3px solid ${UR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:MR},".cm-ghostText":{opacity:`0.5`,color:MR}},{dark:!0}),D(B.define([{tag:A.keyword,color:VR,fontWeight:`bold`},{tag:A.controlKeyword,color:VR,fontWeight:`bold`},{tag:A.moduleKeyword,color:VR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:NR},{tag:[A.variableName],color:NR},{tag:[A.propertyName],color:BR,fontStyle:`normal`},{tag:[A.typeName],color:zR},{tag:[A.className],color:LR,fontStyle:`italic`},{tag:[A.namespace],color:BR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:VR},{tag:[A.bracket],color:MR},{tag:[A.brace],color:MR},{tag:[A.punctuation],color:MR},{tag:[A.function(A.variableName)],color:BR},{tag:[A.labelName],color:BR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:BR},{tag:[A.definition(A.variableName)],color:NR},{tag:A.number,color:IR},{tag:A.changed,color:IR},{tag:A.annotation,color:HR,fontStyle:`italic`},{tag:A.modifier,color:IR,fontStyle:`italic`},{tag:A.self,color:IR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:VR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:IR},{tag:[A.processingInstruction,A.inserted],color:RR},{tag:[A.special(A.string),A.regexp],color:`#b4f9f8`},{tag:A.string,color:RR},{tag:A.definition(A.typeName),color:zR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:NR},{tag:A.meta,color:MR},{tag:A.comment,fontStyle:`italic`,color:MR},{tag:A.docComment,fontStyle:`italic`,color:MR},{tag:[A.tagName],color:VR},{tag:[A.attributeName],color:LR},{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:NR},{tag:[A.emphasis],fontStyle:`italic`,color:zR},{tag:[A.link],color:phe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:YR,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:NR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${HR}`},{tag:[A.strikethrough],color:HR,textDecoration:`line-through`},{tag:A.constant(A.name),color:IR},{tag:A.deleted,color:HR},{tag:A.squareBracket,color:MR},{tag:A.angleBracket,color:MR},{tag:A.monospace,color:NR},{tag:[A.contentSeparator],color:BR},{tag:A.quote,color:MR}]))],ez={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},hhe={borderLeftWidth:`2px`},tz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},nz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},rz={borderRadius:`4px`,padding:`2px 10px`},ghe={borderRadius:`2px`},iz={borderRadius:`2px`},az={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},oz={width:`12px`,height:`12px`,borderRadius:`6px`},sz={borderRadius:`4px`,padding:`2px 6px`},cz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},_he=`#1e1e1e`,lz=`#252526`,uz=`#2d2d30`,dz=`#838383`,vhe=`#c6c6c6`,fz=`#d4d4d4`,pz=`#e9e9e9`,yhe=`#1c1c1c`,mz=`#569cd6`,bhe=`#c586c0`,hz=`#9cdcfe`,gz=`#4ec9b0`,_z=`#dcdcaa`,xhe=`#b5cea8`,vz=`#ce9178`,yz=`#f44747`,bz=`#d7ba7d`,xz=`#6a9955`,Sz=yz,Cz=`#FFFFFF08`,wz=_he,Tz=lz,She=`#264F7899`,Che=`#72a1ff59`,Ez=vhe,whe=`#ffffff15`,The=mz,Dz=bz,Oz=`#3794ff`,Ehe=`#c586c0`,kz=`#1e3f1e80`,Az=`#4b1c1c80`,jz=`#6cc26f`,Mz=`#f14c4c`,Dhe=[I.theme({"&":{color:fz,backgroundColor:wz,fontSize:ez.fontSize,fontFamily:ez.fontFamily},".cm-content":{caretColor:Ez,lineHeight:ez.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ez,borderLeftWidth:hhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${Ez}99`,color:wz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:She},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#72a1ff40`,outline:`1px solid ${mz}90`,color:pz,borderRadius:sz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#3794ff90`,color:pz,padding:sz.padding,"& span":{color:pz}},".cm-search.cm-panel.cm-textfield":{color:fz,borderRadius:sz.borderRadius,padding:sz.padding},".cm-panels":{backgroundColor:lz,color:fz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.45)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${uz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${uz}`},".cm-panel button":{backgroundColor:uz,color:fz,border:`1px solid ${uz}`,borderRadius:rz.borderRadius,padding:rz.padding},".cm-panel button:hover":{backgroundColor:`#3a3a3a`,border:`1px solid ${dz}80`},".cm-activeLine":{backgroundColor:Cz,borderRadius:ghe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yhe,color:dz,border:`none`,borderRight:`1px solid ${uz}`,paddingRight:nz.paddingRight},".cm-activeLineGutter":{backgroundColor:Cz,color:pz,fontWeight:nz.fontWeight},".cm-lineNumbers":{fontSize:nz.fontSize,lineHeight:nz.lineHeight},".cm-foldGutter":{fontSize:nz.fontSize,lineHeight:nz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:dz,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:pz},".cm-insertedLine":{textDecoration:tz.insertedTextDecoration,backgroundColor:kz,color:jz,padding:tz.insertedLinePadding,borderRadius:tz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:tz.insertedTextDecoration,backgroundColor:`${kz} !important`,color:jz,padding:tz.insertedLinePadding,borderRadius:tz.borderRadious,border:`1px solid ${jz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:tz.deletedTextDecoration,backgroundColor:Az,color:Mz,padding:tz.insertedLinePadding,borderRadius:tz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:tz.deletedTextDecoration,backgroundColor:`${Az} !important`,color:Mz,padding:tz.insertedLinePadding,borderRadius:tz.borderRadious,border:`1px solid ${Mz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:Tz,border:`1px solid ${uz}`,borderRadius:cz.borderRadius,padding:cz.padding,boxShadow:`0 3px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:Tz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:cz.padding,lineHeight:cz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#04395e`,color:pz,borderRadius:cz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:dz,paddingRight:cz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:dz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Tz,borderBottomColor:Tz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${Sz}`},"&-warning":{borderLeft:`3px solid ${Dz}`},"&-info":{borderLeft:`3px solid ${Oz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${Sz}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${Dz}`},".cm-matchingBracket":{backgroundColor:whe,outline:`1px solid ${The}80`,borderRadius:iz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${yz}40`,outline:`1px solid ${Sz}`,borderRadius:iz.borderRadius},".cm-selectionMatch":{backgroundColor:Che,outline:`1px solid ${uz}70`,borderRadius:iz.borderRadius},".cm-foldPlaceholder":{backgroundColor:Tz,color:dz,border:`1px dotted ${dz}70`,borderRadius:az.borderRadius,padding:az.padding,margin:az.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${uz}`},"& .cm-scroller::-webkit-scrollbar":{width:oz.width,height:oz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:wz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#424242`,borderRadius:oz.borderRadius,border:`3px solid ${wz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#525252`},".cm-ghostText":{opacity:`0.5`,color:dz}},{dark:!0}),D(B.define([{tag:A.keyword,color:mz,fontWeight:`bold`},{tag:A.controlKeyword,color:bhe,fontWeight:`bold`},{tag:A.moduleKeyword,color:mz,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:fz},{tag:[A.variableName],color:hz},{tag:[A.propertyName],color:hz,fontStyle:`normal`},{tag:[A.typeName],color:gz},{tag:[A.className],color:gz,fontStyle:`normal`},{tag:[A.namespace],color:fz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:fz},{tag:[A.bracket],color:fz},{tag:[A.brace],color:fz},{tag:[A.punctuation],color:fz},{tag:[A.function(A.variableName)],color:_z},{tag:[A.labelName],color:_z,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:_z},{tag:[A.definition(A.variableName)],color:hz},{tag:A.number,color:xhe},{tag:A.changed,color:bz},{tag:A.annotation,color:bz,fontStyle:`italic`},{tag:A.modifier,color:mz,fontStyle:`normal`},{tag:A.self,color:mz},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:hz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:mz},{tag:[A.processingInstruction,A.inserted],color:vz},{tag:[A.special(A.string),A.regexp],color:`#d16969`},{tag:A.string,color:vz},{tag:A.definition(A.typeName),color:gz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:fz},{tag:A.meta,color:dz},{tag:A.comment,fontStyle:`italic`,color:xz},{tag:A.docComment,fontStyle:`italic`,color:xz},{tag:[A.tagName],color:mz},{tag:[A.attributeName],color:hz},{tag:[A.heading],fontWeight:`bold`,color:mz},{tag:A.heading1,color:mz,fontWeight:`bold`},{tag:A.heading2,color:mz},{tag:A.heading3,color:mz},{tag:A.heading4,color:mz},{tag:A.heading5,color:mz},{tag:A.heading6,color:mz},{tag:[A.strong],fontWeight:`bold`,color:mz},{tag:[A.emphasis],fontStyle:`italic`,color:gz},{tag:[A.link],color:Ehe,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:Oz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:fz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${Sz}`},{tag:[A.strikethrough],color:Sz,textDecoration:`line-through`},{tag:A.constant(A.name),color:hz},{tag:A.deleted,color:Sz},{tag:A.squareBracket,color:fz},{tag:A.angleBracket,color:fz},{tag:A.monospace,color:fz},{tag:[A.contentSeparator],color:fz},{tag:A.quote,color:xz}]))],Nz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Ohe={borderLeftWidth:`2px`},Pz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},Fz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},Iz={borderRadius:`4px`,padding:`2px 10px`},khe={borderRadius:`2px`},Lz={borderRadius:`2px`},Rz={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},zz={width:`12px`,height:`12px`,borderRadius:`6px`},Bz={borderRadius:`4px`,padding:`2px 6px`},Vz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Ahe=`#ffffff`,Hz=`#f3f3f3`,Uz=`#d6d6d6`,Wz=`#6b6b6b`,Gz=`#000000`,Kz=`#383a42`,qz=`#1f1f1f`,Jz=`#f5f5f5`,Yz=`#0064ff`,Xz=`#af00db`,Zz=`#0070c1`,Qz=`#267f99`,$z=`#795e26`,eB=`#098658`,tB=`#a31515`,nB=`#e51400`,rB=`#795e26`,iB=`#008000`,aB=nB,oB=`#99999926`,sB=Ahe,cB=Hz,lB=`#add6ff`,uB=`#a8ac9480`,dB=Gz,fB=`#007acc20`,pB=`#007acc`,mB=`#bf8803`,hB=`#006ab1`,gB=`#9e46d0`,_B=`#ddfbe0`,vB=`#ffebec`,yB=`#22863a`,bB=`#e51400`,xB=[I.theme({"&":{color:Kz,backgroundColor:sB,fontSize:Nz.fontSize,fontFamily:Nz.fontFamily},".cm-content":{caretColor:dB,lineHeight:Nz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:dB,borderLeftWidth:Ohe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${dB}99`,color:sB},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lB},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#bbdefb`,outline:`1px solid ${Zz}90`,color:qz,borderRadius:Bz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#90caf9`,color:qz,padding:Bz.padding,"& span":{color:qz}},".cm-search.cm-panel.cm-textfield":{color:Kz,borderRadius:Bz.borderRadius,padding:Bz.padding},".cm-panels":{backgroundColor:Hz,color:Kz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${Uz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${Uz}`},".cm-panel button":{backgroundColor:sB,color:Kz,border:`1px solid ${Uz}`,borderRadius:Iz.borderRadius,padding:Iz.padding},".cm-panel button:hover":{backgroundColor:`#e8e8e8`,border:`1px solid ${Wz}80`},".cm-activeLine":{backgroundColor:oB,borderRadius:khe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:Jz,color:`#237893`,border:`none`,borderRight:`1px solid ${Uz}`,paddingRight:Fz.paddingRight},".cm-activeLineGutter":{backgroundColor:oB,color:`#0b216f`,fontWeight:Fz.fontWeight},".cm-lineNumbers":{fontSize:Fz.fontSize,lineHeight:Fz.lineHeight},".cm-foldGutter":{fontSize:Fz.fontSize,lineHeight:Fz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:`#237893`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`#0b216f`},".cm-insertedLine":{textDecoration:Pz.insertedTextDecoration,backgroundColor:_B,color:yB,padding:Pz.insertedLinePadding,borderRadius:Pz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:Pz.insertedTextDecoration,backgroundColor:`${_B} !important`,color:yB,padding:Pz.insertedLinePadding,borderRadius:Pz.borderRadious,border:`1px solid ${yB}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:Pz.deletedTextDecoration,backgroundColor:vB,color:bB,padding:Pz.insertedLinePadding,borderRadius:Pz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:Pz.deletedTextDecoration,backgroundColor:`${vB} !important`,color:bB,padding:Pz.insertedLinePadding,borderRadius:Pz.borderRadious,border:`1px solid ${bB}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:cB,border:`1px solid ${Uz}`,borderRadius:Vz.borderRadius,padding:Vz.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:cB,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:Vz.padding,lineHeight:Vz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#dcebfc`,color:qz,borderRadius:Vz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:Wz,paddingRight:Vz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:Wz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:cB,borderBottomColor:cB},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${aB}`},"&-warning":{borderLeft:`3px solid ${mB}`},"&-info":{borderLeft:`3px solid ${hB}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${aB}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${mB}`},".cm-matchingBracket":{backgroundColor:fB,outline:`1px solid ${pB}80`,borderRadius:Lz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${nB}20`,outline:`1px solid ${aB}`,borderRadius:Lz.borderRadius},".cm-selectionMatch":{backgroundColor:uB,outline:`1px solid ${Uz}70`,borderRadius:Lz.borderRadius},".cm-foldPlaceholder":{backgroundColor:cB,color:Wz,border:`1px dotted ${Wz}70`,borderRadius:Rz.borderRadius,padding:Rz.padding,margin:Rz.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${Uz}`},"& .cm-scroller::-webkit-scrollbar":{width:zz.width,height:zz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:sB},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#dadada`,borderRadius:zz.borderRadius,border:`3px solid ${sB}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#cccccc`},".cm-ghostText":{opacity:`0.5`,color:Wz}},{dark:!1}),D(B.define([{tag:A.keyword,color:Yz,fontWeight:`bold`},{tag:A.controlKeyword,color:Xz,fontWeight:`bold`},{tag:A.moduleKeyword,color:Yz,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:Kz},{tag:[A.variableName],color:Zz},{tag:[A.propertyName],color:Zz,fontStyle:`normal`},{tag:[A.typeName],color:Qz},{tag:[A.className],color:Qz,fontStyle:`normal`},{tag:[A.namespace],color:Kz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:Kz},{tag:[A.bracket],color:Kz},{tag:[A.brace],color:Kz},{tag:[A.punctuation],color:Kz},{tag:[A.function(A.variableName)],color:$z},{tag:[A.labelName],color:$z,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:$z},{tag:[A.definition(A.variableName)],color:Zz},{tag:A.number,color:eB},{tag:A.changed,color:rB},{tag:A.annotation,color:rB,fontStyle:`italic`},{tag:A.modifier,color:Yz,fontStyle:`normal`},{tag:A.self,color:Yz},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:Zz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:Yz},{tag:[A.processingInstruction,A.inserted],color:tB},{tag:[A.special(A.string),A.regexp],color:Xz},{tag:A.string,color:tB},{tag:A.definition(A.typeName),color:Qz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:Kz},{tag:A.meta,color:Wz},{tag:A.comment,fontStyle:`italic`,color:iB},{tag:A.docComment,fontStyle:`italic`,color:iB},{tag:[A.tagName],color:Yz},{tag:[A.attributeName],color:Zz},{tag:[A.heading],fontWeight:`bold`,color:Yz},{tag:A.heading1,color:Yz,fontWeight:`bold`},{tag:A.heading2,color:Yz},{tag:A.heading3,color:Yz},{tag:A.heading4,color:Yz},{tag:A.heading5,color:Yz},{tag:A.heading6,color:Yz},{tag:[A.strong],fontWeight:`bold`,color:Yz},{tag:[A.emphasis],fontStyle:`italic`,color:Zz},{tag:[A.link],color:gB,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:hB,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:Kz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${aB}`},{tag:[A.strikethrough],color:aB,textDecoration:`line-through`},{tag:A.constant(A.name),color:Zz},{tag:A.deleted,color:aB},{tag:A.squareBracket,color:Kz},{tag:A.angleBracket,color:Kz},{tag:A.monospace,color:Kz},{tag:[A.contentSeparator],color:Kz},{tag:A.quote,color:iB}]))];function SB(){return SB=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},SB.apply(null,arguments)}function CB(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 wB=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,TB=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(wB(e)):wB,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`&&(TB.prototype[Symbol.iterator]=function(){return this});var EB={from:-1,to:-1,match:/.*/.exec(``)},DB=`gm`+(/x/.unicode==null?``:`u`),OB=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=EB,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new jB(e,t,n,r,i);this.re=new RegExp(t,DB+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=NB(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=NB(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}}},kB=new WeakMap,AB=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=kB.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return kB.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)),kB.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},jB=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=EB,this.matchPos=NB(e,r),this.re=new RegExp(t,DB+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=AB.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=NB(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=AB.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(OB.prototype[Symbol.iterator]=jB.prototype[Symbol.iterator]=function(){return this});function MB(e){try{return new RegExp(e,DB),!0}catch{return!1}}function NB(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 PB(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:FB.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:FB.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:[FB.of(!1),I.scrollIntoView(f.from,{y:`center`})],selection:f}),e.focus()}return{dom:n}}var FB=V.define(),IB=Be.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(FB)&&(e=n.value);return e},provide:e=>ne.from(e,e=>e?PB:null)}),LB=e=>{let t=De(e,PB);if(!t){let n=[FB.of(!0)];e.state.field(IB,!1)??n.push(V.appendConfig.of([IB,RB])),e.dispatch({effects:n}),t=De(e,PB)}return t&&t.dom.querySelector(`input`).select(),!0},RB=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},BB=xe.define({combine(e){return f(e,zB,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function VB(e){let t=[qB,KB];return e&&t.push(BB.of(e)),t}var HB=Ve.mark({class:`cm-selectionMatch`}),UB=Ve.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function WB(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 GB(e,t,n,r){return e(t.sliceDoc(n,n+1))==oe.Word&&e(t.sliceDoc(r-1,r))==oe.Word}var KB=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(BB),{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),!(WB(o,n,i.from,i.to)&&GB(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 TB(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||WB(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(UB.range(r,a)):(r>=i.to||a<=i.from)&&s.push(HB.range(r,a)),s.length>t.maxMatches))return Ve.none}}return Ve.set(s)}},{decorations:e=>e.decorations}),qB=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),JB=({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 YB(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 TB(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new TB(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 XB=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return JB({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=YB(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},ZB=xe.define({combine(e){return f(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new kV(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),QB=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||MB(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`?`
364
364
  `: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 sV(this):new nV(this)}getCursor(e,t=0,n){let r=e.doc?e:Ee.create({doc:e});return n??=r.doc.length,this.regexp?rV(this,r,t,n):eV(this,r,t,n)}},$B=class{constructor(e){this.spec=e}};function eV(e,t,n,r){return new TB(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?tV(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function tV(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(iV(i,n-a))!=oe.Word||t(aV(i,n-a))!=oe.Word)&&(t(aV(i,r-a))!=oe.Word||t(iV(i,r-a))!=oe.Word))}var nV=class extends $B{constructor(e){super(e)}nextMatch(e,t,n){let r=eV(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=eV(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=eV(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=eV(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=eV(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 rV(e,t,n,r){return new OB(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?oV(t.charCategorizer(t.selection.main.head)):void 0},n,r)}function iV(e,t){return e.slice(E(e,t,!1),t)}function aV(e,t){return e.slice(t,E(e,t))}function oV(e){return(t,n,r)=>!r[0].length||(e(iV(r.input,r.index))!=oe.Word||e(aV(r.input,r.index))!=oe.Word)&&(e(aV(r.input,r.index+r[0].length))!=oe.Word||e(iV(r.input,r.index+r[0].length))!=oe.Word)}var sV=class extends $B{nextMatch(e,t,n){let r=rV(this.spec,e,n,e.doc.length).next();return r.done&&(r=rV(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=rV(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=rV(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=rV(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)}},cV=V.define(),lV=V.define(),uV=Be.define({create(e){return new dV(CV(e).create(),null)},update(e,t){for(let n of t.effects)n.is(cV)?e=new dV(n.value.create(),e.panel):n.is(lV)&&(e=new dV(e.query,n.value?SV:null));return e},provide:e=>ne.from(e,e=>e.panel)}),dV=class{constructor(e,t){this.query=e,this.panel=t}},fV=Ve.mark({class:`cm-searchMatch`}),pV=Ve.mark({class:`cm-searchMatch cm-searchMatch-selected`}),mV=g.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(uV))}update(e){let t=e.state.field(uV);(t!=e.startState.field(uV)||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?pV:fV)})}return r.finish()}},{decorations:e=>e.decorations});function hV(e){return t=>{let n=t.state.field(uV,!1);return n&&n.query.spec.valid?e(t,n):EV(t)}}var gV=hV((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(ZB);return e.dispatch({selection:i,effects:[NV(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),TV(e),!0}),_V=hV((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(ZB);return e.dispatch({selection:a,effects:[NV(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),TV(e),!0}),vV=hV((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)}),yV=({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 TB(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},bV=hV((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(NV(e,o)),u.push(n.facet(ZB).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),xV=hV((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 SV(e){return e.state.facet(ZB).createPanel(e)}function CV(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(ZB);return new QB({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 wV(e){let t=De(e,SV);return t&&t.dom.querySelector(`[main-field]`)}function TV(e){let t=wV(e);t&&t==e.root.activeElement&&t.select()}var EV=e=>{let t=e.state.field(uV,!1);if(t&&t.panel){let n=wV(e);if(n&&n!=e.root.activeElement){let r=CV(e.state,t.query.spec);r.valid&&e.dispatch({effects:cV.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[lV.of(!0),t?cV.of(CV(e.state,t.query.spec)):V.appendConfig.of(FV)]});return!0},DV=e=>{let t=e.state.field(uV,!1);if(!t||!t.panel)return!1;let n=De(e,SV);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:lV.of(!1)}),!0},OV=[{key:`Mod-f`,run:EV,scope:`editor search-panel`},{key:`F3`,run:gV,shift:_V,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:gV,shift:_V,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:DV,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:yV},{key:`Mod-Alt-g`,run:LB},{key:`Mod-d`,run:XB,preventDefault:!0}],kV=class{constructor(e){this.view=e;let t=this.query=e.state.field(uV).query.spec;this.commit=this.commit.bind(this),this.searchField=je(`input`,{value:t.search,placeholder:AV(e,`Find`),"aria-label":AV(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:AV(e,`Replace`),"aria-label":AV(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`,()=>gV(e),[AV(e,`next`)]),n(`prev`,()=>_V(e),[AV(e,`previous`)]),n(`select`,()=>vV(e),[AV(e,`all`)]),je(`label`,null,[this.caseField,AV(e,`match case`)]),je(`label`,null,[this.reField,AV(e,`regexp`)]),je(`label`,null,[this.wordField,AV(e,`by word`)]),...e.state.readOnly?[]:[je(`br`),this.replaceField,n(`replace`,()=>bV(e),[AV(e,`replace`)]),n(`replaceAll`,()=>xV(e),[AV(e,`replace all`)])],je(`button`,{name:`close`,onclick:()=>DV(e),"aria-label":AV(e,`close`),type:`button`},[`×`])])}commit(){let e=new QB({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:cV.of(e)}))}keydown(e){me(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?_V:gV)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),bV(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(cV)&&!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(ZB).top}};function AV(e,t){return e.state.phrase(t)}var jV=30,MV=/[\s\.,:;?!]/;function NV(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-jV),o=Math.min(i,n+jV),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<jV;e++)if(!MV.test(s[e+1])&&MV.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-jV;e--)if(!MV.test(s[e-1])&&MV.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 PV=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`}}),FV=[uV,de.low(mV),PV],IV=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},LV=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(ZV).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=cH(s);if(i)o.add(n,n,Ve.widget({widget:new tH(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,RV(f))}};function RV(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 IV(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new IV(r.from,n,r.diagnostic)}),r}function zV(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(ZV).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(VV))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function BV(e,t){return e.field(WV,!1)?t:t.concat(V.appendConfig.of(lH))}var VV=V.define(),HV=V.define(),UV=V.define(),WV=Be.define({create(){return new LV(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=RV(n,e.selected.diagnostic,i)||RV(n,null,i)}!n.size&&i&&t.state.facet(ZV).autoPanel&&(i=null),e=new LV(n,i,r)}for(let n of t.effects)if(n.is(VV)){let r=t.state.facet(ZV).autoPanel?n.value.length?rH.open:null:e.panel;e=LV.init(n.value,r,t.state)}else n.is(HV)?e=new LV(e.diagnostics,n.value?rH.open:null,e.selected):n.is(UV)&&(e=new LV(e.diagnostics,e.panel,n.value));return e},provide:e=>[ne.from(e,e=>e.panel),I.decorations.from(e,e=>e.diagnostics)]}),GV=Ve.mark({class:`cm-lintRange cm-lintRange-active`});function KV(e,t,n){let{diagnostics:r}=e.state.field(WV),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(ZV).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:qV(e,i)}}}:null}function qV(e,t){return je(`ul`,{class:`cm-tooltip-lint`},t.map(t=>eH(e,t,!1)))}var JV=e=>{let t=e.state.field(WV,!1);(!t||!t.panel)&&e.dispatch({effects:BV(e.state,[HV.of(!0)])});let n=De(e,rH.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},YV=e=>{let t=e.state.field(WV,!1);return!t||!t.panel?!1:(e.dispatch({effects:HV.of(!1)}),!0)},XV=[{key:`Mod-Shift-m`,run:JV,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field(WV,!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)}}],ZV=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:QV,tooltipFilter:QV,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 QV(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function $V(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 eH(e,t,n){let r=n?$V(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=RV(e.state.field(WV).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 tH=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})}},nH=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=eH(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},rH=class e{constructor(e){this.view=e,this.items=[];let t=t=>{if(t.keyCode==27)YV(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=$V(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=RV(this.view.state.field(WV).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:()=>YV(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(WV).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(WV),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 nH(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 nH(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=RV(this.view.state.field(WV).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:UV.of(t)})}static open(t){return new e(t)}};function iH(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 aH(e){return iH(`<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 oH=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:aH(`#d11`)},".cm-lintRange-warning":{backgroundImage:aH(`orange`)},".cm-lintRange-info":{backgroundImage:aH(`#999`)},".cm-lintRange-hint":{backgroundImage:aH(`#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 sH(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function cH(e){let t=`hint`,n=1;for(let r of e){let e=sH(r.severity);e>n&&(n=e,t=r.severity)}return t}var lH=[WV,I.decorations.compute([WV],e=>{let{selected:t,panel:n}=e.field(WV);return!t||!n||t.from==t.to?Ve.none:Ve.set([GV.range(t.from,t.to)])}),k(KV,{hideOn:zV}),oH],uH=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(iO)),e.searchKeymap!==!1&&(n=n.concat(OV)),e.historyKeymap!==!1&&(n=n.concat(Dde)),e.foldKeymap!==!1&&(n=n.concat(j)),e.completionKeymap!==!1&&(n=n.concat(Ye)),e.lintKeymap!==!1&&(n=n.concat(XV));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(vde()),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(VB()),e.tabSize&&typeof e.tabSize==`number`&&a.push(i.of(` `.repeat(e.tabSize))),a.concat([r.of(n.flat())]).filter(Boolean)},dH=`#e5c07b`,fH=`#e06c75`,pH=`#56b6c2`,mH=`#ffffff`,hH=`#abb2bf`,gH=`#7d8799`,_H=`#61afef`,vH=`#98c379`,yH=`#d19a66`,bH=`#c678dd`,xH=`#21252b`,SH=`#2c313a`,CH=`#282c34`,wH=`#353a42`,TH=`#3E4451`,EH=`#528bff`,DH=[I.theme({"&":{color:hH,backgroundColor:CH},".cm-content":{caretColor:EH},".cm-cursor, .cm-dropCursor":{borderLeftColor:EH},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:TH},".cm-panels":{backgroundColor:xH,color:hH},".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:CH,color:gH,border:`none`},".cm-activeLineGutter":{backgroundColor:SH},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:wH},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:wH,borderBottomColor:wH},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:SH,color:hH}}},{dark:!0}),D(B.define([{tag:A.keyword,color:bH},{tag:[A.name,A.deleted,A.character,A.propertyName,A.macroName],color:fH},{tag:[A.function(A.variableName),A.labelName],color:_H},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:yH},{tag:[A.definition(A.name),A.separator],color:hH},{tag:[A.typeName,A.className,A.number,A.changed,A.annotation,A.modifier,A.self,A.namespace],color:dH},{tag:[A.operator,A.operatorKeyword,A.url,A.escape,A.regexp,A.link,A.special(A.string)],color:pH},{tag:[A.meta,A.comment],color:gH},{tag:A.strong,fontWeight:`bold`},{tag:A.emphasis,fontStyle:`italic`},{tag:A.strikethrough,textDecoration:`line-through`},{tag:A.link,color:gH,textDecoration:`underline`},{tag:A.heading,fontWeight:`bold`,color:fH},{tag:[A.atom,A.bool,A.special(A.variableName)],color:yH},{tag:[A.processingInstruction,A.string,A.inserted],color:vH},{tag:A.invalid,color:mH}]))],OH=I.theme({"&":{backgroundColor:`#fff`}},{dark:!1}),kH=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([aO])),s&&(typeof s==`boolean`?c.unshift(uH()):c.unshift(uH(s))),o&&c.unshift(Ce(o)),a){case`light`:c.push(OH);break;case`dark`:c.push(DH);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]},AH=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)}),jH=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}},MH=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)}},NH=null,PH=()=>typeof window>`u`?new MH:(NH||=new MH,NH),FH=ie.define(),IH=200,LH=[];function RH(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:a,onUpdate:o,extensions:s=LH,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(FH))&&(k.current?k.current.reset():(k.current=new jH(()=>{if(A.current){var e=A.current;A.current=null,e()}k.current=null},IH),PH().add(k.current)),r(e.state.doc.toString(),e)),i&&i(AH(e))}),j,...kH({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:[FH.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`],BH=(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=CB(e,zH),E=(0,G.useRef)(null),{state:D,view:O,container:k,setContainer:A}=RH({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`,SB({ref:j,className:(typeof d==`string`?`cm-theme-`+d:`cm-theme`)+(n?` `+n:``)},T))});BH.displayName=`CodeMirror`;function VH(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 HH(e,t){switch(e){case`markdown`:return[_M({base:iM,codeLanguages:dpe}),cde()];case`typescript`:return[We({typescript:!0,jsx:t?.endsWith(`.tsx`)})];case`javascript`:return[We({jsx:t?.endsWith(`.jsx`)})];case`json`:return[lO()];case`yaml`:return[KM()];default:return[]}}function UH(e,t){switch(e){case`github`:return t?DN:oP;case`material`:return t?hme:Dme;case`vscode`:return t?Dhe:xB;case`tokyo`:return t?mhe:ihe;case`gruvbox`:return t?Vpe:tme;case`monokai`:return Ime;case`nord`:return qme;default:return t?DN:oP}}function WH({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??VH(a),m=vv(),{data:h}=zg(),g=h?.codeEditor?.theme??`github`,_=(0,G.useMemo)(()=>{let e=[Ee.readOnly.of(n),...HH(p,a)];return e.push(UH(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:bD}])),s&&e.push(I.lineWrapping),e},[p,a,n,s,g,m]);return(0,K.jsx)(BH,{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 GH(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 KH(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 qH(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 JH(e){return e?.type===`target`?e.placement??`bottom-start`:`bottom-start`}function YH({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)(()=>GH(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}`,_=JH(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(KH(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?qH(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`
365
365
  .context-menu-anchor[data-context-menu-id='${g}'] {
366
366
  width: 1px;
@@ -957,7 +957,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
957
957
  @pointerdown=${e=>this._onResizeStart(e,`br`)}
958
958
  ></div>
959
959
  ${e}
960
- </dialog>`:e}};customElements.define(`input-panel`,eve);var tve={extension:{type:W.Environment,name:`browser`,priority:-1},test:()=>!0,load:async()=>{await q(()=>import(`./browserAll-SlkyrnP3.js`),__vite__mapDeps([127,128,1,129]))}},nve={extension:{type:W.Environment,name:`webworker`,priority:0},test:()=>typeof self<`u`&&self.WorkerGlobalScope!==void 0,load:async()=>{await q(()=>import(`./webworkerAll-Cpui2nNu.js`),__vite__mapDeps([130,128,1,129]))}},rve=new mt;function LZ(e,t,n){let r=rve;e.measurable=!0,Nt(e,n,r),t.addBoundsMask(r),e.measurable=!1}function RZ(e,t,n){let r=$e.get();e.measurable=!0;let i=Mt.get().identity();ht(e,r,zZ(e,n,i)),e.measurable=!1,t.addBoundsMask(r),Mt.return(i),$e.return(r)}function zZ(e,t,n){return e?(e!==t&&(zZ(e.parent,t,n),e.updateLocalTransform(),n.append(e.localTransform)),n):(ot(`Mask bounds, renderable is not inside the root container`),n)}var BZ=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||LZ(this.mask,e,t)}addLocalBounds(e,t){RZ(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}};BZ.extension=W.MaskEffect;var VZ=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`}};VZ.extension=W.MaskEffect;var HZ=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){LZ(this.mask,e,t)}addLocalBounds(e,t){RZ(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}};HZ.extension=W.MaskEffect;var UZ;async function ive(){return UZ??=(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`})(),UZ}var WZ=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 ive(),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}};WZ.extension=W.TextureSource,WZ.defaultOptions={...gt.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},WZ.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`};var ave=WZ,GZ=(e,t,n=!1)=>(Array.isArray(e)||(e=[e]),t?e.map(e=>typeof e==`string`||n?t(e):e):e),KZ=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=GZ(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}},qZ=[];jt.handleByList(W.TextureSource,qZ);function JZ(e={}){let t=e&&e.resource,n=t?e.resource:e,r=t?e:{resource:e};for(let e=0;e<qZ.length;e++){let t=qZ[e];if(t.test(n))return new t(r)}throw Error(`Could not find a source type for resource: ${r.resource}`)}function ove(e={},t=!1){let n=e&&e.resource,r=n?e.resource:e,i=n?e:{resource:e};if(!t&&KZ.has(r))return KZ.get(r);let a=new et({source:JZ(i)});return a.on(`destroy`,()=>{KZ.has(r)&&KZ.remove(r)}),t||KZ.set(r,a),a}function sve(e,t=!1){return typeof e==`string`?KZ.get(e):e instanceof gt?new et({source:e}):ove(e,t)}et.from=sve,gt.from=JZ,jt.add(BZ,VZ,HZ,ave,Xt,xt,at);var YZ=(e=>(e[e.Low=0]=`Low`,e[e.Normal=1]=`Normal`,e[e.High=2]=`High`,e))(YZ||{});function XZ(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function ZZ(e){return e.split(`?`)[0].split(`#`)[0]}function cve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function lve(e,t,n){return e.replace(new RegExp(cve(t),`g`),n)}function uve(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 QZ={toPosix(e){return lve(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){XZ(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(XZ(e),this.isDataUrl(e)||this.isBlobUrl(e))return e;let r=ZZ(this.toPosix(t??Gt.get().getBaseUrl())),i=ZZ(this.toPosix(n??this.rootname(r)));return e=this.toPosix(e),e.startsWith(`/`)?QZ.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(XZ(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=uve(e,!1),e.length>0&&r&&(e+=`/`),n?`/${e}`:t+e},isAbsolute(e){return XZ(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(XZ(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(XZ(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){XZ(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){XZ(e),t&&XZ(t),e=ZZ(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){XZ(e),e=ZZ(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){XZ(e);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;e=ZZ(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 $Z(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?$Z(e.replace(r[n],s),t,n+1,r,i):i.push(e.replace(r[n],s))}}function dve(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)}),$Z(e,r,0,t,n)}else n.push(e);return n}var eQ=e=>!Array.isArray(e),tQ=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 GZ(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`)};GZ(t).forEach(e=>{let{src:t}=e,{data:r,format:i,loadParser:a,parser:o}=e,s=GZ(t).map(e=>typeof e==`string`?dve(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=eQ(e);e=GZ(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=eQ(e);e=GZ(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=QZ.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??fve(e.src),s!==void 0&&(e.progressSize=s),e}};tQ.RETINA_PREFIX=/@([0-9\.]+)x/;function fve(e){return e.split(`.`).pop().split(`?`).shift().split(`#`).shift()}var nQ=(e,t)=>{let n=t.split(`?`)[1];return n&&(e+=`?${n}`),e},rQ=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=[]}};rQ.BATCH_SIZE=1e3;var iQ=rQ,pve=[`jpg`,`png`,`jpeg`,`avif`,`webp`,`basis`,`etc2`,`bc7`,`bc6h`,`bc5`,`bc4`,`bc3`,`bc2`,`bc1`,`eac`,`astc`];function aQ(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=QZ.dirname(e[0]);t.linkedSheets.forEach((e,i)=>{let a=aQ([`${n}/${t.data.meta.related_multi_packs[i]}`],e,!0);Object.assign(r,a)})}return r}var mve={extension:W.Asset,cache:{test:e=>e instanceof iQ,getCacheableAssets:(e,t)=>aQ(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`&&pve.includes(r)},parse:e=>{let t=e.split(`.`);return{resolution:parseFloat(tQ.RETINA_PREFIX.exec(e)?.[1]??`1`),format:t[t.length-2],src:e}}},loader:{name:`spritesheetLoader`,id:`spritesheet`,extension:{type:W.LoadParser,priority:YZ.Normal,name:`spritesheetLoader`},async testParse(e,t){return QZ.extname(t.src).toLowerCase()===`.json`&&!!e.frames},async parse(e,t,n){let{texture:r,imageFilename:i,textureOptions:a,cachePrefix:o}=t?.data??{},s=QZ.dirname(t.src);s&&s.lastIndexOf(`/`)!==s.length-1&&(s+=`/`);let c;if(r instanceof et)c=r;else{let r=nQ(s+(i??e.meta.image),t.src);c=(await n.load([{src:r,data:a}]))[r]}let l=new iQ({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=nQ(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(mve);var hve=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}},oQ=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}},sQ=/iPhone/i,cQ=/iPod/i,lQ=/iPad/i,uQ=/\biOS-universal(?:.+)Mac\b/i,dQ=/\bAndroid(?:.+)Mobile\b/i,fQ=/Android/i,pQ=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,mQ=/Silk/i,hQ=/Windows Phone/i,gQ=/\bWindows(?:.+)ARM\b/i,_Q=/BlackBerry/i,vQ=/BB10/i,yQ=/Opera Mini/i,bQ=/\b(CriOS|Chrome)(?:.+)Mobile/i,xQ=/Mobile(?:.+)Firefox\b/i,SQ=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function gve(e){return function(t){return t.test(e)}}function CQ(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=gve(n),a={apple:{phone:i(sQ)&&!i(hQ),ipod:i(cQ),tablet:!i(sQ)&&(i(lQ)||SQ(t))&&!i(hQ),universal:i(uQ),device:(i(sQ)||i(cQ)||i(lQ)||i(uQ)||SQ(t))&&!i(hQ)},amazon:{phone:i(pQ),tablet:!i(pQ)&&i(mQ),device:i(pQ)||i(mQ)},android:{phone:!i(hQ)&&i(pQ)||!i(hQ)&&i(dQ),tablet:!i(hQ)&&!i(pQ)&&!i(dQ)&&(i(mQ)||i(fQ)),device:!i(hQ)&&(i(pQ)||i(mQ)||i(dQ)||i(fQ))||i(/\bokhttp\b/i)},windows:{phone:i(hQ),tablet:i(gQ),device:i(hQ)||i(gQ)},other:{blackberry:i(_Q),blackberry10:i(vQ),opera:i(yQ),firefox:i(xQ),chrome:i(bQ),device:i(_Q)||i(vQ)||i(yQ)||i(xQ)||i(bQ)},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=(CQ.default??CQ)(globalThis.navigator),vve=9,wQ=100,yve=0,bve=0,TQ=2,EQ=1,xve=-1e3,Sve=-1e3,Cve=2,DQ=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=`${EQ}px`,e.style.height=`${EQ}px`,e.style.position=`absolute`,e.style.top=`${xve}px`,e.style.left=`${Sve}px`,e.style.zIndex=Cve.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=`${yve}px`,this._div.style.left=`${bve}px`,this._div.style.pointerEvents=`none`,this._div.style.zIndex=TQ.toString(),this._canvasObserver=new hve({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=`
960
+ </dialog>`:e}};customElements.define(`input-panel`,eve);var tve={extension:{type:W.Environment,name:`browser`,priority:-1},test:()=>!0,load:async()=>{await q(()=>import(`./browserAll-DNt0Yfet.js`),__vite__mapDeps([127,128,1,129]))}},nve={extension:{type:W.Environment,name:`webworker`,priority:0},test:()=>typeof self<`u`&&self.WorkerGlobalScope!==void 0,load:async()=>{await q(()=>import(`./webworkerAll-C_Psgpip.js`),__vite__mapDeps([130,128,1,129]))}},rve=new mt;function LZ(e,t,n){let r=rve;e.measurable=!0,Nt(e,n,r),t.addBoundsMask(r),e.measurable=!1}function RZ(e,t,n){let r=$e.get();e.measurable=!0;let i=Mt.get().identity();ht(e,r,zZ(e,n,i)),e.measurable=!1,t.addBoundsMask(r),Mt.return(i),$e.return(r)}function zZ(e,t,n){return e?(e!==t&&(zZ(e.parent,t,n),e.updateLocalTransform(),n.append(e.localTransform)),n):(ot(`Mask bounds, renderable is not inside the root container`),n)}var BZ=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||LZ(this.mask,e,t)}addLocalBounds(e,t){RZ(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}};BZ.extension=W.MaskEffect;var VZ=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`}};VZ.extension=W.MaskEffect;var HZ=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){LZ(this.mask,e,t)}addLocalBounds(e,t){RZ(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}};HZ.extension=W.MaskEffect;var UZ;async function ive(){return UZ??=(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`})(),UZ}var WZ=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 ive(),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}};WZ.extension=W.TextureSource,WZ.defaultOptions={...gt.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},WZ.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`};var ave=WZ,GZ=(e,t,n=!1)=>(Array.isArray(e)||(e=[e]),t?e.map(e=>typeof e==`string`||n?t(e):e):e),KZ=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=GZ(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}},qZ=[];jt.handleByList(W.TextureSource,qZ);function JZ(e={}){let t=e&&e.resource,n=t?e.resource:e,r=t?e:{resource:e};for(let e=0;e<qZ.length;e++){let t=qZ[e];if(t.test(n))return new t(r)}throw Error(`Could not find a source type for resource: ${r.resource}`)}function ove(e={},t=!1){let n=e&&e.resource,r=n?e.resource:e,i=n?e:{resource:e};if(!t&&KZ.has(r))return KZ.get(r);let a=new et({source:JZ(i)});return a.on(`destroy`,()=>{KZ.has(r)&&KZ.remove(r)}),t||KZ.set(r,a),a}function sve(e,t=!1){return typeof e==`string`?KZ.get(e):e instanceof gt?new et({source:e}):ove(e,t)}et.from=sve,gt.from=JZ,jt.add(BZ,VZ,HZ,ave,Xt,xt,at);var YZ=(e=>(e[e.Low=0]=`Low`,e[e.Normal=1]=`Normal`,e[e.High=2]=`High`,e))(YZ||{});function XZ(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function ZZ(e){return e.split(`?`)[0].split(`#`)[0]}function cve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function lve(e,t,n){return e.replace(new RegExp(cve(t),`g`),n)}function uve(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 QZ={toPosix(e){return lve(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){XZ(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(XZ(e),this.isDataUrl(e)||this.isBlobUrl(e))return e;let r=ZZ(this.toPosix(t??Gt.get().getBaseUrl())),i=ZZ(this.toPosix(n??this.rootname(r)));return e=this.toPosix(e),e.startsWith(`/`)?QZ.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(XZ(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=uve(e,!1),e.length>0&&r&&(e+=`/`),n?`/${e}`:t+e},isAbsolute(e){return XZ(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(XZ(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(XZ(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){XZ(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){XZ(e),t&&XZ(t),e=ZZ(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){XZ(e),e=ZZ(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){XZ(e);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;e=ZZ(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 $Z(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?$Z(e.replace(r[n],s),t,n+1,r,i):i.push(e.replace(r[n],s))}}function dve(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)}),$Z(e,r,0,t,n)}else n.push(e);return n}var eQ=e=>!Array.isArray(e),tQ=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 GZ(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`)};GZ(t).forEach(e=>{let{src:t}=e,{data:r,format:i,loadParser:a,parser:o}=e,s=GZ(t).map(e=>typeof e==`string`?dve(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=eQ(e);e=GZ(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=eQ(e);e=GZ(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=QZ.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??fve(e.src),s!==void 0&&(e.progressSize=s),e}};tQ.RETINA_PREFIX=/@([0-9\.]+)x/;function fve(e){return e.split(`.`).pop().split(`?`).shift().split(`#`).shift()}var nQ=(e,t)=>{let n=t.split(`?`)[1];return n&&(e+=`?${n}`),e},rQ=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=[]}};rQ.BATCH_SIZE=1e3;var iQ=rQ,pve=[`jpg`,`png`,`jpeg`,`avif`,`webp`,`basis`,`etc2`,`bc7`,`bc6h`,`bc5`,`bc4`,`bc3`,`bc2`,`bc1`,`eac`,`astc`];function aQ(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=QZ.dirname(e[0]);t.linkedSheets.forEach((e,i)=>{let a=aQ([`${n}/${t.data.meta.related_multi_packs[i]}`],e,!0);Object.assign(r,a)})}return r}var mve={extension:W.Asset,cache:{test:e=>e instanceof iQ,getCacheableAssets:(e,t)=>aQ(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`&&pve.includes(r)},parse:e=>{let t=e.split(`.`);return{resolution:parseFloat(tQ.RETINA_PREFIX.exec(e)?.[1]??`1`),format:t[t.length-2],src:e}}},loader:{name:`spritesheetLoader`,id:`spritesheet`,extension:{type:W.LoadParser,priority:YZ.Normal,name:`spritesheetLoader`},async testParse(e,t){return QZ.extname(t.src).toLowerCase()===`.json`&&!!e.frames},async parse(e,t,n){let{texture:r,imageFilename:i,textureOptions:a,cachePrefix:o}=t?.data??{},s=QZ.dirname(t.src);s&&s.lastIndexOf(`/`)!==s.length-1&&(s+=`/`);let c;if(r instanceof et)c=r;else{let r=nQ(s+(i??e.meta.image),t.src);c=(await n.load([{src:r,data:a}]))[r]}let l=new iQ({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=nQ(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(mve);var hve=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}},oQ=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}},sQ=/iPhone/i,cQ=/iPod/i,lQ=/iPad/i,uQ=/\biOS-universal(?:.+)Mac\b/i,dQ=/\bAndroid(?:.+)Mobile\b/i,fQ=/Android/i,pQ=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,mQ=/Silk/i,hQ=/Windows Phone/i,gQ=/\bWindows(?:.+)ARM\b/i,_Q=/BlackBerry/i,vQ=/BB10/i,yQ=/Opera Mini/i,bQ=/\b(CriOS|Chrome)(?:.+)Mobile/i,xQ=/Mobile(?:.+)Firefox\b/i,SQ=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function gve(e){return function(t){return t.test(e)}}function CQ(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=gve(n),a={apple:{phone:i(sQ)&&!i(hQ),ipod:i(cQ),tablet:!i(sQ)&&(i(lQ)||SQ(t))&&!i(hQ),universal:i(uQ),device:(i(sQ)||i(cQ)||i(lQ)||i(uQ)||SQ(t))&&!i(hQ)},amazon:{phone:i(pQ),tablet:!i(pQ)&&i(mQ),device:i(pQ)||i(mQ)},android:{phone:!i(hQ)&&i(pQ)||!i(hQ)&&i(dQ),tablet:!i(hQ)&&!i(pQ)&&!i(dQ)&&(i(mQ)||i(fQ)),device:!i(hQ)&&(i(pQ)||i(mQ)||i(dQ)||i(fQ))||i(/\bokhttp\b/i)},windows:{phone:i(hQ),tablet:i(gQ),device:i(hQ)||i(gQ)},other:{blackberry:i(_Q),blackberry10:i(vQ),opera:i(yQ),firefox:i(xQ),chrome:i(bQ),device:i(_Q)||i(vQ)||i(yQ)||i(xQ)||i(bQ)},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=(CQ.default??CQ)(globalThis.navigator),vve=9,wQ=100,yve=0,bve=0,TQ=2,EQ=1,xve=-1e3,Sve=-1e3,Cve=2,DQ=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=`${EQ}px`,e.style.height=`${EQ}px`,e.style.position=`absolute`,e.style.top=`${xve}px`,e.style.left=`${Sve}px`,e.style.zIndex=Cve.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=`${yve}px`,this._div.style.left=`${bve}px`,this._div.style.pointerEvents=`none`,this._div.style.zIndex=TQ.toString(),this._canvasObserver=new hve({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=`
961
961
  color: transparent;
962
962
  pointer-events: none;
963
963
  padding: 0;
@@ -970,7 +970,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
970
970
  -webkit-user-select: none;
971
971
  -moz-user-select: none;
972
972
  -ms-user-select: none;
973
- `,e.accessibleText&&(t.innerText=e.accessibleText)),t.style.width=`${wQ}px`,t.style.height=`${wQ}px`,t.style.backgroundColor=this.debug?`rgba(255,255,255,0.5)`:`transparent`,t.style.position=`absolute`,t.style.zIndex=TQ.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 oQ(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!==vve||!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]}};DQ.extension={type:[W.WebGLSystem,W.WebGPUSystem],name:`accessibility`},DQ.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0};var wve=DQ,Tve={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,accessibleType:`button`,accessibleText:null,accessiblePointerEvents:`auto`,accessibleChildren:!0,_accessibleActive:!1,_accessibleDiv:null,_renderId:-1},OQ;function Eve(e){return OQ===void 0&&(OQ=(()=>{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}})()),OQ}var kQ;async function Dve(e={}){return kQ===void 0&&(kQ=await(async()=>{let t=Gt.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(e)).requestDevice(),!0}catch{return!1}})()),kQ}var AQ=[`webgl`,`webgpu`,`canvas`];async function Ove(e){let t=[];e.preference?(t.push(e.preference),AQ.forEach(n=>{n!==e.preference&&t.push(n)})):t=AQ.slice();let n,r={};for(let i=0;i<t.length;i++){let a=t[i];if(a===`webgpu`&&await Dve()){let{WebGPURenderer:t}=await q(async()=>{let{WebGPURenderer:e}=await import(`./WebGPURenderer-BtRuO5eR.js`);return{WebGPURenderer:e}},__vite__mapDeps([131,128,1]));n=t,r={...e,...e.webgpu};break}else if(a===`webgl`&&Eve(e.failIfMajorPerformanceCaveat??Qt.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:t}=await q(async()=>{let{WebGLRenderer:e}=await import(`./WebGLRenderer-DuCBgcig.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-Cg9iNpF9.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 jQ=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}};jQ.extension=W.Application;var MQ=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()}}};MQ.extension=W.Application,jt.add(jQ),jt.add(MQ);var NQ=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 Ove(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}};NQ._plugins=[];var PQ=NQ;jt.handleByList(W.Application,PQ._plugins),jt.add($t);var kve=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 Ave(e,t){let n=(0,kve.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 jve=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}]`}},Mve=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 Nve(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 Pve,Fve,FQ=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(Pve),n=e.getBounds(Fve);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(Nve(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]}},IQ=(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},Ive=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&&IQ(e,t,d,f,c,u,l)||e>h-c&&t<f&&IQ(e,t,h-c,f,c,u,l)||e>h-c&&t>g-c&&IQ(e,t,h-c,g-c,c,u,l)||e<d&&t>g-c&&IQ(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 Lve(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 Rve(e,t,n,r){let i=0;for(t*=n;i<r;)e[t]=0,e[t+1]=0,t+=n,i++}function LQ(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 zve=new Qe,RQ=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||zve}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}},zQ={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}},Bve={...zQ,extension:{...zQ.extension,name:`ellipse`}},Vve={...zQ,extension:{...zQ.extension,name:`roundedRectangle`}},BQ=1e-4,VQ=1e-4;function Hve(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 HQ(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 UQ(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 WQ(e,t,n,r,i,a){let o=BQ;if(e.length===0)return;let s=t,c=s.alignment;if(t.alignment!==.5){let t=Hve(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+=UQ(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+=HQ(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+=UQ(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+=UQ(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+=UQ(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+=UQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+2:h+=UQ(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+=UQ(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+=HQ(S,C,E,D,M,N,!1,p)));let P=VQ*VQ;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 Uve(e,t,n,r){let i=BQ;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 GQ(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 Wve=[],Gve={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){GQ(e,Wve,t,n,r,i,a)}},Kve={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}},qve={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}},KQ=[{offset:0,color:`white`},{offset:1,color:`black`}],qQ=class e{constructor(...t){this.uid=vt(`fillGradient`),this._tick=0,this.type=`linear`,this.colorStops=[];let n=Jve(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:KQ,c=this._textureSize,{canvas:l,context:u}=XQ(c,1),d=o?u.createLinearGradient(this._textureSize,0,0,0):u.createLinearGradient(0,0,this._textureSize,0);YQ(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:KQ,t=this._textureSize,{canvas:n,context:r}=XQ(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);YQ(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}`}};qQ.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:`local`,type:`linear`,textureSize:256,wrapMode:`clamp-to-edge`},qQ.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:`local`,type:`radial`,textureSize:256,wrapMode:`clamp-to-edge`};var JQ=qQ;function YQ(e,t){for(let n=0;n<t.length;n++){let r=t[n];e.addColorStop(r.offset,r.color)}}function XQ(e,t){let n=Gt.get().createCanvas(e,t);return{canvas:n,context:n.getContext(`2d`)}}function Jve(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]??JQ.defaultLinearOptions.textureSize}),t}var Yve=new Qe,Xve=new bt;function ZQ(e,t,n,r){let i=t.matrix?e.copyFrom(t.matrix).invert():e.identity();if(t.textureSpace===`local`){let e=n.getBounds(Xve);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 JQ)&&a.addressMode===`clamp-to-edge`&&(a.addressMode=`repeat`,a.update()),r&&i.append(Yve.copyFrom(r).invert()),i}var QQ={};jt.handleByMap(W.ShapeBuilder,QQ),jt.add(Kve,Gve,qve,zQ,Bve,Vve);var Zve=new bt,Qve=new Qe;function $ve(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`)eye(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&&$Q(o.shapePath,a,!0,r,n),o&&(t.shapePrimitives[t.shapePrimitives.length-1].holes=o.shapePath.shapePrimitives),$Q(t,a,e,r,n)}}}function eye(e,t,n){let r=[],i=QQ.rectangle,a=Zve;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&&LQ(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(RQ);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 $Q(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=QQ[e.type];if(!d.build(e,u))return;let f=s.length,p=a.length/2,m=`triangle-list`;if(c&&LQ(u,c),n){let n=e.closePath??!0,r=t;r.pixelLine?(Uve(u,n,a,s),m=`line-list`):WQ(u,r,!1,n,a,s)}else if(l){let e=[],t=u.slice();tye(l).forEach(n=>{e.push(t.length/2),t.push(...n)}),GQ(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=ZQ(Qve,t,e,c);Lve(a,2,p,o,h,2,a.length/2-p,n)}else Rve(o,h,2,a.length/2-p);let _=ft.get(RQ);_.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 tye(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n].shape,i=[];QQ[r.type].build(r,i)&&t.push(i)}return t}var nye=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}},rye=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}},e$=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(),$ve(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(rye,{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 nye;return t.context=e,e._gpuData[this._renderer.uid]=t,this._managedContexts.add(e),t}destroy(){this._managedContexts.destroy(),this._renderer=null}};e$.extension={type:[W.WebGLSystem,W.WebGPUSystem],name:`graphicsContext`},e$.defaultOptions={bezierSmoothness:.5};var t$=e$,iye=8,n$=1.1920929e-7,aye=1,r$=.01,i$=0,a$=0;function o$(e,t,n,r,i,a,o,s,c,l){let u=(aye-Math.min(.99,Math.max(0,l??t$.defaultOptions.bezierSmoothness)))/1;return u*=u,oye(t,n,r,i,a,o,s,c,e,u),e}function oye(e,t,n,r,i,a,o,s,c,l){s$(e,t,n,r,i,a,o,s,c,l,0),c.push(o,s)}function s$(e,t,n,r,i,a,o,s,c,l,u){if(u>iye)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>n$&&m>n$){if((p+m)*(p+m)<=l*(u*u+f*f)){if(i$<r$){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<i$){c.push(S,C);return}if(a$!==0){if(h>a$){c.push(n,r);return}if(g>a$){c.push(i,a);return}}}}else if(p>n$){if(p*p<=l*(u*u+f*f)){if(i$<r$){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<i$){c.push(n,r),c.push(i,a);return}if(a$!==0&&h>a$){c.push(n,r);return}}}else if(m>n$){if(m*m<=l*(u*u+f*f)){if(i$<r$){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<i$){c.push(n,r),c.push(i,a);return}if(a$!==0&&h>a$){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}}s$(e,t,f,p,v,y,S,C,c,l,u+1),s$(S,C,b,x,g,_,o,s,c,l,u+1)}var sye=8,cye=1.1920929e-7,lye=1,uye=.01,c$=0;function dye(e,t,n,r,i,a,o,s){let c=(lye-Math.min(.99,Math.max(0,s??t$.defaultOptions.bezierSmoothness)))/1;return c*=c,fye(t,n,r,i,a,o,e,c),e}function fye(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>sye)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>cye){if(v*v<=s*(g*g+_*_)){if(c$<uye){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 pye(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 mye(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)},hye=(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 gye(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)),hye(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=mye(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);o$(e,x,S,n,r,i,s,c,l),x=c,S=l,h+=g}}function _ye(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 vye(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 yye=new bt,bye=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 pye(a,e,t,n,r,i),this}arcToSvg(e,t,n,r,i,a,o){let s=this._currentPoly.points;return gye(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 o$(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 dye(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 jve(e,t,n),r),this}poly(e,t,n){let r=new FQ(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?vye(this,e,t,r):_ye(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 Mve(e,t,n,r),i),this}roundRect(e,t,n,r,i,a){return this.drawShape(new Ive(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 FQ,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 FQ,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(yye);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`?Ave(e,this):this.instructions=e?.slice()??[]}get shapePath(){return this._shapePath||=new bye(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 xye(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]=Sye(n);break;case`radialgradient`:t.defs[n.id]=Cye(n);break;default:break}}}}function Sye(e){let t=new JQ(_$(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 Cye(e){return ot(`[SVG Parser] Radial gradients are not yet supported`),new JQ(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 wye(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 Tye(e){return e.split(/(?=[Mm])/).filter(e=>e.trim().length>0)}function Eye(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 Dye(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$};xye(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=Tye(x),o=i===`evenodd`,s=a.length>1;if(o&&s){let e=a.map(e=>({path:e,area:Eye(e)}));if(e.sort((e,t)=>t.area-e.area),a.length>3||!wye(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 Oye(e){return lt.isColorLike(e)}function E$(e){return e instanceof T$}function D$(e){return e instanceof JQ}function kye(e){return e instanceof et}function Aye(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 jye(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 Mye(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 Oye(e)?Aye(n,e,t):kye(e)?jye(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):Mye(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 Nye=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++,Dye(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,Nye):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 oQ{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 Pye=2048,Fye=new Et,z$=new Et,Iye=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,Fye.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<Pye&&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)}},Lye=1,Rye={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 Iye(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=Lye),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=Rye[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$,zye={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 oQ))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}},Bye=`in vec2 aPosition;
973
+ `,e.accessibleText&&(t.innerText=e.accessibleText)),t.style.width=`${wQ}px`,t.style.height=`${wQ}px`,t.style.backgroundColor=this.debug?`rgba(255,255,255,0.5)`:`transparent`,t.style.position=`absolute`,t.style.zIndex=TQ.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 oQ(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!==vve||!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]}};DQ.extension={type:[W.WebGLSystem,W.WebGPUSystem],name:`accessibility`},DQ.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0};var wve=DQ,Tve={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,accessibleType:`button`,accessibleText:null,accessiblePointerEvents:`auto`,accessibleChildren:!0,_accessibleActive:!1,_accessibleDiv:null,_renderId:-1},OQ;function Eve(e){return OQ===void 0&&(OQ=(()=>{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}})()),OQ}var kQ;async function Dve(e={}){return kQ===void 0&&(kQ=await(async()=>{let t=Gt.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(e)).requestDevice(),!0}catch{return!1}})()),kQ}var AQ=[`webgl`,`webgpu`,`canvas`];async function Ove(e){let t=[];e.preference?(t.push(e.preference),AQ.forEach(n=>{n!==e.preference&&t.push(n)})):t=AQ.slice();let n,r={};for(let i=0;i<t.length;i++){let a=t[i];if(a===`webgpu`&&await Dve()){let{WebGPURenderer:t}=await q(async()=>{let{WebGPURenderer:e}=await import(`./WebGPURenderer-9B_42fBK.js`);return{WebGPURenderer:e}},__vite__mapDeps([131,128,1]));n=t,r={...e,...e.webgpu};break}else if(a===`webgl`&&Eve(e.failIfMajorPerformanceCaveat??Qt.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:t}=await q(async()=>{let{WebGLRenderer:e}=await import(`./WebGLRenderer-DTGXjggz.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-BVt34cwv.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 jQ=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}};jQ.extension=W.Application;var MQ=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()}}};MQ.extension=W.Application,jt.add(jQ),jt.add(MQ);var NQ=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 Ove(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}};NQ._plugins=[];var PQ=NQ;jt.handleByList(W.Application,PQ._plugins),jt.add($t);var kve=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 Ave(e,t){let n=(0,kve.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 jve=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}]`}},Mve=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 Nve(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 Pve,Fve,FQ=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(Pve),n=e.getBounds(Fve);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(Nve(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]}},IQ=(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},Ive=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&&IQ(e,t,d,f,c,u,l)||e>h-c&&t<f&&IQ(e,t,h-c,f,c,u,l)||e>h-c&&t>g-c&&IQ(e,t,h-c,g-c,c,u,l)||e<d&&t>g-c&&IQ(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 Lve(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 Rve(e,t,n,r){let i=0;for(t*=n;i<r;)e[t]=0,e[t+1]=0,t+=n,i++}function LQ(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 zve=new Qe,RQ=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||zve}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}},zQ={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}},Bve={...zQ,extension:{...zQ.extension,name:`ellipse`}},Vve={...zQ,extension:{...zQ.extension,name:`roundedRectangle`}},BQ=1e-4,VQ=1e-4;function Hve(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 HQ(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 UQ(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 WQ(e,t,n,r,i,a){let o=BQ;if(e.length===0)return;let s=t,c=s.alignment;if(t.alignment!==.5){let t=Hve(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+=UQ(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+=HQ(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+=UQ(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+=UQ(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+=UQ(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+=UQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+2:h+=UQ(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+=UQ(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+=HQ(S,C,E,D,M,N,!1,p)));let P=VQ*VQ;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 Uve(e,t,n,r){let i=BQ;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 GQ(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 Wve=[],Gve={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){GQ(e,Wve,t,n,r,i,a)}},Kve={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}},qve={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}},KQ=[{offset:0,color:`white`},{offset:1,color:`black`}],qQ=class e{constructor(...t){this.uid=vt(`fillGradient`),this._tick=0,this.type=`linear`,this.colorStops=[];let n=Jve(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:KQ,c=this._textureSize,{canvas:l,context:u}=XQ(c,1),d=o?u.createLinearGradient(this._textureSize,0,0,0):u.createLinearGradient(0,0,this._textureSize,0);YQ(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:KQ,t=this._textureSize,{canvas:n,context:r}=XQ(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);YQ(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}`}};qQ.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:`local`,type:`linear`,textureSize:256,wrapMode:`clamp-to-edge`},qQ.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:`local`,type:`radial`,textureSize:256,wrapMode:`clamp-to-edge`};var JQ=qQ;function YQ(e,t){for(let n=0;n<t.length;n++){let r=t[n];e.addColorStop(r.offset,r.color)}}function XQ(e,t){let n=Gt.get().createCanvas(e,t);return{canvas:n,context:n.getContext(`2d`)}}function Jve(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]??JQ.defaultLinearOptions.textureSize}),t}var Yve=new Qe,Xve=new bt;function ZQ(e,t,n,r){let i=t.matrix?e.copyFrom(t.matrix).invert():e.identity();if(t.textureSpace===`local`){let e=n.getBounds(Xve);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 JQ)&&a.addressMode===`clamp-to-edge`&&(a.addressMode=`repeat`,a.update()),r&&i.append(Yve.copyFrom(r).invert()),i}var QQ={};jt.handleByMap(W.ShapeBuilder,QQ),jt.add(Kve,Gve,qve,zQ,Bve,Vve);var Zve=new bt,Qve=new Qe;function $ve(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`)eye(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&&$Q(o.shapePath,a,!0,r,n),o&&(t.shapePrimitives[t.shapePrimitives.length-1].holes=o.shapePath.shapePrimitives),$Q(t,a,e,r,n)}}}function eye(e,t,n){let r=[],i=QQ.rectangle,a=Zve;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&&LQ(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(RQ);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 $Q(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=QQ[e.type];if(!d.build(e,u))return;let f=s.length,p=a.length/2,m=`triangle-list`;if(c&&LQ(u,c),n){let n=e.closePath??!0,r=t;r.pixelLine?(Uve(u,n,a,s),m=`line-list`):WQ(u,r,!1,n,a,s)}else if(l){let e=[],t=u.slice();tye(l).forEach(n=>{e.push(t.length/2),t.push(...n)}),GQ(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=ZQ(Qve,t,e,c);Lve(a,2,p,o,h,2,a.length/2-p,n)}else Rve(o,h,2,a.length/2-p);let _=ft.get(RQ);_.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 tye(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n].shape,i=[];QQ[r.type].build(r,i)&&t.push(i)}return t}var nye=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}},rye=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}},e$=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(),$ve(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(rye,{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 nye;return t.context=e,e._gpuData[this._renderer.uid]=t,this._managedContexts.add(e),t}destroy(){this._managedContexts.destroy(),this._renderer=null}};e$.extension={type:[W.WebGLSystem,W.WebGPUSystem],name:`graphicsContext`},e$.defaultOptions={bezierSmoothness:.5};var t$=e$,iye=8,n$=1.1920929e-7,aye=1,r$=.01,i$=0,a$=0;function o$(e,t,n,r,i,a,o,s,c,l){let u=(aye-Math.min(.99,Math.max(0,l??t$.defaultOptions.bezierSmoothness)))/1;return u*=u,oye(t,n,r,i,a,o,s,c,e,u),e}function oye(e,t,n,r,i,a,o,s,c,l){s$(e,t,n,r,i,a,o,s,c,l,0),c.push(o,s)}function s$(e,t,n,r,i,a,o,s,c,l,u){if(u>iye)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>n$&&m>n$){if((p+m)*(p+m)<=l*(u*u+f*f)){if(i$<r$){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<i$){c.push(S,C);return}if(a$!==0){if(h>a$){c.push(n,r);return}if(g>a$){c.push(i,a);return}}}}else if(p>n$){if(p*p<=l*(u*u+f*f)){if(i$<r$){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<i$){c.push(n,r),c.push(i,a);return}if(a$!==0&&h>a$){c.push(n,r);return}}}else if(m>n$){if(m*m<=l*(u*u+f*f)){if(i$<r$){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<i$){c.push(n,r),c.push(i,a);return}if(a$!==0&&h>a$){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}}s$(e,t,f,p,v,y,S,C,c,l,u+1),s$(S,C,b,x,g,_,o,s,c,l,u+1)}var sye=8,cye=1.1920929e-7,lye=1,uye=.01,c$=0;function dye(e,t,n,r,i,a,o,s){let c=(lye-Math.min(.99,Math.max(0,s??t$.defaultOptions.bezierSmoothness)))/1;return c*=c,fye(t,n,r,i,a,o,e,c),e}function fye(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>sye)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>cye){if(v*v<=s*(g*g+_*_)){if(c$<uye){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 pye(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 mye(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)},hye=(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 gye(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)),hye(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=mye(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);o$(e,x,S,n,r,i,s,c,l),x=c,S=l,h+=g}}function _ye(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 vye(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 yye=new bt,bye=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 pye(a,e,t,n,r,i),this}arcToSvg(e,t,n,r,i,a,o){let s=this._currentPoly.points;return gye(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 o$(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 dye(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 jve(e,t,n),r),this}poly(e,t,n){let r=new FQ(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?vye(this,e,t,r):_ye(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 Mve(e,t,n,r),i),this}roundRect(e,t,n,r,i,a){return this.drawShape(new Ive(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 FQ,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 FQ,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(yye);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`?Ave(e,this):this.instructions=e?.slice()??[]}get shapePath(){return this._shapePath||=new bye(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 xye(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]=Sye(n);break;case`radialgradient`:t.defs[n.id]=Cye(n);break;default:break}}}}function Sye(e){let t=new JQ(_$(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 Cye(e){return ot(`[SVG Parser] Radial gradients are not yet supported`),new JQ(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 wye(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 Tye(e){return e.split(/(?=[Mm])/).filter(e=>e.trim().length>0)}function Eye(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 Dye(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$};xye(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=Tye(x),o=i===`evenodd`,s=a.length>1;if(o&&s){let e=a.map(e=>({path:e,area:Eye(e)}));if(e.sort((e,t)=>t.area-e.area),a.length>3||!wye(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 Oye(e){return lt.isColorLike(e)}function E$(e){return e instanceof T$}function D$(e){return e instanceof JQ}function kye(e){return e instanceof et}function Aye(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 jye(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 Mye(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 Oye(e)?Aye(n,e,t):kye(e)?jye(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):Mye(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 Nye=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++,Dye(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,Nye):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 oQ{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 Pye=2048,Fye=new Et,z$=new Et,Iye=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,Fye.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<Pye&&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)}},Lye=1,Rye={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 Iye(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=Lye),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=Rye[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$,zye={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 oQ))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}},Bye=`in vec2 aPosition;
974
974
  out vec2 vTextureCoord;
975
975
 
976
976
  uniform vec4 uInputSize;
@@ -1405,7 +1405,7 @@ fn mainFragment(
1405
1405
  <div class="pixi-host">
1406
1406
  <div class="edge-glow"></div>
1407
1407
  </div>
1408
- `}};customElements.define(`virtual-trackpad-tab`,WSe);var GSe=/^\/versions\/[^/]+(?:\/|$)/;function KSe(e){return GSe.test(e.pathname)&&new URLSearchParams(e.search).get(`session`)?.trim()||null}function F2(e,t=window.location){let n=KSe(t);return n?`hosted-session:${n}:${e}`:e}var I2=1.5,L2=30,qSe=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 JSe(e){try{localStorage.setItem(F2(`xtermInputPanelState`),JSON.stringify(e))}catch{}}function YSe(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(kZ(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=YSe(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}};JSe({...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=K_e(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}))},qSe)}_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`,XSe=50,ZSe=1e3,QSe=1,$Se=1,K2=`terminal-meta`;function q2(){return Ol(`terminal-input-history`,window.location)}function eCe(){return Ol(`openspecui-terminal`,window.location)}function J2(){return Ol(`input-history`,window.location)}function Y2(){return Ol(`terminal-input-history-fallback`,window.location)}function X2(e){return Math.max(QSe,Math.min(ZSe,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 tCe(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(eCe(),$Se);t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(K2)||e.createObjectStore(K2)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)})}async function nCe(){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 iCe(){try{let e=localStorage.getItem(Y2());return e?Z2(JSON.parse(e)):[]}catch{return[]}}function aCe(e){try{localStorage.setItem(Y2(),JSON.stringify(e))}catch{}}async function oCe(){return await nCe()||iCe()}async function n4(e){await rCe(e)||aCe(e)}var sCe=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):XSe}async setLimit(e){let t=X2(e);tCe({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 oCe(),this.getLimit()),this.emit(),!Rl())try{let e=Z2(await Tg.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=Tg.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&&!Rl()&&this.persistRemote(this.records))}async persistRemote(e){try{await Tg.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`,cCe={fontSize:13,fontFamily:``,cursorBlink:!0,cursorStyle:`block`,scrollback:1e3,rendererEngine:`xterm`},i4=1500,a4=1e3,lCe=1e4,o4=`common`,uCe=512*1024,dCe=8,fCe=32,s4=13,pCe=800,mCe=[`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 hCe(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 gCe(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 _Ce=class{instances=new Map;listeners=new Set;idCounter=0;config={...cCe};snapshotCache=null;inputHistoryStore=new sCe;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 l_e(e),n=new HG;return t.loadAddon(n),t.loadAddon(new JG),{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>uCe&&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-DgYpfa64.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(mCe.includes(e))gCe(e),n.push(e);else{let t=await hCe(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-DMzWZWPi.js`);return{trpcClient:e}},[]).then(({trpcClient:e})=>{e.config.update.mutate({terminal:{fontSize:this.config.fontSize}})}).catch(()=>{})},pCe)}zoomFont(e){let t=Math.min(fCe,Math.max(dCe,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(Pl());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=LG.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,lCe)},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=vCe(e.closeCallbackUrl,e.exitCode);t&&yCe(t)}wsSend(e){return this.ws?.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),!0):!1}};function vCe(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 yCe(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=ju.getAreaForPath(t.pathname);ju.push(n,e,null);return}window.open(t.toString(),`_blank`,`noopener,noreferrer`)}new _Ce;var bCe=(0,G.createContext)(null);function xCe(){let e=(0,G.useContext)(bCe);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 SCe(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 CCe(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(Rl())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=Tg.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)(Zc,{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)(fl,{className:`h-3 w-3 animate-pulse`}),(0,K.jsx)(Zc,{className:`h-3 w-3 animate-spin`})]}):e.status===`success`?(0,K.jsx)(yc,{className:`h-3 w-3 text-green-400`}):e.status===`error`?(0,K.jsx)(Tc,{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)(()=>SCe(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 wCe=`schema: spec-driven
1408
+ `}};customElements.define(`virtual-trackpad-tab`,WSe);var GSe=/^\/versions\/[^/]+(?:\/|$)/;function KSe(e){return GSe.test(e.pathname)&&new URLSearchParams(e.search).get(`session`)?.trim()||null}function F2(e,t=window.location){let n=KSe(t);return n?`hosted-session:${n}:${e}`:e}var I2=1.5,L2=30,qSe=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 JSe(e){try{localStorage.setItem(F2(`xtermInputPanelState`),JSON.stringify(e))}catch{}}function YSe(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(kZ(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=YSe(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}};JSe({...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=K_e(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}))},qSe)}_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`,XSe=50,ZSe=1e3,QSe=1,$Se=1,K2=`terminal-meta`;function q2(){return Ol(`terminal-input-history`,window.location)}function eCe(){return Ol(`openspecui-terminal`,window.location)}function J2(){return Ol(`input-history`,window.location)}function Y2(){return Ol(`terminal-input-history-fallback`,window.location)}function X2(e){return Math.max(QSe,Math.min(ZSe,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 tCe(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(eCe(),$Se);t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(K2)||e.createObjectStore(K2)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)})}async function nCe(){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 iCe(){try{let e=localStorage.getItem(Y2());return e?Z2(JSON.parse(e)):[]}catch{return[]}}function aCe(e){try{localStorage.setItem(Y2(),JSON.stringify(e))}catch{}}async function oCe(){return await nCe()||iCe()}async function n4(e){await rCe(e)||aCe(e)}var sCe=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):XSe}async setLimit(e){let t=X2(e);tCe({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 oCe(),this.getLimit()),this.emit(),!Rl())try{let e=Z2(await Tg.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=Tg.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&&!Rl()&&this.persistRemote(this.records))}async persistRemote(e){try{await Tg.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`,cCe={fontSize:13,fontFamily:``,cursorBlink:!0,cursorStyle:`block`,scrollback:1e3,rendererEngine:`xterm`},i4=1500,a4=1e3,lCe=1e4,o4=`common`,uCe=512*1024,dCe=8,fCe=32,s4=13,pCe=800,mCe=[`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 hCe(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 gCe(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 _Ce=class{instances=new Map;listeners=new Set;idCounter=0;config={...cCe};snapshotCache=null;inputHistoryStore=new sCe;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 l_e(e),n=new HG;return t.loadAddon(n),t.loadAddon(new JG),{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>uCe&&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-CHBQyH7_.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(mCe.includes(e))gCe(e),n.push(e);else{let t=await hCe(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-BX7m8KYM.js`);return{trpcClient:e}},[]).then(({trpcClient:e})=>{e.config.update.mutate({terminal:{fontSize:this.config.fontSize}})}).catch(()=>{})},pCe)}zoomFont(e){let t=Math.min(fCe,Math.max(dCe,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(Pl());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=LG.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,lCe)},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=vCe(e.closeCallbackUrl,e.exitCode);t&&yCe(t)}wsSend(e){return this.ws?.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),!0):!1}};function vCe(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 yCe(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=ju.getAreaForPath(t.pathname);ju.push(n,e,null);return}window.open(t.toString(),`_blank`,`noopener,noreferrer`)}new _Ce;var bCe=(0,G.createContext)(null);function xCe(){let e=(0,G.useContext)(bCe);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 SCe(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 CCe(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(Rl())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=Tg.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)(Zc,{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)(fl,{className:`h-3 w-3 animate-pulse`}),(0,K.jsx)(Zc,{className:`h-3 w-3 animate-spin`})]}):e.status===`success`?(0,K.jsx)(yc,{className:`h-3 w-3 text-green-400`}):e.status===`error`?(0,K.jsx)(Tc,{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)(()=>SCe(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 wCe=`schema: spec-driven
1409
1409
 
1410
1410
  context: |
1411
1411
 
@@ -1426,7 +1426,7 @@ rules:
1426
1426
  ${e.right}px ${e.top}px,
1427
1427
  ${e.left}px ${e.top}px
1428
1428
  )`}return(0,K.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function w9(e,t){e&&Object.assign(e.style,t)}var T9={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Ike={position:`fixed`},Lke=G.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=MTe,..._}=e,{store:v,listRef:y,labelsRef:b,alignItemWithTriggerActiveRef:x,selectedItemTextRef:S,valuesRef:C,initialValueRef:w,popupRef:T,setValue:E}=Q7(),D=$7(),O=r7(v,d9.open),k=r7(v,d9.mounted),A=r7(v,d9.modal),j=r7(v,d9.value),M=r7(v,d9.openMethod),N=r7(v,d9.positionerElement),P=r7(v,d9.triggerElement),F=r7(v,d9.isItemEqualToValue),I=r7(v,d9.transitionStatus),ee=G.useRef(null),L=G.useRef(null),[R,z]=G.useState(h),te=k&&R&&M!==`touch`;!k&&R!==h&&z(h),h3(()=>{k||(d9.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),d9.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,k]),G.useImperativeHandle(x,()=>te),kke((te||A)&&O&&M!==`touch`,P);let B=R7({anchor:n,floatingRootContext:D,positionMethod:r,mounted:k,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??te,collisionAvoidance:g,keepMounted:!0}),ne=te?`none`:B.side,re=te?Ike:B.positionerStyles,V=G.useMemo(()=>{let e={};return O||(e.pointerEvents=`none`),{role:`presentation`,hidden:!k,style:{...re,...e}}},[O,k,re]),H={open:O,side:ne,align:B.align,anchorHidden:B.anchorHidden},ie=u5(`div`,e,{ref:[t,A8(e=>{v.set(`positionerElement`,e)})],state:H,stateAttributesMapping:j7,props:[V,B7(I),_]}),ae=G.useRef(0),oe=A8(e=>{if(e.size===0&&ae.current===0||C.current.length===0)return;let t=ae.current;if(ae.current=e.size,e.size===t)return;let n=w8(_8);if(t!==0&&!v.state.multiple&&j!==null&&o9(C.current,j,F)===-1){let e=w.current,t=e!=null&&o9(C.current,e,F)!==-1?e:null;E(t,n),t===null&&(v.set(`selectedIndex`,null),S.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(j)){let e=e=>o9(C.current,e,F)!==-1,t=j.filter(t=>e(t));(t.length!==j.length||t.some(e=>!$Oe(j,e,F)))&&(E(t,n),t.length===0&&(v.set(`selectedIndex`,null),S.current=null))}if(O&&te){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};w9(N,e),w9(T.current,e)}}),se=G.useMemo(()=>({...B,side:ne,alignItemWithTriggerActive:te,setControlledAlignItemWithTrigger:z,scrollUpArrowRef:ee,scrollDownArrowRef:L}),[B,ne,te,z]);return(0,K.jsx)(jke,{elementsRef:y,labelsRef:b,onMapChange:oe,children:(0,K.jsxs)(S9.Provider,{value:se,children:[k&&A&&(0,K.jsx)(Fke,{inert:IOe(!O),cutout:P}),ie]})})});function E9(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var D9=`base-ui-disable-scrollbar`,O9={className:D9,getElement(e){return(0,K.jsx)(`style`,{nonce:e,href:D9,precedence:`base-ui:low`,children:`.${D9}{scrollbar-width:none}.${D9}::-webkit-scrollbar{display:none}`})}},Rke=G.createContext(void 0);function zke(e){let t=G.useContext(Rke);if(t===void 0&&!e)throw Error(g3(69));return t}var k9=`ArrowUp`,A9=`ArrowDown`,j9=`ArrowLeft`,M9=`ArrowRight`,N9=`Home`,Bke=new Set([j9,M9]),Vke=new Set([k9,A9]),Hke=new Set([...Bke,...Vke]);new Set([...Hke,N9,`End`]);var Uke=new Set([k9,A9,j9,M9,N9,`End`]);function P9(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var Wke=G.createContext(void 0),Gke={disableStyleElements:!1};function Kke(){return G.useContext(Wke)??Gke}var F9=1,qke={...j7,...l7},Jke=G.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o,popupRef:s,onOpenChangeComplete:c,setOpen:l,valueRef:u,selectedItemTextRef:d,keyboardActiveRef:f,multiple:p,handleScrollArrowVisibility:m,scrollHandlerRef:h,highlightItemOnHover:g}=Q7(),{side:_,align:v,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:b,scrollDownArrowRef:x,scrollUpArrowRef:S}=C9(),C=zke(!0)!=null,w=$7(),{nonce:T,disableStyleElements:E}=Kke(),D=S3(),O=r7(o,d9.id),k=r7(o,d9.open),A=r7(o,d9.mounted),j=r7(o,d9.popupProps),M=r7(o,d9.transitionStatus),N=r7(o,d9.triggerElement),P=r7(o,d9.positionerElement),F=r7(o,d9.listElement),I=G.useRef(0),ee=G.useRef(!1),L=G.useRef(0),R=G.useRef(!1),z=G.useRef({}),te=P8(),B=A8(e=>{if(!P||!s.current||!R.current)return;if(ee.current||!y){m();return}let t=P.style.top===`0px`,n=P.style.bottom===`0px`,r=P.getBoundingClientRect().height,i=i8(P),a=getComputedStyle(P),o=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=I9(getComputedStyle(s.current)),u=Math.min(i.documentElement.clientHeight-o-c,l),d=e.scrollTop,f=L9(e),p=0,h=null,g=!1,_=!1,v=e=>{P.style.height=`${e}px`},b=(t,n)=>{let i=P9(t,0,u-r);i>0&&v(r+i),e.scrollTop=n,u-(r+i)<=F9&&(ee.current=!0),m()};if(t){let e=f-d,t=r+e,n=Math.min(t,u);if(p=n,e<=F9){b(e,f);return}u-n>F9?_=!0:g=!0}else if(n){let e=d,t=r+e,n=Math.min(t,u),i=t-u;if(p=n,e<=F9){b(e,0);return}u-n>F9?h=0:(g=!0,d<f&&(h=d-(e-i)))}if(p=Math.ceil(p),p!==0&&v(p),_||h!=null){let t=L9(e),n=_?t:P9(h,0,t);Math.abs(e.scrollTop-n)>F9&&(e.scrollTop=n)}(g||p>=u-F9)&&(ee.current=!0),m()});G.useImperativeHandle(h,()=>B,[B]),u7({open:k,ref:s,onComplete(){k&&c?.(!0)}});let ne={open:k,transitionStatus:M,side:_,align:v};h3(()=>{!P||!s.current||Object.keys(z.current).length||(z.current={top:P.style.top||`0`,left:P.style.left||`0`,right:P.style.right,height:P.style.height,bottom:P.style.bottom,minHeight:P.style.minHeight,maxHeight:P.style.maxHeight,marginTop:P.style.marginTop,marginBottom:P.style.marginBottom})},[s,P]),h3(()=>{k||y||(R.current=!1,ee.current=!1,I.current=0,L.current=0,w9(P,z.current))},[k,y,P,s]),h3(()=>{let e=s.current;if(!(!k||!N||!P||!e||o.state.transitionStatus===`ending`)){if(!y){R.current=!0,te.request(m),e.style.removeProperty(`--transform-origin`);return}queueMicrotask(()=>{let t=Xke(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(P),n=getComputedStyle(e),r=i8(N),i=T3(P),a=Yke(N),o=R9(N.getBoundingClientRect(),a),s=R9(P.getBoundingClientRect(),a),c=o.left,l=o.height,f=F||e,p=f.scrollHeight,h=parseFloat(n.borderBottomWidth),g=parseFloat(t.marginTop)||10,_=parseFloat(t.marginBottom)||10,v=parseFloat(t.minHeight)||100,y=I9(n),x=r.documentElement.clientHeight-g-_,S=r.documentElement.clientWidth,C=x-o.bottom+l,w=d.current,T=u.current,E,D=0,O=0;if(w&&T){let e=R9(T.getBoundingClientRect(),a);E=R9(w.getBoundingClientRect(),a);let t=e.left-c,n=E.left-s.left,r=e.top-o.top+e.height/2,i=E.top-s.top+E.height/2;D=t-n,O=i-r}let k=C+O+_+h,A=Math.min(x,k),j=x-g-_,M=k-A,L=Math.max(5,c+D),te=S-5,B=Math.max(0,L+s.width-te);P.style.left=`${L-B}px`,P.style.height=`${A}px`,P.style.maxHeight=`auto`,P.style.marginTop=`${g}px`,P.style.marginBottom=`${_}px`,e.style.height=`100%`;let ne=L9(f),re=M>=ne-F9;re&&(A=Math.min(x,s.height)-(M-ne));let V=o.top<20||o.bottom>x-20||Math.ceil(A)+F9<Math.min(p,v),H=(i.visualViewport?.scale??1)!==1&&J3;if(V||H){R.current=!0,w9(P,z.current),ws.flushSync(()=>b(!1));return}if(re){let e=Math.max(0,x-k);P.style.top=s.height>=j?`0`:`${e}px`,P.style.height=`${A}px`,f.scrollTop=L9(f),I.current=Math.max(v,A)}else P.style.bottom=`0`,I.current=Math.max(v,A),f.scrollTop=M;if(E){let t=s.top,n=s.height,r=E.top+E.height/2,i=P9(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(I.current===x||A>=y)&&(ee.current=!0),m(),setTimeout(()=>{R.current=!0})}finally{t()}})}},[o,k,P,N,u,d,s,m,y,b,te,x,S,F]),G.useEffect(()=>{if(!y||!P||!k)return;let e=T3(P);function t(e){l(!1,w8(BTe,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[l,y,P,k]);let re={...F?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":p||void 0,id:`${O}-list`},onKeyDown(e){f.current=!0,C&&Uke.has(e.key)&&e.stopPropagation()},onMouseMove(){f.current=!1},onPointerLeave(e){if(!g||E9(e)||e.pointerType===`touch`)return;let t=e.currentTarget;D.start(0,()=>{o.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){F||B(e.currentTarget)},...y&&{style:F?{height:`100%`}:T9}},V=u5(`div`,e,{ref:[t,s],state:ne,stateAttributesMapping:qke,props:[j,re,B7(M),{className:!F&&y?O9.className:void 0},a]});return(0,K.jsxs)(G.Fragment,{children:[!E&&O9.getElement(T),(0,K.jsx)(CEe,{context:w,modal:!1,disabled:!A,returnFocus:i,restoreFocus:!0,children:V})]})});function I9(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function L9(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function Yke(e){return V5.getScale(e)}function R9(e,t){return P6({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}var z9=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Xke(e){let{style:t}=e,n={};for(let[e,r]of z9)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of z9){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Zke=G.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a,scrollHandlerRef:o}=Q7(),{alignItemWithTriggerActive:s}=C9(),c=r7(a,d9.hasScrollArrows),l=r7(a,d9.openMethod),u=r7(a,d9.multiple),d={id:`${r7(a,d9.id)}-list`,role:`listbox`,"aria-multiselectable":u||void 0,onScroll(e){o.current?.(e.currentTarget)},...s&&{style:T9},className:c&&l!==`touch`?O9.className:void 0};return u5(`div`,e,{ref:[t,A8(e=>{a.set(`listElement`,e)})],props:[d,i]})}),B9=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function Qke(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=Ake(),f=G.useRef(-1),[p,m]=G.useState(a??(i===B9.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=G.useRef(null),g=G.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return h3(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),h3(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),G.useMemo(()=>({ref:g,index:p}),[p,g])}var V9=G.createContext(void 0);function H9(){let e=G.useContext(V9);if(!e)throw Error(g3(57));return e}var $ke=G.memo(G.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=G.useRef(null),u=Qke({label:a,textRef:l,indexGuessBehavior:B9.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:b}=Q7(),x=S3(),S=r7(d,d9.isActive,u.index),C=r7(d,d9.isSelected,u.index,i),w=r7(d,d9.isSelectedByFocus,u.index),T=r7(d,d9.isItemEqualToValue),E=u.index,D=E!==-1,O=G.useRef(null),k=O8(E);h3(()=>{if(!D)return;let e=_.current;return e[E]=i,()=>{delete e[E]}},[D,E,i,_]),h3(()=>{if(!D)return;let e=d.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&a9(i,t,T)&&d.set(`selectedIndex`,E)},[D,E,y,T,d,i]);let A={disabled:o,selected:C,highlighted:S},j=f({active:S,selected:C});j.onFocus=void 0,j.id=void 0;let M=G.useRef(null),N=G.useRef(`mouse`),P=G.useRef(!1),{getButtonProps:F,buttonRef:I}=m9({disabled:o,focusableWhenDisabled:!0,native:s,composite:!0});function ee(e){let t=d.state.value;if(y){let n=Array.isArray(t)?t:[];m(C?eke(n,i,T):[...n,i],w8(x8,e))}else m(i,w8(x8,e)),p(!1,w8(x8,e))}let L={role:`option`,"aria-selected":C,tabIndex:S?0:-1,onFocus(){d.set(`activeIndex`,E)},onMouseEnter(){!v.current&&d.state.selectedIndex===null&&b&&d.set(`activeIndex`,E)},onMouseMove(){b&&d.set(`activeIndex`,E)},onMouseLeave(e){!b||v.current||E9(e)||x.start(0,()=>{d.state.activeIndex===E&&d.set(`activeIndex`,null)})},onTouchStart(){h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){M.current=e.key,d.set(`activeIndex`,E),e.key===` `&&g.current&&e.preventDefault()},onClick(e){P.current=!1,!(e.type===`keydown`&&M.current===null)&&(o||e.type===`keydown`&&M.current===` `&&g.current||N.current!==`touch`&&!S||(M.current=null,ee(e.nativeEvent)))},onPointerEnter(e){N.current=e.pointerType},onPointerDown(e){N.current=e.pointerType,P.current=!0},onMouseUp(){if(o)return;if(P.current){P.current=!1;return}let e=!h.current.allowSelectedMouseUp&&C,t=!h.current.allowUnselectedMouseUp&&!C;e||t||N.current!==`touch`&&!S||O.current?.click()}},R=u5(`div`,e,{ref:[I,t,u.ref,O],state:A,props:[j,L,c,F]}),z=G.useMemo(()=>({selected:C,indexRef:k,textRef:l,selectedByFocus:w,hasRegistered:D}),[C,k,l,w,D]);return(0,K.jsx)(V9.Provider,{value:z,children:R})})),eAe=G.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=H9();return n||r?(0,K.jsx)(tAe,{...e,ref:t}):null}),tAe=G.memo(G.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=H9(),s=G.useRef(null),{transitionStatus:c,setMounted:l}=s7(o),u=u5(`span`,e,{ref:[t,s],state:{selected:o,transitionStatus:c},props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:l7});return u7({open:o,ref:s,onComplete(){o||l(!1)}}),u})),nAe=G.memo(G.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=H9(),{selectedItemTextRef:o}=Q7(),{className:s,render:c,...l}=e;return u5(`div`,e,{ref:[G.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:l})}));function rAe({value:e,options:t,onValueChange:n,ariaLabel:r,placeholder:i=`Select…`,renderTrigger:a,className:o,popupClassName:s,listClassName:c,itemClassName:l,positionerClassName:u,sideOffset:d=8,modal:f=!1}){let p=t.find(t=>t.value===e);return(0,K.jsxs)(lke,{value:e,modal:f,onValueChange:e=>{e!==null&&n(e)},children:[(0,K.jsx)(vke,{"aria-label":r,className:e=>c3(`text-foreground inline-flex min-w-0 items-center gap-1.5 text-xs outline-none transition-colors`,`focus-visible:ring-ring/60 focus-visible:ring-2`,e.open?`bg-muted/40`:``,o),children:a?a({selectedOption:p}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(bke,{placeholder:i,className:`truncate`,children:()=>p?.label??i}),(0,K.jsx)(xke,{className:`text-muted-foreground flex shrink-0`,children:(0,K.jsx)(bc,{className:`h-3.5 w-3.5`})})]})}),(0,K.jsx)(Cke,{children:(0,K.jsx)(Lke,{sideOffset:d,className:c3(`z-50 select-none outline-none`,u),children:(0,K.jsx)(Jke,{className:c3(`bg-card text-foreground border-border w-max min-w-28 rounded-md border p-1 shadow-lg`,`origin-(--transform-origin) transition-[transform,opacity] duration-150`,`data-[ending-style]:translate-y-0.5 data-[ending-style]:opacity-0`,`data-[starting-style]:translate-y-0.5 data-[starting-style]:opacity-0`,s),children:(0,K.jsx)(Zke,{className:c3(`max-h-64 overflow-y-auto py-0.5`,c),children:t.map(e=>(0,K.jsxs)($ke,{value:e.value,disabled:e.disabled,label:typeof e.label==`string`?e.label:void 0,className:e=>c3(`grid cursor-default grid-cols-[0.8rem_minmax(0,1fr)] items-center gap-1.5 rounded-sm px-2 py-1.5 text-xs outline-none`,e.highlighted&&`bg-muted text-foreground`,e.selected&&`text-foreground`,e.disabled&&`opacity-50`,l),children:[(0,K.jsx)(eAe,{className:`text-primary flex h-3.5 w-3.5 items-center justify-center`,children:(0,K.jsx)(yc,{className:`h-3.5 w-3.5`})}),(0,K.jsx)(nAe,{className:`whitespace-nowrap`,children:e.label})]},e.value))})})})})]})}function iAe(e){return e.type===`commit`?{type:`commit`,hash:e.hash}:{type:`uncommitted`}}function aAe(e){return e.type===`commit`?`/git/commit/${e.hash}`:`/git/uncommitted`}function oAe(e){return aAe(iAe(e))}function sAe(){return jg((0,G.useCallback)(e=>Tg.dashboard.subscribe.subscribe(void 0,{onData:e.onData,onError:e.onError}),[]),Nee,[],`dashboard.subscribe`)}function cAe(){return{running:!1,inFlight:0,lastStartedAt:null,lastFinishedAt:null,lastReason:null,lastError:null}}function lAe(){return jg((0,G.useCallback)(e=>Tg.dashboard.subscribeGitTaskStatus.subscribe(void 0,{onData:e.onData,onError:e.onError}),[]),async()=>cAe(),[],`dashboard.subscribeGitTaskStatus`)}async function uAe(e){Rl()||await Tg.dashboard.refreshGitSnapshot.mutate({reason:e})}async function dAe(e){Rl()||await Tg.dashboard.removeDetachedWorktree.mutate({path:e})}var fAe=[`proposal`,`design`,`specs`,`tasks`],pAe=[{value:`30s`,label:`30s`},{value:`5min`,label:`5min`},{value:`30min`,label:`30min`},{value:`none`,label:`none`}];function mAe(e){return e===`manual-button`||e?.startsWith(`auto-refresh:`)===!0}function hAe(e){return{specifications:{state:`ok`},requirements:{state:`ok`},activeChanges:{state:`invalid`,reason:`objective-history-unavailable`},inProgressChanges:{state:`invalid`,reason:`objective-history-unavailable`},completedChanges:{state:`ok`},taskCompletionPercent:{state:`invalid`,reason:e===null?`semantic-uncomputable`:`objective-history-unavailable`}}}function gAe(){return{specifications:`monotonic`,requirements:`monotonic`,activeChanges:`bidirectional`,inProgressChanges:`bidirectional`,completedChanges:`monotonic`,taskCompletionPercent:`bidirectional`}}function _Ae(e){return e?e.split(/[-_]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):`Unknown`}function vAe(e,t){if(e!==`spec-driven`)return t;let n=new Map;for(let[e,t]of fAe.entries())n.set(t,e);return[...t].sort((e,t)=>{let r=n.get(e),i=n.get(t);return r!==void 0&&i!==void 0?r-i:r===void 0?i===void 0?e.localeCompare(t):1:-1})}function yAe(e,t,n){let r=new Map;for(let t of e){let e=t.schemaName||`unknown`,n=r.get(e);n?n.push(t):r.set(e,[t])}let i=new Map;for(let e of t)i.set(e.schemaName,e.artifactIds);return[...new Set([...t.map(e=>e.schemaName),...r.keys()])].map(e=>{let t=r.get(e)??[],a=[...i.get(e)??[]],o=new Set;for(let e of a)o.add(e);for(let e of t)for(let t of e.artifacts)o.has(t.id)||(o.add(t.id),a.push(t.id));let s=vAe(e,a).map(e=>{let n=0,r=0,i=0;for(let a of t){let t=a.artifacts.find(t=>t.id===e);t&&(t.status===`done`&&(n+=1),t.status===`ready`&&(r+=1),t.status===`blocked`&&(i+=1))}return{id:e,label:_Ae(e),draft:n,ready:r,blocked:i}});return{schemaName:e,readyToArchive:t.filter(e=>e.isComplete&&n.has(e.changeName)).length,steps:s}}).sort((e,t)=>e.schemaName===`spec-driven`?-1:t.schemaName===`spec-driven`?1:e.schemaName.localeCompare(t.schemaName))}function bAe(e){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)|0;return Math.abs(t)%360}function xAe(e){let t=bAe(e),n=`oklch(0.97 0.016 ${t})`,r=`oklch(0.44 0.1 ${t})`;return{border:`oklch(0.84 0.06 ${t})`,background:n,text:r,arrow:`color-mix(in oklab, ${n} 90%, ${r})`}}function SAe(){let e=Rl(),{data:t,isLoading:n,error:r}=sAe(),{data:i}=lAe(),{data:a}=Ug(),{data:o}=Hg(),[s,c]=(0,G.useState)(()=>HCe()),[l,u]=(0,G.useState)(null),[d,f]=(0,G.useState)(()=>Date.now()),[p,m]=(0,G.useState)(()=>typeof document>`u`?!0:document.visibilityState===`visible`),[h,g]=(0,G.useState)(null),_=(0,G.useCallback)(()=>{nv.activatePop(`/opsx-propose`)},[]),v=(0,G.useCallback)(()=>{nv.activatePop(`/opsx-new`)},[]),y=(0,G.useCallback)(async e=>uAe(e),[]),b=(0,G.useRef)(0),[x,S]=(0,G.useState)(null),C=(0,G.useRef)(null),w=(0,G.useRef)(i),T=(0,G.useRef)(h),E=h?.reason??null,D=(0,G.useCallback)(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),O=(0,G.useCallback)(e=>{let t=Date.now();g({reason:e,requestedAt:t}),y(e).then(()=>{w.current?.running||g(n=>n?.reason===e&&n.requestedAt===t?null:n)}).catch(n=>{console.error(`[Dashboard] Failed to refresh git snapshot:`,n),g(n=>n?.reason===e&&n.requestedAt===t?null:n)})},[y]),k=(0,G.useCallback)(()=>{D();let t=w4(s),n=s===`none`?null:WCe(s);if(e||t===null||n===null||h!==null||!p){u(null);return}let r=Date.now();u(r),f(r),C.current=window.setTimeout(()=>{C.current=null,u(null),f(Date.now()),O(n)},t)},[D,s,h,p,O,e]),A=(0,G.useCallback)(()=>{D(),u(null),f(Date.now()),O(`manual-button`)},[D,O]),j=(0,G.useCallback)(async e=>{if(!(Rl()||e.isCurrent||!e.detached||U7(e.path))&&window.confirm([`Remove detached worktree?`,``,e.path,``,`This runs git worktree remove --force.`].join(`
1429
- `))){S(e.path);try{await dAe(e.path)}catch(e){console.error(`[Dashboard] Failed to remove detached worktree:`,e),window.alert(e instanceof Error?e.message:`Failed to remove detached worktree.`)}finally{S(t=>t===e.path?null:t)}}},[]);(0,G.useEffect)(()=>{T.current=h},[h]),(0,G.useEffect)(()=>{if(e)return;let t=e=>{if(T.current!==null)return;let t=Date.now();t-b.current<700||(b.current=t,D(),u(null),f(Date.now()),O(e))},n=()=>{t(`window-focus`)},r=()=>{let e=document.visibilityState===`visible`;m(e),e&&t(`document-visible`)};return window.addEventListener(`focus`,n),document.addEventListener(`visibilitychange`,r),t(`dashboard-mount`),()=>{window.removeEventListener(`focus`,n),document.removeEventListener(`visibilitychange`,r)}},[D,O,e]),(0,G.useEffect)(()=>{w.current=i},[i]),(0,G.useEffect)(()=>{!h||!i||i.running===!1&&(i.lastFinishedAt??0)>=h.requestedAt&&g(e=>e?.reason===h.reason&&e.requestedAt===h.requestedAt?null:e)},[h,i]),(0,G.useEffect)(()=>{e||UCe(s)},[s,e]),(0,G.useEffect)(()=>{if(!e)return k(),()=>{D()}},[D,k,e]),(0,G.useEffect)(()=>{let t=w4(s);if(e||t===null||l===null)return;let n=()=>{f(Date.now())};n();let r=window.setInterval(n,250);return()=>{window.clearInterval(r)}},[l,s,e]);let M=t?.activeChanges??[],N=(0,G.useMemo)(()=>new Set(M.map(e=>e.id)),[M]),P=(0,G.useMemo)(()=>(a??[]).filter(e=>N.has(e.changeName)),[a,N]),F=(0,G.useMemo)(()=>{let e=o?.schemas??[],t=o?.schemaDetails??{};return e.map(e=>{let n=t[e.name]?.artifacts.map(e=>e.id)??[],r=n.length>0?n:e.artifacts;return{schemaName:e.name,artifactIds:r}})},[o]),I=(0,G.useMemo)(()=>new Set(M.filter(e=>e.progress.total===0||e.progress.completed>=e.progress.total).map(e=>e.id)),[M]),ee=(0,G.useMemo)(()=>yAe(P,F,I),[P,I,F]),L=(0,G.useMemo)(()=>{let e=o?.schemaDetails??{},t=new Map;for(let[n,r]of Object.entries(e)){if(!r?.applyTracks)continue;let e=r.artifacts.find(e=>e.outputPath===r.applyTracks);e?.id&&t.set(n,e.id)}return t},[o]);if(n&&!t)return(0,K.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading dashboard...`});if(r)return(0,K.jsxs)(`div`,{className:`text-destructive flex items-center gap-2`,children:[(0,K.jsx)(Sc,{className:`h-5 w-5`}),`Error loading dashboard: `,r.message]});let R=t?.summary??{specifications:0,requirements:0,activeChanges:0,inProgressChanges:0,completedChanges:0,archivedTasksCompleted:0,tasksTotal:0,tasksCompleted:0,taskCompletionPercent:null},z=t?.cardAvailability??hAe(R.taskCompletionPercent),te=t?.trendKinds??gAe(),B=t?.git??{defaultBranch:`main`,worktrees:[]},ne=!e||B.worktrees.some(e=>e.entries.length>0),re=M.length>0,V=B.worktrees.find(e=>e.isCurrent)??null,H=B.worktrees.filter(e=>!e.isCurrent),ie=w4(s),ae=h===null?KCe(l,ie,d):0,oe=ie!==null&&h===null,se=h!==null&&mAe(E),ce=h!==null;return(0,K.jsxs)(`div`,{className:`min-w-0 space-y-6 p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`h1`,{className:`font-nav flex items-center gap-2 text-2xl font-bold`,children:[(0,K.jsx)(qc,{className:`h-6 w-6 shrink-0`}),`Dashboard`]}),(0,K.jsxs)(`button`,{type:`button`,onClick:_,className:`bg-primary text-primary-foreground inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm hover:opacity-90`,title:`Recommended workflow start is /opsx:propose.`,children:[(0,K.jsx)(fl,{className:`h-4 w-4`}),`Start (/opsx:propose)`]})]}),(0,K.jsxs)(`section`,{className:`space-y-2`,children:[(0,K.jsx)(`h2`,{className:`text-sm font-medium`,children:`Historical Trends`}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,K.jsx)(S4,{label:`Specifications / Requirements`,value:`${R.specifications} / ${R.requirements}`,icon:Pc,availability:z.specifications,trendKind:te.specifications,points:t?.trends.specifications??[],triColorPoints:[],className:`min-h-44 sm:min-h-48 lg:min-h-52 xl:min-h-56`}),(0,K.jsx)(S4,{label:`Archived Changes / Completed Tasks`,value:`${R.completedChanges} / ${R.archivedTasksCompleted}`,icon:hc,availability:z.completedChanges,trendKind:te.completedChanges,points:t?.trends.completedChanges??[],triColorPoints:[],className:`min-h-44 sm:min-h-48 lg:min-h-52 xl:min-h-56`})]})]}),(0,K.jsxs)(`div`,{className:`grid min-w-0 gap-3 ${ne?`xl:grid-cols-2`:`xl:grid-cols-1`}`,children:[(0,K.jsxs)(`section`,{className:`@container min-w-0 space-y-2`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h2`,{className:`font-medium`,children:`Workflow Progress`}),(0,K.jsxs)(`p`,{className:`text-muted-foreground text-xs`,children:[`Status coverage: `,P.length,`/`,M.length,` active changes have workflow status snapshots.`]})]}),ee.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No workflow status available.`}):(0,K.jsx)(`div`,{className:`grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),1fr))] gap-2`,children:ee.map(e=>(0,K.jsxs)(`section`,{className:`border-border/70 bg-card min-w-0 rounded-md border p-2`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,K.jsx)(`div`,{className:`min-w-0`,children:(0,K.jsx)(`h3`,{className:`text-xs font-semibold`,children:e.schemaName})}),e.readyToArchive>0?(0,K.jsxs)(`span`,{className:`text-muted-foreground rounded border px-1 py-0.5 text-[10px]`,children:[`archive-ready `,e.readyToArchive]}):null]}),(0,K.jsx)(`div`,{className:`grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,8rem),1fr))] gap-2`,children:e.steps.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground border-border/70 rounded-md border border-dashed px-2 py-1.5 text-[11px]`,children:`No artifacts in schema.`}):e.steps.map(t=>{let n=xAe(t.id);return(0,K.jsxs)(`article`,{className:`relative min-w-0 overflow-hidden rounded-md border px-1.5 py-1`,style:{borderColor:n.border,backgroundColor:n.background,color:n.text},children:[(0,K.jsx)(_c,{className:`pointer-events-none absolute right-[10%] top-1/2 h-12 w-12 -translate-y-1/2`,style:{color:n.arrow}}),(0,K.jsx)(`div`,{className:`relative mb-0.5 pr-6 text-xs font-semibold`,children:t.label}),(0,K.jsxs)(`div`,{className:`relative space-y-0 text-[10px]`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-current/75`,children:`Draft`}),(0,K.jsx)(`span`,{className:`font-mono`,children:t.draft})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-current/75`,children:`Ready`}),(0,K.jsx)(`span`,{className:`font-mono`,children:t.ready})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-current/75`,children:`Blocked`}),(0,K.jsx)(`span`,{className:`font-mono`,children:t.blocked})]})]})]},`${e.schemaName}:${t.id}`)})})]},e.schemaName))})]}),ne?(0,K.jsxs)(`section`,{className:`min-w-0 space-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`h2`,{className:`font-medium`,children:`Git Snapshot`}),(0,K.jsxs)(`p`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,B.defaultBranch]})]}),e?null:(0,K.jsxs)(`div`,{className:`border-border bg-card inline-flex overflow-hidden rounded-md border`,children:[(0,K.jsx)(rAe,{value:s,options:pAe,onValueChange:c,ariaLabel:`Git auto refresh`,className:`text-foreground/75 hover:text-foreground border-r-current/10 bg-muted/20 relative isolate h-7 w-9 shrink-0 justify-center rounded-none border-0 border-r px-0`,positionerClassName:`z-50`,popupClassName:`min-w-[7rem]`,renderTrigger:({selectedOption:e})=>(0,K.jsxs)(`span`,{className:`relative inline-flex h-full w-full items-center justify-center overflow-hidden`,children:[(0,K.jsx)(`span`,{className:`bg-muted/20 pointer-events-none absolute inset-0`}),oe?(0,K.jsx)(`span`,{className:`bg-primary/30 dark:bg-primary/35 pointer-events-none absolute inset-y-0 left-0 transition-[width]`,style:{width:`${ae*100}%`}}):null,(0,K.jsx)(`span`,{className:`relative z-10 inline-flex items-center justify-center`,children:(0,K.jsx)(UOe,{preset:e?.value??s})})]})}),(0,K.jsxs)(`button`,{type:`button`,onClick:A,disabled:ce,className:`inline-flex h-7 items-center gap-1 px-2 py-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-70 ${se?`text-primary bg-primary/10`:`text-foreground/75 hover:text-foreground`}`,children:[(0,K.jsx)(al,{className:`h-3.5 w-3.5 ${se?`animate-spin`:``}`}),`Refresh`]})]})]}),(0,K.jsxs)(`div`,{className:`border-border/80 bg-card min-w-0 rounded-lg border p-3`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5`,children:[(0,K.jsx)(Vc,{className:`text-muted-foreground h-4 w-4 shrink-0`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,B.defaultBranch]})]}),V?(0,K.jsxs)(`div`,{className:`space-y-0`,children:[(0,K.jsx)(K7,{worktree:V,emphasize:!0,removing:x===V.path,onRemoveDetachedWorktree:j}),(0,K.jsx)(`div`,{className:`-mt-px space-y-1 border-l pl-3 pt-2 ${BOe}`,children:GCe(V.entries).map(t=>(0,K.jsx)(GOe,{entry:t,onSelect:e?void 0:(e,t)=>{nv.push(`bottom`,oAe(e),W_(void 0,WOe(e)),{source:t,sharedElements:G7(e)})}},t.type===`commit`?t.hash:`${t.type}:${t.updatedAt??`none`}`))})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-2.5 py-2 text-xs`,children:`No worktree snapshot available.`}),H.length>0&&(0,K.jsxs)(`div`,{className:`border-border/70 mt-3 space-y-1 border-t pt-2`,children:[(0,K.jsx)(`div`,{className:`text-muted-foreground text-xs uppercase tracking-wide`,children:`Other Worktrees`}),H.map(e=>(0,K.jsx)(K7,{worktree:e,emphasize:!1,removing:x===e.path,onRemoveDetachedWorktree:j},e.path))]})]})]}):null]}),(0,K.jsxs)(`div`,{className:`grid gap-3 xl:grid-cols-2`,children:[(0,K.jsxs)(`section`,{className:`border-border flex flex-col rounded-t-lg border`,children:[(0,K.jsxs)(`div`,{className:`border-border flex items-center justify-between border-b px-4 py-3`,children:[(0,K.jsx)(`h2`,{className:`font-medium`,children:`Active Changes`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-sm`,children:[R.activeChanges,` active`]})]}),(0,K.jsxs)(`div`,{className:`bg-card divide-border flex-1 divide-y`,children:[M.map(e=>{let t=e.progress,n=t.total>0?Math.round(t.completed/t.total*100):0,r=P.find(t=>t.changeName===e.id),i=r?.artifacts.filter(e=>e.status===`done`).length??0,a=r?.artifacts.length??0,o=r?L.get(r.schemaName):void 0,s=o&&r?r.artifacts.find(e=>e.id===o)?.status??_U(r.artifacts.map(e=>e.status)):_U(r?.artifacts.map(e=>e.status)??[]),c=gU({hasStatus:!!r,isComplete:r?.isComplete??!1,tasksComplete:t.total===0||t.completed>=t.total,trackedArtifactStatus:s});return(0,K.jsxs)($_,{to:`/changes/$changeId`,params:{changeId:e.id},state:t=>({...t,__vtHandoff:{family:`changes`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:{family:`changes`,entityId:e.id}},...H_({family:`changes`,entityId:e.id},`container`),className:`hover:bg-muted/50 block px-4 py-3`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{...H_({family:`changes`,entityId:e.id},`title`),className:`truncate font-medium`,children:e.name}),(0,K.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.id,e.updatedAt>0&&(0,K.jsxs)(K.Fragment,{children:[` · `,Lv(e.updatedAt)]})]})]}),(0,K.jsxs)(`div`,{className:`flex flex-col items-end gap-1 text-right text-sm`,children:[(0,K.jsx)(`span`,{className:`rounded border px-1.5 py-0.5 text-[11px] font-medium ${c.toneClass}`,children:c.label}),(0,K.jsxs)(`div`,{className:`font-medium`,children:[t.completed,`/`,t.total]}),(0,K.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`tasks`})]})]}),(0,K.jsx)(`div`,{className:`bg-muted h-1.5 rounded-full`,children:(0,K.jsx)(`div`,{className:`bg-primary h-full rounded-full transition-all`,style:{width:`${n}%`}})}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-2 flex flex-wrap items-center justify-between gap-2 text-xs`,children:[(0,K.jsxs)(`span`,{children:[n,`% task completion`]}),r?(0,K.jsxs)(`span`,{className:`truncate`,children:[i,`/`,a,` artifacts · `,r.schemaName]}):(0,K.jsx)(`span`,{children:`Artifacts status unavailable`})]})]},e.id)}),!re&&(0,K.jsxs)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:[(0,K.jsx)(`div`,{children:`No active changes.`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs`,children:`Recommended workflow start: /opsx:propose`}),(0,K.jsxs)(`button`,{type:`button`,onClick:v,className:`text-primary mt-2 inline-flex items-center gap-1 hover:underline`,title:`Open the advanced /opsx:new form`,children:[(0,K.jsx)(fl,{className:`h-3.5 w-3.5`}),`Open /opsx:new form`]})]})]})]}),(0,K.jsxs)(`section`,{className:`border-border min-w-0 rounded-t-lg border`,children:[(0,K.jsxs)(`div`,{className:`border-border flex flex-wrap items-center justify-between gap-1.5 border-b px-4 py-3`,children:[(0,K.jsx)(`h2`,{className:`shrink-0 font-medium`,children:`Specifications`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground w-full text-xs sm:w-auto sm:text-sm`,children:[R.specifications,` specs · `,R.requirements,` requirements`]})]}),(0,K.jsxs)(`div`,{className:`bg-card divide-border divide-y`,children:[t?.specifications.map(e=>{let t={family:`specs`,entityId:e.id};return(0,K.jsx)($_,{to:`/specs/$specId`,params:{specId:e.id},state:t=>({...t,__vtHandoff:{family:`specs`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:t},...H_(t,`container`),className:`hover:bg-muted/50 block px-4 py-3`,children:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{...H_(t,`title`),className:`truncate font-medium`,children:e.name}),(0,K.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.id,e.updatedAt>0&&(0,K.jsxs)(K.Fragment,{children:[` · `,Lv(e.updatedAt)]})]})]}),(0,K.jsxs)(`div`,{className:`shrink-0 text-right text-sm`,children:[(0,K.jsx)(`div`,{className:`font-medium`,children:e.requirements}),(0,K.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`requirements`})]})]})},e.id)}),t?.specifications.length===0&&(0,K.jsx)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:`No specifications found.`})]})]})]})]})}var U9=TG([`spec`,`change`,`archive`]),W9=bG({id:gG(),kind:U9,title:gG(),href:gG(),path:gG(),content:gG(),updatedAt:_G()}),CAe=bG({query:gG(),limit:_G().int().positive().optional()}),G9=bG({documentId:gG(),kind:U9,title:gG(),href:gG(),path:gG(),score:_G(),snippet:gG(),updatedAt:_G()});SG(`type`,[bG({id:gG(),type:wG(`init`),docs:yG(W9)}),bG({id:gG(),type:wG(`replaceAll`),docs:yG(W9)}),bG({id:gG(),type:wG(`search`),query:CAe}),bG({id:gG(),type:wG(`dispose`)})]);var wAe=SG(`type`,[bG({id:gG(),type:wG(`ok`)}),bG({id:gG(),type:wG(`results`),hits:yG(G9)}),bG({id:gG(),type:wG(`error`),message:gG()})]),TAe=String.raw`
1429
+ `))){S(e.path);try{await dAe(e.path)}catch(e){console.error(`[Dashboard] Failed to remove detached worktree:`,e),window.alert(e instanceof Error?e.message:`Failed to remove detached worktree.`)}finally{S(t=>t===e.path?null:t)}}},[]);(0,G.useEffect)(()=>{T.current=h},[h]),(0,G.useEffect)(()=>{if(e)return;let t=e=>{if(T.current!==null)return;let t=Date.now();t-b.current<700||(b.current=t,D(),u(null),f(Date.now()),O(e))},n=()=>{t(`window-focus`)},r=()=>{let e=document.visibilityState===`visible`;m(e),e&&t(`document-visible`)};return window.addEventListener(`focus`,n),document.addEventListener(`visibilitychange`,r),t(`dashboard-mount`),()=>{window.removeEventListener(`focus`,n),document.removeEventListener(`visibilitychange`,r)}},[D,O,e]),(0,G.useEffect)(()=>{w.current=i},[i]),(0,G.useEffect)(()=>{!h||!i||i.running===!1&&(i.lastFinishedAt??0)>=h.requestedAt&&g(e=>e?.reason===h.reason&&e.requestedAt===h.requestedAt?null:e)},[h,i]),(0,G.useEffect)(()=>{e||UCe(s)},[s,e]),(0,G.useEffect)(()=>{if(!e)return k(),()=>{D()}},[D,k,e]),(0,G.useEffect)(()=>{let t=w4(s);if(e||t===null||l===null)return;let n=()=>{f(Date.now())};n();let r=window.setInterval(n,250);return()=>{window.clearInterval(r)}},[l,s,e]);let M=t?.activeChanges??[],N=(0,G.useMemo)(()=>new Set(M.map(e=>e.id)),[M]),P=(0,G.useMemo)(()=>(a??[]).filter(e=>N.has(e.changeName)),[a,N]),F=(0,G.useMemo)(()=>{let e=o?.schemas??[],t=o?.schemaDetails??{};return e.map(e=>{let n=t[e.name]?.artifacts.map(e=>e.id)??[],r=n.length>0?n:e.artifacts;return{schemaName:e.name,artifactIds:r}})},[o]),I=(0,G.useMemo)(()=>new Set(M.filter(e=>e.progress.total===0||e.progress.completed>=e.progress.total).map(e=>e.id)),[M]),ee=(0,G.useMemo)(()=>yAe(P,F,I),[P,I,F]),L=(0,G.useMemo)(()=>{let e=o?.schemaDetails??{},t=new Map;for(let[n,r]of Object.entries(e)){if(!r?.applyTracks)continue;let e=r.artifacts.find(e=>e.outputPath===r.applyTracks);e?.id&&t.set(n,e.id)}return t},[o]);if(n&&!t)return(0,K.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading dashboard...`});if(r)return(0,K.jsxs)(`div`,{className:`text-destructive flex items-center gap-2`,children:[(0,K.jsx)(Sc,{className:`h-5 w-5`}),`Error loading dashboard: `,r.message]});let R=t?.summary??{specifications:0,requirements:0,activeChanges:0,inProgressChanges:0,completedChanges:0,archivedTasksCompleted:0,tasksTotal:0,tasksCompleted:0,taskCompletionPercent:null},z=t?.cardAvailability??hAe(R.taskCompletionPercent),te=t?.trendKinds??gAe(),B=t?.git??{defaultBranch:`main`,worktrees:[]},ne=!e||B.worktrees.some(e=>e.entries.length>0),re=M.length>0,V=B.worktrees.find(e=>e.isCurrent)??null,H=B.worktrees.filter(e=>!e.isCurrent),ie=w4(s),ae=h===null?KCe(l,ie,d):0,oe=ie!==null&&h===null,se=h!==null&&mAe(E),ce=h!==null;return(0,K.jsxs)(`div`,{className:`min-w-0 space-y-6 p-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsxs)(`h1`,{className:`font-nav flex items-center gap-2 text-2xl font-bold`,children:[(0,K.jsx)(qc,{className:`h-6 w-6 shrink-0`}),`Dashboard`]}),(0,K.jsxs)(`button`,{type:`button`,onClick:_,className:`bg-primary text-primary-foreground inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm hover:opacity-90`,title:`Recommended workflow start is /opsx:propose.`,children:[(0,K.jsx)(fl,{className:`h-4 w-4`}),`Start (/opsx:propose)`]})]}),(0,K.jsxs)(`section`,{className:`space-y-2`,children:[(0,K.jsx)(`h2`,{className:`text-sm font-medium`,children:`Historical Trends`}),(0,K.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,K.jsx)(S4,{label:`Specifications / Requirements`,value:`${R.specifications} / ${R.requirements}`,icon:Pc,availability:z.specifications,trendKind:te.specifications,points:t?.trends.specifications??[],triColorPoints:[],className:`min-h-44 sm:min-h-48 lg:min-h-52 xl:min-h-56`}),(0,K.jsx)(S4,{label:`Archived Changes / Completed Tasks`,value:`${R.completedChanges} / ${R.archivedTasksCompleted}`,icon:hc,availability:z.completedChanges,trendKind:te.completedChanges,points:t?.trends.completedChanges??[],triColorPoints:[],className:`min-h-44 sm:min-h-48 lg:min-h-52 xl:min-h-56`})]})]}),(0,K.jsxs)(`div`,{className:`grid min-w-0 gap-3 ${ne?`xl:grid-cols-2`:`xl:grid-cols-1`}`,children:[(0,K.jsxs)(`section`,{className:`@container min-w-0 space-y-2`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h2`,{className:`font-medium`,children:`Workflow Progress`}),(0,K.jsxs)(`p`,{className:`text-muted-foreground text-xs`,children:[`Status coverage: `,P.length,`/`,M.length,` active changes have workflow status snapshots.`]})]}),ee.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No workflow status available.`}):(0,K.jsx)(`div`,{className:`grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),1fr))] gap-2`,children:ee.map(e=>(0,K.jsxs)(`section`,{className:`border-border/70 bg-card min-w-0 rounded-md border p-2`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,K.jsx)(`div`,{className:`min-w-0`,children:(0,K.jsx)(`h3`,{className:`text-xs font-semibold`,children:e.schemaName})}),e.readyToArchive>0?(0,K.jsxs)(`span`,{className:`text-muted-foreground rounded border px-1 py-0.5 text-[10px]`,children:[`archive-ready `,e.readyToArchive]}):null]}),(0,K.jsx)(`div`,{className:`grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,8rem),1fr))] gap-2`,children:e.steps.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground border-border/70 rounded-md border border-dashed px-2 py-1.5 text-[11px]`,children:`No artifacts in schema.`}):e.steps.map(t=>{let n=xAe(t.id);return(0,K.jsxs)(`article`,{className:`relative min-w-0 overflow-hidden rounded-md border px-1.5 py-1`,style:{borderColor:n.border,backgroundColor:n.background,color:n.text},children:[(0,K.jsx)(_c,{className:`pointer-events-none absolute right-[10%] top-1/2 h-12 w-12 -translate-y-1/2`,style:{color:n.arrow}}),(0,K.jsx)(`div`,{className:`relative mb-0.5 pr-6 text-xs font-semibold`,children:t.label}),(0,K.jsxs)(`div`,{className:`relative space-y-0 text-[10px]`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-current/75`,children:`Draft`}),(0,K.jsx)(`span`,{className:`font-mono`,children:t.draft})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-current/75`,children:`Ready`}),(0,K.jsx)(`span`,{className:`font-mono`,children:t.ready})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-current/75`,children:`Blocked`}),(0,K.jsx)(`span`,{className:`font-mono`,children:t.blocked})]})]})]},`${e.schemaName}:${t.id}`)})})]},e.schemaName))})]}),ne?(0,K.jsxs)(`section`,{className:`min-w-0 space-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`h2`,{className:`font-medium`,children:`Git Snapshot`}),(0,K.jsxs)(`p`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,B.defaultBranch]})]}),e?null:(0,K.jsxs)(`div`,{className:`border-border bg-card inline-flex overflow-hidden rounded-md border`,children:[(0,K.jsx)(rAe,{value:s,options:pAe,onValueChange:c,ariaLabel:`Git auto refresh`,className:`text-foreground/75 hover:text-foreground border-r-current/10 bg-muted/20 relative isolate h-7 w-9 shrink-0 justify-center rounded-none border-0 border-r px-0`,positionerClassName:`z-50`,popupClassName:`min-w-[7rem]`,renderTrigger:({selectedOption:e})=>(0,K.jsxs)(`span`,{className:`relative inline-flex h-full w-full items-center justify-center overflow-hidden`,children:[(0,K.jsx)(`span`,{className:`bg-muted/20 pointer-events-none absolute inset-0`}),oe?(0,K.jsx)(`span`,{className:`bg-primary/30 dark:bg-primary/35 pointer-events-none absolute inset-y-0 left-0 transition-[width]`,style:{width:`${ae*100}%`}}):null,(0,K.jsx)(`span`,{className:`relative z-10 inline-flex items-center justify-center`,children:(0,K.jsx)(UOe,{preset:e?.value??s})})]})}),(0,K.jsxs)(`button`,{type:`button`,onClick:A,disabled:ce,className:`inline-flex h-7 items-center gap-1 px-2 py-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-70 ${se?`text-primary bg-primary/10`:`text-foreground/75 hover:text-foreground`}`,children:[(0,K.jsx)(al,{className:`h-3.5 w-3.5 ${se?`animate-spin`:``}`}),`Refresh`]})]})]}),(0,K.jsxs)(`div`,{className:`border-border/80 bg-card min-w-0 rounded-lg border p-3`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5`,children:[(0,K.jsx)(Vc,{className:`text-muted-foreground h-4 w-4 shrink-0`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,B.defaultBranch]})]}),V?(0,K.jsxs)(`div`,{className:`space-y-0`,children:[(0,K.jsx)(K7,{worktree:V,emphasize:!0,removing:x===V.path,onRemoveDetachedWorktree:j}),(0,K.jsx)(`div`,{className:`-mt-px space-y-1 border-l pl-3 pt-2 ${BOe}`,children:GCe(V.entries).map(t=>(0,K.jsx)(GOe,{entry:t,onSelect:e?void 0:(e,t)=>{nv.push(`bottom`,oAe(e),W_(void 0,WOe(e)),{source:t,sharedElements:G7(e)})}},t.type===`commit`?t.hash:`${t.type}:${t.updatedAt??`none`}`))})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-2.5 py-2 text-xs`,children:`No worktree snapshot available.`}),H.length>0&&(0,K.jsxs)(`div`,{className:`border-border/70 mt-3 space-y-1 border-t pt-2`,children:[(0,K.jsx)(`div`,{className:`text-muted-foreground text-xs uppercase tracking-wide`,children:`Other Worktrees`}),H.map(e=>(0,K.jsx)(K7,{worktree:e,emphasize:!1,removing:x===e.path,onRemoveDetachedWorktree:j},e.path))]})]})]}):null]}),(0,K.jsxs)(`div`,{className:`grid gap-3 xl:grid-cols-2`,children:[(0,K.jsxs)(`section`,{className:`border-border flex min-w-0 flex-col rounded-t-lg border`,children:[(0,K.jsxs)(`div`,{className:`border-border flex min-w-0 flex-wrap items-center justify-between gap-1.5 border-b px-4 py-3`,children:[(0,K.jsx)(`h2`,{className:`font-medium`,children:`Active Changes`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-xs sm:text-sm`,children:[R.activeChanges,` active`]})]}),(0,K.jsxs)(`div`,{className:`bg-card divide-border flex min-w-0 flex-1 flex-col divide-y`,children:[M.map(e=>{let t=e.progress,n=t.total>0?Math.round(t.completed/t.total*100):0,r=P.find(t=>t.changeName===e.id),i=r?.artifacts.filter(e=>e.status===`done`).length??0,a=r?.artifacts.length??0,o=r?L.get(r.schemaName):void 0,s=o&&r?r.artifacts.find(e=>e.id===o)?.status??_U(r.artifacts.map(e=>e.status)):_U(r?.artifacts.map(e=>e.status)??[]),c=gU({hasStatus:!!r,isComplete:r?.isComplete??!1,tasksComplete:t.total===0||t.completed>=t.total,trackedArtifactStatus:s});return(0,K.jsxs)($_,{to:`/changes/$changeId`,params:{changeId:e.id},state:t=>({...t,__vtHandoff:{family:`changes`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:{family:`changes`,entityId:e.id}},...H_({family:`changes`,entityId:e.id},`container`),className:`hover:bg-muted/50 block min-w-0 px-4 py-3`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex min-w-0 flex-wrap items-start justify-between gap-3 sm:flex-nowrap sm:items-center`,children:[(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsx)(`div`,{...H_({family:`changes`,entityId:e.id},`title`),className:`truncate font-medium`,children:e.name}),(0,K.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.updatedAt>0&&(0,K.jsxs)(K.Fragment,{children:[Lv(e.updatedAt),` · `]}),e.id]})]}),(0,K.jsxs)(`div`,{className:`shrink-0 text-right text-sm`,children:[(0,K.jsx)(`span`,{className:`rounded border px-1.5 py-0.5 text-[11px] font-medium ${c.toneClass}`,children:c.label}),(0,K.jsxs)(`div`,{className:`font-medium`,children:[t.completed,`/`,t.total]}),(0,K.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`tasks`})]})]}),(0,K.jsx)(`div`,{className:`bg-muted h-1.5 rounded-full`,children:(0,K.jsx)(`div`,{className:`bg-primary h-full rounded-full transition-all`,style:{width:`${n}%`}})}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-2 flex min-w-0 flex-wrap items-center justify-between gap-2 text-xs`,children:[(0,K.jsxs)(`span`,{className:`shrink-0`,children:[n,`% task completion`]}),r?(0,K.jsxs)(`span`,{className:`min-w-0 truncate text-right`,children:[i,`/`,a,` artifacts · `,r.schemaName]}):(0,K.jsx)(`span`,{children:`Artifacts status unavailable`})]})]},e.id)}),!re&&(0,K.jsxs)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:[(0,K.jsx)(`div`,{children:`No active changes.`}),(0,K.jsx)(`div`,{className:`mt-1 text-xs`,children:`Recommended workflow start: /opsx:propose`}),(0,K.jsxs)(`button`,{type:`button`,onClick:v,className:`text-primary mt-2 inline-flex items-center gap-1 hover:underline`,title:`Open the advanced /opsx:new form`,children:[(0,K.jsx)(fl,{className:`h-3.5 w-3.5`}),`Open /opsx:new form`]})]})]})]}),(0,K.jsxs)(`section`,{className:`border-border min-w-0 rounded-t-lg border`,children:[(0,K.jsxs)(`div`,{className:`border-border flex min-w-0 flex-wrap items-center justify-between gap-1.5 border-b px-4 py-3`,children:[(0,K.jsx)(`h2`,{className:`shrink-0 font-medium`,children:`Specifications`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-xs sm:text-sm`,children:[R.specifications,` specs · `,R.requirements,` requirements`]})]}),(0,K.jsxs)(`div`,{className:`bg-card divide-border min-w-0 divide-y`,children:[t?.specifications.map(e=>{let t={family:`specs`,entityId:e.id};return(0,K.jsx)($_,{to:`/specs/$specId`,params:{specId:e.id},state:t=>({...t,__vtHandoff:{family:`specs`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:t},...H_(t,`container`),className:`hover:bg-muted/50 block min-w-0 px-4 py-3`,children:(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center justify-between gap-3 sm:flex-nowrap`,children:[(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsx)(`div`,{...H_(t,`title`),className:`truncate font-medium`,children:e.name}),(0,K.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.updatedAt>0&&(0,K.jsxs)(K.Fragment,{children:[Lv(e.updatedAt),` · `]}),e.id]})]}),(0,K.jsxs)(`div`,{className:`shrink-0 text-right text-sm`,children:[(0,K.jsx)(`div`,{className:`font-medium`,children:e.requirements}),(0,K.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`requirements`})]})]})},e.id)}),t?.specifications.length===0&&(0,K.jsx)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:`No specifications found.`})]})]})]})]})}var U9=TG([`spec`,`change`,`archive`]),W9=bG({id:gG(),kind:U9,title:gG(),href:gG(),path:gG(),content:gG(),updatedAt:_G()}),CAe=bG({query:gG(),limit:_G().int().positive().optional()}),G9=bG({documentId:gG(),kind:U9,title:gG(),href:gG(),path:gG(),score:_G(),snippet:gG(),updatedAt:_G()});SG(`type`,[bG({id:gG(),type:wG(`init`),docs:yG(W9)}),bG({id:gG(),type:wG(`replaceAll`),docs:yG(W9)}),bG({id:gG(),type:wG(`search`),query:CAe}),bG({id:gG(),type:wG(`dispose`)})]);var wAe=SG(`type`,[bG({id:gG(),type:wG(`ok`)}),bG({id:gG(),type:wG(`results`),hits:yG(G9)}),bG({id:gG(),type:wG(`error`),message:gG()})]),TAe=String.raw`
1430
1430
  const DEFAULT_LIMIT = 50;
1431
1431
  const MAX_LIMIT = 200;
1432
1432
  const SNIPPET_SIZE = 180;