pi-webapp 0.1.51-alpha.8 → 0.1.51

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 (143) hide show
  1. package/dist/extension.js +3 -3
  2. package/dist/hosted-recovery.js +2 -2
  3. package/dist/hosted-worker.js +2 -2
  4. package/package.json +3 -3
  5. package/web/dist/.vite/manifest.json +268 -248
  6. package/web/dist/assets/WorkspacePanel.css +1 -0
  7. package/web/dist/assets/WorkspacePanel.module-7fbly3iv.js +7 -0
  8. package/web/dist/assets/app-rE2dO2Sf.js +503 -0
  9. package/web/dist/assets/app.css +1 -1
  10. package/web/dist/assets/app.js +7 -10
  11. package/web/dist/assets/asciidoc-fIjFDxFo.js +2 -0
  12. package/web/dist/assets/bat-JZl-Sbcx.js +2 -0
  13. package/web/dist/assets/bibtex-BaNpQaDO.js +2 -0
  14. package/web/dist/assets/c-D2xwndn2.js +2 -0
  15. package/web/dist/assets/clojure-CWpPQG5x.js +2 -0
  16. package/web/dist/assets/cmake-Cf85PuIk.js +2 -0
  17. package/web/dist/assets/cpp-M92QQ27h.js +2 -0
  18. package/web/dist/assets/csharp-arQIGxh5.js +2 -0
  19. package/web/dist/assets/css-COynAVCS.js +2 -0
  20. package/web/dist/assets/csv-Dfuv-U7u.js +2 -0
  21. package/web/dist/assets/dart-Q1IWwEZX.js +2 -0
  22. package/web/dist/assets/diff-DQlPRImi.js +2 -0
  23. package/web/dist/assets/dist-DvRDAAjZ.js +2 -0
  24. package/web/dist/assets/dotenv-CdzsO68t.js +2 -0
  25. package/web/dist/assets/elixir-DIe8-kxb.js +2 -0
  26. package/web/dist/assets/erlang-9UB0pWNm.js +2 -0
  27. package/web/dist/assets/fish-guO53JpW.js +2 -0
  28. package/web/dist/assets/fsharp-CkcEwvkw.js +2 -0
  29. package/web/dist/assets/go-C-nC3Pcm.js +2 -0
  30. package/web/dist/assets/graphql-BUOosdAq.js +2 -0
  31. package/web/dist/assets/groovy-BYlvK_67.js +2 -0
  32. package/web/dist/assets/haskell-DrRSUTaY.js +2 -0
  33. package/web/dist/assets/hcl-BjaCZWzu.js +2 -0
  34. package/web/dist/assets/html-Dkdzkf5m.js +2 -0
  35. package/web/dist/assets/html-derivative-B-zMOKjI.js +2 -0
  36. package/web/dist/assets/http-iVoGgZyc.js +2 -0
  37. package/web/dist/assets/ini-DAPINsRw.js +2 -0
  38. package/web/dist/assets/java-C0tX6Zjj.js +2 -0
  39. package/web/dist/assets/javascript-qRALF4mN.js +2 -0
  40. package/web/dist/assets/json-Hfsf52vC.js +2 -0
  41. package/web/dist/assets/julia-CTkez5_b.js +2 -0
  42. package/web/dist/assets/kotlin-aMb8GiDI.js +2 -0
  43. package/web/dist/assets/latex--YAwAQ5f.js +2 -0
  44. package/web/dist/assets/less-C2IS6ABU.js +2 -0
  45. package/web/dist/assets/log-GKQXLMhJ.js +2 -0
  46. package/web/dist/assets/lua-2gStHmQ-.js +2 -0
  47. package/web/dist/assets/make-BU3Nopib.js +2 -0
  48. package/web/dist/assets/markdown-BR5vuK2p.js +2 -0
  49. package/web/dist/assets/mdx-BC8ZpVNR.js +2 -0
  50. package/web/dist/assets/nix-DI-FDV4-.js +2 -0
  51. package/web/dist/assets/perl-C6cfY4X6.js +2 -0
  52. package/web/dist/assets/php-B4BGKN5F.js +2 -0
  53. package/web/dist/assets/plugin-Cw0h9Dlw.js +18 -0
  54. package/web/dist/assets/plugin-D3ueGV13.js +2 -0
  55. package/web/dist/assets/plugin-Daa3_Q-m.js +4 -0
  56. package/web/dist/assets/plugin.css +1 -32
  57. package/web/dist/assets/plugin2.css +1 -1
  58. package/web/dist/assets/powershell-DIeWdV2m.js +2 -0
  59. package/web/dist/assets/proto-n2oP_Fv6.js +2 -0
  60. package/web/dist/assets/python-_UfA4Rpn.js +2 -0
  61. package/web/dist/assets/r-vFiqf_wZ.js +2 -0
  62. package/web/dist/assets/rst-DEFIrwXa.js +2 -0
  63. package/web/dist/assets/ruby-CGfRnGY4.js +2 -0
  64. package/web/dist/assets/rust-DKuud5dV.js +2 -0
  65. package/web/dist/assets/scala-Budrm83b.js +2 -0
  66. package/web/dist/assets/scss-DOxJ7xu_.js +2 -0
  67. package/web/dist/assets/shellscript-DugvE863.js +2 -0
  68. package/web/dist/assets/sql-BJwLzEN3.js +2 -0
  69. package/web/dist/assets/svelte-Cnhqc3fy.js +2 -0
  70. package/web/dist/assets/swift-1BrB7fPp.js +2 -0
  71. package/web/dist/assets/system-verilog-DFdH8QvH.js +2 -0
  72. package/web/dist/assets/telemetry-client-BBuLBxwh.js +6 -0
  73. package/web/dist/assets/toml-DnGEDMQq.js +2 -0
  74. package/web/dist/assets/typescript-dAcDzF3q.js +2 -0
  75. package/web/dist/assets/vb-B-92SU4g.js +2 -0
  76. package/web/dist/assets/verilog-DAYahq79.js +2 -0
  77. package/web/dist/assets/vue-b-L2NQfY.js +2 -0
  78. package/web/dist/assets/xml-Dg-qt816.js +2 -0
  79. package/web/dist/assets/yaml-BOAQTz6b.js +2 -0
  80. package/web/dist/assets/app-c9hDiQk1.js +0 -557
  81. package/web/dist/assets/asciidoc-BkcznOd6.js +0 -3
  82. package/web/dist/assets/bat-7OHorXM-.js +0 -3
  83. package/web/dist/assets/bibtex-Bh8y6vty.js +0 -3
  84. package/web/dist/assets/c-CNNPUoIx.js +0 -3
  85. package/web/dist/assets/clojure-B6Ybwt0c.js +0 -3
  86. package/web/dist/assets/cmake-CrlwuiAf.js +0 -3
  87. package/web/dist/assets/cpp-CkbLwvut.js +0 -3
  88. package/web/dist/assets/csharp-DjvczH9s.js +0 -3
  89. package/web/dist/assets/css-BUD4Rp2b.js +0 -3
  90. package/web/dist/assets/csv-D2OB64St.js +0 -3
  91. package/web/dist/assets/dart-BSpXvXd_.js +0 -3
  92. package/web/dist/assets/diff-Ck_wL29v.js +0 -3
  93. package/web/dist/assets/dotenv-Bou5DEqq.js +0 -3
  94. package/web/dist/assets/elixir-4OoZVtxx.js +0 -3
  95. package/web/dist/assets/erlang-CSLCcATe.js +0 -3
  96. package/web/dist/assets/fish-DwbyrR0v.js +0 -3
  97. package/web/dist/assets/fsharp-ClsIF4qc.js +0 -3
  98. package/web/dist/assets/go-2I7aJVaM.js +0 -3
  99. package/web/dist/assets/graphql-DLTfkllw.js +0 -3
  100. package/web/dist/assets/groovy-dFmgeT1x.js +0 -3
  101. package/web/dist/assets/haskell-QfZvDZWC.js +0 -3
  102. package/web/dist/assets/hcl-VvruP1Qi.js +0 -3
  103. package/web/dist/assets/html-DCU_u52o.js +0 -3
  104. package/web/dist/assets/html-derivative-CUeX3DzU.js +0 -3
  105. package/web/dist/assets/http-B7cLPSVs.js +0 -3
  106. package/web/dist/assets/ini-CY2oP9no.js +0 -3
  107. package/web/dist/assets/java-CRWtZee6.js +0 -3
  108. package/web/dist/assets/javascript-Jp5MypX8.js +0 -3
  109. package/web/dist/assets/julia-DW-FaV7T.js +0 -3
  110. package/web/dist/assets/kotlin-BFCw308c.js +0 -3
  111. package/web/dist/assets/latex-BbSjyHGd.js +0 -3
  112. package/web/dist/assets/less-CWx-BWlG.js +0 -3
  113. package/web/dist/assets/log-zN_2It8s.js +0 -3
  114. package/web/dist/assets/lua-DkSWXu2f.js +0 -3
  115. package/web/dist/assets/make-C_UKIGc7.js +0 -3
  116. package/web/dist/assets/markdown-CH9T4AvF.js +0 -3
  117. package/web/dist/assets/mdx-BBz2Ciy1.js +0 -3
  118. package/web/dist/assets/nix-DDQijFVp.js +0 -3
  119. package/web/dist/assets/perl-BgC1VxVJ.js +0 -3
  120. package/web/dist/assets/php-cXRTGkV8.js +0 -3
  121. package/web/dist/assets/plugin-C08s5xL7.js +0 -41
  122. package/web/dist/assets/plugin-VtBHuQqj.js +0 -5
  123. package/web/dist/assets/plugin-vofA5IAY.js +0 -3
  124. package/web/dist/assets/powershell-BZLB_xgZ.js +0 -3
  125. package/web/dist/assets/proto-DkqfxQ53.js +0 -3
  126. package/web/dist/assets/python-BX8YLgJz.js +0 -3
  127. package/web/dist/assets/r-DZcLZpZb.js +0 -3
  128. package/web/dist/assets/rst-DZ3LVoj5.js +0 -3
  129. package/web/dist/assets/ruby-BvwjGZAm.js +0 -3
  130. package/web/dist/assets/rust-CIJIareL.js +0 -3
  131. package/web/dist/assets/scala-FHlq90qT.js +0 -3
  132. package/web/dist/assets/scss-Ddv2ui98.js +0 -3
  133. package/web/dist/assets/sql-C9mHs27a.js +0 -3
  134. package/web/dist/assets/svelte-c9DdG6jS.js +0 -3
  135. package/web/dist/assets/swift-BQgUsLWn.js +0 -3
  136. package/web/dist/assets/system-verilog-C5JtnG2R.js +0 -3
  137. package/web/dist/assets/telemetry-client-B50IiYu9.js +0 -7
  138. package/web/dist/assets/toml-C_4Szv0Y.js +0 -3
  139. package/web/dist/assets/vb-BtDwBlGH.js +0 -3
  140. package/web/dist/assets/verilog-EjgFjXij.js +0 -3
  141. package/web/dist/assets/vue-Bu9BYPo7.js +0 -3
  142. package/web/dist/assets/xml-DQm81bc9.js +0 -3
  143. package/web/dist/assets/yaml-CqHR8vD4.js +0 -3
@@ -0,0 +1,503 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ruby-CGfRnGY4.js","assets/html-Dkdzkf5m.js","assets/dist-DvRDAAjZ.js","assets/app.js","assets/javascript-qRALF4mN.js","assets/css-COynAVCS.js","assets/xml-Dg-qt816.js","assets/java-C0tX6Zjj.js","assets/sql-BJwLzEN3.js","assets/graphql-BUOosdAq.js","assets/typescript-dAcDzF3q.js","assets/cpp-M92QQ27h.js","assets/c-D2xwndn2.js","assets/shellscript-DugvE863.js","assets/lua-2gStHmQ-.js","assets/yaml-BOAQTz6b.js","assets/php-B4BGKN5F.js","assets/json-Hfsf52vC.js","assets/scss-DOxJ7xu_.js","assets/http-iVoGgZyc.js","assets/rst-DEFIrwXa.js","assets/html-derivative-B-zMOKjI.js","assets/python-_UfA4Rpn.js","assets/cmake-Cf85PuIk.js","assets/latex--YAwAQ5f.js","assets/r-vFiqf_wZ.js","assets/julia-CTkez5_b.js","assets/erlang-9UB0pWNm.js","assets/markdown-BR5vuK2p.js","assets/elixir-DIe8-kxb.js","assets/fsharp-CkcEwvkw.js","assets/perl-C6cfY4X6.js","assets/vue-b-L2NQfY.js","assets/svelte-Cnhqc3fy.js","assets/plugin-D3ueGV13.js","assets/WorkspacePanel.module-7fbly3iv.js","assets/WorkspacePanel.css","assets/plugin-Cw0h9Dlw.js","assets/plugin2.css","assets/plugin-Daa3_Q-m.js","assets/plugin.css"])))=>i.map(i=>d[i]);
2
+ (function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`09b8c52c-1dbb-4da4-b078-a43f68e56557`,e._sentryDebugIdIdentifier=`sentry-dbid-09b8c52c-1dbb-4da4-b078-a43f68e56557`)}catch{}})();import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,u as h,v as g}from"./dist-DvRDAAjZ.js";import{A as _,C as v,D as y,E as b,M as x,O as S,S as C,T as w,_ as T,a as E,b as D,c as O,d as k,f as ee,g as te,h as ne,i as A,j as re,k as ie,l as j,m as ae,n as oe,o as M,p as se,r as ce,s as le,t as ue,u as de,v as fe,w as pe,y as me}from"./WorkspacePanel.module-7fbly3iv.js";import{a as N,i as he,o as ge,r as _e,s as ve,t as ye}from"./app.js";import{t as be}from"./typescript-dAcDzF3q.js";import{t as xe}from"./shellscript-DugvE863.js";import{t as Se}from"./json-Hfsf52vC.js";var Ce=a((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&&te(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&&te(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,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function te(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,te(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}}}})),we=a(((e,t)=>{t.exports=Ce()})),Te=a((e=>{var t=we(),n=o(),r=x();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 s(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function c(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 l(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 u(e){if(s(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=s(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 o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return u(a),e;if(o===r)return u(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.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 f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function p(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function h(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function S(e,t,n){return e===n||e===t&&(y=e,!0)}function C(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function w(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function T(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var E=Object.assign,D=Symbol.for(`react.element`),O=Symbol.for(`react.transitional.element`),k=Symbol.for(`react.portal`),ee=Symbol.for(`react.fragment`),te=Symbol.for(`react.strict_mode`),ne=Symbol.for(`react.profiler`),A=Symbol.for(`react.consumer`),re=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),j=Symbol.for(`react.suspense`),ae=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),M=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.legacy_hidden`),le=Symbol.for(`react.memo_cache_sentinel`),ue=Symbol.for(`react.view_transition`),de=Symbol.for(`react.recoverable`),fe=Symbol.iterator;function pe(e){return typeof e!=`object`||!e?null:(e=fe&&e[fe]||e[`@@iterator`],typeof e==`function`?e:null)}var me=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ee:return`Fragment`;case ne:return`Profiler`;case te:return`StrictMode`;case j:return`Suspense`;case ae:return`SuspenseList`;case se:return`Activity`;case ue:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case k:return`Portal`;case re:return e.displayName||`Context`;case A:return(e._context.displayName||`Context`)+`.Consumer`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case oe:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case M:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var he=Array.isArray,ge=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_e=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve={pending:!1,data:null,method:null,action:null},ye=[],be=-1;function xe(e){return{current:e}}function Se(e){0>be||(e.current=ye[be],ye[be]=null,be--)}function Ce(e,t){be++,ye[be]=e.current,e.current=t}var Te=xe(null),Ee=xe(null),P=xe(null),De=xe(null);function F(e,t){switch(Ce(P,t),Ce(Ee,e),Ce(Te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Dp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Dp(t),e=Op(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Se(Te),Ce(Te,e)}function Oe(){Se(Te),Se(Ee),Se(P)}function ke(e){var t=e.memoizedState;t!==null&&(Ch._currentValue=t.memoizedState,Ce(De,e)),t=Te.current;var n=Op(t,e.type);t!==n&&(Ce(Ee,e),Ce(Te,n))}function Ae(e){Ee.current===e&&(Se(Te),Se(Ee)),De.current===e&&(Se(De),Ch._currentValue=ve)}var je,Me;function Ne(e){if(je===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);je=t&&t[1]||``,Me=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+je+e+Me}var Pe=!1;function Fe(e,t){if(!e||Pe)return``;Pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
+ `),l=s.split(`
6
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Pe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ne(n):``}function Ie(e,t){switch(e.tag){case 26:case 27:case 5:return Ne(e.type);case 16:return Ne(`Lazy`);case 13:return e.child!==t&&t!==null?Ne(`Suspense Fallback`):Ne(`Suspense`);case 19:return Ne(`SuspenseList`);case 0:case 15:return Fe(e.type,!1);case 11:return Fe(e.type.render,!1);case 1:return Fe(e.type,!0);case 31:return Ne(`Activity`);case 30:return Ne(`ViewTransition`);default:return``}}function Le(e){try{var t=``,n=null;do t+=Ie(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var Re=Object.prototype.hasOwnProperty,ze=t.unstable_scheduleCallback,Be=t.unstable_cancelCallback,Ve=t.unstable_shouldYield,He=t.unstable_requestPaint,Ue=t.unstable_now,We=t.unstable_getCurrentPriorityLevel,Ge=t.unstable_ImmediatePriority,Ke=t.unstable_UserBlockingPriority,qe=t.unstable_NormalPriority,Je=t.unstable_LowPriority,Ye=t.unstable_IdlePriority,Xe=t.log,Ze=t.unstable_setDisableYieldValue,Qe=null,$e=null;function et(e){if(typeof Xe==`function`&&Ze(e),$e&&typeof $e.setStrictMode==`function`)try{$e.setStrictMode(Qe,e)}catch{}}var tt=Math.clz32?Math.clz32:it,nt=Math.log,rt=Math.LN2;function it(e){return e>>>=0,e===0?32:31-(nt(e)/rt|0)|0}var at=256,ot=262144,st=4194304;function ct(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function lt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ct(n))):i=ct(o):i=ct(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ct(n))):i=ct(o)):i=ct(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ut(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-tt(n),i=1<<r;t|=e[r],n&=~i}return t}function ft(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pt(){var e=st;return st<<=1,!(st&62914560)&&(st=4194304),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ht(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-tt(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&_t(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function _t(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-tt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-tt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function yt(e,t){var n=t&-t;return n=n&42?1:bt(n),(n&(e.suspendedLanes|t))===0?n:0}function bt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function xt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function St(){var e=_e.p;return e===0?(e=window.event,e===void 0?32:zh(e.type)):e}function Ct(e,t){var n=_e.p;try{return _e.p=e,t()}finally{_e.p=n}}var wt=Math.random().toString(36).slice(2),Tt=`__reactFiber$`+wt,Et=`__reactProps$`+wt,Dt=`__reactContainer$`+wt,Ot=`__reactEvents$`+wt,kt=`__reactListeners$`+wt,At=`__reactHandles$`+wt,jt=`__reactResources$`+wt,Mt=`__reactMarker$`+wt,Nt=`__reactLoad$`+wt;function Pt(e){delete e[Tt],delete e[Et],delete e[kt],delete e[At]}function Ft(e){var t;if(t=e[Tt])return t;for(var n=e.parentNode;n;){if(t=n[Dt]||n[Tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Om(e);e!==null;){if(n=e[Tt])return n;e=Om(e)}return t}e=n,n=e.parentNode}return null}function It(e){if(e=e[Tt]||e[Dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Lt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Rt(e){var t=e[jt];return t||=e[jt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function zt(e){e[Mt]=!0}function Bt(e){e[Nt]=void 0}var Vt=new Set,Ht={};function Ut(e,t){Wt(e,t),Wt(e+`Capture`,t)}function Wt(e,t){for(Ht[e]=t,e=0;e<t.length;e++)Vt.add(t[e])}var Gt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Kt={},qt={};function Jt(e){return Re.call(qt,e)?!0:Re.call(Kt,e)?!1:Gt.test(e)?qt[e]=!0:(Kt[e]=!0,!1)}var Yt=!1;function Xt(){var e=Yt;return Yt=!1,e}function Zt(e,t,n){if(Jt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Qt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function $t(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function en(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function tn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function nn(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rn(e){if(!e._valueTracker){var t=tn(e)?`checked`:`value`;e._valueTracker=nn(e,t,``+e[t])}}function an(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=tn(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var on=/[\n"\\]/g;function sn(e){return e.replace(on,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function cn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+en(t)):e.value!==``+en(t)&&(e.value=``+en(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):un(e,en(n)):o===`number`&&e.value==t?un(e,en(e.value)):un(e,en(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+en(s):e.removeAttribute(`name`)}function ln(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){rn(e);return}n=n==null?``:``+en(n),t=t==null?n:``+en(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),rn(e)}function un(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function dn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+en(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function fn(e,t,n){t!=null&&(t=``+en(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+en(n)}function pn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(he(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=en(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),rn(e)}function mn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function gn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||hn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function _n(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Yt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(gn(e,a,r),Yt=!0)}else for(var o in t)t.hasOwnProperty(o)&&gn(e,o,t[o])}function vn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var yn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),I=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function bn(e){return I.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function xn(){}var Sn=null;function Cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,Tn=null;function En(e){var t=It(e);if(t&&(e=t.stateNode)){var n=e[Et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(cn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+sn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Et]||null;if(!a)throw Error(i(90));cn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&an(r)}break a;case`textarea`:fn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&dn(e,!!n.multiple,t,!1)}}}var Dn=!1;function On(e,t,n){if(Dn)return e(t,n);Dn=!0;try{return e(t)}finally{if(Dn=!1,(wn!==null||Tn!==null)&&($d(),wn&&(t=wn,e=Tn,Tn=wn=null,En(t),e)))for(t=0;t<e.length;t++)En(e[t])}}function kn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Et]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var An=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,jn=!1;if(An)try{var Mn={};Object.defineProperty(Mn,"passive",{get:function(){jn=!0}}),window.addEventListener(`test`,Mn,Mn),window.removeEventListener(`test`,Mn,Mn)}catch{jn=!1}var Nn=null,Pn=null,Fn=null;function In(){if(Fn)return Fn;var e,t=Pn,n=t.length,r,i=`value`in Nn?Nn.value:Nn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Fn=i.slice(e,1<r?1-r:void 0)}function Ln(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rn(){return!0}function zn(){return!1}function Bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Rn:zn,this.isPropagationStopped=zn,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Rn)},persist:function(){},isPersistent:Rn}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hn=Bn(Vn),Un=E({},Vn,{view:0,detail:0}),Wn=Bn(Un),Gn,Kn,qn,Jn=E({},Un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ar,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==qn&&(qn&&e.type===`mousemove`?(Gn=e.screenX-qn.screenX,Kn=e.screenY-qn.screenY):Kn=Gn=0,qn=e),Gn)},movementY:function(e){return`movementY`in e?e.movementY:Kn}}),Yn=Bn(Jn),Xn=Bn(E({},Jn,{dataTransfer:0})),Zn=Bn(E({},Un,{relatedTarget:0})),Qn=Bn(E({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0})),$n=Bn(E({},Vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),er=Bn(E({},Vn,{data:0})),tr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},nr={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},rr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ir(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rr[e])?!!t[e]:!1}function ar(){return ir}var or=Bn(E({},Un,{key:function(e){if(e.key){var t=tr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?nr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ar,charCode:function(e){return e.type===`keypress`?Ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),sr=Bn(E({},Jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),cr=Bn(E({},Vn,{submitter:0})),lr=Bn(E({},Un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ar})),ur=Bn(E({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),dr=Bn(E({},Jn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),fr=Bn(E({},Vn,{newState:0,oldState:0,source:0})),pr=[9,13,27,32],mr=An&&`CompositionEvent`in window,hr=null;An&&`documentMode`in document&&(hr=document.documentMode);var gr=An&&`TextEvent`in window&&!hr,_r=An&&(!mr||hr&&8<hr&&11>=hr),vr=` `,yr=!1;function br(e,t){switch(e){case`keyup`:return pr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function xr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Sr=!1;function Cr(e,t){switch(e){case`compositionend`:return xr(t);case`keypress`:return t.which===32?(yr=!0,vr):null;case`textInput`:return e=t.data,e===vr&&yr?null:e;default:return null}}function wr(e,t){if(Sr)return e===`compositionend`||!mr&&br(e,t)?(e=In(),Fn=Pn=Nn=null,Sr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return _r&&t.locale!==`ko`?null:t.data;default:return null}}var Tr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Tr[e.type]:t===`textarea`}function Dr(e,t,n,r){wn?Tn?Tn.push(r):Tn=[r]:wn=r,t=up(t,`onChange`),0<t.length&&(n=new Hn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Or=null,kr=null;function Ar(e){np(e,0)}function jr(e){if(an(Lt(e)))return e}function Mr(e,t){if(e===`change`)return t}var Nr=!1;if(An){var Pr;if(An){var Fr=`oninput`in document;if(!Fr){var Ir=document.createElement(`div`);Ir.setAttribute(`oninput`,`return;`),Fr=typeof Ir.oninput==`function`}Pr=Fr}else Pr=!1;Nr=Pr&&(!document.documentMode||9<document.documentMode)}function Lr(){Or&&(Or.detachEvent(`onpropertychange`,Rr),kr=Or=null)}function Rr(e){if(e.propertyName===`value`&&jr(kr)){var t=[];Dr(t,kr,e,Cn(e)),On(Ar,t)}}function zr(e,t,n){e===`focusin`?(Lr(),Or=t,kr=n,Or.attachEvent(`onpropertychange`,Rr)):e===`focusout`&&Lr()}function Br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return jr(kr)}function Vr(e,t){if(e===`click`)return jr(t)}function Hr(e,t){if(e===`input`||e===`change`)return jr(t)}function Ur(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Wr=typeof Object.is==`function`?Object.is:Ur;function Gr(e,t){if(Wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Re.call(t,i)||!Wr(e[i],t[i]))return!1}return!0}function Kr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function qr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jr(e,t){var n=qr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=qr(n)}}function Yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kr(e.document)}return t}function Zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Qr=An&&`documentMode`in document&&11>=document.documentMode,$r=null,ei=null,ti=null,ni=!1;function ri(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ni||$r==null||$r!==Kr(r)||(r=$r,`selectionStart`in r&&Zr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ti&&Gr(ti,r)||(ti=r,r=up(ei,`onSelect`),0<r.length&&(t=new Hn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=$r)))}function ii(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ai={animationend:ii(`Animation`,`AnimationEnd`),animationiteration:ii(`Animation`,`AnimationIteration`),animationstart:ii(`Animation`,`AnimationStart`),transitionrun:ii(`Transition`,`TransitionRun`),transitionstart:ii(`Transition`,`TransitionStart`),transitioncancel:ii(`Transition`,`TransitionCancel`),transitionend:ii(`Transition`,`TransitionEnd`)},oi={},si={};An&&(si=document.createElement(`div`).style,`AnimationEvent`in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),`TransitionEvent`in window||delete ai.transitionend.transition);function ci(e){if(oi[e])return oi[e];if(!ai[e])return e;var t=ai[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in si)return oi[e]=t[n];return e}var li=ci(`animationend`),ui=ci(`animationiteration`),di=ci(`animationstart`),fi=ci(`transitionrun`),pi=ci(`transitionstart`),mi=ci(`transitioncancel`),hi=ci(`transitionend`),gi=new Map,_i=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);_i.push(`scrollEnd`);function vi(e,t){gi.set(e,t),Ut(t,[e])}var yi=0;function bi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Pd.identifierPrefix;var n=yi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function xi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Hd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function Si(e,t){return e=xi(e),t=xi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Ci=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)},wi=[],Ti=0,Ei=0;function Di(){for(var e=Ti,t=Ei=Ti=0;t<e;){var n=wi[t];wi[t++]=null;var r=wi[t];wi[t++]=null;var i=wi[t];wi[t++]=null;var a=wi[t];if(wi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ji(n,i,a)}}function Oi(e,t,n,r){wi[Ti++]=e,wi[Ti++]=t,wi[Ti++]=n,wi[Ti++]=r,Ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ki(e,t,n,r){return Oi(e,t,n,r),Mi(e)}function Ai(e,t){return Oi(e,null,null,t),Mi(e)}function ji(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-tt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Mi(e){if(50<Ud)throw Ud=0,Wd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ni={};function Pi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fi(e,t,n,r){return new Pi(e,t,n,r)}function Ii(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Li(e,t){var n=e.alternate;return n===null?(n=Fi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ri(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function zi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ii(r)&&(s=1);else if(typeof r==`string`)s=lh(e,n,Te.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case se:return e=Fi(31,n,t,a),e.elementType=se,e.lanes=o,e;case ee:return Bi(n.children,a,o,t);case te:s=8,a|=24;break;case ne:return e=Fi(12,n,t,a|2),e.elementType=ne,e.lanes=o,e;case j:return e=Fi(13,n,t,a),e.elementType=j,e.lanes=o,e;case ae:return e=Fi(19,n,t,a),e.elementType=ae,e.lanes=o,e;case ce:case ue:return e=a|32,e=Fi(30,n,t,e),e.elementType=ue,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case re:s=10;break a;case A:s=9;break a;case ie:s=11;break a;case oe:s=14;break a;case M:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Fi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Bi(e,t,n,r){return e=Fi(7,e,r,t),e.lanes=n,e}function Vi(e,t,n){return e=Fi(6,e,null,t),e.lanes=n,e}function Hi(e){var t=Fi(18,null,null,0);return t.stateNode=e,t}function Ui(e,t,n){return t=Fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wi=new WeakMap;function Gi(e,t){if(typeof e==`object`&&e){var n=Wi.get(e);return n===void 0?(t={value:e,source:t,stack:Le(t)},Wi.set(e,t),t):n}return{value:e,source:t,stack:Le(t)}}var Ki=[],qi=0,Ji=null,Yi=0,Xi=[],Zi=0,Qi=null,$i=1,ea=``;function ta(e,t){Ki[qi++]=Yi,Ki[qi++]=Ji,Ji=e,Yi=t}function na(e,t,n){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,Qi=e;var r=$i;e=ea;var i=32-tt(r)-1;r&=~(1<<i),n+=1;var a=32-tt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,$i=1<<32-tt(t)+i|n<<i|r,ea=a+e}else $i=1<<a|n<<i|r,ea=e}function ra(e){e.return!==null&&(ta(e,1),na(e,1,0))}function ia(e){for(;e===Ji;)Ji=Ki[--qi],Ki[qi]=null,Yi=Ki[--qi],Ki[qi]=null;for(;e===Qi;)Qi=Xi[--Zi],Xi[Zi]=null,ea=Xi[--Zi],Xi[Zi]=null,$i=Xi[--Zi],Xi[Zi]=null}function aa(e,t){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,$i=t.id,ea=t.overflow,Qi=e}var oa=null,sa=null,ca=!1,la=null,ua=!1,da=Error(i(519));function fa(e){throw va(Gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),da}function pa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Tt]=e,t[Et]=r,n){case`dialog`:rp(`cancel`,t),rp(`close`,t);break;case`iframe`:case`object`:case`embed`:rp(`load`,t);break;case`video`:case`audio`:for(n=0;n<ep.length;n++)rp(ep[n],t);break;case`source`:rp(`error`,t);break;case`img`:case`image`:case`link`:rp(`error`,t),rp(`load`,t);break;case`details`:rp(`toggle`,t);break;case`input`:rp(`invalid`,t),ln(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:rp(`invalid`,t);break;case`textarea`:rp(`invalid`,t),pn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||gp(t.textContent,n)?(r.popover!=null&&(rp(`beforetoggle`,t),rp(`toggle`,t)),r.onScroll!=null&&rp(`scroll`,t),r.onScrollEnd!=null&&rp(`scrollend`,t),r.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||fa(e,!0)}function ma(e){for(oa=e.return;oa;)switch(oa.tag){case 5:case 31:case 13:ua=!1;return;case 27:case 3:ua=!0;return;default:oa=oa.return}}function ha(e){if(e!==oa)return!1;if(!ca)return ma(e),ca=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Ap(e.type,e.memoizedProps)),n=!n),n&&sa&&fa(e),ma(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=Dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=Dm(e)}else t===27?(t=sa,zp(e.type)?(e=Em,Em=null,sa=e):sa=t):sa=oa?Tm(e.stateNode.nextSibling):null;return!0}function ga(){sa=oa=null,ca=!1}function _a(){var e=la;return e!==null&&(Ed===null?Ed=e:Ed.push.apply(Ed,e),la=null),e}function va(e){la===null?la=[e]:la.push(e)}var ya=xe(null),ba=null,xa=null;function Sa(e,t,n){Ce(ya,t._currentValue),t._currentValue=n}function Ca(e){e._currentValue=ya.current,Se(ya)}function wa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ta(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),wa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),wa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),wa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ea(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===De.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Ch]:e.push(Ch))}a=a.return}return e!==null&&Ta(t,e,n,r),t.flags|=262144,e!==null}function Da(e){for(e=e.firstContext;e!==null;){if(!Wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Oa(e){ba=e,xa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ka(e){return ja(ba,e)}function Aa(e,t){return ba===null&&Oa(e),ja(e,t)}function ja(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},xa===null){if(e===null)throw Error(i(308));xa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xa=xa.next=t;return n}var Ma=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Na=t.unstable_scheduleCallback,Pa=t.unstable_NormalPriority,Fa={$$typeof:re,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ia(){return{controller:new Ma,data:new Map,refCount:0}}function La(e){e.refCount--,e.refCount===0&&Na(Pa,function(){e.controller.abort()})}function Ra(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var za=null;function Ba(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Va=null,Ha=0,Ua=0,Wa=null;function Ga(e,t){if(Va===null){var n=Va=[];Ha=0,Ua=Yf(),Wa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ha++,t.then(Ka,Ka),t}function Ka(){if(--Ha===0&&(za=null,Va!==null)){Wa!==null&&(Wa.status=`fulfilled`);var e=Va;Va=null,Ua=0,Wa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ja=ge.S;ge.S=function(e,t){if(kd=Ue(),typeof t==`object`&&t&&typeof t.then==`function`&&Ga(e,t),za!==null)for(var n=Ff;n!==null;)Ra(n,za),n=n.next;if(n=e.types,n!==null){for(var r=Ff;r!==null;)Ra(r,n),r=r.next;if(Ua!==0){r=za,r===null&&(r=za=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ja!==null&&Ja(e,t)};var Ya=xe(null);function Xa(){var e=Ya.current;return e===null?ud.pooledCache:e}function Za(e,t){t===null?Ce(Ya,Ya.current):Ce(Ya,t.pool)}function Qa(){var e=Xa();return e===null?null:{parent:Fa._currentValue,pool:e}}var $a=Error(i(460)),eo=Error(i(474)),to=Error(i(542)),no={then:function(){}};function ro(e){return e=e.status,e===`fulfilled`||e===`rejected`}function io(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(xn,xn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,co(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(xn,xn);else{if(e=ud,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,co(e),e}throw oo=t,$a}}function ao(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(oo=e,$a):e}}var oo=null;function so(){if(oo===null)throw Error(i(459));var e=oo;return oo=null,e}function co(e){if(e===$a||e===to)throw Error(i(483))}var lo=null,uo=0;function fo(e){var t=uo;return uo+=1,lo===null&&(lo=[]),io(lo,e,t)}function po(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function mo(e,t){throw t.$$typeof===D?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ho(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Li(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===ee?(e=d(e,t,n.props.children,r,n.key),po(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===M&&ao(i)===t.type)?(t=a(t,n.props),po(t,n),t.return=e,t):(t=zi(n.type,n.key,n.props,null,e.mode,r),po(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ui(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Bi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case O:return n=zi(t.type,t.key,t.props,null,e.mode,n),po(n,t),n.return=e,n;case k:return t=Ui(t,e.mode,n),t.return=e,t;case M:return t=ao(t),f(e,t,n)}if(he(t)||pe(t))return t=Bi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,fo(t),n);if(t.$$typeof===re)return f(e,Aa(e,t),n);mo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case O:return n.key===i?l(e,t,n,r):null;case k:return n.key===i?u(e,t,n,r):null;case M:return n=ao(n),p(e,t,n,r)}if(he(n)||pe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,fo(n),r);if(n.$$typeof===re)return p(e,t,Aa(e,n),r);mo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case O:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case k:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case M:return r=ao(r),m(e,t,n,r,i)}if(he(r)||pe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,fo(r),i);if(r.$$typeof===re)return m(e,t,n,Aa(t,r),i);mo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ca&&ta(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ca&&ta(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),ca&&ta(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ca&&ta(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ca&&ta(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ca&&ta(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ee&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case O:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ee){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),po(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===M&&ao(l)===r.type){n(e,r.sibling),c=a(r,o.props),po(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ee?(c=Bi(o.props.children,e.mode,c,o.key),po(c,o),c.return=e,e=c):(c=zi(o.type,o.key,o.props,null,e.mode,c),po(c,o),c.return=e,e=c)}return s(e);case k:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ui(o,e.mode,c),c.return=e,e=c}return s(e);case M:return o=ao(o),_(e,r,o,c)}if(he(o))return h(e,r,o,c);if(pe(o)){if(l=pe(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,fo(o),c);if(o.$$typeof===re)return _(e,r,Aa(e,o),c);mo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Vi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{uo=0;var i=_(e,t,n,r);return lo=null,i}catch(t){if(t===$a||t===to)throw t;var a=Fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var go=ho(!0),_o=ho(!1),vo=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function So(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ld&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Mi(e),ji(e,null,n),t}return Oi(e,r,t,n),Mi(e)}function Co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vt(e,n)}}function wo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var To=!1;function Eo(){if(To){var e=Wa;if(e!==null)throw e}}function Do(e,t,n,r){To=!1;var i=e.updateQueue;vo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(fd&f)===f:(r&f)===f){f!==0&&f===Ua&&(To=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:vo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),bd|=o,e.lanes=o,e.memoizedState=d}}function Oo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ko(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Oo(n[e],t)}var Ao=xe(null),jo=xe(0);function Mo(e,t){e=vd,Ce(jo,e),Ce(Ao,t),vd=e|t.baseLanes}function No(){Ce(jo,vd),Ce(Ao,Ao.current)}function Po(){vd=jo.current,Se(Ao),Se(jo)}var Fo=xe(null),Io=null;function Lo(e){var t=e.alternate;Ce(Ho,Ho.current&1),Ce(Fo,e),Io===null&&(t===null||Ao.current!==null||t.memoizedState!==null)&&(Io=e)}function Ro(e){Ce(Ho,Ho.current),Ce(Fo,e),Io===null&&(Io=e)}function zo(e){e.tag===22?(Ce(Ho,Ho.current),Ce(Fo,e),Io===null&&(Io=e)):Bo()}function Bo(){Ce(Ho,Ho.current),Ce(Fo,Fo.current)}function Vo(e){Se(Fo),Io===e&&(Io=null),Se(Ho)}var Ho=xe(0);function Uo(e,t){Ce(Fo,Fo.current),Ce(Ho,t)}function Wo(e){Se(Ho),Se(Fo),Io===e&&(Io=null)}function Go(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Sm(n)||Cm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ko=0,qo=null,Jo=null,Yo=null,Xo=!1,Zo=!1,Qo=!1,$o=0,es=0,ts=null,ns=0;function rs(){throw Error(i(321))}function is(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wr(e[n],t[n]))return!1;return!0}function as(e,t,n,r,i,a){return Ko=a,qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ge.H=e===null||e.memoizedState===null?Sc:Cc,Qo=!1,a=n(r,i),Qo=!1,Zo&&(a=ss(t,n,r,i)),os(e),a}function os(e){ge.H=xc;var t=Jo!==null&&Jo.next!==null;if(Ko=0,Yo=Jo=qo=null,Xo=!1,es=0,ts=null,t)throw Error(i(300));e===null||Bc||(e=e.dependencies,e!==null&&Da(e)&&(Bc=!0))}function ss(e,t,n,r){qo=e;var a=0;do{if(Zo&&(ts=null),es=0,Zo=!1,25<=a)throw Error(i(301));if(a+=1,Yo=Jo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}ge.H=wc,o=t(n,r)}while(Zo);return o}function cs(){var e=ge.H,t=e.useState()[0];return t=typeof t.then==`function`?hs(t):t,e=e.useState()[0],(Jo===null?null:Jo.memoizedState)!==e&&(qo.flags|=1024),t}function ls(){var e=$o!==0;return $o=0,e}function us(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ds(e){if(Xo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xo=!1}Ko=0,Yo=Jo=qo=null,Zo=!1,es=$o=0,ts=null}function fs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yo===null?qo.memoizedState=Yo=e:Yo=Yo.next=e,Yo}function ps(){if(Jo===null){var e=qo.alternate;e=e===null?null:e.memoizedState}else e=Jo.next;var t=Yo===null?qo.memoizedState:Yo.next;if(t!==null)Yo=t,Jo=e;else{if(e===null)throw qo.alternate===null?Error(i(467)):Error(i(310));Jo=e,e={memoizedState:Jo.memoizedState,baseState:Jo.baseState,baseQueue:Jo.baseQueue,queue:Jo.queue,next:null},Yo===null?qo.memoizedState=Yo=e:Yo=Yo.next=e}return Yo}function ms(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hs(e){var t=es;return es+=1,ts===null&&(ts=[]),e=io(ts,e,t),t=qo,(Yo===null?t.memoizedState:Yo.next)===null&&(t=t.alternate,ge.H=t===null||t.memoizedState===null?Sc:Cc),e}function gs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return hs(e);if(e.$$typeof===de)return;if(e.$$typeof===re)return ka(e)}throw Error(i(438,String(e)))}function _s(e){var t=null,n=qo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=qo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ms(),qo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=le;return t.index++,n}function vs(e,t){return typeof t==`function`?t(e):t}function ys(e){return bs(ps(),Jo,e)}function bs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Ko&f)===f:(fd&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ua&&(d=!0);else if((Ko&p)===p){u=u.next,p===Ua&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,qo.lanes|=p,bd|=p;f=u.action,Qo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,qo.lanes|=f,bd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Wr(o,e.memoizedState)&&(Bc=!0,d&&(n=Wa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function xs(e){var t=ps(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Wr(o,t.memoizedState)||(Bc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ss(e,t,n){var r=qo,a=ps(),o=ca;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Wr((Jo||a).memoizedState,n);if(s&&(a.memoizedState=n,Bc=!0),a=a.queue,qs(Ts.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Yo!==null&&!!(Yo.memoizedState.tag&1),Hs(e?9:8,{destroy:void 0},ws.bind(null,r,a,n,t),null),e){if(r.flags|=2048,ud===null)throw Error(i(349));o||Ko&127||Cs(r,t,n)}return n}function Cs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qo.updateQueue,t===null?(t=ms(),qo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ws(e,t,n,r){t.value=n,t.getSnapshot=r,Es(t)&&Ds(e)}function Ts(e,t,n){return n(function(){Es(t)&&Ds(e)})}function Es(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wr(e,n)}catch{return!0}}function Ds(e){var t=Ai(e,2);t!==null&&Jd(t,e,2)}function Os(e){var t=fs();if(typeof e==`function`){var n=e;if(e=n(),Qo){et(!0);try{n()}finally{et(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:e},t}function ks(e,t,n,r){return e.baseState=n,bs(e,Jo,typeof r==`function`?r:vs)}function As(e,t,n,r,a){if(vc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};ge.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,js(t,o)):(o.next=n.next,t.pending=n.next=o)}}function js(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=ge.T,o={};o.types=a===null?null:a.types,ge.T=o;try{var s=n(i,r),c=ge.S;c!==null&&c(o,s),Ms(e,t,s)}catch(n){Ps(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),ge.T=a}}else try{a=n(i,r),Ms(e,t,a)}catch(n){Ps(e,t,n)}}function Ms(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ns(e,t,n)},function(n){return Ps(e,t,n)}):Ns(e,t,n)}function Ns(e,t,n){t.status=`fulfilled`,t.value=n,Fs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,js(e,n)))}function Ps(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Fs(t),t=t.next;while(t!==r)}e.action=null}function Fs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Is(e,t){return t}function Ls(e,t){if(ca){var n=ud.formState;if(n!==null){a:{var r=qo;if(ca){if(sa){b:{for(var i=sa,a=ua;i.nodeType!==8;)if(!a||(i=Tm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){sa=Tm(i.nextSibling),r=i.data===`F!`;break a}}fa(r)}r=!1}r&&(t=n[0])}}return n=fs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Is,lastRenderedState:t},n.queue=r,n=hc.bind(null,qo,r),r.dispatch=n,r=Os(!1),a=_c.bind(null,qo,!1,r.queue),r=fs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=As.bind(null,qo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Rs(e){return zs(ps(),Jo,e)}function zs(e,t,n){if(t=bs(e,t,Is)[0],e=ys(vs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=hs(t)}catch(e){throw e===$a?to:e}else r=t;t=ps();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(qo.flags|=2048,Hs(9,{destroy:void 0},Bs.bind(null,i,n),null)),[r,a,e]}function Bs(e,t){e.action=t}function Vs(e){var t=ps(),n=Jo;if(n!==null)return zs(t,n,e);ps(),t=t.memoizedState,n=ps();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Hs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=qo.updateQueue,t===null&&(t=ms(),qo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Us(){return ps().memoizedState}function Ws(e,t,n,r){var i=fs();qo.flags|=e,i.memoizedState=Hs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Gs(e,t,n,r){var i=ps();r=r===void 0?null:r;var a=i.memoizedState.inst;Jo!==null&&r!==null&&is(r,Jo.memoizedState.deps)?i.memoizedState=Hs(t,a,n,r):(qo.flags|=e,i.memoizedState=Hs(1|t,a,n,r))}function Ks(e,t){Ws(8390656,8,e,t)}function qs(e,t){Gs(2048,8,e,t)}function Js(e){qo.flags|=4;var t=qo.updateQueue;if(t===null)t=ms(),qo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ys(e){var t=ps().memoizedState;return Js({ref:t,nextImpl:e}),function(){if(ld&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Xs(e,t){return Gs(4,2,e,t)}function Zs(e,t){return Gs(4,4,e,t)}function Qs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $s(e,t,n){n=n==null?null:n.concat([e]),Gs(4,4,Qs.bind(null,t,e),n)}function ec(){}function tc(e,t){var n=ps();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&is(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function nc(e,t){var n=ps();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&is(t,r[1]))return r[0];if(r=e(),Qo){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r}function rc(e,t,n){return n===void 0||Ko&1073741824&&!(fd&261930)?e.memoizedState=t:(e.memoizedState=n,e=Kd(),qo.lanes|=e,bd|=e,n)}function ic(e,t,n,r){return Wr(n,t)?n:Ao.current===null?!(Ko&106)||Ko&1073741824&&!(fd&261930)?(Bc=!0,e.memoizedState=n):(e=Kd(),qo.lanes|=e,bd|=e,t):(e=rc(e,n,r),Wr(e,t)||(Bc=!0),e)}function ac(e,t,n,r,i){var a=_e.p;_e.p=a!==0&&8>a?a:8;var o=ge.T,s={};s.types=o===null?null:o.types,ge.T=s,_c(e,!1,t,n);try{var c=i(),l=ge.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?gc(e,t,qa(c,r),Gd(e)):gc(e,t,r,Gd(e))}catch(n){gc(e,t,{then:function(){},status:`rejected`,reason:n},Gd())}finally{_e.p=a,o!==null&&s.types!==null&&(o.types=s.types),ge.T=o}}function oc(){}function sc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=cc(e).queue;ac(e,a,t,ve,n===null?oc:function(){return lc(e),n(r)})}function cc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ve,baseState:ve,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:ve},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function lc(e){var t=cc(e);t.next===null&&(t=e.alternate.memoizedState),gc(e,t.next.queue,{},Gd())}function uc(){return ka(Ch)}function dc(){return ps().memoizedState}function fc(){return ps().memoizedState}function pc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Gd();e=xo(n);var r=So(t,e,n);r!==null&&(Jd(r,t,n),Co(r,t,n)),t={cache:Ia()},e.payload=t;return}t=t.return}}function mc(e,t,n){var r=Gd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},vc(e)?yc(t,n):(n=ki(e,t,n,r),n!==null&&(Jd(n,e,r),bc(n,t,r)))}function hc(e,t,n){gc(e,t,n,Gd())}function gc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(vc(e))yc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Wr(s,o))return Oi(e,t,i,0),ud===null&&Di(),!1}catch{}if(n=ki(e,t,i,r),n!==null)return Jd(n,e,r),bc(n,t,r),!0}return!1}function _c(e,t,n,r){if(r={lane:2,revertLane:Yf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},vc(e)){if(t)throw Error(i(479))}else t=ki(e,n,r,2),t!==null&&Jd(t,e,2)}function vc(e){var t=e.alternate;return e===qo||t!==null&&t===qo}function yc(e,t){Zo=Xo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vt(e,n)}}var xc={readContext:ka,use:gs,useCallback:rs,useContext:rs,useEffect:rs,useImperativeHandle:rs,useLayoutEffect:rs,useInsertionEffect:rs,useMemo:rs,useReducer:rs,useRef:rs,useState:rs,useDebugValue:rs,useDeferredValue:rs,useTransition:rs,useSyncExternalStore:rs,useId:rs,useHostTransitionStatus:rs,useFormState:rs,useActionState:rs,useOptimistic:rs,useMemoCache:rs,useCacheRefresh:rs,useEffectEvent:rs},Sc={readContext:ka,use:gs,useCallback:function(e,t){return fs().memoizedState=[e,t===void 0?null:t],e},useContext:ka,useEffect:Ks,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ws(4194308,4,Qs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ws(4194308,4,e,t)},useInsertionEffect:function(e,t){Ws(4,2,e,t)},useMemo:function(e,t){var n=fs();t=t===void 0?null:t;var r=e();if(Qo){et(!0);try{e()}finally{et(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=fs();if(n!==void 0){var i=n(t);if(Qo){et(!0);try{n(t)}finally{et(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=mc.bind(null,qo,e),[r.memoizedState,e]},useRef:function(e){var t=fs();return e={current:e},t.memoizedState=e},useState:function(e){e=Os(e);var t=e.queue,n=hc.bind(null,qo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ec,useDeferredValue:function(e,t){return rc(fs(),e,t)},useTransition:function(){var e=Os(!1);return e=ac.bind(null,qo,e.queue,!0,!1),fs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=qo,a=fs();if(ca){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ud===null)throw Error(i(349));fd&127||Cs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ks(Ts.bind(null,r,o,e),[e]),r.flags|=2048,Hs(9,{destroy:void 0},ws.bind(null,r,o,n,t),null),n},useId:function(){var e=fs(),t=ud.identifierPrefix;if(ca){var n=ea,r=$i;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=$o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ns++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:uc,useFormState:Ls,useActionState:Ls,useOptimistic:function(e){var t=fs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=_c.bind(null,qo,!0,n),n.dispatch=t,[e,t]},useMemoCache:_s,useCacheRefresh:function(){return fs().memoizedState=pc.bind(null,qo)},useEffectEvent:function(e){var t=fs(),n={impl:e};return t.memoizedState=n,function(){if(ld&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Cc={readContext:ka,use:gs,useCallback:tc,useContext:ka,useEffect:qs,useImperativeHandle:$s,useInsertionEffect:Xs,useLayoutEffect:Zs,useMemo:nc,useReducer:ys,useRef:Us,useState:function(){return ys(vs)},useDebugValue:ec,useDeferredValue:function(e,t){return ic(ps(),Jo.memoizedState,e,t)},useTransition:function(){var e=ys(vs)[0],t=ps().memoizedState;return[typeof e==`boolean`?e:hs(e),t]},useSyncExternalStore:Ss,useId:dc,useHostTransitionStatus:uc,useFormState:Rs,useActionState:Rs,useOptimistic:function(e,t){return ks(ps(),Jo,e,t)},useMemoCache:_s,useCacheRefresh:fc,useEffectEvent:Ys},wc={readContext:ka,use:gs,useCallback:tc,useContext:ka,useEffect:qs,useImperativeHandle:$s,useInsertionEffect:Xs,useLayoutEffect:Zs,useMemo:nc,useReducer:xs,useRef:Us,useState:function(){return xs(vs)},useDebugValue:ec,useDeferredValue:function(e,t){var n=ps();return Jo===null?rc(n,e,t):ic(n,Jo.memoizedState,e,t)},useTransition:function(){var e=xs(vs)[0],t=ps().memoizedState;return[typeof e==`boolean`?e:hs(e),t]},useSyncExternalStore:Ss,useId:dc,useHostTransitionStatus:uc,useFormState:Vs,useActionState:Vs,useOptimistic:function(e,t){var n=ps();return Jo===null?(n.baseState=e,[e,n.queue.dispatch]):ks(n,Jo,e,t)},useMemoCache:_s,useCacheRefresh:fc,useEffectEvent:Ys};function Tc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:E({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ec={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Gd(),i=xo(r);i.payload=t,n!=null&&(i.callback=n),t=So(e,i,r),t!==null&&(Jd(t,e,r),Co(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Gd(),i=xo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=So(e,i,r),t!==null&&(Jd(t,e,r),Co(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gd(),r=xo(n);r.tag=2,t!=null&&(r.callback=t),t=So(e,r,n),t!==null&&(Jd(t,e,n),Co(t,e,n))}};function Dc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Gr(n,r)||!Gr(i,a):!0}function Oc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ec.enqueueReplaceState(t,t.state,null)}function kc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=E({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ac(e){Ci(e)}function jc(e){console.error(e)}function Mc(e){Ci(e)}function Nc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Pc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Fc(e,t,n){return n=xo(n),n.tag=3,n.payload={element:null},n.callback=function(){Nc(e,t)},n}function Ic(e){return e=xo(e),e.tag=3,e}function Lc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Pc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Pc(t,n,r),typeof i!=`function`&&(Md===null?Md=new Set([this]):Md.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Rc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ea(t,n,a,!0),n=Fo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Io===null?sf():n.alternate===null&&yd===0&&(yd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===no?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),kf(e,r,a)),!1;case 22:return n.flags|=65536,r===no?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),kf(e,r,a)),!1}throw Error(i(435,n.tag))}return kf(e,r,a),sf(),!1}if(ca)return t=Fo.current,t===null?(r!==da&&(t=Error(i(423),{cause:r}),va(Gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Gi(r,n),a=Fc(e.stateNode,r,a),wo(e,a),yd!==4&&(yd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==da&&(e=Error(i(422),{cause:r}),va(Gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Gi(o,n),Td===null?Td=[o]:Td.push(o),yd!==4&&(yd=2),t===null)return!0;r=Gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Fc(n.stateNode,r,e),wo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(Md===null||!Md.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ic(a),Lc(a,e,n,r),wo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var zc=Error(i(461)),Bc=!1;function Vc(e,t,n,r){t.child=e===null?_o(t,null,n,r):go(t,e.child,n,r)}function Hc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Oa(t),r=as(e,t,n,o,a,i),s=ls(),e!==null&&!Bc?(us(e,t,i),gl(e,t,i)):(ca&&s&&ra(t),t.flags|=1,Vc(e,t,r,i),t.child)}function Uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ii(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Wc(e,t,a,r,i)):(e=zi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!_l(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Gr:n,n(o,r)&&e.ref===t.ref)return gl(e,t,i)}return t.flags|=1,e=Li(a,r),e.ref=t.ref,e.return=t,t.child=e}function Wc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Gr(a,r)&&e.ref===t.ref){if(Bc=!1,t.pendingProps=r=a,_l(e,i))e.flags&131072&&(Bc=!0);else return t.lanes=e.lanes,gl(e,t,i)}}return Qc(e,t,n,r,i)}function Gc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return qc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Za(t,a===null?null:a.cachePool),a===null?No():Mo(t,a),zo(t);else return r=t.lanes=536870912,qc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Za(t,null),No(),Bo()):(Za(t,a.cachePool),Mo(t,a),Bo(),t.memoizedState=null);return Vc(e,t,i,n),t.child}function Kc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function qc(e,t,n,r,i){var a=Xa();return a=a===null?null:{parent:Fa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Za(t,null),No(),zo(t),e!==null&&Ea(e,t,r,!0),t.childLanes=i,null}function Jc(e,t){return t=sl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yc(e,t,n){return go(t,e.child,null,n),e=Jc(t,t.pendingProps),e.flags|=2,Vo(t),t.memoizedState=null,e}function Xc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(ca){if(r.mode===`hidden`)return e=Jc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Kc(null,e);if(Ro(t),(e=sa)?(e=xm(e,ua),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw fa(t);return t.lanes=536870912,null}return Jc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ro(t),a){if(t.flags&256)t.flags&=-257,t=Yc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Bc||Ea(e,t,n,!1),a=(n&e.childLanes)!==0,Bc||a){if(Ao.current===null){if(r=ud,r!==null&&(s=yt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ai(e,s),Jd(r,e,s),zc;sf()}t=Yc(e,t,n)}else e=o.treeContext,sa=Tm(s.nextSibling),oa=t,ca=!0,la=null,ua=!1,e!==null&&aa(t,e),t=Jc(t,r),t.flags|=134221824;return t}return e=Li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Zc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Qc(e,t,n,r,i){return Oa(t),n=as(e,t,n,r,void 0,i),r=ls(),e!==null&&!Bc?(us(e,t,i),gl(e,t,i)):(ca&&r&&ra(t),t.flags|=1,Vc(e,t,n,i),t.child)}function $c(e,t,n,r,i,a){return Oa(t),t.updateQueue=null,n=ss(t,r,n,i),os(e),r=ls(),e!==null&&!Bc?(us(e,t,a),gl(e,t,a)):(ca&&r&&ra(t),t.flags|=1,Vc(e,t,n,a),t.child)}function el(e,t,n,r,i){if(Oa(t),t.stateNode===null){var a=Ni,o=n.contextType;typeof o==`object`&&o&&(a=ka(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ec,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},yo(t),o=n.contextType,a.context=typeof o==`object`&&o?ka(o):Ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Tc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ec.enqueueReplaceState(a,a.state,null),Do(t,r,a,i),Eo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=kc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ni,typeof u==`object`&&u&&(o=ka(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Oc(t,a,r,o),vo=!1;var f=t.memoizedState;a.state=f,Do(t,r,a,i),Eo(),l=t.memoizedState,s||f!==l||vo?(typeof d==`function`&&(Tc(t,n,d,r),l=t.memoizedState),(c=vo||Dc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,bo(e,t),o=t.memoizedProps,u=kc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ni,typeof l==`object`&&l&&(c=ka(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Oc(t,a,r,c),vo=!1,f=t.memoizedState,a.state=f,Do(t,r,a,i),Eo();var p=t.memoizedState;o!==d||f!==p||vo||e!==null&&e.dependencies!==null&&Da(e.dependencies)?(typeof s==`function`&&(Tc(t,n,s,r),p=t.memoizedState),(u=vo||Dc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Da(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Zc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=go(t,e.child,null,i),t.child=go(t,null,n,i)):Vc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=gl(e,t,i),e}function tl(e,t,n,r){return ga(),t.flags|=256,Vc(e,t,n,r),t.child}var nl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rl(e){return{baseLanes:e,cachePool:Qa()}}function il(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Cd),e}function al(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Ho.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(ca){if(i?Lo(t):Bo(),(e=sa)?(e=xm(e,ua),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw fa(t);return t.lanes=Cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Bo(),i=t.mode,a=sl({mode:`hidden`,children:a},i),r=Bi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=rl(n),r.childLanes=il(e,o,n),t.memoizedState=nl,Kc(null,r)):(Lo(t),ol(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return ll(e,t,a,o,r,c,s,n)}return i?(Bo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Li(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Bi(i,a,n,null),i.flags|=2):i=Li(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Kc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=rl(n):(a=i.cachePool,a===null?a=Qa():(s=Fa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=il(e,o,n),t.memoizedState=nl,Kc(e.child,r)):(Lo(t),n=e.child,e=n.sibling,n=Li(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function ol(e,t){return t=sl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function sl(e,t){return e=Fi(22,e,null,t),e.lanes=0,e}function cl(e,t,n){return go(t,e.child,null,n),e=ol(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ll(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Lo(t),t.flags&=-257,cl(e,t,c)):t.memoizedState===null?(Bo(),o=a.fallback,s=t.mode,a=sl({mode:`visible`,children:a.children},s),o=Bi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,go(t,e.child,null,c),a=t.child,a.memoizedState=rl(c),a.childLanes=il(e,r,c),t.memoizedState=nl,Kc(null,a)):(Bo(),t.child=e.child,t.flags|=128,null);if(Lo(t),Cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,va({value:a,source:null,stack:null})),cl(e,t,c)}if(Bc||Ea(e,t,c,!1),r=(c&e.childLanes)!==0,Bc||r){if(Ao.current!==null)return cl(e,t,c);if(r=ud,r!==null&&(a=yt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ai(e,a),Jd(r,e,a),zc;return Sm(o)||sf(),cl(e,t,c)}return Sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,sa=Tm(o.nextSibling),oa=t,ca=!0,la=null,ua=!1,e!==null&&aa(t,e),t=ol(t,a.children),t.flags|=134221824,t)}function ul(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),wa(e.return,t,n)}function dl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Go(n)===null&&(t=e),e=e.sibling}return t}function fl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function pl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ml(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Ho.current;if(t.flags&128)return Uo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Uo(t,o),i===`backwards`&&e!==null?(pl(e),Vc(e,t,r,n),pl(e)):Vc(e,t,r,n),r=ca?Yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ul(e,n,t);else if(e.tag===19)ul(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=dl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,pl(t)),fl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Go(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}fl(t,!0,n,null,a,r);break;case`together`:fl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=dl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),fl(t,!1,i,n,a,r)}return t.child}function hl(e,t,n){var r=t.pendingProps;return Sa(t,t.type,r.value),Vc(e,t,r.children,n),t.child}function gl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),bd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _l(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Da(e)))}function vl(e,t,n){switch(t.tag){case 3:F(t,t.stateNode.containerInfo),Sa(t,Fa,e.memoizedState.cache),ga();break;case 27:case 5:ke(t);break;case 4:F(t,t.stateNode.containerInfo);break;case 10:Sa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Lo(t),t.flags|=128,null;r=Ea(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?al(e,t,n):(Lo(t),e=gl(e,t,n),e===null?null:e.sibling)}Lo(t);break;case 19:if(t.flags&128)return ml(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ml(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Uo(t,Ho.current),r)break;return null;case 22:return t.lanes=0,Gc(e,t,n,t.pendingProps);case 24:Sa(t,Fa,e.memoizedState.cache)}return gl(e,t,n)}function yl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Bc=!0;else{if(!_l(e,n)&&!(t.flags&128))return Bc=!1,vl(e,t,n);Bc=!!(e.flags&131072)}}else Bc=!1,ca&&t.flags&1048576&&na(t,Yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ao(t.elementType),t.type=e,typeof e==`function`)Ii(e)?(r=kc(e,r),t.tag=1,t=el(null,t,e,r,n)):(t.tag=0,t=Qc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=Hc(null,t,e,r,n);break a}if(a===oe){t.tag=14,t=Uc(null,t,e,r,n);break a}if(a===re){t.tag=10,t.type=e,t=hl(null,t,n);break a}}throw t=N(e)||e,Error(i(306,t,``))}}return t;case 0:return Qc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=kc(r,t.pendingProps),el(e,t,r,a,n);case 3:a:{if(F(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,bo(e,t),Do(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Sa(t,Fa,r),r!==o.cache&&Ta(t,[Fa],n,!0),Eo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=tl(e,t,r,n);break a}if(r!==a){a=Gi(Error(i(424)),t),va(a),t=tl(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(sa=Tm(e.firstChild),oa=t,ca=!0,la=null,ua=!0,n=_o(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ga(),r===a){t=gl(e,t,n);break a}Vc(e,t,r,n)}t=t.child}return t;case 26:return Zc(e,t),e===null?(n=Ym(t.type,null,t.pendingProps,null))?t.memoizedState=n:ca||(t.stateNode=kp(t.type,t.pendingProps,P.current,t)):t.memoizedState=Ym(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ke(t),e===null&&ca&&(r=t.stateNode=jm(t.type,t.pendingProps,P.current),oa=t,ua=!0,a=sa,zp(t.type)?(Em=a,sa=Tm(r.firstChild)):sa=a),Vc(e,t,t.pendingProps.children,n),Zc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ca&&((a=r=sa)&&(r=ym(r,t.type,t.pendingProps,ua),r===null?a=!1:(t.stateNode=r,oa=t,sa=Tm(r.firstChild),ua=!1,a=!0)),a||fa(t)),ke(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ap(a,o)?r=null:s!==null&&Ap(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=as(e,t,cs,null,null,n),Ch._currentValue=a),Zc(e,t),Vc(e,t,r,n),t.child;case 6:return e===null&&ca&&((e=n=sa)&&(n=bm(n,t.pendingProps,ua),n===null?e=!1:(t.stateNode=n,oa=t,sa=null,e=!0)),e||fa(t)),null;case 13:return al(e,t,n);case 4:return F(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=go(t,null,r,n):Vc(e,t,r,n),t.child;case 11:return Hc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Zc(e,t),Vc(e,t,r,n),t.child;case 8:return Vc(e,t,t.pendingProps.children,n),t.child;case 12:return Vc(e,t,t.pendingProps.children,n),t.child;case 10:return hl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Oa(t),a=ka(a),r=r(a),t.flags|=1,Vc(e,t,r,n),t.child;case 14:return Uc(e,t,t.type,t.pendingProps,n);case 15:return Wc(e,t,t.type,t.pendingProps,n);case 19:return ml(e,t,n);case 31:return Xc(e,t,n);case 22:return Gc(e,t,n,t.pendingProps);case 24:return Oa(t),r=ka(Fa),e===null?(a=Xa(),a===null&&(a=ud,o=Ia(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},yo(t),Sa(t,Fa,a)):((e.lanes&n)!==0&&(bo(e,t),Do(t,null,null,n),Eo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Sa(t,Fa,r),r!==a.cache&&Ta(t,[Fa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Sa(t,Fa,r))),Vc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:ca&&ra(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Zc(e,t),Vc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function bl(e){e.flags|=4}function xl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?uh(t,r):uh(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(rf())e.flags|=8192;else throw oo=no,eo}}else e.flags&=-16777217}function Sl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!dh(t)){if(rf())e.flags|=8192;else throw oo=no,eo}}function Cl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:pt(),e.lanes|=t,wd|=t)}function wl(e,t){if(!ca)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Tl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function El(e,t,n){var r=t.pendingProps;switch(ia(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tl(t),null;case 1:return Tl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ca(Fa),Oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ha(t)?bl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_a())),Tl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(bl(t),o===null?(Tl(t),xl(t,a,null,r,n)):(Tl(t),Sl(t,o))):o?o===e.memoizedState?(Tl(t),t.flags&=-16777217):(bl(t),Tl(t),Sl(t,o)):(e=e.memoizedProps,e!==r&&bl(t),Tl(t),xl(t,a,e,r,n)),null;case 27:if(Ae(t),n=P.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&bl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Tl(t),t.subtreeFlags&=-33554433,null}e=Te.current,ha(t)?pa(t,e):(e=jm(a,r,n),t.stateNode=e,bl(t))}return Tl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ae(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&bl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Tl(t),t.subtreeFlags&=-33554433,null}if(o=Te.current,ha(t))pa(t,o);else{var s=Ep(P.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Tt]=t,o[Et]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(yp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&bl(t)}}return Tl(t),t.subtreeFlags&=-33554433,xl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&bl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=P.current,ha(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=oa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||gp(e.nodeValue,n)),e||fa(t,!0)}else e=Ep(e).createTextNode(r),e[Tt]=t,t.stateNode=e}return Tl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ha(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Tt]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Tl(t),e=!1}else n=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Vo(t),t):(Vo(t),null);if(t.flags&128)throw Error(i(558))}return Tl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ha(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Tt]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Tl(t),a=!1}else a=_a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Vo(t),t):(Vo(t),null)}return Vo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Cl(t,t.updateQueue),Tl(t),null);case 4:return Oe(),e===null&&op(t.stateNode.containerInfo),t.flags|=67108864,Tl(t),null;case 10:return Ca(t.type),Tl(t),null;case 19:if(Wo(t),r=t.memoizedState,r===null)return Tl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)wl(r,!1);else{if(yd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Go(e),o!==null){for(t.flags|=128,wl(r,!1),e=o.updateQueue,t.updateQueue=e,Cl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ri(n,e),n=n.sibling;return Uo(t,Ho.current&1|2),ca&&ta(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ue()>Ad&&(t.flags|=128,a=!0,wl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Cl(t,e),wl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!ca)return Tl(t),null}else 2*Ue()-r.renderingStartTime>Ad&&n!==536870912&&(t.flags|=128,a=!0,wl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ue(),e.sibling=null,o=Ho.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||ca?Uo(t,o):(n=o,Ce(Fo,t),Ce(Ho,n),Io===null&&(Io=t)),ca&&ta(t,r.treeForkCount),e}return Tl(t),null;case 22:case 23:return Vo(t),Po(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Tl(t),t.subtreeFlags&6&&(t.flags|=8192)):Tl(t),n=t.updateQueue,n!==null&&Cl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Se(Ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ca(Fa),Tl(t),null;case 25:return null;case 30:return t.flags|=33554432,Tl(t),null}throw Error(i(156,t.tag))}function Dl(e,t){switch(ia(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ca(Fa),Oe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ae(t),null;case 31:if(t.memoizedState!==null){if(Vo(t),t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Wo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Oe(),null;case 10:return Ca(t.type),null;case 22:case 23:return Vo(t),Po(),e!==null&&Se(Ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ca(Fa),null;case 25:return null;default:return null}}function Ol(e,t){switch(ia(t),t.tag){case 3:Ca(Fa),Oe();break;case 26:case 27:case 5:Ae(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&Vo(t);break;case 13:Vo(t);break;case 19:Wo(t);break;case 10:Ca(t.type);break;case 22:case 23:Vo(t),Po(),e!==null&&Se(Ya);break;case 24:Ca(Fa)}}function kl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Of(t,t.return,e)}}function Al(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Of(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Of(t,t.return,e)}}function jl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ko(t,n)}catch(t){Of(e,e.return,t)}}}function Ml(e,t,n){n.props=kc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Of(e,t,n)}}function Nl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=bi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Xp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Zp(e);p(e.child,!1,mm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Of(e,t,n)}}function Pl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Of(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Of(e,t,n)}else n.current=null}}function Fl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)gm(e.stateNode,t[n])}function Il(e){for(var t=e.return;t!==null&&(zl(t)&&gm(e.stateNode,t.stateNode),!Rl(t));)t=t.return}function Ll(e){for(var t=e.return;t!==null&&(zl(t)&&_m(e.stateNode,t.stateNode),!Rl(t));)t=t.return}function Rl(e){return e.tag===5||e.tag===3||e.tag===27}function zl(e){return e&&e.tag===7&&e.stateNode!==null}function Bl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Of(e,e.return,t)}}function Vl(e,t,n){try{var r=e.stateNode;xp(r,e.type,n,t),r[Et]=t}catch(t){Of(e,e.return,t)}}function Hl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zp(e.type)||e.tag===4}function Ul(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Hl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&zp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xn)),Fl(e,r),Yt=!0;else if(i!==4&&(i===27&&(Fl(e,r),r=null,zp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Wl(e,t,n,r),e=e.sibling;e!==null;)Wl(e,t,n,r),e=e.sibling}function Gl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Fl(e,r),Yt=!0;else if(i!==4&&(i===27&&(Fl(e,r),r=null,zp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Gl(e,t,n,r),e=e.sibling;e!==null;)Gl(e,t,n,r),e=e.sibling}function Kl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);yp(t,r,n),t[Tt]=e,t[Et]=n}catch(t){Of(e,e.return,t)}}var ql=!1,Jl=null;function Yl(e){(e.tag===30||e.subtreeFlags&33554432)&&(ql=!0)}var Xl=null;function Zl(){var e=Xl;return Xl=null,e}var Ql=0;function $l(e,t,n,r,i){return Ql=0,eu(e.child,t,n,r,i)}function eu(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Wp(o);r.push(s),s.view&&(a=!0)}else a||Wp(o).view&&(a=!0);ql=!0,L(o,Ql===0?t:t+`_`+Ql,n),Ql++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||eu(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function tu(e,t){for(;e!==null;)e.tag===5?Hp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||tu(e.child,t),e=e.sibling}function nu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(nu(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=Si(t.default,t.share),t!==`none`&&($l(e,n,t,null,!1)||tu(e.child,!1))}e=e.sibling}}function ru(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=bi(r,n),a=Si(r.default,n.paired?r.share:r.enter);a===`none`?nu(e):$l(e,i,a,null,!1)?(nu(e),n.paired||t||qd(e,r.onEnter)):tu(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ru(e,t),e=e.sibling;else nu(e)}function iu(e){if(Jl!==null&&Jl.size!==0){var t=Jl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=Si(n.default,n.share);if(a!==`none`&&($l(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,qd(e,n.onShare)):tu(e.child,!1)),t.delete(r),t.size===0)break}}}iu(e)}e=e.sibling}}}function au(e){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode),r=Jl===null?void 0:Jl.get(n),i=Si(t.default,r===void 0?t.exit:t.share);i!==`none`&&($l(e,n,i,null,!1)?r===void 0?qd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Jl.delete(n),qd(e,t.onShare)):tu(e.child,!1)),Jl!==null&&iu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)au(e),e=e.sibling;else Jl!==null&&iu(e)}function ou(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode);t=Si(t.default,t.update),e.flags&=-5,t!==`none`&&$l(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&ou(e);e=e.sibling}}function su(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,tu(e.child,!1))}su(e)}e=e.sibling}}function cu(e){if(e.tag===30)e.stateNode.paired=null,tu(e.child,!1),su(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)cu(e),e=e.sibling;else su(e)}function lu(e){for(e=e.child;e!==null;)e.tag===30?tu(e.child,!1):e.subtreeFlags&33554432&&lu(e),e=e.sibling}function uu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ql<a.length){var l=a[Ql],u=Wp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&L(c,Ql===0?n:n+`_`+Ql,i),s&&e.flags&4||(Xl===null&&(Xl=[]),Xl.push(c,Ql===0?r:r+`_`+Ql,t.memoizedProps)),Ql++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:uu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function du(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=bi(n,r),a=Si(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Gp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ql=0,i=uu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||qd(e,n.onUpdate))}else e.subtreeFlags&33554432&&du(e,t);e=e.sibling}}var fu=!1,pu=!1,mu=!1,hu=!1,gu=typeof WeakSet==`function`?WeakSet:Set,_u=null,vu=!1,yu=!1,bu=!1,xu=!1;function Su(e,t,n){if(e=e.containerInfo,wp=Mh,e=Xr(e),Zr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(Tp={focusedElem:e,selectionRange:r},Mh=!1,n=(n&335544064)===n,_u=t,t=n?9270:1024;_u!==null;){if(e=_u,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&au(r[a]);if(e.alternate===null&&e.flags&2)n&&Yl(e),Cu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&au(r),Cu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Yl(e),Cu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,_u=r):(n&&ou(e),Cu(n))}}Jl=null}function Cu(e){for(;_u!==null;){var t=_u,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=kc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){Of(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)vm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:vm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=bi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=Si(a.default,a.update),a!==`none`&&$l(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,_u=r;break}_u=t.return}}function wu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Wu(e,n),r&4&&kl(5,n);break;case 1:if(Wu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Of(n,n.return,e)}else{var i=kc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Of(n,n.return,e)}}}r&64&&jl(n),r&512&&Nl(n,n.return);break;case 3:if(Wu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ko(e,t)}catch(e){Of(n,n.return,e)}}break;case 27:t===null&&r&4&&Kl(n);case 26:case 5:Wu(e,n),t===null&&r&4&&Bl(n),r&512&&Nl(n,n.return);break;case 12:Wu(e,n);break;case 31:Wu(e,n),r&4&&Nu(e,n);break;case 13:Wu(e,n),r&4&&Pu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Mf.bind(null,n),wm(e,n))));break;case 22:if(r=n.memoizedState!==null||fu,!r){var a=t!==null&&t.memoizedState!==null||pu;t=fu,i=pu,fu=r,(pu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Ku(e,n,r)):Wu(e,n),fu=t,pu=i}break;case 30:Wu(e,n),r&512&&Nl(n,n.return);break;case 7:r&512&&Nl(n,n.return);default:Wu(e,n)}}function Tu(e,t){for(e=e.child;e!==null;)Eu(e,t),e=e.sibling}function Eu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){Of(e,e.return,t)}Du(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Yt=!0}catch(t){Of(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Vp(s,!0):Vp(e.stateNode,!1)}catch(t){Of(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&Tu(e,t);break;default:Tu(e,t)}}function Du(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:Eu(n,r);break a;case 22:n.memoizedState===null&&Du(n,r);break a;default:Du(n,r)}}e=e.sibling}}function Ou(e){var t=e.alternate;t!==null&&(e.alternate=null,Ou(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ku=null,Au=!1;function ju(e,t,n){for(n=n.child;n!==null;)Mu(e,t,n),n=n.sibling}function Mu(e,t,n){if($e&&typeof $e.onCommitFiberUnmount==`function`)try{$e.onCommitFiberUnmount(Qe,n)}catch{}switch(n.tag){case 26:pu||Pl(n,t),ju(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!pu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:pu||Pl(n,t),Ll(n);var r=ku,i=Au;zp(n.type)&&(ku=n.stateNode,Au=!1),ju(e,t,n),Mm(n.stateNode,n.type,n.memoizedProps),ku=r,Au=i;break;case 5:pu||Pl(n,t),Ll(n);case 6:if(n.tag===6&&Ll(n),r=ku,i=Au,ku=null,ju(e,t,n),ku=r,Au=i,ku!==null){if(Au)try{(ku.nodeType===9?ku.body:ku.nodeName===`HTML`?ku.ownerDocument.body:ku).removeChild(n.stateNode),Yt=!0}catch(e){Of(n,t,e)}else try{ku.removeChild(n.stateNode),Yt=!0}catch(e){Of(n,t,e)}}break;case 18:ku!==null&&(Au?(e=ku,Bp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),ig(e)):Bp(ku,n.stateNode));break;case 4:r=ku,i=Au,ku=n.stateNode.containerInfo,Au=!0,ju(e,t,n),ku=r,Au=i;break;case 0:case 11:case 14:case 15:Al(2,n,t),pu||Al(4,n,t),ju(e,t,n);break;case 1:pu||(Pl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ml(n,t,r)),ju(e,t,n);break;case 21:ju(e,t,n);break;case 22:pu=(r=pu)||n.memoizedState!==null,ju(e,t,n),pu=r;break;case 30:Pl(n,t),ju(e,t,n);break;case 7:pu||Pl(n,t),ju(e,t,n);break;default:ju(e,t,n)}}function Nu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ig(e)}catch(e){Of(t,t.return,e)}}}function Pu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ig(e)}catch(e){Of(t,t.return,e)}}function Fu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new gu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new gu),t;default:throw Error(i(435,e.tag))}}function Iu(e,t){var n=Fu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Nf.bind(null,e,t);t.then(r,r)}})}function Lu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(zp(l.type)){ku=l.stateNode,Au=!1;break a}break;case 5:ku=l.stateNode,Au=!1;break a;case 3:case 4:ku=l.stateNode.containerInfo,Au=!0;break a}l=l.return}if(ku===null)throw Error(i(160));Mu(s,c,o),ku=null,Au=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)zu(t,e,n),t=t.sibling}var Ru=null;function zu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Lu(t,e,n),Bu(e),a&4&&(Al(3,e,e.return),kl(3,e),Al(5,e,e.return));break;case 1:Lu(t,e,n),Bu(e),a&512&&(pu||r===null||Pl(r,r.return)),a&64&&fu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Ru,Lu(t,e,n),Bu(e),a&512&&(pu||r===null||Pl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(fu)e.stateNode=kp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Mt]||r[Tt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),yp(r,t,n),r[Tt]=e,zt(r),t=r;break a;case`link`:if(o=sh(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),yp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=sh(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),yp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Tt]=e,zt(r),t=r}e.stateNode=t}}else fu||ch(o,e.type,e.stateNode)}else e.stateNode=nh(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Vl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||pu||t.parentNode.removeChild(t)):a.count--,n===null?fu||ch(o,e.type,e.stateNode):nh(o,n,e.memoizedProps))}break;case 27:Lu(t,e,n),Bu(e),a&512&&(pu||r===null||Pl(r,r.return)),r!==null&&a&4&&Vl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=mu,mu=!1,Lu(t,e,n),mu=o,Bu(e),a&512&&(pu||r===null||Pl(r,r.return)),e.flags&32){t=e.stateNode;try{mn(t,``),Yt=!0}catch(t){Of(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Vl(e,t,r===null?t:r.memoizedProps)),a&1024&&(hu=!0);break;case 6:if(Lu(t,e,n),Bu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Yt=!0}catch(t){Of(e,e.return,t)}}break;case 3:if(Yt=!1,oh=null,o=Ru,Ru=Im(t.containerInfo),Lu(t,e,n),Ru=o,Bu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{ig(t.containerInfo)}catch(t){Of(e,e.return,t)}hu&&(hu=!1,Vu(e)),Yt=!1;break;case 4:a=mu,mu=fu,r=Xt(),o=Ru,Ru=Im(e.stateNode.containerInfo),Lu(t,e,n),Bu(e),Ru=o,Yt&&yu&&(bu=!0),Yt=r,mu=a;break;case 12:Lu(t,e,n),Bu(e);break;case 31:Lu(t,e,n),Bu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Iu(e,t)));break;case 13:Lu(t,e,n),Bu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Od=Ue()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Iu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=fu,l=pu,u=mu;fu=c||o,mu=u||o,pu=l||s,Lu(t,e,n),pu=l,mu=u,fu=c,Bu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||fu||pu||(t=s||pu,n=fu,r=pu,fu=o||fu,pu=t,Gu(e,2),fu=n,pu=r),!o&&mu||Tu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Iu(e,n))));break;case 19:Lu(t,e,n),Bu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Iu(e,t)));break;case 30:a&512&&(pu||r===null||Pl(r,r.return)),a=Xt(),o=yu,s=(n&335544064)===n,c=e.memoizedProps,yu=s&&Si(c.default,c.update)!==`none`,Lu(t,e,n),Bu(e),s&&r!==null&&Yt&&(e.flags|=4),yu=o,Yt=a;break;case 21:break;case 7:a&512&&(pu||r===null||Pl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Lu(t,e,n),Bu(e)}}function Bu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Hl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(zl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Rl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Gl(e,Ul(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(mn(l,``),n.flags&=-33),Gl(e,Ul(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Wl(e,Ul(e),u,s);break;default:throw Error(i(161))}}catch(t){Of(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Mh=!0,t.reset(),Mh=!1),e=e.sibling}}function Hu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Uu(t,e),t=t.sibling;else du(t,!1)}function Uu(e,t){var n=e.alternate;if(n===null)ru(e,!1);else switch(e.tag){case 3:if(xu=vu=!1,Zl(),Hu(t,e),!vu&&!bu){if(e=Xl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Hp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),xu=!0}Xl=null;break;case 5:Hu(t,e);break;case 4:r=vu,vu=!1,Hu(t,e),vu&&(bu=!0),vu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Hu(t,e):ru(e,!1));break;case 30:r=vu,i=Zl(),vu=!1,Hu(t,e),vu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=bi(a,o),o=bi(n.memoizedProps,o);var s=Si(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ql=0,t=uu(e,n,t,o,s,a,!0),Ql!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(qd(e,e.memoizedProps.onUpdate),Xl=i):i!==null&&(i.push.apply(i,Xl),Xl=i),vu=e.flags&32?!0:r;break;default:Hu(t,e)}}function Wu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)wu(e,t.alternate,t),t=t.sibling}function Gu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Al(4,n,n.return),Gu(n,r);break;case 1:Pl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Ml(n,n.return,i),Gu(n,r);break;case 27:r&2&&Mm(n.stateNode,n.type,n.memoizedProps);case 5:Pl(n,n.return),n.tag!==5&&n.tag!==27||Ll(n),Gu(n,r);break;case 6:Ll(n);break;case 26:Pl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||pu||i.parentNode.removeChild(i),Gu(n,r);break;case 22:n.memoizedState===null&&Gu(n,r);break;case 30:Pl(n,n.return),Gu(n,r);break;case 7:Pl(n,n.return);default:Gu(n,r)}e=e.sibling}}function Ku(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Ku(i,a,n),kl(4,a);break;case 1:if(Ku(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Of(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Oo(l[i],c)}catch(e){Of(r,r.return,e)}}s&&o&64&&jl(a),Nl(a,a.return);break;case 27:n&2&&Kl(a);case 5:a.tag!==5&&a.tag!==27||Il(a),Ku(i,a,n),s&&r===null&&o&4&&Bl(a),Nl(a,a.return);break;case 6:Il(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||fu||ch(Im(c.ownerDocument),a.type,c),Ku(i,a,n),s&&r===null&&o&4&&Bl(a),Nl(a,a.return);break;case 12:Ku(i,a,n);break;case 31:Ku(i,a,n),s&&o&4&&Nu(i,a);break;case 13:Ku(i,a,n),s&&o&4&&Pu(i,a);break;case 22:a.memoizedState===null&&Ku(i,a,n),Nl(a,a.return);break;case 30:Ku(i,a,n),Nl(a,a.return);break;case 7:Nl(a,a.return);default:Ku(i,a,n)}t=t.sibling}}function qu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&La(n))}function Ju(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&La(e))}function Yu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Xu(e,t,n,r),t=t.sibling;else i&&lu(t)}function Xu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&cu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Yu(e,t,n,r),a&2048&&kl(9,t);break;case 1:Yu(e,t,n,r);break;case 3:Yu(e,t,n,r),i&&xu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&La(a)));break;case 12:if(a&2048){Yu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){Of(t,t.return,e)}}else Yu(e,t,n,r);break;case 31:Yu(e,t,n,r);break;case 13:Yu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&cu(t),o._visibility&2?Yu(e,t,n,r):(o._visibility|=2,Zu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&cu(s),o._visibility&2?Yu(e,t,n,r):Qu(e,t)),a&2048&&qu(s,t);break;case 24:Yu(e,t,n,r),a&2048&&Ju(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(tu(a.child,!0),tu(t.child,!0))),Yu(e,t,n,r);break;default:Yu(e,t,n,r)}}function Zu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Zu(a,o,s,c,i),kl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Zu(a,o,s,c,i)):u._visibility&2?Zu(a,o,s,c,i):Qu(a,o),i&&l&2048&&qu(o.alternate,o);break;case 24:Zu(a,o,s,c,i),i&&l&2048&&Ju(o.alternate,o);break;default:Zu(a,o,s,c,i)}t=t.sibling}}function Qu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Qu(n,r),i&2048&&qu(r.alternate,r);break;case 24:Qu(n,r),i&2048&&Ju(r.alternate,r);break;default:Qu(n,r)}t=t.sibling}}var $u=8192;function ed(e,t,n){if(e.subtreeFlags&$u)for(e=e.child;e!==null;)td(e,t,n),e=e.sibling}function td(e,t,n){switch(e.tag){case 26:ed(e,t,n),e.flags&$u&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&ph(n,e)):mh(n,Ru,e.memoizedState,e.memoizedProps));break;case 5:ed(e,t,n),e.flags&$u&&(e=e.stateNode,(t&335544128)===t&&ph(n,e));break;case 3:case 4:var r=Ru;Ru=Im(e.stateNode.containerInfo),ed(e,t,n),Ru=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=$u,$u=16777216,ed(e,t,n),$u=r):ed(e,t,n));break;case 30:if((e.flags&$u)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Jl===null&&(Jl=new Map),Jl.set(r,i)}ed(e,t,n);break;default:ed(e,t,n)}}function nd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function rd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];_u=r,od(r,e)}nd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)id(e),e=e.sibling}function id(e){switch(e.tag){case 0:case 11:case 15:rd(e),e.flags&2048&&Al(9,e,e.return);break;case 3:rd(e);break;case 12:rd(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ad(e)):rd(e);break;default:rd(e)}}function ad(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];_u=r,od(r,e)}nd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Al(8,t,t.return),ad(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ad(t));break;default:ad(t)}e=e.sibling}}function od(e,t){for(;_u!==null;){var n=_u;switch(n.tag){case 0:case 11:case 15:Al(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:La(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,_u=r;else a:for(n=e;_u!==null;){r=_u;var i=r.sibling,a=r.return;if(Ou(r),r===n){_u=null;break a}if(i!==null){i.return=a,_u=i;break a}_u=a}}}var sd={getCacheForType:function(e){var t=ka(Fa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ka(Fa).controller.signal}},cd=typeof WeakMap==`function`?WeakMap:Map,ld=0,ud=null,dd=null,fd=0,pd=0,md=null,hd=!1,gd=!1,_d=!1,vd=0,yd=0,bd=0,xd=0,Sd=0,Cd=0,wd=0,Td=null,Ed=null,Dd=!1,Od=0,kd=0,Ad=1/0,jd=null,Md=null,Nd=0,Pd=null,Fd=null,Id=0,Ld=0,Rd=null,zd=null,Bd=null,Vd=null,Hd=null,Ud=0,Wd=null;function Gd(){return ld&2&&fd!==0?fd&-fd:ge.T===null?St():Yf()}function Kd(){if(Cd===0){if(!(fd&536870912)||ca){var e=ot;ot<<=1,!(ot&3932160)&&(ot=262144),Cd=e}else Cd=536870912}return e=Fo.current,e!==null&&(e.flags|=32),Cd}function qd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Xp(bi(e.memoizedProps,n))),Vd===null&&(Vd=[]),Vd.push(t.bind(null,r))}}function Jd(e,t,n){(e===ud&&(pd===2||pd===9)||e.cancelPendingCommit!==null)&&(tf(e,0),Qd(e,fd,Cd,!1)),ht(e,n),ld&2&&e===ud||(e===ud&&(!(ld&2)&&(xd|=n),yd===4&&Qd(e,fd,Cd,!1)),Vf(e))}function Yd(e,t,n){if(ld&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ut(e,t),a=r?uf(e,t):cf(e,t,!0),o=r;do{if(a===0){gd&&!r&&Qd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Zd(n))a=cf(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Td;var l=c.current.memoizedState.isDehydrated;if(l&&(tf(c,s).flags|=256),s=cf(c,s,!1),s!==2&&s!==6){if(_d&&!l){c.errorRecoveryDisabledLanes|=o,xd|=o,a=4;break a}o=Ed,Ed=a,o!==null&&(Ed===null?Ed=o:Ed.push.apply(Ed,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){tf(e,0),Qd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Qd(r,t,Cd,!hd);break a;case 2:Ed=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Od+300-Ue(),10<a)){if(Qd(r,t,Cd,!hd),lt(r,0,!0)!==0)break a;Id=t,r.timeoutHandle=Np(Xd.bind(null,r,n,Ed,jd,Dd,t,Cd,xd,wd,hd,o,`Throttled`,-0,0),a);break a}Xd(r,n,Ed,jd,Dd,t,Cd,xd,wd,hd,o,null,-0,0)}break}}while(1);Vf(e)}function Xd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Jl=null,td(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=vh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?Od-Ue():(a&4194048)===a?kd-Ue():0,m=gh(d,m),m!==null)?(Id=a,e.cancelPendingCommit=m(_f.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Qd(e,a,o,!l)):_f(e,t,a,n,r,i,o,s,c,l,u,d)}function Zd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qd(e,t,n,r){t=dt(e,t),t&=~Sd,t&=~xd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-tt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&_t(e,n,t)}function $d(){return ld&6?!0:(Hf(0,!1),!1)}function ef(){if(dd!==null){if(pd===0)var e=dd.return;else e=dd,xa=ba=null,ds(e),lo=null,uo=0,e=dd;for(;e!==null;)Ol(e.alternate,e),e=e.return;dd=null}}function tf(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Pp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Id=0,ef(),ud=e,dd=n=Li(e.current,null),fd=t,pd=0,md=null,hd=!1,gd=ut(e,t),_d=!1,wd=Cd=Sd=xd=bd=yd=0,Ed=Td=null,Dd=!1,vd=dt(e,t),Di(),n}function nf(e,t){qo=null,ge.H=xc,t===$a||t===to?(t=so(),pd=3):t===eo?(t=so(),pd=4):pd=t===zc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,md=t,dd===null&&(yd=1,Nc(e,Gi(t,e.current)))}function rf(){var e=Fo.current;return e===null?!0:(fd&4194048)===fd?Io===null:(fd&62914560)===fd||fd&536870912?e===Io:!1}function af(){var e=ge.H;return ge.H=xc,e===null?xc:e}function of(){var e=ge.A;return ge.A=sd,e}function sf(){yd=4,hd||(fd&4194048)!==fd&&Fo.current!==null||(gd=!0),!(bd&134217727)&&!(xd&134217727)||ud===null||Qd(ud,fd,Cd,!1)}function cf(e,t,n){var r=ld;ld|=2;var i=af(),a=of();(ud!==e||fd!==t)&&(jd=null,tf(e,t)),t=!1;var o=yd;a:do try{if(pd!==0&&dd!==null){var s=dd,c=md;switch(pd){case 8:ef(),o=6;break a;case 3:case 2:case 9:case 6:Fo.current===null&&(t=!0);var l=pd;if(pd=0,md=null,mf(e,s,c,l),n&&gd){o=0;break a}break;default:l=pd,pd=0,md=null,mf(e,s,c,l)}}lf(),o=yd;break}catch(t){nf(e,t)}while(1);return t&&e.shellSuspendCounter++,xa=ba=null,ld=r,ge.H=i,ge.A=a,dd===null&&(ud=null,fd=0,Di()),o}function lf(){for(;dd!==null;)ff(dd)}function uf(e,t){var n=ld;ld|=2;var r=af(),a=of();ud!==e||fd!==t?(jd=null,Ad=Ue()+500,tf(e,t)):gd=ut(e,t);a:do try{if(pd!==0&&dd!==null){t=dd;var o=md;b:switch(pd){case 1:pd=0,md=null,mf(e,t,o,1);break;case 2:case 9:if(ro(o)){pd=0,md=null,pf(t);break}t=function(){pd!==2&&pd!==9||ud!==e||(pd=7),Vf(e)},o.then(t,t);break a;case 3:pd=7;break a;case 4:pd=5;break a;case 7:ro(o)?(pd=0,md=null,pf(t)):(pd=0,md=null,mf(e,t,o,7));break;case 5:var s=null;switch(dd.tag){case 26:s=dd.memoizedState;case 5:case 27:var c=dd;if(s?dh(s):c.stateNode.complete){pd=0,md=null;var l=c.sibling;if(l!==null)dd=l;else{var u=c.return;u===null?dd=null:(dd=u,hf(u))}break b}}pd=0,md=null,mf(e,t,o,5);break;case 6:pd=0,md=null,mf(e,t,o,6);break;case 8:ef(),yd=6;break a;default:throw Error(i(462))}}df();break}catch(t){nf(e,t)}while(1);return xa=ba=null,ge.H=r,ge.A=a,ld=n,dd===null?(ud=null,fd=0,Di(),yd):0}function df(){for(;dd!==null&&!Ve();)ff(dd)}function ff(e){var t=yl(e.alternate,e,vd);e.memoizedProps=e.pendingProps,t===null?hf(e):dd=t}function pf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=$c(n,t,t.pendingProps,t.type,void 0,fd);break;case 11:t=$c(n,t,t.pendingProps,t.type.render,t.ref,fd);break;case 5:ds(t);var r=t;r===oa&&(ca?(ma(r),r.tag===5&&r.stateNode!=null&&(sa=r.stateNode)):(ma(r),ca=!0));default:Ol(n,t),t=dd=Ri(t,vd),t=yl(n,t,vd)}e.memoizedProps=e.pendingProps,t===null?hf(e):dd=t}function mf(e,t,n,r){xa=ba=null,ds(t),lo=null,uo=0;var i=t.return;try{if(Rc(e,i,t,n,fd)){yd=1,Nc(e,Gi(n,e.current)),dd=null;return}}catch(t){if(i!==null)throw dd=i,t;yd=1,Nc(e,Gi(n,e.current)),dd=null;return}t.flags&32768?(ca||r===1?e=!0:gd||fd&536870912?e=!1:(hd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Fo.current,r!==null&&r.tag===13&&(r.flags|=16384))),gf(t,e)):hf(t)}function hf(e){var t=e;do{if(t.flags&32768){gf(t,hd);return}e=t.return;var n=El(t.alternate,t,vd);if(n!==null){dd=n;return}if(t=t.sibling,t!==null){dd=t;return}dd=t=e}while(t!==null);yd===0&&(yd=5)}function gf(e,t){do{var n=Dl(e.alternate,e);if(n!==null){n.flags&=32767,dd=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){dd=e;return}dd=e=n}while(e!==null);yd=6,dd=null}function _f(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do Tf();while(Nd!==0);if(ld&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===ud&&(dd=ud=null,fd=0),Fd=t,Pd=e,Id=n,Rd=a,zd=r,vf(e,t,n,s,c,l,f)}}function vf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ld=s,s|=Ei,gt(e,n,s,r,i,a),Vd=null,(n&335544064)===n?(Hd=Ba(e),r=10262):(Hd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Pf(qe,function(){return Ef(),null})):(e.callbackNode=null,e.callbackPriority=0),ql=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=ge.T,ge.T=null,i=_e.p,_e.p=2,a=ld,ld|=4;try{Su(e,t,n)}finally{ld=a,_e.p=i,ge.T=r}}Nd=1,ql?Bd=Jp(o,e.containerInfo,Hd,xf,Sf,bf,Cf,Ef,yf,null,null):(xf(),Sf(),Cf())}function yf(e){if(Nd!==0){var t=Pd.onRecoverableError;t(e,{componentStack:null})}}function bf(){Nd===3&&(Nd=0,Uu(Fd,Pd),Nd=4)}function xf(){if(Nd===1){Nd=0;var e=Pd,t=Fd,n=Id,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=ge.T,ge.T=null;var i=_e.p;_e.p=2;var a=ld;ld|=4;try{yu=bu=!1,zu(t,e,n),n=Tp;var o=Xr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Yr(s.ownerDocument.documentElement,s)){if(c!==null&&Zr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Jr(s,h),v=Jr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Mh=!!wp,Tp=wp=null}finally{ld=a,_e.p=i,ge.T=r}}e.current=t,Nd=2}}function Sf(){if(Nd===2){Nd=0;var e=Pd,t=Fd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=ge.T,ge.T=null;var r=_e.p;_e.p=2;var i=ld;ld|=4;try{wu(e,t.alternate,t)}finally{ld=i,_e.p=r,ge.T=n}}Nd=3}}function Cf(){if(Nd===4||Nd===3){Nd=0;var e=Bd;Bd=null,He();var t=Pd,n=Fd,r=Id,i=zd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Nd=5:(Nd=0,Fd=Pd=null,wf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Md=null),xt(r),n=n.stateNode,$e&&typeof $e.onCommitFiberRoot==`function`)try{$e.onCommitFiberRoot(Qe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=ge.T,a=_e.p,_e.p=2,ge.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{ge.T=n,_e.p=a}}if(i=Vd,o=Hd,Hd=null,i!==null&&(Vd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Id&3&&Tf(),Vf(t),a=t.pendingLanes,r&261930&&a&42?t===Wd?Ud++:(Ud=0,Wd=t):(Ud=0,Wd=null),Hf(0,!1)}}function wf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,La(t)))}function Tf(){return Bd!==null&&(Bd.skipTransition(),Bd=null),xf(),Sf(),Cf(),Ef()}function Ef(){if(Nd!==5)return!1;var e=Pd,t=Ld;Ld=0;var n=xt(Id),r=ge.T,a=_e.p;try{_e.p=32>n?32:n,ge.T=null,n=Rd,Rd=null;var o=Pd,s=Id;if(Nd=0,Fd=Pd=null,Id=0,ld&6)throw Error(i(331));var c=ld;if(ld|=4,id(o.current),Xu(o,o.current,s,n),ld=c,Hf(0,!1),$e&&typeof $e.onPostCommitFiberRoot==`function`)try{$e.onPostCommitFiberRoot(Qe,o)}catch{}return!0}finally{_e.p=a,ge.T=r,wf(e,t)}}function Df(e,t,n){t=Gi(n,t),t=Fc(e.stateNode,t,2),e=So(e,t,2),e!==null&&(ht(e,2),Vf(e))}function Of(e,t,n){if(e.tag===3)Df(e,e,n);else for(;t!==null;){if(t.tag===3){Df(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Md===null||!Md.has(r))){e=Gi(n,e),n=Ic(2),r=So(t,n,2),r!==null&&(Lc(n,r,t,e),ht(r,2),Vf(r));break}}t=t.return}}function kf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new cd;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(_d=!0,i.add(n),e=Af.bind(null,e,t,n),t.then(e,e))}function Af(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ud===e&&(fd&n)===n&&(yd===4||yd===3&&(fd&62914560)===fd&&300>Ue()-Od?ld&2?Sd|=n:tf(e,0):Sd|=n,wd===fd&&(wd=0)),Vf(e)}function jf(e,t){t===0&&(t=pt()),e=Ai(e,t),e!==null&&(ht(e,t),Vf(e))}function Mf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),jf(e,n)}function Nf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),jf(e,n)}function Pf(e,t){return ze(e,t)}var Ff=null,If=null,Lf=!1,Rf=!1,zf=!1,Bf=0;function Vf(e){e!==If&&e.next===null&&(If===null?Ff=If=e:If=If.next=e),Rf=!0,Lf||(Lf=!0,Jf())}function Hf(e,t){if(!zf&&Rf){zf=!0;do for(var n=!1,r=Ff;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-tt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,qf(r,a))}else a=fd,a=lt(r,r===ud?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ut(r,a)||(n=!0,qf(r,a))}r=r.next}while(n);zf=!1}}function Uf(){Wf()}function Wf(){Rf=Lf=!1;var e=0;Bf!==0&&Mp()&&(e=Bf);for(var t=Ue(),n=null,r=Ff;r!==null;){var i=r.next,a=Gf(r,t);a===0?(r.next=null,n===null?Ff=i:n.next=i,i===null&&(If=n)):(n=r,(e!==0||a&3)&&(Rf=!0)),r=i}Nd!==0&&Nd!==5||Hf(e,!1),Bf!==0&&(Bf=0)}function Gf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-tt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ft(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ud,n=fd,n=lt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(pd===2||pd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ut(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Be(r),xt(n)){case 2:case 8:n=Ke;break;case 32:n=qe;break;case 268435456:n=Ye;break;default:n=qe}return r=Kf.bind(null,e),n=ze(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Be(r),e.callbackPriority=2,e.callbackNode=null,2}function Kf(e,t){if(Nd!==0&&Nd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Tf()&&e.callbackNode!==n)return null;var r=fd;return r=lt(e,e===ud?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Yd(e,r,t),Gf(e,Ue()),e.callbackNode!=null&&e.callbackNode===n?Kf.bind(null,e):null)}function qf(e,t){if(Tf())return null;Yd(e,t,!0)}function Jf(){Lp(function(){ld&6?ze(Ge,Uf):Wf()})}function Yf(){if(Bf===0){var e=Ua;e===0&&(e=at,at<<=1,!(at&261888)&&(at=256)),Bf=e}return Bf}function Xf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:bn(e)}function Zf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Xf((i[Et]||null).action),o=r.submitter;o&&(t=(t=o[Et]||null)?Xf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Hn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Bf!==0){var e=new FormData(i,o);sc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),sc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Qf=0;Qf<_i.length;Qf++){var $f=_i[Qf];vi($f.toLowerCase(),`on`+($f[0].toUpperCase()+$f.slice(1)))}vi(li,`onAnimationEnd`),vi(ui,`onAnimationIteration`),vi(di,`onAnimationStart`),vi(`dblclick`,`onDoubleClick`),vi(`focusin`,`onFocus`),vi(`focusout`,`onBlur`),vi(fi,`onTransitionRun`),vi(pi,`onTransitionStart`),vi(mi,`onTransitionCancel`),vi(hi,`onTransitionEnd`),Wt(`onMouseEnter`,[`mouseout`,`mouseover`]),Wt(`onMouseLeave`,[`mouseout`,`mouseover`]),Wt(`onPointerEnter`,[`pointerout`,`pointerover`]),Wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ut(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ut(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ut(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ut(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ut(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ut(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ep=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),tp=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(ep));function np(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ci(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ci(e)}i.currentTarget=null,a=c}}}}function rp(e,t){var n=t[Ot];n===void 0&&(n=t[Ot]=new Set);var r=e+`__bubble`;n.has(r)||(sp(t,e,2,!1),n.add(r))}function ip(e,t,n){var r=0;t&&(r|=4),sp(n,e,r,t)}var ap=`_reactListening`+Math.random().toString(36).slice(2);function op(e){if(!e[ap]){e[ap]=!0,Vt.forEach(function(t){t!==`selectionchange`&&(tp.has(t)||ip(t,!1,e),ip(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ap]||(t[ap]=!0,ip(`selectionchange`,!1,t))}}function sp(e,t,n,r){switch(zh(t)){case 2:var i=Nh;break;case 8:i=Ph;break;default:i=Fh}n=i.bind(null,t,n,e),i=void 0,!jn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function cp(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=Ft(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}On(function(){var r=a,i=Cn(n),o=[];a:{var c=gi.get(e);if(c!==void 0){var l=Hn,u=e;switch(e){case`keypress`:if(Ln(n)===0)break a;case`keydown`:case`keyup`:l=or;break;case`focusin`:u=`focus`,l=Zn;break;case`focusout`:u=`blur`,l=Zn;break;case`beforeblur`:case`afterblur`:l=Zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Yn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=lr;break;case li:case ui:case di:l=Qn;break;case hi:l=ur;break;case`scroll`:case`scrollend`:l=Wn;break;case`wheel`:l=dr;break;case`copy`:case`cut`:case`paste`:l=$n;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=sr;break;case`submit`:l=cr;break;case`toggle`:case`beforetoggle`:l=fr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=kn(m,p),g!=null&&d.push(lp(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==Sn&&(u=n.relatedTarget||n.fromElement)&&(Ft(u)||u[Dt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ft(l):null,l!==null&&(f=s(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Yn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=sr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Lt(c),h=l==null?u:Lt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Ft(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?T(c,l,dp):null,c!==null&&fp(o,u,c,d,!1),l!==null&&f!==null&&fp(o,f,l,d,!0)))}a:{if(c=r?Lt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Mr;else if(Er(c)){if(Nr)_=Hr;else{_=Br;var v=zr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&vn(r.elementType)&&(_=Mr):_=Vr;if(_&&=_(e,r)){Dr(o,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Lt(r):window,e){case`focusin`:(Er(v)||v.contentEditable===`true`)&&($r=v,ei=r,ti=null);break;case`focusout`:ti=ei=$r=null;break;case`mousedown`:ni=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ni=!1,ri(o,n,i);break;case`selectionchange`:if(Qr)break;case`keydown`:case`keyup`:ri(o,n,i)}var y;if(mr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else Sr?br(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(_r&&n.locale!==`ko`&&(Sr||b!==`onCompositionStart`?b===`onCompositionEnd`&&Sr&&(y=In()):(Nn=i,Pn=`value`in Nn?Nn.value:Nn.textContent,Sr=!0)),v=up(r,b),0<v.length&&(b=new er(b,e,null,n,i),o.push({event:b,listeners:v}),y?b.data=y:(y=xr(n),y!==null&&(b.data=y)))),(y=gr?Cr(e,n):wr(e,n))&&(b=up(r,`onBeforeInput`),0<b.length&&(v=new er(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:v,listeners:b}),v.data=y)),Zf(o,e,r,n,i)}np(o,t)})}function lp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function up(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=kn(e,n),i!=null&&r.unshift(lp(e,i,a)),i=kn(e,t),i!=null&&r.push(lp(e,i,a))),e.tag===3)return r;e=e.return}return[]}function dp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function fp(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=kn(n,a),l!=null&&o.unshift(lp(n,l,c))):i||(l=kn(n,a),l!=null&&o.push(lp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var pp=/\r\n?/g,mp=/\u0000|\uFFFD/g;function hp(e){return(typeof e==`string`?e:``+e).replace(pp,`
10
+ `).replace(mp,``)}function gp(e,t){return t=hp(t),hp(e)===t}function _p(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||mn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&mn(e,``+r);else return;break;case`className`:Qt(e,`class`,r);break;case`tabIndex`:Qt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Qt(e,n,r);break;case`style`:_n(e,r,o);return;case`data`:if(t!==`object`){Qt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&_p(e,t,`name`,a.name,a,null),_p(e,t,`formEncType`,a.formEncType,a,null),_p(e,t,`formMethod`,a.formMethod,a,null),_p(e,t,`formTarget`,a.formTarget,a,null)):(_p(e,t,`encType`,a.encType,a,null),_p(e,t,`method`,a.method,a,null),_p(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=xn);return;case`onScroll`:r!=null&&rp(`scroll`,e);return;case`onScrollEnd`:r!=null&&rp(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=bn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:rp(`beforetoggle`,e),rp(`toggle`,e),Zt(e,`popover`,r);break;case`xlinkActuate`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:$t(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:$t(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:$t(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Zt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=yn.get(n)||n,Zt(e,n,r);else return}Yt=!0}function vp(e,t,n,r,a,o){switch(n){case`style`:_n(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)mn(e,r);else if(typeof r==`number`||typeof r==`bigint`)mn(e,``+r);else return;break;case`onScroll`:r!=null&&rp(`scroll`,e);return;case`onScrollEnd`:r!=null&&rp(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=xn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Ht.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Et]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Yt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Zt(e,n,r)}return}Yt=!0}function yp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:rp(`error`,e),rp(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:_p(e,t,o,s,n,null)}}a&&_p(e,t,`srcSet`,n.srcSet,n,null),r&&_p(e,t,`src`,n.src,n,null);return;case`input`:rp(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:_p(e,t,r,d,n,null)}}ln(e,o,c,l,u,s,a,!1);return;case`select`:for(a in rp(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:_p(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&dn(e,!!r,n,!0):dn(e,!!r,t,!1);return;case`textarea`:for(s in rp(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:_p(e,t,s,c,n,null)}pn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:_p(e,t,l,r,n,null)}return;case`dialog`:rp(`beforetoggle`,e),rp(`toggle`,e),rp(`cancel`,e),rp(`close`,e);break;case`iframe`:case`object`:rp(`load`,e);break;case`video`:case`audio`:for(r=0;r<ep.length;r++)rp(ep[r],e);break;case`image`:rp(`error`,e),rp(`load`,e);break;case`details`:rp(`toggle`,e);break;case`embed`:case`source`:case`link`:rp(`error`,e),rp(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:_p(e,t,u,r,n,null)}return;default:if(vn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&vp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&_p(e,t,c,r,n,null))}var bp={};function xp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||_p(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Yt=!0),o=m;break;case`name`:m!==f&&(Yt=!0),a=m;break;case`checked`:m!==f&&(Yt=!0),u=m;break;case`defaultChecked`:m!==f&&(Yt=!0),d=m;break;case`value`:m!==f&&(Yt=!0),s=m;break;case`defaultValue`:m!==f&&(Yt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&_p(e,t,p,m,r,f)}}cn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||_p(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Yt=!0),p=o;break;case`defaultValue`:o!==l&&(Yt=!0),c=o;break;case`multiple`:o!==l&&(Yt=!0),s=o;default:o!==l&&_p(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?dn(e,!!n,n?[]:``,!1):dn(e,!!n,t,!0)):dn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:_p(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Yt=!0),p=a;break;case`defaultValue`:a!==o&&(Yt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&_p(e,t,s,a,r,o)}fn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:_p(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Yt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:_p(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&_p(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:_p(e,t,u,p,r,m)}return;default:if(vn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&vp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||vp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&_p(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||_p(e,t,f,p,r,m)}function Sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Cp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Sp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Sp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var wp=null,Tp=null;function Ep(e){return e.nodeType===9?e:e.ownerDocument}function Dp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Op(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function kp(e,t,n,r){return n=Ep(n).createElement(e),n[Tt]=r,n[Et]=t,yp(n,e,t),zt(n),n}function Ap(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var jp=null;function Mp(){var e=window.event;return e&&e.type===`popstate`?e!==jp&&(jp=e,!0):(jp=null,!1)}var Np=typeof setTimeout==`function`?setTimeout:void 0,Pp=typeof clearTimeout==`function`?clearTimeout:void 0,Fp=typeof Promise==`function`?Promise:void 0,Ip=typeof requestAnimationFrame==`function`?requestAnimationFrame:Np,Lp=typeof queueMicrotask==`function`?queueMicrotask:Fp===void 0?Np:function(e){return Fp.resolve(null).then(e).catch(Rp)};function Rp(e){setTimeout(function(){throw e})}function zp(e){return e===`head`}function Bp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),ig(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Nm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Nm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Nm(e.ownerDocument.body)}n=i}while(n);ig(t)}function Vp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function L(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Hp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Up(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Wp(e){return Up(e.getBoundingClientRect(),getComputedStyle(e),e)}function Gp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Up(t,n,e)}function Kp(e){return e.documentElement.clientHeight}function qp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Jp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Kp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=fh(f),u>hh){s.length=o;break}f=new Promise(qp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Yp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Yp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:E({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Yp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Yp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Xp(e){return{name:e,group:new Yp(`group`,e),imagePair:new Yp(`image-pair`,e),old:new Yp(`old`,e),new:new Yp(`new`,e)}}function Zp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Zp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(nm(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=em(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Qp,e,s,r)}this._eventListeners=a}};function Qp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Zp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=nm(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=em(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,$p,e,n,i),r.splice(t,1),a!==null&&a()}};function $p(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function em(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function tm(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function nm(e,t,n,r){if(e.length===0)return-1;r=tm(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&tm(a.optionsOrUseCapture)===r)return i}return-1}Zp.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,em(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,em(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Zp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,rm,e,void 0,void 0)};function rm(e,t){return e.tag!==6&&(e=v(e),km(e,t))}Zp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,im,t,void 0,void 0);for(var n=t.length-1;0<=n&&!rm(t[n],e);n--);};function im(e,t){return t.push(e),!1}Zp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=Ep(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,am,e,void 0,void 0))};function am(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Zp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,om,e,void 0,void 0)};function om(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}Zp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,sm,e,void 0,void 0);for(var n=t=0;n<cm.length;n++){var r=cm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):cm[t++]=r}cm.length=t}};function sm(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var cm=[],lm=!1;function um(e,t,n){cm.push({fragmentInstance:e,observer:t,instance:n}),lm||(lm=!0,Am(function(){lm=!1;var e=cm;cm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Zp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,dm,e,void 0,void 0),e};function dm(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}Zp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Zp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,im,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=h(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||fm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function fm(e,t,n,r,i){var a=Ft(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=T(n,a,w),t===null?t=!1:(p(t,!0,S,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=T(r,a,w),t===null?t=!1:(p(t,!0,C,a,r),a=y,b=y=null,t=a!==null)),t):!1}function pm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Zp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,im,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),pm(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),pm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function mm(e,t){return e=v(e),hm(e,t),!1}function hm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function gm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,em(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<cm.length;i++){var a=cm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(cm[r++]=a)}cm.length=r,n.observe(e)}),hm(e,t))}function _m(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,em(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?um(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function vm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:vm(n),Pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function ym(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Tm(e.nextSibling),e===null)break}return null}function bm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Tm(e.nextSibling),e===null))return null;return e}function xm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Tm(e.nextSibling),e===null))return null;return e}function Sm(e){return e.data===`$?`||e.data===`$~`}function Cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function wm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function Tm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Em=null;function Dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Tm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Om(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function km(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function Am(e){Ip(function(){Ip(function(t){return e(t)})})}function jm(e,t,n){switch(t=Ep(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Mm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&_p(e,t,r,null,bp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===xn&&(e.onclick=null),Pt(e)}function Nm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pt(e)}var Pm=new Map,Fm=new Set;function Im(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Lm=_e.d;_e.d={f:Rm,r:zm,D:Hm,C:Um,L:Wm,m:Gm,X:qm,S:Km,M:Jm};function Rm(){var e=Lm.f(),t=$d();return e||t}function zm(e){var t=It(e);t!==null&&t.tag===5&&t.type===`form`?lc(t):Lm.r(e)}var Bm=typeof document>`u`?null:document;function Vm(e,t,n){var r=Bm;if(r&&typeof t==`string`&&t){var i=sn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Fm.has(i)||(Fm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),yp(t,`link`,e),zt(t),r.head.appendChild(t)))}}function Hm(e){Lm.D(e),Vm(`dns-prefetch`,e,null)}function Um(e,t){Lm.C(e,t),Vm(`preconnect`,e,t)}function Wm(e,t,n){Lm.L(e,t,n);var r=Bm;if(r&&e&&t){var i=`link[rel="preload"][as="`+sn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+sn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+sn(n.imageSizes)+`"]`)):i+=`[href="`+sn(e)+`"]`;var a=i;switch(t){case`style`:a=Xm(e);break;case`script`:a=eh(e)}if(!(Pm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Pm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Zm(a))||t===`script`&&r.querySelector(th(a))))){var o=r.createElement(`link`);yp(o,`link`,e),t===`style`&&(o[Nt]=!0,o.onload=o.onerror=function(){Bt(o)}),zt(o),r.head.appendChild(o)}}}function Gm(e,t){Lm.m(e,t);var n=Bm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+sn(r)+`"][href="`+sn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=eh(e)}if(!Pm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),Pm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(th(a)))return}r=n.createElement(`link`),yp(r,`link`,e),zt(r),n.head.appendChild(r)}}}function Km(e,t,n){Lm.S(e,t,n);var r=Bm;if(r&&e){var i=Rt(r).hoistableStyles,a=Xm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Zm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Pm.get(a))&&ih(e,n);var c=o=r.createElement(`link`);zt(c),yp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,rh(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function qm(e,t){Lm.X(e,t);var n=Bm;if(n&&e){var r=Rt(n).hoistableScripts,i=eh(e),a=r.get(i);a||(a=n.querySelector(th(i)),a||(e=E({src:e,async:!0},t),(t=Pm.get(i))&&ah(e,t),a=n.createElement(`script`),zt(a),yp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Jm(e,t){Lm.M(e,t);var n=Bm;if(n&&e){var r=Rt(n).hoistableScripts,i=eh(e),a=r.get(i);a||(a=n.querySelector(th(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=Pm.get(i))&&ah(e,t),a=n.createElement(`script`),zt(a),yp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ym(e,t,n,r){var a=(a=P.current)?Im(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Xm(n.href),t=Rt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Xm(n.href);var o=Rt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Zm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Pm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Pm.set(e,o)),$m(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=eh(n),t=Rt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Xm(e){return`href="`+sn(e)+`"`}function Zm(e){return`link[rel="stylesheet"][`+e+`]`}function Qm(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function $m(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Nt]){r.loading=1;return}}else t=e.createElement(`link`),t[Nt]=!0,t.onload=t.onerror=Bt.bind(null,t),yp(t,`link`,n),zt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function eh(e){return`[src="`+sn(e)+`"]`}function th(e){return`script[async]`+e}function nh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+sn(n.href)+`"]`);if(r)return t.instance=r,zt(r),r;var a=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),zt(r),yp(r,`style`,a),rh(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Xm(n.href);var o=e.querySelector(Zm(a));if(o)return t.state.loading|=4,t.instance=o,zt(o),o;r=Qm(n),(a=Pm.get(a))&&ih(r,a),o=(e.ownerDocument||e).createElement(`link`),zt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),yp(o,`link`,r),t.state.loading|=4,rh(o,n.precedence,e),t.instance=o;case`script`:return o=eh(n.src),(a=e.querySelector(th(o)))?(t.instance=a,zt(a),a):(r=n,(a=Pm.get(o))&&(r=E({},n),ah(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),zt(a),yp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,rh(r,n.precedence,e));return t.instance}function rh(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ih(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function ah(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var oh=null;function sh(e,t,n){if(oh===null){var r=new Map,i=oh=new Map;i.set(n,r)}else i=oh,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Mt]||a[Tt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function ch(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function lh(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function uh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function dh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function fh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function ph(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=fh(t),e.suspenseyImages.push(t)),e=yh.bind(e),t.decode().then(e,e))}function mh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Xm(r.href),a=t.querySelector(Zm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=vh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,zt(a);return}a=t.ownerDocument||t,r=Qm(r),(i=Pm.get(i))&&ih(r,i),a=a.createElement(`link`),zt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),yp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=vh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var hh=0;function gh(e,t){return e.stylesheets&&e.count===0&&xh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&xh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&hh===0&&(hh=62500*Cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>hh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function _h(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)xh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function vh(){this.count--,_h(this)}function yh(){this.imgCount--,_h(this)}var bh=null;function xh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bh=new Map,t.forEach(Sh,e),bh=null,vh.call(e))}function Sh(e,t){if(!(t.state.loading&4)){var n=bh.get(e);if(n)var r=n.get(null);else{n=new Map,bh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=vh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Ch={$$typeof:re,Provider:null,Consumer:null,_currentValue:ve,_currentValue2:ve,_threadCount:0};function wh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=mt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.hiddenUpdates=mt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function Th(e,t,n,r,i,a,o,s,c,l,u,d){return e=new wh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Fi(3,null,null,t),e.current=a,a.stateNode=e,t=Ia(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},yo(a),e}function Eh(e){return e?(e=Ni,e):Ni}function Dh(e,t,n,r,i,a){i=Eh(i),r.context===null?r.context=i:r.pendingContext=i,r=xo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=So(e,r,t),n!==null&&(Jd(n,e,t),Co(n,e,t))}function Oh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kh(e,t){Oh(e,t),(e=e.alternate)&&Oh(e,t)}function Ah(e){if(e.tag===13||e.tag===31){var t=Ai(e,67108864);t!==null&&Jd(t,e,67108864),kh(e,67108864)}}function jh(e){if(e.tag===13||e.tag===31){var t=Gd();t=bt(t);var n=Ai(e,t);n!==null&&Jd(n,e,t),kh(e,t)}}var Mh=!0;function Nh(e,t,n,r){var i=ge.T;ge.T=null;var a=_e.p;try{_e.p=2,Fh(e,t,n,r)}finally{_e.p=a,ge.T=i}}function Ph(e,t,n,r){var i=ge.T;ge.T=null;var a=_e.p;try{_e.p=8,Fh(e,t,n,r)}finally{_e.p=a,ge.T=i}}function Fh(e,t,n,r){if(Mh){var i=Ih(r);if(i===null)cp(e,t,r,Lh,n),Jh(e,r);else if(Xh(i,e,t,n,r))r.stopPropagation();else if(Jh(e,r),t&4&&-1<qh.indexOf(e)){for(;i!==null;){var a=It(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ct(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-tt(o);s.entanglements[1]|=c,o&=~c}Vf(a),!(ld&6)&&(Ad=Ue()+500,Hf(0,!1))}}break;case 31:case 13:s=Ai(a,2),s!==null&&Jd(s,a,2),$d(),kh(a,2)}if(a=Ih(r),a===null&&cp(e,t,r,Lh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else cp(e,t,r,null,n)}}function Ih(e){return e=Cn(e),Rh(e)}var Lh=null;function Rh(e){if(Lh=null,e=Ft(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Lh=e,null}function zh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(We()){case Ge:return 2;case Ke:return 8;case qe:case Je:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var Bh=!1,Vh=null,Hh=null,Uh=null,Wh=new Map,Gh=new Map,Kh=[],qh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Jh(e,t){switch(e){case`focusin`:case`focusout`:Vh=null;break;case`dragenter`:case`dragleave`:Hh=null;break;case`mouseover`:case`mouseout`:Uh=null;break;case`pointerover`:case`pointerout`:Wh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Gh.delete(t.pointerId)}}function Yh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=It(t),t!==null&&Ah(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Xh(e,t,n,r,i){switch(t){case`focusin`:return Vh=Yh(Vh,e,t,n,r,i),!0;case`dragenter`:return Hh=Yh(Hh,e,t,n,r,i),!0;case`mouseover`:return Uh=Yh(Uh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Wh.set(a,Yh(Wh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Gh.set(a,Yh(Gh.get(a)||null,e,t,n,r,i)),!0}return!1}function Zh(e){var t=Ft(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,Ct(e.priority,function(){jh(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,Ct(e.priority,function(){jh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ih(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sn=r,n.target.dispatchEvent(r),Sn=null}else return t=It(n),t!==null&&Ah(t),e.blockedOn=n,!1;t.shift()}return!0}function $h(e,t,n){Qh(e)&&n.delete(t)}function eg(){Bh=!1,Vh!==null&&Qh(Vh)&&(Vh=null),Hh!==null&&Qh(Hh)&&(Hh=null),Uh!==null&&Qh(Uh)&&(Uh=null),Wh.forEach($h),Gh.forEach($h)}function tg(e,n){e.blockedOn===n&&(e.blockedOn=null,Bh||(Bh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,eg)))}var ng=null;function rg(e){ng!==e&&(ng=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){ng===e&&(ng=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Rh(r||n)===null)continue;break}var a=It(n);a!==null&&(e.splice(t,3),t-=3,sc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function ig(e){function t(t){return tg(t,e)}Vh!==null&&tg(Vh,e),Hh!==null&&tg(Hh,e),Uh!==null&&tg(Uh,e),Wh.forEach(t),Gh.forEach(t);for(var n=0;n<Kh.length;n++){var r=Kh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Kh.length&&(n=Kh[0],n.blockedOn===null);)Zh(n),n.blockedOn===null&&Kh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Et]||null;if(typeof a==`function`)o||rg(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Et]||null)s=o.formAction;else if(Rh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),rg(n)}}}function ag(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function og(e){this._internalRoot=e}sg.prototype.render=og.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;Dh(n,Gd(),e,t,null,null)},sg.prototype.unmount=og.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dh(e.current,2,null,e,null,null),$d(),t[Dt]=null}};function sg(e){this._internalRoot=e}sg.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kh.length&&t!==0&&t<Kh[n].priority;n++);Kh.splice(n,0,e),n===0&&Zh(e)}};var cg=n.version;if(cg!==`19.3.1`)throw Error(i(527,cg,`19.3.1`));_e.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var lg={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:ge,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var ug=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ug.isDisabled&&ug.supportsFiber)try{Qe=ug.inject(lg),$e=ug}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ac,s=jc,c=Mc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Th(e,1,!1,null,null,n,r,null,o,s,c,ag),e[Dt]=t.current,op(e),new og(t)}})),Ee=a(((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=Te()})),P=g(o(),1),De=Ee(),F=c(),Oe=class extends P.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){_e(e,{stage:`react`,componentStack:t.componentStack??``})}render(){return this.state.failed?(0,F.jsxs)(`main`,{role:`alert`,children:[(0,F.jsx)(`p`,{children:r(`页面遇到错误,请刷新后重试。`,`The page encountered an error. Refresh to try again.`)}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>location.reload(),children:r(`刷新页面`,`Refresh page`)})]}):this.props.children}},ke=1024,Ae=.7;function je(e,t){return e>=t+72?`focus`:e<=228?`collapse`:null}function Me(e,t){return e>t?t+Math.min(24,(e-t)/3):e<300?300-Math.min(24,(300-e)/3):null}function Ne(e,t,n){return Math.min(n,Math.max(t,Math.round(e)))}function Pe(e,t,n){let r=t===0?56:Ne(t,264,420),i=e-r-400,a=n===0||i<300?0:Math.min(i,Ne(n,300,e*Ae));return{sidebar:r,center:Math.max(0,e-r-a),rightbar:a}}var Fe=(0,P.createContext)(null),Ie=new Map;function Le(e,t){return Ie.set(e,t),()=>{Ie.delete(e)}}function Re(e,t){if(!t)return!1;if(e.contains(t))return!0;for(let[n,r]of Ie)if(r.current===e&&n.isConnected&&n.contains(t))return!0;return!1}function ze(e,t,n){let r=(0,P.useRef)(n);r.current=n,(0,P.useEffect)(()=>{let n=e.current;if(!t||!n)return;let i=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...n.querySelectorAll(`button, input, select, textarea, a[href], [tabindex]`)].filter(e=>e.tabIndex>=0&&!e.matches(`:disabled`)&&e.getClientRects().length>0);(n.querySelector(`[data-sidebar-toggle]`)??a()[0]??n).focus();let o=e=>{let t=document.querySelectorAll(`[aria-modal="true"]`);if(t[t.length-1]!==n)return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),r.current();return}if(e.key!==`Tab`)return;let i=a(),o=i[0]??n,s=i.at(-1)??n;e.shiftKey&&(document.activeElement===o||!Re(n,document.activeElement))?(e.preventDefault(),s.focus()):e.shiftKey||document.activeElement!==s&&Re(n,document.activeElement)||(e.preventDefault(),o.focus())},s=e=>{let t=document.querySelectorAll(`[aria-modal="true"]`);t[t.length-1]===n&&!Re(n,e.target)&&(a()[0]??n).focus()};return document.addEventListener(`keydown`,o),document.addEventListener(`focusin`,s),()=>{document.removeEventListener(`keydown`,o),document.removeEventListener(`focusin`,s),i?.isConnected&&i.getClientRects().length>0?i.focus():document.querySelector(`[data-sidebar-toggle]`)?.focus()}},[e,t])}function Be({productTitle:e}){return(0,P.useEffect)(()=>(document.title=e,()=>{document.title=e}),[e]),null}var Ve={frame:`_frame_bac9o_1`,sidebarCol:`_sidebarCol_bac9o_24`,centerCol:`_centerCol_bac9o_33`,drawerMask:`_drawerMask_bac9o_49`,handle:`_handle_bac9o_64`,snapHint:`_snapHint_bac9o_84`,rightbarCol:`_rightbarCol_bac9o_121`,overlayLayer:`_overlayLayer_bac9o_129`};function He(e){return(0,F.jsx)(`div`,{className:Ve.centerCol,children:e.children})}function Ue({usePanelInfo:e,renderSlot:t}){return t(`main`,{},{entryKey:e(e=>e.activePanelId)??`conversation`})}function We(e){return(0,F.jsx)(`div`,{className:Ve.rightbarCol,"data-rightbar-col":!0,children:e.children})}function Ge(e){let[t,n]=(0,P.useState)(!1),r=(0,P.useRef)(0),i=(0,P.useRef)(0),a=(0,P.useRef)(null),o=(0,P.useRef)(null),s=(0,P.useRef)({onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd});s.current={onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd};let c=(0,P.useCallback)((e=!0)=>{let t=o.current;t!==null&&(o.current=null,a.current!==null&&(cancelAnimationFrame(a.current),a.current=null),t.element.hasPointerCapture(t.id)&&t.element.releasePointerCapture(t.id),n(!1),s.current.onEnd(i.current-r.current,e))},[]);(0,P.useEffect)(()=>c,[c]);let l=(0,P.useCallback)(e=>{e.button===0&&o.current===null&&(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),o.current={element:e.currentTarget,id:e.pointerId},r.current=e.clientX,i.current=e.clientX,s.current.onStart(),n(!0))},[]),u=(0,P.useCallback)(e=>{o.current?.id===e.pointerId&&(i.current=e.clientX,a.current??=requestAnimationFrame(()=>{a.current=null,s.current.onDrag(i.current-r.current)}))},[]),d=(0,P.useCallback)(e=>{o.current?.id===e.pointerId&&(i.current=e.clientX,s.current.onDrag(e.clientX-r.current),c(!1))},[c]),f=(0,P.useCallback)(e=>{o.current?.id===e.pointerId&&c()},[c]);return(0,F.jsx)(`div`,{className:Ve.handle,style:{left:e.left},"data-side":e.side,"data-dragging":t||void 0,onPointerDown:l,onPointerMove:u,onPointerUp:d,onPointerCancel:f,onLostPointerCapture:f})}function Ke({useStore:e,usePanelInfo:t,actions:n,renderSlot:r,t:i}){let a=e(e=>e.layoutInfo),o=(0,P.useRef)(null),s=a.viewportWidth;(0,P.useLayoutEffect)(()=>{let e=o.current;if(e===null)return;let t=null,r=!1,i=()=>{let t=e.getBoundingClientRect().width;t>0&&n.setViewportWidth(t)};i();let a=new ResizeObserver(()=>{r||(t??=requestAnimationFrame(()=>{t=null,i()}))});return a.observe(e),()=>{r=!0,a.disconnect(),t!==null&&cancelAnimationFrame(t)}},[n]);let c=s<ke,l=a.rightbarFullscreen&&s>=767,u=l||(c?!a.narrowExpanded:a.sidebar===0),d=u?0:a.sidebar===0?280:a.sidebar,f=a.rightbar??s*.45,p=Pe(s,!a.rightbarShown&&c?0:d,f),m=c&&!u,h=(0,P.useRef)(null);ze(h,m,n.closeSidebar),(0,P.useEffect)(()=>{if(!m)return;let e=o.current?.querySelectorAll(`.${Ve.centerCol}, .${Ve.rightbarCol}`)??[];for(let t of e)t.setAttribute(`inert`,``);return()=>{for(let t of e)t.removeAttribute(`inert`)}},[m]);let g=Pe(s,c?0:d,a.rightbarTrack?f:0),[_,v]=(0,P.useState)(null),[y,b]=(0,P.useState)(null),x=s-g.sidebar,S=l?s-56:a.rightbarFocus?x:_??p.rightbar,C=l&&a.rightbarTrack?S:a.rightbarFocus&&a.rightbarTrack?x:_!==null&&a.rightbarTrack?_:g.rightbar,w=m?Math.min(d,Math.max(0,s-48)):g.sidebar,T=(0,P.useRef)(g);T.current=g;let E=(0,P.useRef)(p.rightbar);E.current=p.rightbar;let D=(0,P.useRef)(0),O=(0,P.useRef)(0),[k,ee]=(0,P.useState)(!1),te=(0,P.useCallback)(()=>{ee(!1)},[]),ne=(0,P.useCallback)(()=>{D.current=T.current.sidebar,ee(!0)},[]),A=(0,P.useCallback)(e=>{n.setSidebar(D.current+e)},[n]),re=Math.min(s*Ae,s-g.sidebar-400),ie=(0,P.useRef)(re),j=(0,P.useRef)(!1),ae=(0,P.useCallback)(()=>{O.current=E.current,ie.current=re,j.current=!1,v(null),b(null),ee(!0)},[re]),oe=(0,P.useCallback)(e=>{if(j.current)return;let t=O.current-e,r=je(t,ie.current);r?(j.current=!0,v(null),b(null),ee(!1),r===`focus`?n.focusRightbar():n.collapseRightbar()):(n.setRightbar(t),v(Me(t,ie.current)),b(t>ie.current?`focus`:t<300?`collapse`:null))},[n]),M=(0,P.useCallback)(()=>{v(null),b(null),ee(!1)},[]),se=i(`brand.localBuild`),ce=(0,P.useMemo)(()=>r(`sidebar`,{collapsed:u,width:w}),[r,u,w]),le=(0,P.useMemo)(()=>(0,F.jsx)(Ue,{usePanelInfo:t,renderSlot:r}),[t,r]),ue=(0,P.useMemo)(()=>r(`shell.overlay`,{}),[r]);return(0,F.jsxs)(`div`,{ref:o,className:Ve.frame,style:{gridTemplateColumns:`${g.sidebar}px minmax(0, 1fr) ${C}px`},"data-sidebar-collapsed":u||void 0,"data-sidebar-drawer":m||void 0,"data-rightbar-collapsed":g.rightbar===0||void 0,"data-rightbar-fullscreen":a.rightbarFullscreen||void 0,"data-rightbar-focus":a.rightbarFocus||void 0,"data-rightbar-instant":a.rightbarInstant||void 0,"data-dragging":k||void 0,"data-rightbar-elastic":y??void 0,children:[(0,F.jsx)(Be,{productTitle:se}),m&&(0,F.jsx)(`button`,{type:`button`,className:Ve.drawerMask,tabIndex:-1,"aria-label":i(`sidebar.close`),onClick:n.closeSidebar}),(0,F.jsx)(`div`,{ref:h,className:Ve.sidebarCol,style:m?{width:w}:void 0,role:m?`dialog`:void 0,"aria-modal":m||void 0,"aria-label":m?i(`sidebar.label`):void 0,tabIndex:m?-1:void 0,children:(0,F.jsx)(Fe.Provider,{value:m?h:null,children:ce})}),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(He,{children:le}),(0,F.jsx)(We,{children:r(`rightbar`,{width:S,viewportWidth:s,canShow:p.rightbar>0})})]}),(0,F.jsx)(`div`,{className:Ve.overlayLayer,"data-shell-overlay":!0,children:ue}),!u&&!c&&(0,F.jsx)(Ge,{side:`sidebar`,left:g.sidebar,onStart:ne,onDrag:A,onEnd:te}),a.rightbarShown&&!a.rightbarFullscreen&&!a.rightbarFocus&&p.rightbar>0&&(0,F.jsx)(Ge,{side:`rightbar`,left:s-S,onStart:ae,onDrag:oe,onEnd:M}),y&&(0,F.jsx)(`div`,{className:Ve.snapHint,role:`status`,style:{left:s-S},children:i(y===`focus`?`rightbar.drag.focus`:`rightbar.drag.collapse`)})]})}var qe=`data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%3E%0A%20%20%3Ctitle%3Epi-webapp%3C%2Ftitle%3E%0A%20%20%3Cpath%20d%3D%22M5.2%209.1c0-1.5%201.2-2.7%202.7-2.7h16.2c1.5%200%202.7%201.2%202.7%202.7v1.1H5.2V9.1Z%22%20fill%3D%22%23172943%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M8.7%2010.2h3.8v12.6c0%202.5-1.8%204.3-4.3%204.3h-.5V10.2h1Z%22%20fill%3D%22%23172943%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M20.7%2010.2h3.8v12.3c0%201%20.6%201.6%201.6%201.6h1.2v3h-1.4c-3.3%200-5.2-1.9-5.2-4.6V10.2Z%22%20fill%3D%22%23172943%22%2F%3E%0A%3C%2Fsvg%3E%0A`;function Je({size:e=24,className:t}){return(0,F.jsx)(`span`,{className:t,"aria-hidden":`true`,style:{display:`inline-block`,flexShrink:0,width:e,height:e,backgroundColor:`currentColor`,maskImage:`url("${qe}")`,WebkitMaskImage:`url("${qe}")`,maskSize:`contain`,WebkitMaskSize:`contain`,maskRepeat:`no-repeat`,WebkitMaskRepeat:`no-repeat`,maskPosition:`center`,WebkitMaskPosition:`center`}})}var Ye={bubble:`_bubble_1nw3t_1`,"tooltip-in":`_tooltip-in_1nw3t_1`};function Xe({label:e,side:t=`right`,delayMs:n=0,disabled:r=!1,maxWidth:i,children:a}){let o=(0,P.useRef)(null),s=a.props.ref,c=(0,P.useCallback)(e=>{o.current=e,typeof s==`function`?s(e):s!=null&&(s.current=e)},[s]),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(t),p=(0,P.useRef)(null),m=l===null?null:typeof e==`function`?e():e,h=l===null?0:d===`right`?l.top+(l.bottom-l.top)/2:d===`top`?l.top-8:l.bottom+8;(0,P.useLayoutEffect)(()=>{if(l===null)return;let e=()=>{let e=p.current;if(e===null)return;e.style.left=`${l.x}px`;let n=e.getBoundingClientRect(),r=0;if(n.right>window.innerWidth-12&&(r=window.innerWidth-12-n.right),n.left+r<12&&(r=12-n.left),e.style.left=`${l.x+r}px`,t===`right`)return;let i=l.bottom+8+n.height<=window.innerHeight-12,a=l.top-8-n.height>=12;d===`bottom`&&!i&&a&&f(`top`),d===`top`&&!a&&i&&f(`bottom`)};return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[d,l,m,t]);let g=(0,P.useRef)(null),_=(0,P.useRef)({hover:!1,focus:!1}),v=(0,P.useCallback)(()=>{g.current!==null&&(clearTimeout(g.current),g.current=null)},[]);(0,P.useEffect)(()=>(r&&(v(),_.current={hover:!1,focus:!1},u(null)),v),[v,r]);let y=()=>{if(r)return;let e=o.current;if(e===null)return;let n=e.getBoundingClientRect();f(t),u({x:t===`right`?n.right+10:n.left+n.width/2,top:n.top,bottom:n.bottom})},b=()=>{v(),n<=0?y():g.current=setTimeout(()=>{g.current=null,y()},n)},x=()=>{v(),!_.current.hover&&!_.current.focus&&u(null)};return(0,F.jsxs)(F.Fragment,{children:[(0,P.cloneElement)(a,{ref:c,onMouseEnter:e=>{a.props.onMouseEnter?.(e),_.current.hover=!0,b()},onMouseLeave:e=>{a.props.onMouseLeave?.(e),_.current.hover=!1,v(),u(null)},onFocus:e=>{a.props.onFocus?.(e),_.current.focus=!0,v(),y()},onBlur:e=>{a.props.onBlur?.(e),_.current.focus=!1,x()}}),l!==null&&(0,F.jsx)(`span`,{ref:p,className:Ye.bubble,"data-side":d,style:{left:l.x,top:h,...i===void 0?{}:{maxWidth:i}},role:`tooltip`,children:m})]})}var Ze={dot:`_dot_1cjbl_3`,matrix:`_matrix_1cjbl_4`,cell:`_cell_1cjbl_62`,"piw-state-dot-chase":`_piw-state-dot-chase_1cjbl_1`},Qe=[[0,0],[4,0],[8,0],[8,4],[8,8],[4,8],[0,8],[0,4]];function $e({state:e,size:t=10,className:r}){return e===`ongoing`?(0,F.jsx)(`svg`,{className:n(Ze.matrix,r),"data-state":`ongoing`,width:t,height:t,viewBox:`0 0 10 10`,shapeRendering:`crispEdges`,"aria-hidden":`true`,children:Qe.map(([e,t],n)=>(0,F.jsx)(`rect`,{className:Ze.cell,x:e,y:t,width:`2`,height:`2`,style:{animationDelay:`${(n-Qe.length)*125}ms`}},`${e}-${t}`))}):(0,F.jsx)(`span`,{className:n(Ze.dot,r),"data-state":e,style:{width:t,height:t},"aria-hidden":`true`})}var et=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M8.00003 0.3237C3.76075 0.3237 0.32373 3.76072 0.32373 8C0.32373 9.17603 0.589121 10.2922 1.0632 11.2901L1.35291 11.8989L2.5705 11.3205L2.28079 10.7117C1.89079 9.89074 1.67301 8.97167 1.67301 8C1.67301 4.50546 4.50549 1.67298 8.00003 1.67298C11.4946 1.67298 14.3271 4.50546 14.3271 8C14.3271 11.4945 11.4946 14.327 8.00003 14.327C7.28473 14.327 6.76077 14.277 6.29621 14.1487C5.83857 14.0224 5.40441 13.8109 4.88514 13.4488C4.12569 12.919 3.03778 12.7316 2.141 13.2978L2.12682 13.307L2.11264 13.3171L1.34886 13.854L1.79659 15.188L2.86122 14.4384C3.19068 14.2305 3.68325 14.2542 4.11326 14.5539C4.72789 14.9826 5.30042 15.2724 5.93762 15.4484C6.56803 15.6224 7.22776 15.6763 8.00003 15.6763C12.2393 15.6763 15.6763 12.2393 15.6763 8C15.6763 3.76072 12.2393 0.3237 8.00003 0.3237ZM7.32033 4.82535V7.32536H4.82538V8.67464H7.32033V11.1747H8.6696V8.67464H11.1747V7.32536H8.6696V4.82535H7.32033Z`,fill:`currentColor`})}),tt=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M11.894845 6.647401C11.894845 3.725463 9.534486 1.356779 6.623219 1.35657C3.711786 1.35657 1.351635 3.725338 1.351635 6.647401C1.351843 9.569296 3.711911 11.938273 6.623219 11.938273C9.534361 11.938064 11.894637 9.569171 11.894845 6.647401ZM13.245462 6.647401C13.245254 10.317935 10.280401 13.293613 6.623219 13.293821C2.965871 13.293821 0.000204 10.31806 0 6.647401C0 2.976574 2.965746 0 6.623219 0C10.280526 0.000205 13.245462 2.9767 13.245462 6.647401Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M16.000417 15.041079L15.044449 16.000433L11.530434 12.473588L12.486298 11.514234L16.000417 15.041079Z`,fill:`currentColor`})]}),nt=({size:e=14,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsxs)(`g`,{clipPath:`url(#clip0_2580_121189)`,children:[(0,F.jsx)(`path`,{d:`M12.1192 4.91016C11.9392 4.52714 11.7007 4.1292 11.4483 3.78809C11.385 3.70258 11.3517 3.68409 11.2462 3.67383C10.7419 3.6248 10.2318 3.69454 9.72662 3.64551C9.29108 3.60318 8.93739 3.40341 8.67682 3.05176C8.38762 2.66127 8.19217 2.20926 7.90338 1.81934C7.83985 1.73359 7.80848 1.71542 7.70221 1.70508C7.24758 1.6609 6.7511 1.66104 6.29791 1.70508C6.19164 1.71542 6.16027 1.73359 6.09674 1.81934C5.80775 2.20954 5.61248 2.66131 5.3233 3.05176C5.06273 3.40341 4.70904 3.60318 4.2735 3.64551C3.76831 3.69454 3.25825 3.6248 2.75397 3.67383C2.6484 3.68409 2.61509 3.70258 2.55182 3.78809C2.30019 4.12814 2.06125 4.52646 1.88092 4.91016C1.83256 5.01309 1.83242 5.04912 1.88092 5.15235C2.07954 5.57482 2.37449 5.94529 2.5733 6.36817C2.76971 6.78606 2.76964 7.21293 2.5733 7.63086C2.37462 8.05374 2.07947 8.42453 1.88092 8.84668C1.83235 8.95004 1.83257 8.98695 1.88092 9.08985C2.06098 9.47285 2.2994 9.87079 2.55182 10.2119C2.61509 10.2974 2.6484 10.3159 2.75397 10.3262C3.25879 10.3753 3.76834 10.3055 4.2735 10.3545C4.70904 10.3968 5.06273 10.5966 5.3233 10.9482C5.6125 11.3387 5.80795 11.7907 6.09674 12.1807C6.16027 12.2664 6.19164 12.2846 6.29791 12.2949C6.7511 12.339 7.24758 12.3391 7.70221 12.2949C7.80848 12.2846 7.83985 12.2664 7.90338 12.1807C8.19237 11.7905 8.38764 11.3387 8.67682 10.9482C8.93739 10.5966 9.29108 10.3968 9.72662 10.3545C10.2318 10.3055 10.7419 10.3752 11.2462 10.3262C11.3517 10.3159 11.385 10.2974 11.4483 10.2119C11.7007 9.87079 11.9391 9.47285 12.1192 9.08985C12.1675 8.98695 12.1678 8.95004 12.1192 8.84668C11.9205 8.42428 11.6255 8.05377 11.4268 7.63086C11.2305 7.21293 11.2304 6.78606 11.4268 6.36817C11.6256 5.94531 11.9207 5.5746 12.1192 5.15235C12.1677 5.04912 12.1676 5.01309 12.1192 4.91016ZM13.2051 5.66309C13.0064 6.08573 12.7114 6.45579 12.5128 6.87793C12.4642 6.98123 12.4645 7.01829 12.5128 7.1211C12.7112 7.54328 13.0064 7.91405 13.2051 8.33692C13.4015 8.75487 13.4015 9.18169 13.2051 9.59961C12.9911 10.0551 12.7109 10.5221 12.4122 10.9258C12.1522 11.277 11.7974 11.4782 11.3624 11.5205C10.8573 11.5696 10.3477 11.4999 9.84283 11.5488C9.73621 11.5592 9.70429 11.5772 9.64069 11.6631C9.35229 12.0526 9.15705 12.5044 8.86823 12.8945C8.60854 13.2452 8.25275 13.447 7.81842 13.4893C7.28749 13.5409 6.71096 13.5407 6.1817 13.4893C5.74737 13.447 5.39158 13.2452 5.1319 12.8945C4.84312 12.5045 4.64808 12.0529 4.35944 11.6631C4.29583 11.5772 4.26392 11.5592 4.15729 11.5488C3.65283 11.5 3.14295 11.5696 2.63776 11.5205C2.20274 11.4782 1.84796 11.277 1.58795 10.9258C1.28834 10.5209 1.00864 10.0543 0.794982 9.59961C0.598644 9.18169 0.598598 8.75487 0.794982 8.33692C0.993688 7.91405 1.28889 7.54328 1.48737 7.1211C1.53567 7.01829 1.53593 6.98123 1.48737 6.87793C1.28887 6.45603 0.993667 6.08569 0.794982 5.66309C0.598535 5.24516 0.59869 4.81829 0.794982 4.40039C1.00898 3.94492 1.28922 3.47791 1.58795 3.07422C1.84796 2.723 2.20274 2.5218 2.63776 2.47949C3.14295 2.43038 3.65283 2.50003 4.15729 2.45117C4.26391 2.44081 4.29583 2.4228 4.35944 2.33692C4.64783 1.94742 4.84308 1.49557 5.1319 1.10547C5.39158 0.754835 5.74737 0.553005 6.1817 0.510744C6.71263 0.459147 7.28917 0.459309 7.81842 0.510744C8.25275 0.553005 8.60854 0.754835 8.86823 1.10547C9.157 1.49551 9.35204 1.94708 9.64069 2.33692C9.70429 2.4228 9.73621 2.44081 9.84283 2.45117C10.3477 2.50007 10.8573 2.43039 11.3624 2.47949C11.7974 2.5218 12.1522 2.723 12.4122 3.07422C12.7118 3.47909 12.9915 3.94567 13.2051 4.40039C13.4014 4.81829 13.4016 5.24516 13.2051 5.66309Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M7.9317 7C7.9317 6.48569 7.51438 6.06836 7.00006 6.06836C6.48575 6.06836 6.06842 6.48569 6.06842 7C6.06842 7.51432 6.48575 7.93164 7.00006 7.93164C7.51438 7.93164 7.9317 7.51432 7.9317 7ZM9.13092 7C9.13092 8.17706 8.17712 9.13086 7.00006 9.13086C5.823 9.13086 4.8692 8.17706 4.8692 7C4.8692 5.82294 5.823 4.86914 7.00006 4.86914C8.17712 4.86914 9.13092 5.82294 9.13092 7Z`,fill:`currentColor`})]}),(0,F.jsx)(`defs`,{children:(0,F.jsx)(`clipPath`,{id:`clip0_2580_121189`,children:(0,F.jsx)(`rect`,{width:14,height:14,fill:`currentColor`})})})]}),rt=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsxs)(`g`,{clipPath:`url(#clip0_1450_63327)`,children:[(0,F.jsx)(`path`,{d:`M14.0861 5.51366C13.8717 5.0575 13.588 4.58542 13.2889 4.18108C13.208 4.07172 13.1596 4.04373 13.0243 4.03054C12.4277 3.97255 11.8245 4.05527 11.2269 3.9972C10.7224 3.94816 10.3133 3.71661 10.0115 3.30919C9.66986 2.84777 9.43973 2.31343 9.09824 1.85234C9.01771 1.74365 8.96805 1.71589 8.83354 1.70282C8.29432 1.65044 7.70402 1.65061 7.16656 1.70282C7.03205 1.71589 6.98239 1.74365 6.90186 1.85234C6.56067 2.31303 6.33025 2.84774 5.98855 3.30919C5.68681 3.71661 5.27774 3.94816 4.77317 3.9972C4.17564 4.05527 3.57239 3.97255 2.97585 4.03054C2.84046 4.04373 2.79208 4.07172 2.71115 4.18108C2.41212 4.58542 2.12835 5.0575 1.91403 5.51366C1.85299 5.64359 1.85286 5.7018 1.91403 5.8319C2.14865 6.33077 2.49748 6.76892 2.73237 7.26854C2.9594 7.7515 2.96041 8.24717 2.73338 8.73044C2.49837 9.23061 2.14891 9.66837 1.91403 10.1681C1.85291 10.2982 1.85299 10.3564 1.91403 10.4863C2.12856 10.9429 2.41185 11.4142 2.71115 11.8189C2.79208 11.9283 2.84046 11.9563 2.97585 11.9694C3.57239 12.0274 4.17564 11.9447 4.77317 12.0028C5.27774 12.0518 5.68681 12.2834 5.98855 12.6908C6.33024 13.1522 6.56037 13.6866 6.90186 14.1476C6.98239 14.2563 7.03205 14.2841 7.16656 14.2972C7.70402 14.3494 8.29432 14.3495 8.83354 14.2972C8.96805 14.2841 9.01771 14.2563 9.09824 14.1476C9.43944 13.687 9.66985 13.1522 10.0115 12.6908C10.3133 12.2834 10.7224 12.0518 11.2269 12.0028C11.8244 11.9447 12.4271 12.0275 13.0243 11.9694C13.1596 11.9563 13.208 11.9283 13.2889 11.8189C13.5891 11.4131 13.872 10.942 14.0861 10.4863C14.1471 10.3564 14.1472 10.2982 14.0861 10.1681C13.8513 9.66861 13.5017 9.23061 13.2667 8.73044C13.0397 8.24717 13.0407 7.7515 13.2677 7.26854C13.5026 6.7689 13.8513 6.33106 14.0861 5.8319C14.1472 5.7018 14.1471 5.64359 14.0861 5.51366ZM15.3035 6.40373C15.0685 6.90359 14.7188 7.34119 14.4841 7.84037C14.4231 7.97025 14.423 8.02855 14.4841 8.15861C14.7189 8.65833 15.0685 9.09611 15.3035 9.59626C15.5308 10.0801 15.5308 10.5744 15.3035 11.0582C15.052 11.5933 14.7225 12.1426 14.37 12.6191C14.0685 13.0265 13.6581 13.259 13.1536 13.3081C12.5566 13.366 11.9541 13.2835 11.3573 13.3414C11.2228 13.3545 11.1731 13.3823 11.0926 13.491C10.7511 13.9521 10.521 14.4864 10.1793 14.9478C9.87828 15.3542 9.46719 15.5869 8.96387 15.6358C8.34008 15.6964 7.66194 15.6966 7.03623 15.6358C6.53291 15.5869 6.12182 15.3542 5.82084 14.9478C5.47911 14.4863 5.24878 13.9517 4.90753 13.491C4.82701 13.3823 4.77734 13.3545 4.64284 13.3414C4.04647 13.2835 3.44373 13.366 2.84653 13.3081C2.34201 13.259 1.93164 13.0265 1.63013 12.6191C1.27867 12.144 0.948453 11.5941 0.696621 11.0582C0.469315 10.5744 0.469279 10.0801 0.696621 9.59626C0.931628 9.09613 1.2813 8.65807 1.51597 8.15861C1.57708 8.02855 1.57702 7.97025 1.51597 7.84037C1.28117 7.34095 0.931635 6.9036 0.696621 6.40373C0.469213 5.91992 0.469367 5.42562 0.696621 4.94183C0.948441 4.40587 1.27868 3.85598 1.63013 3.38092C1.93164 2.97349 2.34201 2.74095 2.84653 2.6919C3.44353 2.63397 4.04599 2.71649 4.64284 2.65856C4.77734 2.64549 4.82701 2.61774 4.90753 2.50904C5.24905 2.04792 5.47913 1.51362 5.82084 1.05219C6.12182 0.645806 6.53291 0.413119 7.03623 0.364178C7.66002 0.303556 8.33816 0.303369 8.96387 0.364178C9.46719 0.413119 9.87828 0.645806 10.1793 1.05219C10.521 1.51365 10.7513 2.04828 11.0926 2.50904C11.1731 2.61774 11.2228 2.64549 11.3573 2.65856C11.9541 2.71649 12.5566 2.63397 13.1536 2.6919C13.6581 2.74095 14.0685 2.97349 14.37 3.38092C14.7214 3.85598 15.0517 4.40587 15.3035 4.94183C15.5307 5.42562 15.5309 5.91992 15.3035 6.40373Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M9.13764 7.99999C9.13764 7.3715 8.62855 6.8624 8.00005 6.8624C7.37155 6.8624 6.86246 7.3715 6.86246 7.99999C6.86246 8.62849 7.37155 9.13759 8.00005 9.13759C8.62855 9.13759 9.13764 8.62849 9.13764 7.99999ZM10.4834 7.99999C10.4834 9.37126 9.37132 10.4833 8.00005 10.4833C6.62878 10.4833 5.51674 9.37126 5.51674 7.99999C5.51674 6.62873 6.62878 5.51669 8.00005 5.51669C9.37132 5.51669 10.4834 6.62873 10.4834 7.99999Z`,fill:`currentColor`})]}),(0,F.jsx)(`defs`,{children:(0,F.jsx)(`clipPath`,{id:`clip0_1450_63327`,children:(0,F.jsx)(`rect`,{width:16,height:16,fill:`currentColor`})})})]}),it=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.67272 0.522841C10.8339 0.522841 11.76 0.522714 12.4963 0.602493C13.2453 0.683657 13.8789 0.854248 14.4264 1.25197C14.7504 1.48739 15.0355 1.77247 15.2709 2.0965C15.6686 2.64394 15.8392 3.27758 15.9204 4.02655C16.0002 4.7629 16 5.68895 16 6.85014V9.14986C16 10.3111 16.0002 11.2371 15.9204 11.9735C15.8392 12.7224 15.6686 13.3561 15.2709 13.9035C15.0355 14.2275 14.7504 14.5126 14.4264 14.748C13.8789 15.1458 13.2453 15.3163 12.4963 15.3975C11.76 15.4773 10.8339 15.4772 9.67272 15.4772H6.3273C5.16611 15.4772 4.24006 15.4773 3.50371 15.3975C2.75474 15.3163 2.1211 15.1458 1.57366 14.748C1.24963 14.5126 0.964549 14.2275 0.729131 13.9035C0.331407 13.3561 0.160817 12.7224 0.0796529 11.9735C-0.000126137 11.2371 1.25338e-09 10.3111 1.25338e-09 9.14986V6.85014C1.25329e-09 5.68895 -0.000126137 4.7629 0.0796529 4.02655C0.160817 3.27758 0.331407 2.64394 0.729131 2.0965C0.964549 1.77247 1.24963 1.48739 1.57366 1.25197C2.1211 0.854248 2.75474 0.683657 3.50371 0.602493C4.24006 0.522714 5.16611 0.522841 6.3273 0.522841H9.67272ZM5.54303 1.88715V14.1118C5.78636 14.1128 6.04709 14.1169 6.3273 14.1169H9.67272C10.8639 14.1169 11.7032 14.1164 12.3493 14.0465C12.9824 13.9779 13.3497 13.8494 13.6268 13.6482C13.8354 13.4966 14.0195 13.3125 14.1711 13.1039C14.3723 12.8268 14.5007 12.4595 14.5693 11.8264C14.6393 11.1803 14.6398 10.341 14.6398 9.14986V6.85014C14.6398 5.65896 14.6393 4.81967 14.5693 4.1736C14.5007 3.54048 14.3723 3.17318 14.1711 2.89609C14.0195 2.68747 13.8354 2.50337 13.6268 2.35179C13.3497 2.1506 12.9824 2.02212 12.3493 1.95353C11.7032 1.88358 10.8639 1.88307 9.67272 1.88307H6.3273C6.04709 1.88307 5.78636 1.8862 5.54303 1.88715ZM4.1828 1.91166C3.99125 1.9216 3.8148 1.93577 3.65076 1.95353C3.01764 2.02212 2.65034 2.1506 2.37325 2.35179C2.16463 2.50337 1.98052 2.68747 1.82895 2.89609C1.62776 3.17318 1.49928 3.54048 1.43069 4.1736C1.36074 4.81967 1.36023 5.65896 1.36023 6.85014V9.14986C1.36023 10.341 1.36074 11.1803 1.43069 11.8264C1.49928 12.4595 1.62776 12.8268 1.82895 13.1039C1.98052 13.3125 2.16463 13.4966 2.37325 13.6482C2.65034 13.8494 3.01764 13.9779 3.65076 14.0465C3.81478 14.0642 3.99127 14.0774 4.1828 14.0873V1.91166Z`,fill:`currentColor`})}),at=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M4.55146 8.00001C4.55146 8.63513 4.03659 9.15001 3.40146 9.15001C2.76634 9.15001 2.25146 8.63513 2.25146 8.00001C2.25146 7.36488 2.76634 6.85001 3.40146 6.85001C4.03659 6.85001 4.55146 7.36488 4.55146 8.00001Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M9.1476 8.00001C9.1476 8.63513 8.63273 9.15001 7.9976 9.15001C7.36248 9.15001 6.8476 8.63513 6.8476 8.00001C6.8476 7.36488 7.36248 6.85001 7.9976 6.85001C8.63273 6.85001 9.1476 7.36488 9.1476 8.00001Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M13.7486 8.00001C13.7486 8.63513 13.2338 9.15001 12.5986 9.15001C11.9635 9.15001 11.4486 8.63513 11.4486 8.00001C11.4486 7.36488 11.9635 6.85001 12.5986 6.85001C13.2338 6.85001 13.7486 7.36488 13.7486 8.00001Z`,fill:`currentColor`})]}),ot=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M8.64453 1.5V7.34961H14.5V8.65039H8.64453V14.5H7.34473V8.65039H1.5V7.34961H7.34473V1.5H8.64453Z`,fill:`currentColor`})}),st=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M15.0498 3.92579L8.49512 12.3818C8.25774 12.6881 8.04517 12.9645 7.84668 13.1689C7.63957 13.3823 7.38732 13.5841 7.04492 13.6719C6.86373 13.7183 6.6757 13.7346 6.48926 13.7197C6.13666 13.6915 5.8528 13.5355 5.6123 13.3604C5.38201 13.1926 5.12573 12.9567 4.83984 12.6953L1.03125 9.21289L1.96875 8.1875L5.77734 11.6699C6.08684 11.9529 6.27773 12.1249 6.43066 12.2363C6.50183 12.2882 6.54699 12.3135 6.57324 12.3252C6.58525 12.3305 6.59269 12.3322 6.5957 12.333C6.59802 12.3336 6.59961 12.334 6.59961 12.334C6.63317 12.3367 6.66758 12.3335 6.7002 12.3252C6.7002 12.3252 6.70211 12.3251 6.7041 12.3242C6.70698 12.3229 6.71348 12.319 6.72461 12.3115C6.74849 12.2956 6.78843 12.2642 6.84961 12.2012C6.98138 12.0654 7.13957 11.8628 7.39648 11.5313L13.9502 3.07422L15.0498 3.92579Z`,fill:`currentColor`})}),ct=({size:e=14,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z`,fill:`currentColor`})}),lt=({size:e=14,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M5.5 2.15137L5.92383 2.57617L8.65137 5.30273C8.90706 5.55843 9.13382 5.78438 9.29785 5.98828C9.46883 6.20088 9.61756 6.44405 9.66602 6.75C9.69222 6.91565 9.69222 7.08435 9.66602 7.25C9.61756 7.55595 9.46883 7.79912 9.29785 8.01172C9.13382 8.21561 8.90706 8.44157 8.65137 8.69727L5.92383 11.4238L5.5 11.8486L4.65137 11L5.07617 10.5762L7.80273 7.84863C8.07732 7.57405 8.24849 7.40124 8.3623 7.25977C8.46904 7.12709 8.47813 7.07728 8.48047 7.0625C8.48703 7.02105 8.48703 6.97895 8.48047 6.9375C8.47813 6.92272 8.46904 6.87291 8.3623 6.74023C8.24848 6.59876 8.07732 6.42595 7.80273 6.15137L5.07617 3.42383L4.65137 3L5.5 2.15137Z`,fill:`currentColor`})}),ut=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M14.1168 13.197L13.197 14.1167L1.8833 2.80303L2.80309 1.88324L14.1168 13.197Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M13.197 1.88326L14.1168 2.80305L2.80309 14.1168L1.8833 13.197L13.197 1.88326Z`,fill:`currentColor`})]}),dt=({size:e=14,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M10.6074 4.40278L8.00975 6.99973L10.6074 9.59739L9.59736 10.6074L6.9997 8.00978L4.40274 10.6074L3.3927 9.59739L5.98966 6.99973L3.3927 4.40278L4.40274 3.39273L6.9997 5.98969L9.59736 3.39273L10.6074 4.40278Z`,fill:`currentColor`})}),ft=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M6.14929 4.02032C7.11197 4.02032 7.87983 4.02016 8.49597 4.07598C9.12128 4.13269 9.65792 4.25188 10.1415 4.53106C10.7202 4.8653 11.2008 5.3459 11.535 5.92462C11.8142 6.40818 11.9334 6.94481 11.9901 7.57012C12.0459 8.18625 12.0458 8.95419 12.0458 9.9168C12.0458 10.8795 12.0459 11.6473 11.9901 12.2635C11.9334 12.8888 11.8142 13.4254 11.535 13.909C11.2008 14.4877 10.7202 14.9683 10.1415 15.3025C9.65792 15.5817 9.12128 15.7009 8.49597 15.7576C7.87984 15.8134 7.11196 15.8133 6.14929 15.8133C5.18667 15.8133 4.41874 15.8134 3.80261 15.7576C3.1773 15.7009 2.64067 15.5817 2.1571 15.3025C1.5784 14.9683 1.09778 14.4877 0.76355 13.909C0.484366 13.4254 0.365184 12.8888 0.308472 12.2635C0.252649 11.6473 0.252808 10.8795 0.252808 9.9168C0.252808 8.95418 0.252664 8.18625 0.308472 7.57012C0.365184 6.94481 0.484366 6.40818 0.76355 5.92462C1.09777 5.34589 1.57839 4.86529 2.1571 4.53106C2.64067 4.25188 3.1773 4.13269 3.80261 4.07598C4.41874 4.02017 5.18666 4.02032 6.14929 4.02032ZM6.14929 5.37774C5.16181 5.37774 4.46634 5.37761 3.92566 5.42657C3.39434 5.47472 3.07859 5.56574 2.83582 5.70587C2.4632 5.92106 2.15354 6.2307 1.93835 6.60333C1.79823 6.8461 1.70721 7.16185 1.65906 7.69317C1.6101 8.23385 1.61023 8.92933 1.61023 9.9168C1.61023 10.9043 1.61009 11.5998 1.65906 12.1404C1.70721 12.6717 1.79823 12.9875 1.93835 13.2303C2.15356 13.6029 2.46321 13.9126 2.83582 14.1277C3.07859 14.2679 3.39434 14.3589 3.92566 14.407C4.46634 14.456 5.16182 14.4559 6.14929 14.4559C7.13682 14.4559 7.83224 14.456 8.37292 14.407C8.90425 14.3589 9.21999 14.2679 9.46277 14.1277C9.83535 13.9126 10.145 13.6029 10.3602 13.2303C10.5004 12.9875 10.5914 12.6717 10.6395 12.1404C10.6885 11.5998 10.6884 10.9043 10.6884 9.9168C10.6884 8.92934 10.6885 8.23384 10.6395 7.69317C10.5914 7.16185 10.5004 6.8461 10.3602 6.60333C10.1451 6.23071 9.83536 5.92107 9.46277 5.70587C9.21999 5.56574 8.90424 5.47472 8.37292 5.42657C7.83224 5.3776 7.13682 5.37774 6.14929 5.37774ZM9.80164 0.367975C10.7638 0.367975 11.5314 0.36788 12.1473 0.423639C12.7726 0.480307 13.3093 0.598759 13.7928 0.877741C14.3717 1.21192 14.8521 1.69355 15.1864 2.27227C15.4655 2.75574 15.5857 3.29164 15.6425 3.9168C15.6983 4.53301 15.6971 5.3016 15.6971 6.26446V7.82989C15.6971 8.29264 15.6989 8.58993 15.6649 8.84844C15.4668 10.3525 14.401 11.5738 12.9833 11.9988V10.5467C13.6973 10.1903 14.2105 9.49662 14.3192 8.67169C14.3387 8.52347 14.3407 8.3358 14.3407 7.82989V6.26446C14.3407 5.27706 14.3398 4.58149 14.2909 4.04083C14.2428 3.50968 14.1526 3.19372 14.0126 2.95098C13.7974 2.57849 13.4876 2.26869 13.1151 2.05352C12.8724 1.91347 12.5564 1.82237 12.0253 1.77423C11.4847 1.72528 10.7888 1.7254 9.80164 1.7254H7.71472C6.7562 1.72558 5.92665 2.27697 5.52332 3.07891H4.07019C4.54221 1.51132 5.9932 0.368186 7.71472 0.367975H9.80164Z`,fill:`currentColor`})}),pt=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M9.94076 1.34942C10.7047 0.90231 11.6503 0.902415 12.4143 1.34942C12.7061 1.52015 12.9688 1.79118 13.3104 2.13284C13.6521 2.47448 13.9231 2.73721 14.0939 3.02894C14.5408 3.79294 14.5409 4.73856 14.0939 5.50251C13.9231 5.79415 13.652 6.05704 13.3104 6.39861L6.65932 13.0497C6.28068 13.4284 6.00695 13.7108 5.66543 13.9097C5.32391 14.1085 4.94315 14.2074 4.42705 14.3498L3.24394 14.6761C2.77527 14.8054 2.34538 14.9262 2.00131 14.9684C1.65196 15.0112 1.17964 15.0013 0.810764 14.6325C0.441921 14.2637 0.432107 13.7913 0.47486 13.442C0.517035 13.0979 0.6379 12.668 0.767181 12.1993L1.09352 11.0162C1.23588 10.5001 1.33481 10.1193 1.5336 9.77784C1.7325 9.43632 2.0149 9.1626 2.39355 8.78395L9.04466 2.13284C9.38625 1.79126 9.64911 1.52016 9.94076 1.34942ZM15.5427 14.8398H7.55223L8.96707 13.425H15.5427V14.8398ZM3.39382 9.78422C2.965 10.213 2.84244 10.3436 2.75709 10.49C2.67183 10.6366 2.61862 10.8079 2.45733 11.3925L2.13099 12.5756C2.00183 13.0439 1.92194 13.3419 1.88863 13.5536C2.10041 13.5204 2.39872 13.4416 2.86764 13.3123L4.05075 12.9859C4.63544 12.8246 4.80669 12.7715 4.95323 12.6862C5.09968 12.6008 5.23022 12.4783 5.65905 12.0494L10.721 6.98644L8.45577 4.72121L3.39382 9.78422ZM11.7 2.57079C11.3774 2.38198 10.9777 2.38198 10.6551 2.57079C10.5602 2.62647 10.4487 2.72931 10.0449 3.13311L9.45604 3.72094L11.7213 5.98617L12.3102 5.39833C12.7139 4.99457 12.8168 4.88307 12.8725 4.78818C13.0613 4.46561 13.0612 4.06585 12.8725 3.74326C12.8169 3.64827 12.7146 3.53752 12.3102 3.13311C11.9057 2.72863 11.795 2.6264 11.7 2.57079Z`,fill:`currentColor`})}),mt=({size:e=14,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M7.06431 5.93342C7.68763 5.93342 8.19307 6.43904 8.19322 7.06233C8.19322 7.68573 7.68772 8.19123 7.06431 8.19123C6.44099 8.19113 5.9354 7.68567 5.9354 7.06233C5.93555 6.43911 6.44108 5.93353 7.06431 5.93342Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.6815 0.963693C10.1169 0.447019 11.6266 0.374829 12.5633 1.31135C13.5 2.24805 13.4277 3.75776 12.911 5.19319C12.7126 5.74431 12.4386 6.31796 12.0965 6.89729C12.4969 7.54638 12.8141 8.19018 13.036 8.80647C13.5527 10.2419 13.6251 11.7516 12.6883 12.6883C11.7516 13.625 10.242 13.5527 8.8065 13.036C8.19022 12.8141 7.54641 12.4969 6.89732 12.0965C6.31797 12.4386 5.74435 12.7125 5.19322 12.911C3.75777 13.4276 2.2481 13.5 1.31138 12.5633C0.374859 11.6266 0.447049 10.1168 0.963724 8.68147C1.17185 8.10338 1.46321 7.50063 1.82896 6.8924C1.52182 6.35711 1.27235 5.82825 1.08872 5.31819C0.572068 3.88278 0.499714 2.37306 1.43638 1.43635C2.37308 0.499655 3.8828 0.572044 5.31822 1.08869C5.82828 1.27232 6.35715 1.5218 6.89243 1.82893C7.50066 1.46318 8.10341 1.17181 8.6815 0.963693ZM11.3573 8.01154C10.9083 8.62253 10.3901 9.22873 9.80943 9.8094C9.22877 10.3901 8.62255 10.9083 8.01158 11.3572C8.4257 11.5841 8.8287 11.7688 9.21275 11.9071C10.5456 12.3868 11.4246 12.2547 11.8397 11.8397C12.2548 11.4246 12.3869 10.5456 11.9071 9.21272C11.7688 8.82866 11.5841 8.42568 11.3573 8.01154ZM2.56529 8.02912C2.37344 8.39322 2.21495 8.74796 2.09263 9.08772C1.61291 10.4204 1.74512 11.2995 2.16001 11.7147C2.57505 12.1297 3.45415 12.2618 4.78697 11.7821C5.11057 11.6656 5.44786 11.5164 5.7938 11.3367C5.249 10.9223 4.70922 10.4533 4.19029 9.9344C3.57578 9.31987 3.03169 8.67633 2.56529 8.02912ZM6.90708 3.2469C6.24065 3.70479 5.5646 4.26321 4.91392 4.91389C4.26325 5.56456 3.70482 6.24063 3.24693 6.90705C3.72674 7.63325 4.32777 8.37459 5.03892 9.08576C5.64943 9.69627 6.28183 10.2265 6.90806 10.6678C7.59368 10.2025 8.2908 9.63076 8.96079 8.96076C9.6308 8.29075 10.2025 7.59366 10.6678 6.90803C10.2265 6.2818 9.69631 5.6494 9.08579 5.03889C8.37462 4.32773 7.63328 3.72672 6.90708 3.2469ZM11.7147 2.15998C11.2996 1.74509 10.4204 1.61288 9.08775 2.0926C8.74835 2.21479 8.39382 2.37271 8.03013 2.56428C8.67728 3.03065 9.31995 3.5758 9.93443 4.19026C10.4534 4.7092 10.9223 5.24896 11.3368 5.79377C11.5164 5.44785 11.6656 5.11052 11.7821 4.78694C12.2618 3.45416 12.1297 2.57502 11.7147 2.15998ZM4.91197 2.2176C3.57922 1.73788 2.70004 1.86995 2.28501 2.28498C1.87001 2.70003 1.73791 3.5792 2.21763 4.91194C2.31709 5.18822 2.44112 5.47427 2.58677 5.7674C3.01931 5.1887 3.51474 4.6158 4.06529 4.06526C4.61584 3.5147 5.18872 3.01928 5.76743 2.58674C5.47431 2.4411 5.18824 2.31706 4.91197 2.2176Z`,fill:`currentColor`})]}),ht=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M14.4782 4.84067L14.2138 10.1152C14.1102 12.1872 14.067 13.0115 13.3866 13.9607C13.1044 14.3546 12.7498 14.6912 12.3424 14.9535C11.8239 15.2872 11.2415 15.4316 10.5585 15.4998C9.88727 15.5668 9.04946 15.5656 7.99998 15.5656C6.95051 15.5656 6.1127 15.5668 5.44142 15.4998C4.75851 15.4316 4.17602 15.2872 3.65753 14.9535C3.25012 14.6912 2.89559 14.3546 2.61332 13.9607C1.93296 13.0115 1.88979 12.1872 1.78619 10.1152L1.52179 4.84067L2.89006 4.77277L3.15343 10.0463C3.26221 12.2218 3.32452 12.6015 3.72646 13.1624C3.90825 13.4161 4.13686 13.6334 4.39927 13.8023C4.66204 13.9714 5.00263 14.0792 5.57825 14.1367C6.16562 14.1953 6.92298 14.1963 7.99998 14.1963C9.07699 14.1963 9.83434 14.1953 10.4217 14.1367C10.9973 14.0792 11.3379 13.9714 11.6007 13.8023C11.8631 13.6334 12.0917 13.4161 12.2735 13.1624C12.6755 12.6015 12.7378 12.2218 12.8465 10.0463L13.1099 4.77277L14.4782 4.84067ZM5.43011 6.22849H6.7994V11.3909H5.43011V6.22849ZM9.20056 6.22849H10.5699V11.3909H9.20056V6.22849ZM8.53597 0.434431C9.17976 0.434431 9.6522 0.426926 10.0966 0.571258C10.2357 0.616451 10.3717 0.672554 10.502 0.738948C10.9182 0.951107 11.2464 1.29099 11.7015 1.74612L12.4978 2.54136H15.3742V3.91169H0.625732V2.54136H3.50218L4.29845 1.74612C4.75358 1.29099 5.08174 0.951107 5.49801 0.738948C5.62831 0.672554 5.76425 0.616451 5.90334 0.571258C6.34776 0.426926 6.82021 0.434431 7.46399 0.434431H8.53597ZM7.46399 1.80476C6.73208 1.80476 6.51641 1.81187 6.32617 1.87369C6.25545 1.89667 6.18668 1.92533 6.12041 1.95907C5.96398 2.03878 5.82348 2.16253 5.44142 2.54136H10.5585C10.1765 2.16253 10.036 2.03878 9.87955 1.95907C9.81329 1.92533 9.74452 1.89667 9.6738 1.87369C9.48356 1.81187 9.26789 1.80476 8.53597 1.80476H7.46399Z`,fill:`currentColor`})}),gt=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M2.871 13.1286C0.0387669 10.2962 0.0387669 5.70383 2.871 2.87141C5.70341 0.0390029 10.2957 0.0391154 13.1282 2.87141L12.1387 3.86094C9.85292 1.57538 6.1469 1.57596 3.86123 3.86163C1.57573 6.14732 1.57573 9.85269 3.86123 12.1384C6.1469 14.424 9.85292 14.4246 12.1387 12.1391L13.1282 13.1286C10.2957 15.9609 5.70341 15.961 2.871 13.1286Z`,fill:`currentColor`})}),_t=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M15.3695 11.411L15.1234 12.8866C14.8869 14.3042 13.6603 15.3436 12.223 15.3436H3.77673C2.33958 15.3434 1.1128 14.3042 0.876343 12.8866L0.630249 11.411L2.05408 11.1747L2.29919 12.6493C2.41973 13.3713 3.04475 13.9001 3.77673 13.9003H12.223C12.9551 13.9002 13.58 13.3713 13.7006 12.6493L13.9457 11.1747L15.3695 11.411ZM8.72205 8.994C8.77717 8.93934 8.83792 8.88106 8.90271 8.81627L12.4828 5.23424L13.5043 6.25572L9.92224 9.8358C9.6395 10.1185 9.38763 10.3732 9.15857 10.5575C8.91892 10.7503 8.63953 10.9224 8.2865 10.9784C8.09711 11.0083 7.90363 11.0083 7.71423 10.9784C7.36106 10.9224 7.0809 10.7503 6.84119 10.5575C6.61215 10.3732 6.36022 10.1185 6.07751 9.8358L2.49646 6.25572L3.51697 5.23424L7.09705 8.81627C7.16219 8.88142 7.22331 8.94006 7.27869 8.99498V1.3065H8.72205V8.994Z`,fill:`currentColor`})}),vt=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.3368 1.53569L11.931 4.43172H14.8086V5.79673H11.7404L11.1962 9.67859H14.2839V11.0436H11.0056L10.4994 14.6529L9.14873 14.4643L9.62731 11.0436H5.75876L5.25252 14.6529L3.90186 14.4643L4.38043 11.0436H1.69141V9.67859H4.57104L5.11417 5.79673H2.21609V4.43172H5.30581L5.73724 1.34713L7.08995 1.53569L6.68414 4.43172H10.5527L10.9841 1.34713L12.3368 1.53569ZM5.94937 9.67859H9.81791L10.361 5.79673H6.49353L5.94937 9.67859Z`,fill:`currentColor`})}),yt=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,children:(0,F.jsx)(`path`,{transform:`translate(1.292 1.3)`,d:`M10.3232 9.18164C11.2868 9.18164 12.0985 9.82833 12.3506 10.7109L13.415 10.7109L13.415 11.8711L12.3496 11.8711C12.0971 12.7532 11.2864 13.3994 10.3232 13.3994C9.36031 13.3992 8.55012 12.7531 8.29785 11.8711L0 11.8711L0 10.7109L8.29688 10.7109C8.54876 9.82845 9.35988 9.18186 10.3232 9.18164ZM10.3232 10.3418C9.7999 10.3421 9.37534 10.7667 9.375 11.29C9.375 11.8137 9.79969 12.239 10.3232 12.2393C10.847 12.2393 11.2725 11.8138 11.2725 11.29C11.2721 10.7666 10.8468 10.3418 10.3232 10.3418ZM12.4326 11.291C12.4326 11.3549 12.4284 11.418 12.4229 11.4805C12.4287 11.4181 12.4326 11.355 12.4326 11.291ZM8.21484 11.2832C8.21484 11.2856 8.21484 11.2886 8.21484 11.291L8.21484 11.29C8.21484 11.2878 8.21484 11.2855 8.21484 11.2832ZM3.08301 4.59082C4.04605 4.59095 4.85696 5.23717 5.10938 6.11914L13.415 6.11914L13.415 7.2793L5.11035 7.2793C4.85833 8.16202 4.04648 8.80846 3.08301 8.80859C2.11972 8.80843 1.30963 8.16179 1.05762 7.2793L0 7.2793L0 6.11914L1.05762 6.11914C1.30994 5.23728 2.12006 4.59098 3.08301 4.59082ZM3.08301 5.75098C2.55962 5.75117 2.13512 6.17587 2.13477 6.69922C2.13477 7.22287 2.5594 7.64824 3.08301 7.64844C3.60665 7.64828 4.03223 7.2229 4.03223 6.69922C4.03187 6.17585 3.60643 5.75113 3.08301 5.75098ZM5.19238 6.69922C5.19238 6.763 5.18816 6.82633 5.18262 6.88867C5.18846 6.82629 5.19238 6.76313 5.19238 6.69922C5.19236 6.63495 5.18853 6.57152 5.18262 6.50879C5.18826 6.57154 5.19236 6.635 5.19238 6.69922ZM0.982422 6.52344C0.977382 6.58136 0.97463 6.63999 0.974609 6.69922C0.974609 6.75775 0.977496 6.81579 0.982422 6.87305C0.977758 6.81579 0.974609 6.75767 0.974609 6.69922C0.974628 6.64 0.977618 6.58142 0.982422 6.52344ZM10.3232 0C11.2869 0 12.0986 0.646596 12.3506 1.5293L13.415 1.5293L13.415 2.68945L12.3496 2.68945C12.363 2.64266 12.3754 2.59488 12.3857 2.54688C12.1838 3.50118 11.3376 4.21777 10.3232 4.21777C9.36037 4.21756 8.55018 3.57139 8.29785 2.68945L0 2.68945L0 1.5293L8.29688 1.5293C8.5487 0.646717 9.35981 0.00021854 10.3232 0ZM10.3232 1.16016C9.79984 1.16042 9.37524 1.58499 9.375 2.1084C9.375 2.63201 9.79969 3.05735 10.3232 3.05762C10.847 3.05762 11.2725 2.63217 11.2725 2.1084C11.2722 1.58483 10.8469 1.16016 10.3232 1.16016ZM12.4229 2.29883C12.4287 2.23641 12.4326 2.17331 12.4326 2.10938C12.4326 2.17327 12.4284 2.23638 12.4229 2.29883ZM8.21484 2.10938L8.21484 2.1084L8.21484 2.10938ZM8.22266 1.93359C8.21785 1.98897 8.21506 2.04499 8.21484 2.10156C8.21503 2.04501 8.2181 1.98902 8.22266 1.93359ZM8.22266 11.1162C8.2179 11.1713 8.21507 11.227 8.21484 11.2832C8.21504 11.227 8.21814 11.1713 8.22266 11.1162Z`,fill:`currentColor`})}),bt=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,children:[(0,F.jsx)(`path`,{transform:`translate(9.52 2.52)`,d:`M3.55246 0L3.55246 2.44252L6 2.44252L6 3.55748L3.55246 3.55748L3.55246 6L2.43834 6L2.43834 3.55748L0 3.55748L0 2.44252L2.43834 2.44252L2.43834 0L3.55246 0Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{transform:`translate(0.3496 2.35)`,d:`M4.76367 0C5.36861 1.80598e-05 5.93113 0.310294 6.25488 0.821289L6.78027 1.64941C6.79685 1.67558 6.81791 1.69775 6.83887 1.71973C6.72186 2.15521 6.65702 2.61192 6.65137 3.08301C6.25601 2.96045 5.90909 2.70478 5.68164 2.3457L5.15723 1.5166C5.07183 1.38189 4.92318 1.3008 4.76367 1.30078L2.32422 1.30078C1.7589 1.30078 1.30078 1.7589 1.30078 2.32422L1.30078 10.1338C1.30078 10.6991 1.7589 11.1572 2.32422 11.1572L11.9766 11.1572C12.5419 11.1572 13 10.6991 13 10.1338L13 8.58398C13.4545 8.5135 13.8903 8.38748 14.3008 8.21289L14.3008 10.1338C14.3008 11.4171 13.2598 12.458 11.9766 12.458L2.32422 12.458C1.04093 12.458 0 11.4171 0 10.1338L0 2.32422C0 1.04093 1.04093 0 2.32422 0L4.76367 0Z`,fill:`currentColor`})]}),xt=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,children:[(0,F.jsx)(`path`,{d:`M5.19629 1.57104C5.81144 1.5711 6.38623 1.8786 6.72754 2.39038L7.19922 3.09839C7.28454 3.22635 7.42824 3.30344 7.58203 3.30347H12.1699C13.5039 3.30348 14.5859 4.38548 14.5859 5.71948V6.62671C15.2694 7.02689 15.6605 7.85012 15.4385 8.68726L14.3848 12.658C14.1037 13.7164 13.1449 14.4527 12.0498 14.4529H2.91699C1.51651 14.4529 0.451662 13.2814 0.501954 11.9519V3.98706C0.501954 2.65305 1.58396 1.57104 2.91797 1.57104H5.19629ZM3.7793 7.75562C3.30994 7.75562 2.89883 8.07153 2.77832 8.52515L1.91602 11.7722C1.74167 12.4291 2.23734 13.073 2.91699 13.073H12.0498C12.5191 13.0728 12.9304 12.757 13.0508 12.3035L14.1045 8.33374C14.1819 8.04202 13.9619 7.756 13.6602 7.75562H3.7793ZM2.91797 2.9519C2.34625 2.9519 1.88281 3.41534 1.88281 3.98706V7.2937C2.33068 6.7269 3.02249 6.37476 3.7793 6.37476H13.2051V5.71948C13.2051 5.14777 12.7416 4.68434 12.1699 4.68433H7.58203C6.96675 4.6843 6.39209 4.37595 6.05078 3.86401L5.5791 3.15601C5.49379 3.02821 5.34995 2.95196 5.19629 2.9519H2.91797Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{opacity:`0.2`,d:`M13.6602 7.75525C13.9618 7.7556 14.1815 8.04179 14.1045 8.33337L13.0508 12.3031C12.9304 12.7567 12.5191 13.0725 12.0498 13.0726H2.91701C2.23744 13.0725 1.7417 12.4287 1.91603 11.7719L2.77834 8.52478C2.89898 8.07146 3.31018 7.75532 3.77931 7.75525H13.6602ZM5.1963 2.95154C5.34985 2.95159 5.49377 3.02803 5.57912 3.15564L6.0508 3.86365C6.39205 4.37553 6.96685 4.68385 7.58205 4.68396H12.1699C12.7416 4.68396 13.2049 5.14754 13.2051 5.71912V6.37439H3.77931C3.02267 6.37444 2.33067 6.72671 1.88283 7.29333V3.98669C1.88299 3.4152 2.34649 2.95168 2.91798 2.95154H5.1963Z`,fill:`currentColor`})]}),St=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,children:(0,F.jsx)(`path`,{transform:`translate(1.5 2.429)`,d:`M5.05582 0.518756L4.50669 0.86654L5.05582 0.518756ZM13 9.4837L13.65 9.4837L13.65 3.53962L13 3.53962L12.35 3.53962L12.35 9.4837L13 9.4837ZM11.3264 1.86603L11.3264 1.21603L6.52313 1.21603L6.52313 1.86603L6.52313 2.51603L11.3264 2.51603L11.3264 1.86603ZM5.58054 1.34727L6.12968 0.999489L5.60495 0.170972L5.05582 0.518756L4.50669 0.86654L5.03141 1.69506L5.58054 1.34727ZM4.11323 1.23058e-13L4.11323 -0.65L1.67359 -0.65L1.67359 5.00699e-14L1.67359 0.65L4.11323 0.65L4.11323 1.23058e-13ZM0 1.67359L-0.65 1.67359L-0.65 9.4837L0 9.4837L0.65 9.4837L0.65 1.67359L0 1.67359ZM11.3264 11.1573L11.3264 10.5073L1.67359 10.5073L1.67359 11.1573L1.67359 11.8073L11.3264 11.8073L11.3264 11.1573ZM0 9.4837L-0.65 9.4837C-0.65 10.767 0.390308 11.8073 1.67359 11.8073L1.67359 11.1573L1.67359 10.5073C1.10828 10.5073 0.65 10.049 0.65 9.4837L0 9.4837ZM1.67359 5.00699e-14L1.67359 -0.65C0.390307 -0.65 -0.65 0.390309 -0.65 1.67359L0 1.67359L0.65 1.67359C0.65 1.10828 1.10828 0.65 1.67359 0.65L1.67359 5.00699e-14ZM5.05582 0.518756L5.60495 0.170972C5.28121 -0.340193 4.71829 -0.65 4.11323 -0.65L4.11323 1.23058e-13L4.11323 0.65C4.27282 0.65 4.4213 0.731715 4.50669 0.86654L5.05582 0.518756ZM6.52313 1.86603L6.52313 1.21603C6.36354 1.21603 6.21507 1.13431 6.12968 0.999489L5.58054 1.34727L5.03141 1.69506C5.35515 2.20622 5.91808 2.51603 6.52313 2.51603L6.52313 1.86603ZM13 3.53962L13.65 3.53962C13.65 2.25634 12.6097 1.21603 11.3264 1.21603L11.3264 1.86603L11.3264 2.51603C11.8917 2.51603 12.35 2.97431 12.35 3.53962L13 3.53962ZM13 9.4837L12.35 9.4837C12.35 10.049 11.8917 10.5073 11.3264 10.5073L11.3264 11.1573L11.3264 11.8073C12.6097 11.8073 13.65 10.767 13.65 9.4837L13 9.4837Z`,fill:`currentColor`})}),Ct=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M11.3496 8C11.3496 6.14985 9.85015 4.65039 8 4.65039C6.14985 4.65039 4.65039 6.14985 4.65039 8C4.65039 9.85015 6.14985 11.3496 8 11.3496C9.85015 11.3496 11.3496 9.85015 11.3496 8ZM12.6504 8C12.6504 10.5681 10.5681 12.6504 8 12.6504C5.43188 12.6504 3.34961 10.5681 3.34961 8C3.34961 5.43188 5.43188 3.34961 8 3.34961C10.5681 3.34961 12.6504 5.43188 12.6504 8Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M8.65039 0.5V2.5H7.34961V0.5H8.65039Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M8.65039 13.5V15.5H7.34961V13.5H8.65039Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M3.15808 2.24035L4.57229 3.65456L3.6525 4.57435L2.23829 3.16014L3.15808 2.24035Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M12.3505 11.4327L13.7647 12.8469L12.8449 13.7667L11.4307 12.3525L12.3505 11.4327Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M2.24537 12.8469L3.65958 11.4327L4.57937 12.3525L3.16516 13.7667L2.24537 12.8469Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M11.4377 3.65455L12.852 2.24033L13.7718 3.16012L12.3575 4.57434L11.4377 3.65455Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M0.5 7.35461H2.5V8.6554H0.5L0.5 7.35461Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M13.5 7.35461H15.5V8.6554H13.5V7.35461Z`,fill:`currentColor`})]}),wt=({size:e=16,className:t})=>(0,F.jsx)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{d:`M13.2764 9.52324C12.5607 9.97754 11.7177 10.242 10.7812 10.242C8.11386 10.2419 5.95042 8.07997 5.9502 5.41289C5.9502 4.48128 6.21453 3.61071 6.67188 2.87285C4.30332 3.4658 2.54992 5.60845 2.5498 8.16093C2.5498 11.1712 4.99103 13.6102 8 13.6102C10.5383 13.6102 12.6709 11.8724 13.2764 9.52324ZM7.05078 5.41289C7.051 7.47224 8.72116 9.1423 10.7812 9.14238C11.9248 9.14238 12.887 8.63397 13.5781 7.8084C13.7266 7.63106 13.9701 7.56547 14.1875 7.64433C14.4049 7.72329 14.5497 7.9297 14.5498 8.16093C14.5498 11.7766 11.6161 14.7098 8 14.7098C4.38402 14.7098 1.4502 11.7792 1.4502 8.16093C1.45033 4.54322 4.3812 1.61015 8 1.61015C8.23027 1.61015 8.43585 1.75352 8.51562 1.96953C8.59536 2.18554 8.53241 2.42829 8.35742 2.57793C7.55573 3.26311 7.05078 4.27876 7.05078 5.41289Z`,fill:`currentColor`})}),Tt=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M12.1665 13.5811V14.7803H3.66651V13.5811H12.1665Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M13.4453 7.02379C13.4453 6.04702 13.4452 5.3616 13.3887 4.83434C13.3333 4.31828 13.2302 4.02378 13.0723 3.80309C12.9446 3.62475 12.7877 3.46883 12.6094 3.34117C12.3887 3.18328 12.0942 3.08007 11.5781 3.02477C11.0508 2.96829 10.3655 2.96715 9.38867 2.96715H6.61035C5.63359 2.96715 4.94816 2.96827 4.4209 3.02477C3.90486 3.0801 3.61034 3.18321 3.38965 3.34117C3.21143 3.46878 3.05534 3.62487 2.92774 3.80309C2.76977 4.02377 2.66667 4.3183 2.61133 4.83434C2.55483 5.3616 2.55371 6.04702 2.55371 7.02379C2.55371 8.0006 2.55485 8.68596 2.61133 9.21324C2.66663 9.72936 2.76983 10.0238 2.92774 10.2445C3.0554 10.4228 3.21131 10.5797 3.38965 10.7074C3.61034 10.8654 3.90484 10.9685 4.4209 11.0238C4.94816 11.0803 5.63359 11.0804 6.61035 11.0804H9.38867C10.3654 11.0804 11.0508 11.0803 11.5781 11.0238C12.0941 10.9685 12.3887 10.8652 12.6094 10.7074C12.7877 10.5797 12.9446 10.4229 13.0723 10.2445C13.2301 10.0238 13.3334 9.72927 13.3887 9.21324C13.4452 8.68596 13.4453 8.00058 13.4453 7.02379ZM14.6455 7.02379C14.6455 7.97428 14.646 8.73509 14.5811 9.34117C14.5149 9.95828 14.3756 10.4858 14.0479 10.9437C13.8436 11.229 13.5938 11.4788 13.3086 11.683C12.8507 12.0108 12.3232 12.15 11.7061 12.2162C11.1 12.2811 10.3391 12.2806 9.38867 12.2806H6.61035C5.66018 12.2806 4.89991 12.2811 4.29395 12.2162C3.67684 12.15 3.14935 12.0108 2.69141 11.683C2.40613 11.4788 2.15639 11.229 1.95215 10.9437C1.62436 10.4858 1.4841 9.95828 1.41797 9.34117C1.35305 8.73511 1.35449 7.97424 1.35449 7.02379C1.35449 6.07366 1.35308 5.31333 1.41797 4.70738C1.4841 4.09028 1.62436 3.56279 1.95215 3.10485C2.15638 2.81956 2.40613 2.56982 2.69141 2.36559C3.14935 2.03779 3.67684 1.89753 4.29395 1.83141C4.8999 1.76652 5.66022 1.76793 6.61035 1.76793H9.38867C10.3391 1.76793 11.1 1.76649 11.7061 1.83141C12.3232 1.89753 12.8507 2.03779 13.3086 2.36559C13.5939 2.56982 13.8436 2.81957 14.0479 3.10485C14.3756 3.56279 14.5149 4.09028 14.5811 4.70738C14.646 5.31335 14.6455 6.07362 14.6455 7.02379Z`,fill:`currentColor`})]}),Et=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.0997 8.54554C12.2905 8.54989 12.3541 8.58056 12.4535 8.74614L12.8849 9.46387C12.9851 9.63071 13.0464 9.66013 13.2388 9.66447H14.1138C14.3417 9.66448 14.3512 9.66937 14.4686 9.86507L14.892 10.5717C14.9942 10.7422 14.9948 10.8247 14.892 10.9961L14.4756 11.6906C14.3741 11.8677 14.3694 11.9379 14.4756 12.115L14.892 12.8096C14.9942 12.9801 14.9947 13.0625 14.892 13.234L14.4686 13.9406C14.3643 14.1028 14.3063 14.1354 14.1138 14.1412H13.2388C13.0465 14.1456 12.985 14.1752 12.8849 14.3418L12.4535 15.0595C12.353 15.2195 12.2895 15.2558 12.0997 15.2601H11.2237C10.9962 15.2601 10.9871 15.2548 10.8699 15.0595L10.4384 14.3418C10.3383 14.175 10.2767 14.1456 10.0846 14.1412H9.2096C9.01854 14.1355 8.95761 14.1006 8.85477 13.9406L8.43139 13.234C8.32562 13.0576 8.33148 12.9862 8.43139 12.8096L8.84771 12.115C8.95165 11.9416 8.94659 11.863 8.84771 11.6906L8.43139 10.9961C8.32767 10.8232 8.33411 10.7437 8.43139 10.5717L8.85477 9.86507C8.95447 9.69891 9.01875 9.67017 9.2096 9.66447H10.0846C10.2741 9.66441 10.3414 9.62547 10.4384 9.46387L10.8699 8.74614C10.987 8.55106 10.9963 8.54554 11.2237 8.54554H12.0997ZM11.6612 10.232C11.3326 10.7798 10.8155 11.0948 10.1743 11.106C10.4443 11.61 10.4425 12.1976 10.1743 12.6987C10.803 12.7096 11.3391 13.0359 11.6612 13.5727C11.9855 13.0323 12.5131 12.7098 13.148 12.6987C12.879 12.196 12.8789 11.6086 13.148 11.106C12.5076 11.0948 11.9894 10.7794 11.6612 10.232Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.51205 0.790627C9.19055 0.790649 10.7401 1.0691 11.892 1.54364C12.4664 1.78029 12.9719 2.07885 13.3436 2.4408C13.7171 2.80467 13.9916 3.27253 13.9918 3.82384V7.90442C13.6067 7.69532 13.1907 7.53597 12.7529 7.43366V5.66454C12.4928 5.82898 12.2028 5.97601 11.892 6.10405C10.74 6.57865 9.19071 6.85706 7.51205 6.85706C5.8337 6.85703 4.285 6.57852 3.13309 6.10405C2.82215 5.97593 2.53164 5.8291 2.27121 5.66454V7.4135C2.27134 7.75678 2.6066 8.27106 3.62502 8.73405C4.58641 9.17097 5.95762 9.45591 7.50499 9.45681C7.24582 9.83133 7.03684 10.2434 6.88706 10.6826C5.44388 10.6162 4.12516 10.3216 3.11192 9.86104C2.81708 9.72698 2.53185 9.56866 2.27121 9.38928V11.2542C2.27158 11.5974 2.60697 12.1109 3.62502 12.5737C4.41933 12.9347 5.4937 13.1898 6.71569 13.2693C6.80349 13.7128 6.9513 14.1345 7.14814 14.5273C5.60324 14.4862 4.18593 14.1889 3.11192 13.7007C2.01039 13.1998 1.03366 12.3814 1.03333 11.2542V3.82384C1.03352 3.27273 1.30721 2.80461 1.68049 2.4408C2.05211 2.07893 2.55887 1.78026 3.13309 1.54364C4.28492 1.06926 5.83393 0.790683 7.51205 0.790627ZM7.51205 2.02851C5.95492 2.02857 4.57354 2.29079 3.60486 2.68979C3.11958 2.88977 2.76667 3.11253 2.5454 3.32788C2.32671 3.54101 2.2714 3.7089 2.27121 3.82384C2.27121 3.93882 2.32624 4.10625 2.5454 4.3198C2.76667 4.53527 3.11927 4.75781 3.60486 4.9579C4.5736 5.35699 5.95467 5.61914 7.51205 5.61918C9.06942 5.61918 10.4505 5.35695 11.4192 4.9579C11.9051 4.75773 12.2584 4.53536 12.4797 4.3198C12.6988 4.10627 12.7529 3.93882 12.7529 3.82384C12.7527 3.70889 12.6984 3.54104 12.4797 3.32788C12.2584 3.11239 11.9049 2.88989 11.4192 2.68979C10.4505 2.29079 9.06925 2.02853 7.51205 2.02851Z`,fill:`currentColor`})]}),Dt=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`ellipse`,{cx:`8`,cy:`3.6`,rx:`5.75`,ry:`2.4`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,F.jsx)(`path`,{d:`M2.25 3.6V12.3A5.75 2.4 0 0 0 13.75 12.3V3.6`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,F.jsx)(`path`,{d:`M2.25 7.95A5.75 2.4 0 0 0 13.75 7.95`,stroke:`currentColor`,strokeWidth:`1.25`})]}),Ot=({size:e=16,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M12.5113 15.4067C12.4395 15.6249 12.1308 15.6249 12.059 15.4067L11.643 14.1416C11.454 13.567 11.0033 13.1164 10.4288 12.9274L9.16369 12.5113C8.94544 12.4395 8.94544 12.1308 9.16369 12.059L10.4288 11.643C11.0033 11.454 11.454 11.0033 11.643 10.4288L12.059 9.16369C12.1308 8.94544 12.4395 8.94544 12.5113 9.16369L12.9274 10.4288C13.1164 11.0033 13.567 11.454 14.1416 11.643L15.4067 12.059C15.6249 12.1308 15.6249 12.4395 15.4067 12.5113L14.1416 12.9274C13.567 13.1164 13.1164 13.567 12.9274 14.1416L12.5113 15.4067Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M9.02246 0.546878C9.9822 0.546878 10.7564 0.545403 11.374 0.612307C12.0042 0.680586 12.5515 0.826244 13.0273 1.17188C13.3052 1.37376 13.5501 1.61868 13.752 1.89649C14.0975 2.37225 14.2432 2.91984 14.3115 3.54981C14.3784 4.16727 14.377 4.94206 14.377 5.90137V8.51367C13.9611 8.29533 13.5071 8.13985 13.0273 8.06055V5.90137C13.0273 4.9121 13.0259 4.22322 12.9688 3.69532C12.9129 3.18044 12.8098 2.89782 12.6592 2.69043C12.5406 2.52724 12.3966 2.38326 12.2334 2.26465C12.026 2.11404 11.7437 2.0109 11.2285 1.95508C10.7005 1.89789 10.0122 1.89649 9.02246 1.89649H6.55371C5.56395 1.89649 4.87569 1.89787 4.34766 1.95508C3.83242 2.01092 3.55022 2.11398 3.34278 2.26465C3.17953 2.38329 3.03564 2.52719 2.91699 2.69043C2.76642 2.89782 2.66325 3.18042 2.60742 3.69532C2.55027 4.22322 2.54883 4.9121 2.54883 5.90137V10.0986C2.54883 11.0878 2.55031 11.7768 2.60742 12.3047C2.66326 12.8196 2.76642 13.1032 2.91699 13.3105C3.03558 13.4736 3.17966 13.6178 3.34278 13.7363C3.5502 13.8869 3.83265 13.9901 4.34766 14.0459C4.87568 14.1031 5.56398 14.1035 6.55371 14.1035H8.08399C8.27443 14.6025 8.55077 15.0585 8.89551 15.4541H6.55371C5.59402 15.4541 4.81976 15.4546 4.20215 15.3877C3.57204 15.3194 3.02468 15.1738 2.54883 14.8281C2.27111 14.6263 2.02606 14.3813 1.82422 14.1035C1.47883 13.6278 1.33293 13.08 1.26465 12.4502C1.19783 11.8327 1.19922 11.0579 1.19922 10.0986V5.90137C1.19922 4.94206 1.1978 4.16727 1.26465 3.54981C1.33295 2.91984 1.47867 2.37225 1.82422 1.89649C2.02613 1.61864 2.27098 1.37379 2.54883 1.17188C3.02472 0.826181 3.57197 0.6806 4.20215 0.612307C4.81976 0.545393 5.594 0.546877 6.55371 0.546878H9.02246ZM9.19629 9.14649H4.5459V7.84571H9.19629V9.14649ZM11.0303 6.10645H4.5459V4.80567H11.0303V6.10645Z`,fill:`currentColor`})]}),kt=({size:e=20,className:t})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.8659 2.05975C17.2603 2.05995 18.3913 3.19096 18.3914 4.58527V5.4874C18.3914 6.02747 18.2192 6.52672 17.9303 6.93735C17.9336 6.96524 17.9388 6.99318 17.9388 7.02195V12.8884C17.9388 13.6345 17.9395 14.2379 17.8996 14.7254C17.8642 15.1593 17.7936 15.5499 17.6373 15.9141L17.5654 16.0685C17.278 16.6328 16.8405 17.1046 16.3038 17.434L16.0679 17.5661C15.66 17.7739 15.2196 17.8598 14.7237 17.9003C14.2362 17.9401 13.6327 17.9405 12.8867 17.9405H7.11122C6.36511 17.9405 5.76171 17.9401 5.27418 17.9003C4.84051 17.8649 4.44949 17.7952 4.08545 17.6391L3.93104 17.5661C3.36673 17.2785 2.89392 16.8414 2.56465 16.3044L2.43245 16.0685C2.22473 15.6608 2.13878 15.2211 2.09825 14.7254C2.05841 14.2379 2.05912 13.6345 2.05912 12.8884V7.02195C2.05912 6.99284 2.06422 6.96449 2.06758 6.93629C1.77931 6.52592 1.60858 6.02687 1.60858 5.4874V4.58527C1.60876 3.19084 2.73962 2.05975 4.1341 2.05975H15.8659ZM16.4984 7.92936C16.296 7.98169 16.0847 8.01288 15.8659 8.01291H4.1341C3.91478 8.01291 3.70246 7.98194 3.49955 7.92936V12.8884C3.49955 13.6582 3.50053 14.1927 3.53445 14.608C3.56769 15.0146 3.62923 15.244 3.71635 15.415L3.7925 15.5514C3.98339 15.8627 4.25749 16.1165 4.58464 16.2833L4.72529 16.3435C4.88095 16.3993 5.08638 16.4402 5.39158 16.4651C5.80685 16.4991 6.34138 16.5001 7.11122 16.5001H12.8867C13.6564 16.5001 14.1911 16.499 14.6063 16.4651C15.0128 16.432 15.2423 16.3703 15.4133 16.2833L15.5508 16.2061C15.8618 16.0152 16.116 15.7419 16.2827 15.415L16.3429 15.2732C16.3985 15.1177 16.4396 14.9128 16.4645 14.608C16.4985 14.1927 16.4984 13.6583 16.4984 12.8884V7.92936ZM4.1341 3.50019C3.53511 3.50019 3.0492 3.98631 3.04902 4.58527V5.4874C3.04902 6.08649 3.535 6.57248 4.1341 6.57248H15.8659C16.4648 6.57228 16.951 6.08638 16.951 5.4874V4.58527C16.9509 3.98644 16.4647 3.50038 15.8659 3.50019H4.1341Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M12.7962 12.5661V11.0832H7.20548V12.5661L12.7962 12.5661Z`,fill:`currentColor`})]}),At=x(),jt={viewport:`_viewport_1h2wd_1`,toast:`_toast_1h2wd_13`,"toast-in":`_toast-in_1h2wd_1`,body:`_body_1h2wd_29`,message:`_message_1h2wd_30`,detail:`_detail_1h2wd_31`,close:`_close_1h2wd_34`},Mt=4e3,Nt=[],Pt=new Set,Ft=new Map,It=0;function Lt(e){Nt=e;for(let e of Pt)e()}function Rt(e){let t=e.key??`toast-${++It}`,n={key:t,tone:e.tone??`error`,message:e.message,detail:e.detail,detailLabel:e.detailLabel};return Lt([...Nt.filter(e=>e.key!==t),n].slice(-4)),clearTimeout(Ft.get(t)),Ft.delete(t),n.tone===`info`&&Ft.set(t,setTimeout(()=>zt(t),Mt)),t}function zt(e){clearTimeout(Ft.get(e)),Ft.delete(e),Nt.some(t=>t.key===e)&&Lt(Nt.filter(t=>t.key!==e))}function Bt(e,t,n,r){(0,P.useEffect)(()=>{t&&Rt({key:e,message:t,detail:n&&n!==t?n:void 0,detailLabel:r})},[e,t,n,r])}var Vt=e=>(Pt.add(e),()=>{Pt.delete(e)}),Ht=()=>Nt;function Ut({closeLabel:e=`Dismiss`,detailLabel:t=`Details`}){let n=(0,P.useSyncExternalStore)(Vt,Ht,Ht);return typeof document>`u`?null:(0,At.createPortal)((0,F.jsx)(`div`,{className:jt.viewport,"data-toast-viewport":!0,children:n.map(n=>(0,F.jsxs)(`div`,{className:jt.toast,"data-tone":n.tone,role:n.tone===`error`?`alert`:`status`,children:[(0,F.jsxs)(`div`,{className:jt.body,children:[(0,F.jsx)(`p`,{className:jt.message,children:n.message}),n.detail&&(0,F.jsxs)(`details`,{className:jt.detail,children:[(0,F.jsx)(`summary`,{children:n.detailLabel??t}),(0,F.jsx)(`pre`,{children:n.detail})]})]}),(0,F.jsx)(`button`,{type:`button`,className:jt.close,"aria-label":e,onClick:()=>zt(n.key),children:`×`})]},n.key))}),document.body)}var Wt={root:`_root_1axg2_9`,collapsed:`_collapsed_1axg2_6`,quietBars:`_quietBars_1axg2_20`,fading:`_fading_1axg2_4`,wide:`_wide_1axg2_53`,"wide-in":`_wide-in_1axg2_1`,railIn:`_railIn_1axg2_64`,iconButton:`_iconButton_1axg2_66`,newSession:`_newSession_1axg2_67`,panelList:`_panelList_1axg2_68`,regionArea:`_regionArea_1axg2_69`,"rail-in":`_rail-in_1axg2_1`,footArea:`_footArea_1axg2_73`,"rail-fade-in":`_rail-fade-in_1axg2_1`,logoRow:`_logoRow_1axg2_91`,brand:`_brand_1axg2_115`,brandIdentity:`_brandIdentity_1axg2_130`,brandMark:`_brandMark_1axg2_138`,brandName:`_brandName_1axg2_145`,fallbackBrandName:`_fallbackBrandName_1axg2_157`,localBuildBrand:`_localBuildBrand_1axg2_163`,localBuildTitle:`_localBuildTitle_1axg2_174`,toggle:`_toggle_1axg2_208`,panelIcon:`_panelIcon_1axg2_208`,railMark:`_railMark_1axg2_216`,buildVersion:`_buildVersion_1axg2_232`,newSessionLabel:`_newSessionLabel_1axg2_290`,panelRow:`_panelRow_1axg2_308`,panelActive:`_panelActive_1axg2_330`,panelGlyph:`_panelGlyph_1axg2_341`,panelTitle:`_panelTitle_1axg2_348`,settingsArea:`_settingsArea_1axg2_396`,footerActions:`_footerActions_1axg2_397`},Gt=150,Kt=2e3;function qt({id:e,label:t,wide:r,usePanelInfo:i,selectPanel:a,renderSlot:o}){let s=i(t=>t.activePanelId===e);return(0,F.jsx)(Xe,{label:t,delayMs:500,disabled:r,children:(0,F.jsxs)(`button`,{type:`button`,className:n(Wt.panelRow,s&&Wt.panelActive),"aria-label":t,"aria-current":s?`page`:void 0,onClick:()=>{a(e)},children:[(0,F.jsx)(`span`,{className:Wt.panelGlyph,"aria-hidden":`true`,children:o(`sidebar.panellist`,{size:r?16:18,active:s},{only:e})}),r&&(0,F.jsx)(`span`,{className:n(Wt.panelTitle,Wt.wide),children:t})]})})}function Jt({collapsed:e,width:t,startSession:r,sessionBusy:i=!1,toggleSidebar:a,selectPanel:o,usePanels:s,usePanelInfo:c,t:l,renderSlot:u}){let d=s(e=>e),[f,p]=(0,P.useState)(e);(0,P.useEffect)(()=>{if(!e){p(!1);return}let t=window.setTimeout(()=>{p(!0)},Gt);return()=>{window.clearTimeout(t)}},[e]);let m=!e||!f,h=(0,P.useRef)(t);e||(h.current=t);let g=(0,P.useRef)(!e);e||(g.current=!0);let _=(0,P.useRef)(null),[v,y]=(0,P.useState)(!1),b=(0,P.useRef)(void 0),x=()=>{b.current===void 0&&(b.current=window.setTimeout(()=>{b.current=void 0,y(!1)},Kt))},S=()=>{window.clearTimeout(b.current),b.current=void 0};return(0,P.useEffect)(()=>{if(!v)return;let e=e=>{let t=_.current?.getBoundingClientRect();t!==void 0&&(e.clientX>=t.left&&e.clientX<t.right&&e.clientY>=t.top&&e.clientY<t.bottom?S():x())};return document.addEventListener(`pointermove`,e),()=>{document.removeEventListener(`pointermove`,e),S()}},[v]),(0,F.jsxs)(`div`,{ref:_,className:n(Wt.root,!m&&Wt.collapsed,!m&&g.current&&Wt.railIn,e&&m&&Wt.fading,!v&&Wt.quietBars),style:m?{width:e?h.current:t}:void 0,onPointerEnter:()=>{S(),y(!0)},onPointerLeave:()=>{x()},children:[(0,F.jsxs)(`div`,{className:Wt.logoRow,children:[m&&(0,F.jsx)(`button`,{type:`button`,className:n(Wt.brand,Wt.wide),"aria-label":l(`session.new.label`),disabled:i,onClick:()=>{r()},children:(0,F.jsxs)(`span`,{className:Wt.brandIdentity,"aria-hidden":`true`,children:[(0,F.jsx)(`span`,{className:Wt.brandMark,children:u(`sidebar.brand.mark`,{size:24},{fallback:(0,F.jsx)(Je,{size:24})})}),(0,F.jsx)(`span`,{className:Wt.brandName,children:u(`sidebar.brand.name`,{},{fallback:(0,F.jsx)(`span`,{className:Wt.fallbackBrandName,children:l(`brand.localBuild`)})})})]})}),(0,F.jsx)(Xe,{label:l(e?`toggle.open`:`toggle.collapse`),delayMs:500,children:(0,F.jsxs)(`button`,{type:`button`,className:n(Wt.iconButton,Wt.toggle),"aria-label":l(e?`toggle.open`:`toggle.collapse`),"aria-expanded":!e,"data-sidebar-toggle":!0,onClick:()=>{a()},children:[!m&&(0,F.jsx)(`span`,{className:Wt.railMark,"aria-hidden":`true`,children:u(`sidebar.brand.mark`,{size:24},{fallback:(0,F.jsx)(Je,{size:24})})}),(0,F.jsx)(it,{className:Wt.panelIcon,size:m?16:18})]})})]}),(0,F.jsx)(Xe,{label:l(`session.new.label`),delayMs:500,disabled:m,children:(0,F.jsxs)(`button`,{type:`button`,className:Wt.newSession,"aria-label":l(`session.new.label`),disabled:i,onClick:()=>{r()},children:[(0,F.jsx)(et,{size:m?14:18}),m&&(0,F.jsx)(`span`,{className:n(Wt.newSessionLabel,Wt.wide),children:l(`session.new`)})]})}),d.length>0&&(0,F.jsx)(`nav`,{className:Wt.panelList,"aria-label":l(`panels.label`),children:d.map(({id:e,label:t})=>(0,F.jsx)(qt,{id:e,label:t,wide:m,usePanelInfo:c,selectPanel:o,renderSlot:u},e))}),(0,F.jsx)(`div`,{className:Wt.regionArea,children:u(`sidebar.workspaces`,{wide:m,expandSidebar:()=>{e&&a()}})}),(0,F.jsxs)(`div`,{className:Wt.footArea,children:[(0,F.jsx)(`div`,{className:Wt.footerActions,children:u(`sidebar.footer.action`,{wide:m})}),(0,F.jsx)(`div`,{className:Wt.settingsArea,children:u(`sidebar.settings`,{wide:m})})]})]})}function Yt(e,t){let n=e.replaceAll(`\\`,`/`).replace(/\/+$/,``),r=t.replaceAll(`\\`,`/`);if(/^(?:\/|[a-z]:\/)/i.test(r)){let e=/^[a-z]:\//i.test(n),i=`${n}/`;if(!(e?r.toLowerCase().startsWith(i.toLowerCase()):r.startsWith(i)))return t;r=r.slice(i.length)}let i=[];for(let e of r.split(`/`))if(e&&e!==`.`){if(e===`..`){if(!i.length)return t;i.pop()}else i.push(e)}return i.join(`/`)||t}var Xt={root:`_root_xhk35_5`,stack:`_stack_xhk35_15`,headline:`_headline_xhk35_29`,titleGroup:`_titleGroup_xhk35_51`,previewBadge:`_previewBadge_xhk35_62`,logoFrame:`_logoFrame_xhk35_77`,logo:`_logo_xhk35_77`,"logo-breathe":`_logo-breathe_xhk35_1`,body:`_body_xhk35_98`,workspaceRow:`_workspaceRow_xhk35_114`,workspace:`_workspace_xhk35_114`,folder:`_folder_xhk35_155`,workspaceLabel:`_workspaceLabel_xhk35_160`,chevron:`_chevron_xhk35_167`,modalInput:`_modalInput_xhk35_175`,modalAction:`_modalAction_xhk35_198`,modalError:`_modalError_xhk35_202`};function Zt({t:e,renderSlot:t,children:n}){return(0,F.jsxs)(`div`,{className:Xt.root,children:[(0,F.jsxs)(`div`,{className:Xt.stack,children:[(0,F.jsxs)(`div`,{className:Xt.headline,children:[(0,F.jsx)(`span`,{className:Xt.logoFrame,children:t(`conversation.hero.brand.mark`,{size:34,className:Xt.logo},{fallback:(0,F.jsx)(Je,{size:34,className:Xt.logo})})}),(0,F.jsxs)(`span`,{className:Xt.titleGroup,children:[(0,F.jsx)(`span`,{children:e(`hero.headline`)}),(0,F.jsx)(`span`,{className:Xt.previewBadge,children:e(`hero.preview`)})]})]}),(0,F.jsx)(`div`,{className:Xt.body})]}),n]})}var Qt={root:`_root_gyk4n_1`,heroTools:`_heroTools_gyk4n_44`,header:`_header_gyk4n_51`,headerHidden:`_headerHidden_gyk4n_61`,titleRow:`_titleRow_gyk4n_65`,titleCluster:`_titleCluster_gyk4n_72`,crumbs:`_crumbs_gyk4n_80`,crumbSeg:`_crumbSeg_gyk4n_89`,crumbSep:`_crumbSep_gyk4n_96`,crumb:`_crumb_gyk4n_80`,crumbSubagent:`_crumbSubagent_gyk4n_118`,crumbCurrent:`_crumbCurrent_gyk4n_127`,headerActions:`_headerActions_gyk4n_133`,headerUtilities:`_headerUtilities_gyk4n_140`,headerCorner:`_headerCorner_gyk4n_156`,tabs:`_tabs_gyk4n_170`,tab:`_tab_gyk4n_40`,tabActive:`_tabActive_gyk4n_208`,viewArea:`_viewArea_gyk4n_216`,widthHandle:`_widthHandle_gyk4n_235`,composerStack:`_composerStack_gyk4n_303`,composerSeat:`_composerSeat_gyk4n_314`,body:`_body_gyk4n_224`,scrollBody:`_scrollBody_gyk4n_350`,composerHero:`_composerHero_gyk4n_451`,heroWorkspaceRow:`_heroWorkspaceRow_gyk4n_464`},$t={root:`_root_1d5y2_2`,hero:`_hero_1d5y2_20`,notice:`_notice_1d5y2_27`,card:`_card_1d5y2_39`,cardWorkspaceTrigger:`_cardWorkspaceTrigger_1d5y2_79`,accessory:`_accessory_1d5y2_107`,overlayAnchor:`_overlayAnchor_1d5y2_116`,scroll:`_scroll_1d5y2_125`,grow:`_grow_1d5y2_143`,pending:`_pending_1d5y2_148`,"input-pending":`_input-pending_1d5y2_1`,input:`_input_1d5y2_128`,placeholder:`_placeholder_1d5y2_202`,inputDisabled:`_inputDisabled_1d5y2_221`,row:`_row_1d5y2_248`,tools:`_tools_1d5y2_266`,modes:`_modes_1d5y2_267`,trailing:`_trailing_1d5y2_268`,add:`_add_1d5y2_297`,select:`_select_1d5y2_322`,primary:`_primary_1d5y2_355`,retry:`_retry_1d5y2_385`,suspended:`_suspended_1d5y2_397`},en={root:`_root_14jhb_1`,scroll:`_scroll_14jhb_9`,column:`_column_14jhb_37`,flowItem:`_flowItem_14jhb_48`,callRow:`_callRow_14jhb_72`,turnStatus:`_turnStatus_14jhb_81`,"piw-turn-status-shimmer":`_piw-turn-status-shimmer_14jhb_1`,turnStatusClock:`_turnStatusClock_14jhb_113`,hint:`_hint_14jhb_138`,openError:`_openError_14jhb_144`,older:`_older_14jhb_150`,toBottomSlot:`_toBottomSlot_14jhb_173`,toBottom:`_toBottom_14jhb_173`,modalAction:`_modalAction_14jhb_220`},tn={userRow:`_userRow_1dwc7_4`,userStack:`_userStack_1dwc7_11`,bubble:`_bubble_1dwc7_23`,referenceSummary:`_referenceSummary_1dwc7_43`,contextRow:`_contextRow_1dwc7_48`,compactionRow:`_compactionRow_1dwc7_55`,compactionButton:`_compactionButton_1dwc7_59`,compactionLeading:`_compactionLeading_1dwc7_82`,compactionContextIcon:`_compactionContextIcon_1dwc7_99`,compactionDisclosureIcon:`_compactionDisclosureIcon_1dwc7_100`,compactionTitle:`_compactionTitle_1dwc7_121`,compactionSep:`_compactionSep_1dwc7_128`,compactionSummary:`_compactionSummary_1dwc7_137`,compactionBody:`_compactionBody_1dwc7_148`,retryRow:`_retryRow_1dwc7_156`,retrySummary:`_retrySummary_1dwc7_162`,retryText:`_retryText_1dwc7_199`,"retry-shimmer":`_retry-shimmer_1dwc7_1`,retryDetails:`_retryDetails_1dwc7_224`,retryDetailLabel:`_retryDetailLabel_1dwc7_234`,turnErrorRow:`_turnErrorRow_1dwc7_238`,turnErrorDot:`_turnErrorDot_1dwc7_248`,turnErrorCopy:`_turnErrorCopy_1dwc7_252`,turnErrorTitle:`_turnErrorTitle_1dwc7_257`,turnErrorMessage:`_turnErrorMessage_1dwc7_263`,turnErrorCode:`_turnErrorCode_1dwc7_267`,maxTokensTitle:`_maxTokensTitle_1dwc7_272`,attachmentRow:`_attachmentRow_1dwc7_296`,fileCard:`_fileCard_1dwc7_304`,fileIcon:`_fileIcon_1dwc7_318`,fileContent:`_fileContent_1dwc7_324`,fileName:`_fileName_1dwc7_331`,fileMeta:`_fileMeta_1dwc7_341`};function nn(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var rn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,an=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,on={};function sn(e,t){return((t||on).jsx?an:rn).test(e)}var cn=/[ \t\n\f\r]/g;function ln(e){return typeof e==`object`?e.type===`text`&&un(e.value):un(e)}function un(e){return e.replace(cn,``)===``}var dn=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};dn.prototype.normal={},dn.prototype.property={},dn.prototype.space=void 0;function fn(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new dn(n,r,t)}function pn(e){return e.toLowerCase()}var mn=class{constructor(e,t){this.attribute=t,this.property=e}};mn.prototype.attribute=``,mn.prototype.booleanish=!1,mn.prototype.boolean=!1,mn.prototype.commaOrSpaceSeparated=!1,mn.prototype.commaSeparated=!1,mn.prototype.defined=!1,mn.prototype.mustUseProperty=!1,mn.prototype.number=!1,mn.prototype.overloadedBoolean=!1,mn.prototype.property=``,mn.prototype.spaceSeparated=!1,mn.prototype.space=void 0;var hn=e({boolean:()=>_n,booleanish:()=>vn,commaOrSpaceSeparated:()=>Sn,commaSeparated:()=>xn,number:()=>I,overloadedBoolean:()=>yn,spaceSeparated:()=>bn}),gn=0,_n=Cn(),vn=Cn(),yn=Cn(),I=Cn(),bn=Cn(),xn=Cn(),Sn=Cn();function Cn(){return 2**++gn}var wn=Object.keys(hn),Tn=class extends mn{constructor(e,t,n,r){let i=-1;if(super(e,t),En(this,`space`,r),typeof n==`number`)for(;++i<wn.length;){let e=wn[i];En(this,wn[i],(n&hn[e])===hn[e])}}};Tn.prototype.defined=!0;function En(e,t,n){n&&(e[t]=n)}function Dn(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Tn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[pn(r)]=r,n[pn(a.attribute)]=r}return new dn(t,n,e.space)}var On=Dn({properties:{ariaActiveDescendant:null,ariaAtomic:vn,ariaAutoComplete:null,ariaBusy:vn,ariaChecked:vn,ariaColCount:I,ariaColIndex:I,ariaColSpan:I,ariaControls:bn,ariaCurrent:null,ariaDescribedBy:bn,ariaDetails:null,ariaDisabled:vn,ariaDropEffect:bn,ariaErrorMessage:null,ariaExpanded:vn,ariaFlowTo:bn,ariaGrabbed:vn,ariaHasPopup:null,ariaHidden:vn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bn,ariaLevel:I,ariaLive:null,ariaModal:vn,ariaMultiLine:vn,ariaMultiSelectable:vn,ariaOrientation:null,ariaOwns:bn,ariaPlaceholder:null,ariaPosInSet:I,ariaPressed:vn,ariaReadOnly:vn,ariaRelevant:null,ariaRequired:vn,ariaRoleDescription:bn,ariaRowCount:I,ariaRowIndex:I,ariaRowSpan:I,ariaSelected:vn,ariaSetSize:I,ariaSort:null,ariaValueMax:I,ariaValueMin:I,ariaValueNow:I,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function kn(e,t){return t in e?e[t]:t}function An(e,t){return kn(e,t.toLowerCase())}var jn=Dn({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:xn,acceptCharset:bn,accessKey:bn,action:null,allow:null,allowFullScreen:_n,allowPaymentRequest:_n,allowUserMedia:_n,alpha:_n,alt:null,as:null,async:_n,autoCapitalize:null,autoComplete:bn,autoFocus:_n,autoPlay:_n,blocking:bn,capture:null,charSet:null,checked:_n,cite:null,className:bn,closedBy:null,colorSpace:null,cols:I,colSpan:I,command:null,commandFor:null,content:null,contentEditable:vn,controls:_n,controlsList:bn,coords:I|xn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_n,defer:_n,dir:null,dirName:null,disabled:_n,download:yn,draggable:vn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_n,formTarget:null,headers:bn,height:I,hidden:yn,high:I,href:null,hrefLang:null,htmlFor:bn,httpEquiv:bn,id:null,imageSizes:null,imageSrcSet:null,inert:_n,inputMode:null,integrity:null,is:null,isMap:_n,itemId:null,itemProp:bn,itemRef:bn,itemScope:_n,itemType:bn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_n,low:I,manifest:null,max:null,maxLength:I,media:null,method:null,min:null,minLength:I,multiple:_n,muted:_n,name:null,nonce:null,noModule:_n,noValidate:_n,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:_n,optimum:I,pattern:null,ping:bn,placeholder:null,playsInline:_n,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_n,referrerPolicy:null,rel:bn,required:_n,reversed:_n,rows:I,rowSpan:I,sandbox:bn,scope:null,scoped:_n,seamless:_n,selected:_n,shadowRootClonable:_n,shadowRootCustomElementRegistry:_n,shadowRootDelegatesFocus:_n,shadowRootMode:null,shadowRootSerializable:_n,shape:null,size:I,sizes:null,slot:null,span:I,spellCheck:vn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:I,step:null,style:null,tabIndex:I,target:null,title:null,translate:null,type:null,typeMustMatch:_n,useMap:null,value:vn,width:I,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bn,axis:null,background:null,bgColor:null,border:I,borderColor:null,bottomMargin:I,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_n,declare:_n,event:null,face:null,frame:null,frameBorder:null,hSpace:I,leftMargin:I,link:null,longDesc:null,lowSrc:null,marginHeight:I,marginWidth:I,noResize:_n,noHref:_n,noShade:_n,noWrap:_n,object:null,profile:null,prompt:null,rev:null,rightMargin:I,rules:null,scheme:null,scrolling:vn,standby:null,summary:null,text:null,topMargin:I,valueType:null,version:null,vAlign:null,vLink:null,vSpace:I,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:_n,disablePictureInPicture:_n,disableRemotePlayback:_n,exportParts:xn,part:bn,prefix:null,property:null,results:I,security:null,unselectable:null},space:`html`,transform:An}),Mn=Dn({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Sn,accentHeight:I,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:I,amplitude:I,arabicForm:null,ascent:I,attributeName:null,attributeType:null,azimuth:I,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:I,by:null,calcMode:null,capHeight:I,className:bn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:I,diffuseConstant:I,direction:null,display:null,dur:null,divisor:I,dominantBaseline:null,download:_n,dx:null,dy:null,edgeMode:null,editable:null,elevation:I,enableBackground:null,end:null,event:null,exponent:I,externalResourcesRequired:null,fill:null,fillOpacity:I,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:xn,g2:xn,glyphName:xn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:I,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:I,horizOriginX:I,horizOriginY:I,id:null,ideographic:I,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:I,k:I,k1:I,k2:I,k3:I,k4:I,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:I,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:I,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:I,overlineThickness:I,paintOrder:null,panose1:null,path:null,pathLength:I,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:I,pointsAtY:I,pointsAtZ:I,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sn,rev:Sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sn,requiredFeatures:Sn,requiredFonts:Sn,requiredFormats:Sn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:I,specularExponent:I,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:I,strikethroughThickness:I,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:I,strokeOpacity:I,strokeWidth:null,style:null,surfaceScale:I,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:I,tableValues:null,target:null,targetX:I,targetY:I,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:I,underlineThickness:I,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:I,values:null,vAlphabetic:I,vMathematical:I,vectorEffect:null,vHanging:I,vIdeographic:I,version:null,vertAdvY:I,vertOriginX:I,vertOriginY:I,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:I,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:kn}),Nn=Dn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Pn=Dn({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:An}),Fn=Dn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),In={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Ln=/[A-Z]/g,Rn=/-[a-z]/g,zn=/^data[-\w.:]+$/i;function Bn(e,t){let n=pn(t),r=t,i=mn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&zn.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Rn,Hn);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Rn.test(e)){let n=e.replace(Ln,Vn);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Tn}return new i(r,t)}function Vn(e){return`-`+e.toLowerCase()}function Hn(e){return e.charAt(1).toUpperCase()}var Un=fn([On,jn,Nn,Pn,Fn],`html`),Wn=fn([On,Mn,Nn,Pn,Fn],`svg`);function Gn(e){return e.join(` `).trim()}var Kn=a(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
11
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),qn=a(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(Kn());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),Jn=a((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Yn=a(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(qn()),i=Jn();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),Xn=Qn(`end`),Zn=Qn(`start`);function Qn(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function $n(e){let t=Zn(e),n=Xn(e);if(t&&n)return{start:t,end:n}}function er(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?nr(e.position):`start`in e||`end`in e?nr(e):`line`in e||`column`in e?tr(e):``}function tr(e){return rr(e&&e.line)+`:`+rr(e&&e.column)}function nr(e){return tr(e&&e.start)+`-`+tr(e&&e.end)}function rr(e){return e&&typeof e==`number`?e:1}var ir=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=er(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ir.prototype.file=``,ir.prototype.name=``,ir.prototype.reason=``,ir.prototype.message=``,ir.prototype.stack=``,ir.prototype.column=void 0,ir.prototype.line=void 0,ir.prototype.ancestors=void 0,ir.prototype.cause=void 0,ir.prototype.fatal=void 0,ir.prototype.place=void 0,ir.prototype.ruleId=void 0,ir.prototype.source=void 0;var ar=g(Yn(),1),or={}.hasOwnProperty,sr=new Map,cr=/[A-Z]/g,lr=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ur=new Set([`td`,`th`]),dr=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function fr(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Cr(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Sr(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Wn:Un,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=pr(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function pr(e,t,n){if(t.type===`element`)return mr(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return hr(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return _r(e,t,n);if(t.type===`mdxjsEsm`)return gr(e,t);if(t.type===`root`)return vr(e,t,n);if(t.type===`text`)return yr(e,t)}function mr(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Wn,e.schema=i),e.ancestors.push(t);let a=kr(e,t.tagName,!1),o=wr(e,t),s=Er(e,t);return lr.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!ln(e)})),br(e,o,a,t),xr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function hr(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ar(e,t.position)}function gr(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ar(e,t.position)}function _r(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Wn,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:kr(e,t.name,!0),o=Tr(e,t),s=Er(e,t);return br(e,o,a,t),xr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function vr(e,t,n){let r={};return xr(r,Er(e,t)),e.create(t,e.Fragment,r,n)}function yr(e,t){return t.value}function br(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xr(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Sr(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Cr(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Zn(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function wr(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&or.call(t.properties,i)){let a=Dr(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ur.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Tr(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ar(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Ar(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Er(e,t){let n=[],r=-1,i=e.passKeys?new Map:sr;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=pr(e,a,o);s!==void 0&&n.push(s)}return n}function Dr(e,t,n){let r=Bn(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?nn(n):Gn(n)),r.property===`style`){let t=typeof n==`object`?n:Or(e,String(n));return e.stylePropertyNameCase===`css`&&(t=jr(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?In[r.property]||r.property:r.attribute,n]}}function Or(e,t){try{return(0,ar.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new ir("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=dr+`#cannot-parse-style-attribute`,r}}function kr(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=sn(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=sn(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return or.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ar(e)}function Ar(e,t){let n=new ir("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=dr+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function jr(e){let t={},n;for(n in e)or.call(e,n)&&(t[Mr(n)]=e[n]);return t}function Mr(e){let t=e.replace(cr,Nr);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Nr(e){return`-`+e.toLowerCase()}var Pr={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Fr={};function Ir(e,t){let n=t||Fr;return Lr(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Lr(e,t,n){if(zr(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Rr(e.children,t,n)}return Array.isArray(e)?Rr(e,t,n):``}function Rr(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Lr(e[i],t,n);return r.join(``)}function zr(e){return!!(e&&typeof e==`object`)}var Br=document.createElement(`i`);function Vr(e){let t=`&`+e+`;`;Br.innerHTML=t;let n=Br.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Hr(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Ur(e,t){return e.length>0?(Hr(e,e.length,0,t),e):t}var Wr={}.hasOwnProperty;function Gr(e){let t={},n=-1;for(;++n<e.length;)Kr(t,e[n]);return t}function Kr(e,t){let n;for(n in t){let r=(Wr.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Wr.call(r,a)||(r[a]=[]);let e=i[a];qr(r[a],Array.isArray(e)?e:e?[e]:[])}}}function qr(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Hr(e,0,0,r)}function Jr(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Yr(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Xr=ci(/[A-Za-z]/),Zr=ci(/[\dA-Za-z]/),Qr=ci(/[#-'*+\--9=?A-Z^-~]/);function $r(e){return e!==null&&(e<32||e===127)}var ei=ci(/\d/),ti=ci(/[\dA-Fa-f]/),ni=ci(/[!-/:-@[-`{-~]/);function ri(e){return e!==null&&e<-2}function ii(e){return e!==null&&(e<0||e===32)}function ai(e){return e===-2||e===-1||e===32}var oi=ci(/\p{P}|\p{S}/u),si=ci(/\s/);function ci(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function li(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Zr(e.charCodeAt(n+1))&&Zr(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function ui(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return ai(r)?(e.enter(n),s(r)):t(r)}function s(r){return ai(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function di(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&ai(t)?(e.enter(r),c(t)):l(t)}function c(t){return ai(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var fi={tokenize:pi};function pi(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ui(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return ri(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var mi={tokenize:gi},hi={tokenize:_i};function gi(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Hr(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(hi,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(hi,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return ri(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Hr(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function _i(e,t,n){return ui(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function vi(e){if(e===null||ii(e)||si(e))return 1;if(oi(e))return 2}function yi(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var bi={name:`attention`,resolveAll:xi,tokenize:Si};function xi(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Ci(o,-a),Ci(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Ur(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=Ur(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=Ur(r,yi(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Ur(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=Ur(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),Hr(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Si(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=vi(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=vi(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Ci(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var wi={name:`autolink`,tokenize:Ti};function Ti(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Xr(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Zr(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Zr(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||$r(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Qr(t)?(e.consume(t),l):n(t)}function u(e){return Zr(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Zr(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Ei={partial:!0,tokenize:Di};function Di(e,t,n){return r;function r(t){return ai(t)?ui(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||ri(e)?t(e):n(e)}}var Oi={continuation:{tokenize:Ai},exit:ji,name:`blockQuote`,tokenize:ki};function ki(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return ai(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Ai(e,t,n){let r=this;return i;function i(t){return ai(t)?ui(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Oi,t,n)(r)}}function ji(e){e.exit(`blockQuote`)}var Mi={name:`characterEscape`,tokenize:Ni};function Ni(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ni(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Pi={name:`characterReference`,tokenize:Fi};function Fi(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Zr,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=ti,u):(e.enter(`characterReferenceValue`),a=7,o=ei,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Zr&&!Vr(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Ii={partial:!0,tokenize:Li};function Li(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Ri={concrete:!0,name:`codeFenced`,tokenize:zi};function zi(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),ai(t)?ui(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||ri(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Ii,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||ri(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):ai(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),ui(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||ri(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||ri(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&ai(t)?ui(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||ri(t)?e.check(Ii,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||ri(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),ai(t)?ui(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),ai(t)?ui(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||ri(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Bi={name:`codeIndented`,tokenize:Hi},Vi={partial:!0,tokenize:Ui};function Hi(e,t,n){return r;function r(t){return e.enter(`codeIndented`),di(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):ri(t)?e.attempt(Vi,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||ri(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Ui(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):ri(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):di(e,t,a,`linePrefix`,4,4)(o)}function a(e){return ri(e)?i(e):n(e)}}var Wi={name:`codeText`,previous:Ki,resolve:Gi,tokenize:qi};function Gi(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ki(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function qi(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):ri(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||ri(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Ji=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Yi(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Yi(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Yi(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Yi(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Yi(this.left,t.reverse())}}}};function Yi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Xi(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Ji(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Zi(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Hr(e,0,1/0,u.slice(0)),!l}function Zi(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Qi={resolve:ea,tokenize:ta},$i={partial:!0,tokenize:na};function ea(e){return Xi(e),e}function ta(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):ri(t)?e.check($i,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function na(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ui(e,a,`linePrefix`)}function a(i){if(i===null||ri(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function ra(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||$r(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||ri(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||ii(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||$r(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function ia(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):ri(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||ri(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!ai(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function aa(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):ri(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ui(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||ri(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function oa(e,t){let n;return r;function r(i){return ri(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):ai(i)?ui(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var sa={name:`definition`,tokenize:la},ca={partial:!0,tokenize:ua};function la(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return ia.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Yr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return ii(t)?oa(e,l)(t):l(t)}function l(t){return ra(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(ca,d,d)(t)}function d(t){return ai(t)?ui(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||ri(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ua(e,t,n){return r;function r(t){return ii(t)?oa(e,i)(t):n(t)}function i(t){return aa(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return ai(t)?ui(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||ri(e)?t(e):n(e)}}var da={name:`hardBreakEscape`,tokenize:fa};function fa(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return ri(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var pa={name:`headingAtx`,resolve:ma,tokenize:ha};function ma(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};Hr(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function ha(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||ii(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||ri(n)?(e.exit(`atxHeading`),t(n)):ai(n)?ui(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||ii(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var ga=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),_a=[`pre`,`script`,`style`,`textarea`],va={concrete:!0,name:`htmlFlow`,resolveTo:ba,tokenize:xa},ya={partial:!0,tokenize:Sa};function ba(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function xa(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:j):Xr(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Xr(a)?(e.consume(a),i=4,r.interrupt?t:j):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:j):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Xr(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||ii(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&_a.includes(l)?(i=1,r.interrupt?t(s):O(s)):ga.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Zr(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return ai(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Xr(t)?(e.consume(t),b):ai(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Zr(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):ai(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):ai(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||ri(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||ii(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||ai(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||ri(t)?O(t):ai(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),ne):t===60&&i===1?(e.consume(t),A):t===62&&i===4?(e.consume(t),ae):t===63&&i===3?(e.consume(t),j):t===93&&i===5?(e.consume(t),ie):ri(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(ya,oe,k)(t)):t===null||ri(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Ii,ee,oe)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||ri(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function ne(t){return t===45?(e.consume(t),j):O(t)}function A(t){return t===47?(e.consume(t),o=``,re):O(t)}function re(t){if(t===62){let n=o.toLowerCase();return _a.includes(n)?(e.consume(t),ae):O(t)}return Xr(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),re):O(t)}function ie(t){return t===93?(e.consume(t),j):O(t)}function j(t){return t===62?(e.consume(t),ae):t===45&&i===2?(e.consume(t),j):O(t)}function ae(t){return t===null||ri(t)?(e.exit(`htmlFlowData`),oe(t)):(e.consume(t),ae)}function oe(n){return e.exit(`htmlFlow`),t(n)}}function Sa(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Ei,t,n)}}var Ca={name:`htmlText`,tokenize:wa};function wa(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Xr(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Xr(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):ri(t)?(o=d,A(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ne(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):ri(t)?(o=h,A(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ne(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ne(t):ri(t)?(o=v,A(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):ri(t)?(o=y,A(t)):(e.consume(t),y)}function b(e){return e===62?ne(e):y(e)}function x(t){return Xr(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Zr(t)?(e.consume(t),S):C(t)}function C(t){return ri(t)?(o=C,A(t)):ai(t)?(e.consume(t),C):ne(t)}function w(t){return t===45||Zr(t)?(e.consume(t),w):t===47||t===62||ii(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ne):t===58||t===95||Xr(t)?(e.consume(t),E):ri(t)?(o=T,A(t)):ai(t)?(e.consume(t),T):ne(t)}function E(t){return t===45||t===46||t===58||t===95||Zr(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):ri(t)?(o=D,A(t)):ai(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):ri(t)?(o=O,A(t)):ai(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):ri(t)?(o=k,A(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||ii(t)?T(t):(e.consume(t),ee)}function te(e){return e===47||e===62||ii(e)?T(e):n(e)}function ne(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function A(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return ai(t)?ui(e,ie,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ie(t)}function ie(t){return e.enter(`htmlTextData`),o(t)}}var Ta={name:`labelEnd`,resolveAll:ka,resolveTo:Aa,tokenize:ja},Ea={tokenize:Ma},Da={tokenize:Na},Oa={tokenize:Pa};function ka(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Hr(e,0,e.length,n),e}function Aa(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=Ur(o,e.slice(i+1,i+r+3)),o=Ur(o,[[`enter`,l,t]]),o=Ur(o,yi(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Ur(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=Ur(o,e.slice(a+1)),o=Ur(o,[[`exit`,s,t]]),Hr(e,i,e.length,o),e}function ja(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Yr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Ea,u,o?u:d)(t):t===91?e.attempt(Da,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Oa,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Ma(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return ii(t)?oa(e,a)(t):a(t)}function a(t){return t===41?u(t):ra(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return ii(t)?oa(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?aa(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return ii(t)?oa(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Na(e,t,n){let r=this;return i;function i(t){return ia.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Yr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Pa(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Fa={name:`labelStartImage`,resolveAll:Ta.resolveAll,tokenize:Ia};function Ia(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var La={name:`labelStartLink`,resolveAll:Ta.resolveAll,tokenize:Ra};function Ra(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var za={name:`lineEnding`,tokenize:Ba};function Ba(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ui(e,t,`linePrefix`)}}var Va={name:`thematicBreak`,tokenize:Ha};function Ha(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||ri(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),ai(t)?ui(e,s,`whitespace`)(t):s(t))}}var Ua={continuation:{tokenize:qa},exit:Ya,name:`list`,tokenize:Ka},Wa={partial:!0,tokenize:Xa},Ga={partial:!0,tokenize:Ja};function Ka(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:ei(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Va,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return ei(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Ei,r.interrupt?n:u,e.attempt(Wa,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return ai(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function qa(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Ei,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ui(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!ai(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ga,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ui(e,e.attempt(Ua,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Ja(e,t,n){let r=this;return ui(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Ya(e){e.exit(this.containerState.type)}function Xa(e,t,n){let r=this;return ui(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!ai(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Za=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Qa(this,e,t,n,!1)}addBefore(e,t,n){Qa(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Qa(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var $a={name:`setextUnderline`,resolveTo:eo,tokenize:to};function eo(e,t){let n=new Za,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function to(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),ai(t)?ui(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||ri(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var no={tokenize:ro};function ro(e){let t=this,n=e.attempt(Ei,r,e.attempt(this.parser.constructs.flowInitial,i,ui(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Qi,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var io={resolveAll:co()},ao=so(`string`),oo=so(`text`);function so(e){return{resolveAll:co(e===`text`?lo:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function co(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function lo(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var uo=e({attentionMarkers:()=>yo,contentInitial:()=>po,disable:()=>bo,document:()=>fo,flow:()=>ho,flowInitial:()=>mo,insideSpan:()=>vo,string:()=>go,text:()=>_o}),fo={42:Ua,43:Ua,45:Ua,48:Ua,49:Ua,50:Ua,51:Ua,52:Ua,53:Ua,54:Ua,55:Ua,56:Ua,57:Ua,62:Oi},po={91:sa},mo={[-2]:Bi,[-1]:Bi,32:Bi},ho={35:pa,42:Va,45:[$a,Va],60:va,61:$a,95:Va,96:Ri,126:Ri},go={38:Pi,92:Mi},_o={[-5]:za,[-4]:za,[-3]:za,33:Fa,38:Pi,42:bi,60:[wi,Ca],91:La,92:[da,Mi],93:Ta,95:bi,96:Wi},vo={null:[bi,io]},yo={null:[42,95]},bo={null:[]};function xo(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Ur(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=yi(a,l.events,l),l.events):[]}function f(e,t){return Co(p(e),t)}function p(e){return So(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){ri(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Hr(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function So(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Co(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
12
+ `;break;case-3:o=`\r
13
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function wo(e){let t={constructs:Gr([uo,...(e||{}).extensions||[]]),content:n(fi),defined:[],document:n(mi),flow:n(no),lazy:{},string:n(ao),text:n(oo)};return t;function n(e){return n;function n(n){return xo(t,e,n)}}}function To(e){for(;!Xi(e););return e}var Eo=/[\0\t\n\r]/g;function Do(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Eo.lastIndex=u,c=Eo.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Oo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ko(e){return e.replace(Oo,Ao)}function Ao(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Jr(n.slice(t?2:1),t?16:10)}return Vr(n)||e}var jo={}.hasOwnProperty;function Mo(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),No(n)(To(wo(n).document().write(Do()(e,t,!0))))}function No(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(Se),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(ve),blockQuote:o(me),characterEscape:E,characterReference:E,codeFenced:o(N),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(N,s),codeText:o(he,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(ge),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(_e),hardBreakEscape:o(ye),hardBreakTrailing:o(ye),htmlFlow:o(be,s),htmlFlowData:E,htmlText:o(be,s),htmlTextData:E,image:o(xe),label:s,link:o(Se),listItem:o(we),listItemValue:p,listOrdered:o(Ce,f),listUnordered:o(Ce),paragraph:o(Te),reference:se,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ve),strong:o(Ee),thematicBreak:o(De)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:pe,autolinkProtocol:fe,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ue,characterReference:de,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(ne),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(ee),htmlFlowData:D,htmlText:l(te),htmlTextData:D,image:l(re),label:j,labelText:ie,lineEnding:O,link:l(A),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ce,resourceDestinationString:ae,resourceTitleString:oe,resource:M,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Fo(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),jo.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Lo).call(o,void 0,e[0])}for(r.position={start:Po(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Po(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Po(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+er({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Lo).call(this,e,r[0])),n.position.end=Po(e.end)}function d(){return Ir(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Yr(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=P(),n.position={start:Po(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Po(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Po(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function re(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ie(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ko(t),n.identifier=Yr(t).toLowerCase()}function j(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function M(){this.data.inReference=void 0}function se(){this.data.referenceType=`collapsed`}function ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Yr(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function le(e){this.data.characterReferenceType=e.type}function ue(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Jr(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Vr(t);let i=this.stack[this.stack.length-1];i.value+=r}function de(e){let t=this.stack.pop();t.position.end=Po(e.end)}function fe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function pe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function me(){return{type:`blockquote`,children:[],position:void 0}}function N(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function he(){return{type:`inlineCode`,value:``,position:void 0}}function ge(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function _e(){return{type:`emphasis`,children:[],position:void 0}}function ve(){return{type:`heading`,depth:0,children:[],position:void 0}}function ye(){return{type:`break`,position:void 0}}function be(){return{type:`html`,value:``,position:void 0}}function xe(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function Se(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function Ce(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function we(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function Te(){return{type:`paragraph`,children:[],position:void 0}}function Ee(){return{type:`strong`,children:[],position:void 0}}function P(){return{type:`text`,value:``,position:void 0}}function De(){return{type:`thematicBreak`,position:void 0}}}function Po(e){return{line:e.line,column:e.column,offset:e.offset}}function Fo(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Fo(e,r):Io(e,r)}}function Io(e,t){let n;for(n in t)if(jo.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Lo(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+er({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+er({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+er({start:t.start,end:t.end})+`) is still open`)}function Ro(e){let t=this;t.parser=n;function n(n){return Mo(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function zo(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Bo(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
14
+ `}]}function Vo(e,t){let n=t.value?t.value+`
15
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Ho(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Uo(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wo(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=li(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Go(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ko(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function qo(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Jo(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qo(e,t);let i={src:li(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Yo(e,t){let n={src:li(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Xo(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Zo(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qo(e,t);let i={href:li(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Qo(e,t){let n={href:li(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $o(e,t,n){let r=e.all(t),i=n?es(n):ts(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
16
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
17
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function es(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=ts(n[r])}return t}function ts(e){return e.spread??e.children.length>1}function ns(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function rs(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function is(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function as(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function os(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Zn(t.children[1]),o=Xn(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function ss(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function cs(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var ls=9,us=32;function ds(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(fs(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(fs(t.slice(i),i>0,!1)),a.join(``)}function fs(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===ls||t===us;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===ls||t===us;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function ps(e,t){let n={type:`text`,value:ds(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ms(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var hs={blockquote:zo,break:Bo,code:Vo,delete:Ho,emphasis:Uo,footnoteReference:Wo,heading:Go,html:Ko,imageReference:Jo,image:Yo,inlineCode:Xo,linkReference:Zo,link:Qo,listItem:$o,list:ns,paragraph:rs,root:is,strong:as,table:os,tableCell:cs,tableRow:ss,text:ps,thematicBreak:ms,toml:gs,yaml:gs,definition:gs,footnoteDefinition:gs};function gs(){}var{defineProperty:_s}=Object,vs=typeof self==`object`?self:globalThis,ys=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new vs[e](t)},bs=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?_s(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof vs[e]==`function`?ys(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(ys(a,o),i)};return r},xs=e=>bs(new Map,e)(0),Ss=``,{toString:Cs}={},{keys:ws,is:Ts}=Object,Es=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Cs.call(e).slice(8,-1);switch(n){case`Array`:return[1,Ss];case`Object`:return[2,Ss];case`Date`:return[3,Ss];case`RegExp`:return[4,Ss];case`Map`:return[5,Ss];case`Set`:return[6,Ss];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Ds=([e,t])=>e===0&&(t===`function`||t===`symbol`),Os=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Es(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Ts(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of ws(o))(e||!Ds(Es(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Ss:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Ds(Es(n))||Ds(Es(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Ds(Es(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},ks=(e,{json:t,lossy:n}={})=>{let r=[];return Os(!(t||n),!!t,new Map,r)(e),r},As=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?xs(ks(e,t)):structuredClone(e):(e,t)=>xs(ks(e,t));function js(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Ms(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Ns(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||js,r=e.options.footnoteBackLabel||Ms,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=li(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...As(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
18
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
19
+ `}]}}var Ps=(function(e){if(e==null)return zs;if(typeof e==`function`)return Rs(e);if(typeof e==`object`)return Array.isArray(e)?Fs(e):Is(e);if(typeof e==`string`)return Ls(e);throw Error(`Expected function, string, or object as test`)});function Fs(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Ps(e[n]);return Rs(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Is(e){let t=e;return Rs(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Ls(e){return Rs(t);function t(t){return t&&t.type===e}}function Rs(e){return t;function t(t,n,r){return!!(Bs(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function zs(){return!0}function Bs(e){return typeof e==`object`&&!!e&&`type`in e}function Vs(e){return e}var Hs=[];function Us(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Ps(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Vs(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Hs,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Ws(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Ws(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Hs:[e]}function Gs(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Us(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Ks={}.hasOwnProperty,qs={};function Js(e,t){let n=t||qs,r=new Map,i=new Map,a={all:s,applyData:Xs,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...hs,...n.handlers},one:o,options:n,patch:Ys,wrap:Qs};return Gs(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Ks.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=As(n);return r.children=a.all(e),r}return As(e)}return(a.options.unknownHandler||Zs)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=$s(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=$s(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Ys(e,t){e.position&&(t.position=$n(e))}function Xs(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,As(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Zs(e,t){let n=t.data||{},r=`value`in t&&!(Ks.call(n,`hProperties`)||Ks.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Qs(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
20
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
21
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
22
+ `}),n}function $s(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ec(e,t){let n=Js(e,t),r=n.one(e,void 0),i=Ns(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
23
+ `},i)),a}function tc(e,t){return e&&`run`in e?async function(n,r){let i=ec(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ec(n,{file:r,...e||t})}}function nc(e){if(e)throw e}var rc=a(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function ic(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ac(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?oc(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function oc(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var sc={basename:cc,dirname:lc,extname:uc,join:dc,sep:`/`};function cc(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);mc(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function lc(e){if(mc(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function uc(e){mc(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function dc(...e){let t=-1,n;for(;++t<e.length;)mc(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:fc(n)}function fc(e){mc(e);let t=e.codePointAt(0)===47,n=pc(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function pc(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function mc(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var hc={cwd:gc};function gc(){return`/`}function _c(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function vc(e){if(typeof e==`string`)e=new URL(e);else if(!_c(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return yc(e)}function yc(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var bc=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],xc=class{constructor(e){let t;t=e?_c(e)?{path:e}:typeof e==`string`||Tc(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:hc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<bc.length;){let e=bc[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)bc.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?sc.basename(this.path):void 0}set basename(e){Cc(e,`basename`),Sc(e,`basename`),this.path=sc.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?sc.dirname(this.path):void 0}set dirname(e){wc(this.basename,`dirname`),this.path=sc.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?sc.extname(this.path):void 0}set extname(e){if(Sc(e,`extname`),wc(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=sc.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){_c(e)&&(e=vc(e)),Cc(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?sc.basename(this.path,this.extname):void 0}set stem(e){Cc(e,`stem`),Sc(e,`stem`),this.path=sc.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new ir(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Sc(e,t){if(e&&e.includes(sc.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+sc.sep+"`")}function Cc(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function wc(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Tc(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ec=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Dc=g(rc(),1),Oc={}.hasOwnProperty,kc=new class e extends Ec{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=ac()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Dc.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Mc(`data`,this.frozen),this.namespace[e]=t,this):Oc.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Mc(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Fc(e),n=this.parser||this.Parser;return Ac(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Ac(`process`,this.parser||this.Parser),jc(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Fc(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Lc(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Ac(`processSync`,this.parser||this.Parser),jc(`processSync`,this.compiler||this.Compiler),this.process(e,r),Pc(`processSync`,`process`,t),n;function r(e,r){t=!0,nc(e),n=r}}run(e,t,n){Nc(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Fc(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Pc(`runSync`,`run`,n),r;function i(e,t){nc(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Fc(t),r=this.compiler||this.Compiler;return jc(`stringify`,r),Nc(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Mc(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Dc.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];ic(o)&&ic(r)&&(r=(0,Dc.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Ac(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function jc(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Mc(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Nc(e){if(!ic(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Pc(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fc(e){return Ic(e)?e:new xc(e)}function Ic(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Lc(e){return typeof e==`string`||Rc(e)}function Rc(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var zc=[],Bc={allowDangerousHtml:!0},Vc=/^(https?|ircs?|mailto|xmpp)$/i,Hc=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Uc(e){let t=Wc(e),n=Gc(e);return Kc(t.runSync(t.parse(n),n),e)}function Wc(e){let t=e.rehypePlugins||zc,n=e.remarkPlugins||zc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Bc}:Bc;return kc().use(Ro).use(n).use(tc,r).use(t)}function Gc(e){let t=e.children||``,n=new xc;return typeof t==`string`?n.value=t:``+t,n}function Kc(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||qc;for(let e of Hc)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Gs(e,l),fr(e,{Fragment:F.Fragment,components:i,ignoreInvalidStyle:!0,jsx:F.jsx,jsxs:F.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Pr)if(Object.hasOwn(Pr,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Pr[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function qc(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Vc.test(e.slice(0,t))?e:``}function Jc(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Yc(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Xc(e,t,n){let r=Ps((n||{}).ignore||[]),i=Zc(t),a=-1;for(;++a<i.length;)Us(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Zc(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Qc(e[0]),$c(e[1])])}return t}function Qc(e){return typeof e==`string`?new RegExp(Yc(e),`g`):e}function $c(e){return typeof e==`function`?e:function(){return e}}var el=`phrasing`,tl=[`autolink`,`link`,`image`,`label`];function nl(){return{transforms:[ul],enter:{literalAutolink:il,literalAutolinkEmail:al,literalAutolinkHttp:al,literalAutolinkWww:al},exit:{literalAutolink:ll,literalAutolinkEmail:cl,literalAutolinkHttp:ol,literalAutolinkWww:sl}}}function rl(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:el,notInConstruct:tl},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:el,notInConstruct:tl},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:el,notInConstruct:tl}]}}function il(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function al(e){this.config.enter.autolinkProtocol.call(this,e)}function ol(e){this.config.exit.autolinkProtocol.call(this,e)}function sl(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function cl(e){this.config.exit.autolinkEmail.call(this,e)}function ll(e){this.exit(e)}function ul(e){Xc(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,dl],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,fl]],{ignore:[`link`,`linkReference`]})}function dl(e,t,n,r,i){let a=``;if(!hl(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!pl(n)))return!1;let o=ml(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function fl(e,t,n,r){return!hl(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function pl(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ml(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Jc(e,`(`),a=Jc(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function hl(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||si(n)||oi(n))&&(!t||n!==47)}Tl.peek=wl;function gl(){this.buffer()}function _l(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function vl(){this.buffer()}function yl(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function bl(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xl(e){this.exit(e)}function Sl(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Cl(e){this.exit(e)}function wl(){return`[`}function Tl(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function El(){return{enter:{gfmFootnoteCallString:gl,gfmFootnoteCall:_l,gfmFootnoteDefinitionLabelString:vl,gfmFootnoteDefinition:yl},exit:{gfmFootnoteCallString:bl,gfmFootnoteCall:xl,gfmFootnoteDefinitionLabelString:Sl,gfmFootnoteDefinition:Cl}}}function Dl(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Tl},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
24
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?kl:Ol))),s(),o}}function Ol(e,t,n){return t===0?e:kl(e,t,n)}function kl(e,t,n){return(n?``:` `)+e}var Al=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Fl.peek=Il;function jl(){return{canContainEols:[`delete`],enter:{strikethrough:Nl},exit:{strikethrough:Pl}}}function Ml(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Al}],handlers:{delete:Fl}}}function Nl(e){this.enter({type:`delete`,children:[]},e)}function Pl(e){this.exit(e)}function Fl(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Il(){return`~`}function Ll(e){return e.length}function Rl(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ll,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=zl(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Bl(r[d]);else{let e=Bl(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
25
+ `)}function zl(e){return e==null?``:String(e)}function Bl(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Vl={}.hasOwnProperty;function Hl(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Vl.call(t,e)){let n=String(t[e]);i=Vl.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function Ul(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Wl);return i(),o}function Wl(e,t,n){return`>`+(n?``:` `)+e}function Gl(e,t){return Kl(e,t.inConstruct,!0)&&!Kl(e,t.notInConstruct,!1)}function Kl(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ql(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
26
+ `&&Gl(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
27
+ `}function Jl(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Yl(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Xl(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Zl(e,t,n,r){let i=Xl(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Yl(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Ql);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Jl(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
28
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
29
+ `),a&&(u+=s.move(a+`
30
+ `)),u+=s.move(c),l(),u}function Ql(e,t,n){return(n?``:` `)+e}function $l(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function eu(e,t,n,r){let i=$l(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
31
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function tu(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function nu(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function ru(e,t,n){let r=vi(e),i=vi(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}iu.peek=au;function iu(e,t,n,r){let i=tu(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=ru(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=nu(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=ru(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+nu(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function au(e,t,n){return n.options.emphasis||`*`}function ou(e,t){let n=!1;return Gs(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Ir(e)&&(t.options.setext||n))}function su(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(ou(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
32
+ `,after:`
33
+ `});return r(),t(),o+`
34
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
35
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
36
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=nu(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}cu.peek=lu;function cu(e){return e.value||``}function lu(){return`<`}uu.peek=du;function uu(e,t,n,r){let i=$l(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function du(){return`!`}fu.peek=pu;function fu(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function pu(){return`!`}mu.peek=hu;function mu(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function hu(){return"`"}function gu(e,t){let n=Ir(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][a-z+.-]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}_u.peek=vu;function _u(e,t,n,r){let i=$l(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(gu(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function vu(e,t,n){return gu(e,n)?`<`:`[`}yu.peek=bu;function yu(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function bu(){return`[`}function xu(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Su(e){let t=xu(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Cu(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function wu(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Tu(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Cu(n):xu(n),s=e.ordered?o===`.`?`)`:`.`:Su(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),wu(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Eu(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Du(e,t,n,r){let i=Eu(n),a=n.bulletCurrent||xu(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Ou(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var ku=Ps([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Au(e,t,n,r){return(e.children.some(function(e){return ku(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ju(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Mu.peek=Nu;function Mu(e,t,n,r){let i=ju(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=ru(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=nu(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=ru(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+nu(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Nu(e,t,n){return n.options.strong||`*`}function Pu(e,t,n,r){return n.safe(e.value,r)}function Fu(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Iu(e,t,n){let r=(wu(n)+(n.options.ruleSpaces?` `:``)).repeat(Fu(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Lu={blockquote:Ul,break:ql,code:Zl,definition:eu,emphasis:iu,hardBreak:ql,heading:su,html:cu,image:uu,imageReference:fu,inlineCode:mu,link:_u,linkReference:yu,list:Tu,listItem:Du,paragraph:Ou,root:Au,strong:Mu,text:Pu,thematicBreak:Iu};function Ru(){return{enter:{table:zu,tableData:Uu,tableHeader:Uu,tableRow:Vu},exit:{codeText:Wu,table:Bu,tableData:Hu,tableHeader:Hu,tableRow:Hu}}}function zu(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Bu(e){this.exit(e),this.data.inTable=void 0}function Vu(e){this.enter({type:`tableRow`,children:[]},e)}function Hu(e){this.exit(e)}function Uu(e){this.enter({type:`tableCell`,children:[]},e)}function Wu(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Gu));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Gu(e,t){return t===`|`?t:e}function Ku(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
37
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
38
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Rl(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Lu.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function qu(){return{exit:{taskListCheckValueChecked:Yu,taskListCheckValueUnchecked:Yu,paragraph:Xu}}}function Ju(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Zu}}}function Yu(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Xu(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Zu(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Lu.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Qu(){return[nl(),El(),jl(),Ru(),qu()]}function $u(e){return{extensions:[rl(),Dl(e),Ml(),Ku(e),Ju()]}}var ed={tokenize:md,partial:!0},td={tokenize:hd,partial:!0},nd={tokenize:gd,partial:!0},rd={tokenize:_d,partial:!0},id={tokenize:vd,partial:!0},ad={name:`wwwAutolink`,tokenize:fd,previous:yd},od={name:`protocolAutolink`,tokenize:pd,previous:bd},sd={name:`emailAutolink`,tokenize:dd,previous:xd},cd={};function ld(){return{text:cd}}for(var ud=48;ud<123;)cd[ud]=sd,ud++,ud===58?ud=65:ud===91&&(ud=97);cd[43]=sd,cd[45]=sd,cd[46]=sd,cd[95]=sd,cd[72]=[sd,od],cd[104]=[sd,od],cd[87]=[sd,ad],cd[119]=[sd,ad];function dd(e,t,n){let r=this,i,a;return o;function o(t){return!Sd(t)||!xd.call(r,r.previous)||Cd(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Sd(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(id,u,l)(t):t===45||t===95||Zr(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Xr(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function fd(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!yd.call(r,r.previous)||Cd(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ed,e.attempt(td,e.attempt(nd,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function pd(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&bd.call(r,r.previous)&&!Cd(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Xr(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||$r(t)||ii(t)||si(t)||oi(t)?n(t):e.attempt(td,e.attempt(nd,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function md(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function hd(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(rd,c,s)(t):t===null||ii(t)||si(t)||t!==45&&oi(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function gd(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(rd,t,a)(o):o===null||ii(o)||si(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function _d(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||ii(o)||si(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||ii(e)||si(e)?t(e):r(e)}function a(e){return Xr(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Xr(t)?(e.consume(t),o):n(t)}}function vd(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Zr(e)?n(e):t(e)}}function yd(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ii(e)}function bd(e){return!Xr(e)}function xd(e){return!(e===47||Sd(e))}function Sd(e){return e===43||e===45||e===46||e===95||Zr(e)}function Cd(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var wd={tokenize:Md,partial:!0};function Td(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:kd,continuation:{tokenize:Ad},exit:jd}},text:{91:{name:`gfmFootnoteCall`,tokenize:Od},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Ed,resolveTo:Dd}}}}function Ed(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Yr(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Dd(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Od(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||ii(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Yr(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return ii(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function kd(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||ii(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Yr(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return ii(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),ui(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Ad(e,t,n){return e.check(Ei,t,e.attempt(wd,t,n))}function jd(e){e.exit(`gfmFootnoteDefinition`)}function Md(e,t,n){let r=this;return ui(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Nd(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Hr(o,o.length,0,yi(s,e.slice(r+1,n),t)),Hr(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Hr(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=vi(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=vi(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Pd=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Fd(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Fd(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Id(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Ld(){return{flow:{null:{name:`table`,tokenize:Rd,resolveAll:zd}}}}function Rd(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):ri(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):ai(t)?ui(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||ii(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,ai(t)?ui(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return ai(t)?ui(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||ri(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return ai(t)?ui(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||ri(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||ri(n)?(e.exit(`tableRow`),t(n)):ai(n)?ui(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||ii(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function zd(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Pd;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Vd(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Bd(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Bd(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Bd(f,t,o,i,n,d)):(o[0]=o[1],d=Bd(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Vd(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Id(t.events,n))}return e}function Bd(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Hd(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Hd(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Hd(t.events,n[2]),a=Hd(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Hd(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Vd(e,t,n,r,i){let a=[],o=Hd(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Hd(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Ud={name:`tasklistCheck`,tokenize:Gd};function Wd(){return{text:{91:Ud}}}function Gd(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return ii(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return ri(r)?t(r):ai(r)?e.check({tokenize:Kd},t,n)(r):n(r)}}function Kd(e,t,n){return ui(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function qd(e){return Gr([ld(),Td(),Nd(e),Ld(),Wd()])}var Jd={};function Yd(e){let t=this,n=e||Jd,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(qd(n)),a.push(Qu()),o.push($u(n))}var Xd=(0,P.createContext)({});function Zd({children:e,openExternalLink:t,openFile:n,fileImages:r}){let i=(0,P.useMemo)(()=>({openExternalLink:t,openFile:n,fileImages:r}),[t,n,r]);return(0,F.jsx)(Xd.Provider,{value:i,children:e})}function Qd(){return(0,P.useContext)(Xd)}function $d(e){let t=e.indexOf(`#`),n=t<0?e:e.slice(0,t);if(n.includes(`?`))return;let r;try{r=decodeURIComponent(n)}catch{return}if(r.length===0||/[\u0000-\u001f\u007f]/.test(r)||/^[\\/]{2}/.test(r)||/^[a-z][a-z\d+.-]*:/i.test(r)&&!/^[a-z]:[\\/]/i.test(r))return;if(t<0)return{path:r};let i=e.slice(t+1),a=/^L([1-9]\d*)(?:-L([1-9]\d*))?$/.exec(i);if(a===null)return;let o=Number(a[1]),s=a[2]===void 0?o:Number(a[2]);if(!(!Number.isSafeInteger(o)||!Number.isSafeInteger(s)||s<o))return{path:r,line:o}}async function ef(e){if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}let t=typeof document.execCommand==`function`?document.execCommand.bind(document):void 0;if(t===void 0)return!1;let n=document.activeElement instanceof HTMLElement?document.activeElement:null,r=document.createElement(`textarea`);r.value=e,r.setAttribute(`readonly`,``),r.style.position=`fixed`,r.style.left=`-9999px`,document.body.appendChild(r),r.select();try{return t(`copy`)}catch{return!1}finally{r.remove(),n?.focus({preventScroll:!0})}}function tf({children:e}){let t=(0,P.useRef)(null),[n,i]=(0,P.useState)(!1);return(0,F.jsxs)(`div`,{className:`pi-code-block`,children:[(0,F.jsx)(`div`,{className:`pi-code-toolbar`,children:(0,F.jsx)(`button`,{type:`button`,onClick:async()=>{let e=await ef(t.current?.textContent??``);i(e),e&&window.setTimeout(()=>i(!1),1800)},children:n?r(`已复制`,`Copied`):r(`复制代码`,`Copy code`)})}),(0,F.jsx)(`pre`,{ref:t,children:e})]})}function nf({text:e}){let{openFile:t}=Qd();return(0,F.jsx)(`div`,{className:`pi-markdown`,children:(0,F.jsx)(Uc,{remarkPlugins:[Yd],components:{pre:({children:e})=>(0,F.jsx)(tf,{children:e}),a:({href:e,children:n})=>{let r=e?$d(e):void 0,i=r!==void 0&&t!==void 0;return(0,F.jsx)(`a`,{href:e,target:i||e?.startsWith(`#`)?void 0:`_blank`,rel:`noopener noreferrer`,onClick:i?e=>{e.preventDefault(),t(r.path,r.line===void 0?void 0:{line:r.line})}:void 0,children:n})}},children:e})})}var rf={root:`_root_rf6yg_9`,row:`_row_rf6yg_16`,leading:`_leading_rf6yg_29`,iconIdle:`_iconIdle_rf6yg_57`,chevronHover:`_chevronHover_rf6yg_63`,title:`_title_rf6yg_79`};function af({icon:e,title:t,open:n,onToggle:r,collapsedContent:i,children:a,rowClassName:o,leadingClassName:s,titleClassName:c,chevronClassName:l}){return(0,F.jsxs)(`div`,{className:rf.root,"data-open":n||void 0,children:[(0,F.jsxs)(`div`,{className:`${rf.row} ${o??``}`,"data-disclosure-row":!0,"data-expandable":!0,role:`button`,tabIndex:0,"aria-expanded":n,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},children:[(0,F.jsx)(`span`,{className:`${rf.leading} ${s??``}`,children:n?(0,F.jsx)(ct,{className:l}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:rf.iconIdle,children:e}),(0,F.jsx)(ct,{className:`${rf.chevronHover} ${l??``}`})]})}),(0,F.jsx)(`span`,{className:`${rf.title} ${c??``}`,children:t}),!n&&i]}),n&&a]})}var of={root:`_root_b8edg_1`,row:`_row_b8edg_11`,"piw-reasoning-row-sweep":`_piw-reasoning-row-sweep_b8edg_1`,leading:`_leading_b8edg_37`,chevron:`_chevron_b8edg_41`,title:`_title_b8edg_45`,separator:`_separator_b8edg_49`,summary:`_summary_b8edg_61`,summaryText:`_summaryText_b8edg_71`,thinkBody:`_thinkBody_b8edg_91`};function sf({text:e,running:t}){let[n,i]=(0,P.useState)(!1),a=e.trimEnd(),o=(t?a.slice(a.lastIndexOf(`
39
+ `)+1):e.split(`
40
+ `,1)[0]).replaceAll(`**`,``);return(0,F.jsx)(`div`,{className:of.root,"data-variant":`think`,"data-state":t?`running`:`ok`,"data-expanded":n||void 0,children:(0,F.jsx)(af,{icon:(0,F.jsx)(mt,{size:14}),title:r(`思考`,`Thinking`),open:n,onToggle:()=>i(e=>!e),rowClassName:of.row,leadingClassName:of.leading,titleClassName:of.title,chevronClassName:of.chevron,collapsedContent:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:of.separator,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:of.summary,"data-follow-end":t||void 0,children:(0,F.jsx)(`span`,{className:of.summaryText,children:o})})]}),children:(0,F.jsx)(`div`,{className:of.thinkBody,children:e})})})}function cf(e){let t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=t%60;return n>0?`${n}d ${r}h ${i}m ${a}s`:r>0?`${r}h ${i}m ${a}s`:i>0?`${i}m ${a}s`:`${a}s`}var lf={root:`_root_1tps1_1`,icon:`_icon_1tps1_12`,"agent-activity-spin":`_agent-activity-spin_1tps1_1`,copy:`_copy_1tps1_19`};function uf({state:e,elapsedSeconds:t}){return(0,F.jsxs)(`div`,{className:lf.root,"data-agent-activity":e,children:[(0,F.jsx)(`span`,{className:lf.icon,"aria-hidden":`true`,children:(0,F.jsx)(gt,{})}),(0,F.jsxs)(`span`,{className:`${en.turnStatus} ${lf.copy}`,children:[(0,F.jsx)(`span`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:e===`sending`?r(`正在发送`,`Sending`):r(`正在处理`,`Working`)}),(0,F.jsx)(`span`,{"data-agent-elapsed":t,"aria-hidden":`true`,children:` · ${cf(t)}`})]})]})}function df(e,t,n,r){return!!e&&n===`connected`&&!e.interactions?.length&&!t?.error&&(r||!e.idle)}function ff(e,t,n,r){return!df(e,t,n,r)||t?.blocks.some(e=>e.kind===`toolCall`||e.text.trim())?null:r?`sending`:`working`}function pf(e,t){let[n,r]=(0,P.useState)(null);return(0,P.useEffect)(()=>{if(!e){r(null);return}let n=performance.now();r({sessionId:t,seconds:0});let i=window.setInterval(()=>{r({sessionId:t,seconds:Math.max(0,Math.floor((performance.now()-n)/1e3))})},1e3);return()=>window.clearInterval(i)},[e,t]),e&&n&&n.sessionId===t?n.seconds:0}var mf=g(a(((e,t)=>{var n=[[{color:`0, 0, 0`,class:`ansi-black`},{color:`187, 0, 0`,class:`ansi-red`},{color:`0, 187, 0`,class:`ansi-green`},{color:`187, 187, 0`,class:`ansi-yellow`},{color:`0, 0, 187`,class:`ansi-blue`},{color:`187, 0, 187`,class:`ansi-magenta`},{color:`0, 187, 187`,class:`ansi-cyan`},{color:`255,255,255`,class:`ansi-white`}],[{color:`85, 85, 85`,class:`ansi-bright-black`},{color:`255, 85, 85`,class:`ansi-bright-red`},{color:`0, 255, 0`,class:`ansi-bright-green`},{color:`255, 255, 85`,class:`ansi-bright-yellow`},{color:`85, 85, 255`,class:`ansi-bright-blue`},{color:`255, 85, 255`,class:`ansi-bright-magenta`},{color:`85, 255, 255`,class:`ansi-bright-cyan`},{color:`255, 255, 255`,class:`ansi-bright-white`}]],r=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm;t.exports=class e{static escapeForHtml(t){return new e().escapeForHtml(t)}static linkify(t){return new e().linkify(t)}static ansiToHtml(t,n){return new e().ansiToHtml(t,n)}static ansiToJson(t,n){return new e().ansiToJson(t,n)}static ansiToText(t){return new e().ansiToText(t)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let e=0;e<2;++e)for(let t=0;t<8;++t)this.PALETTE_COLORS.push(n[e][t].color);let e=[0,95,135,175,215,255],t=(t,n,r)=>e[t]+`, `+e[n]+`, `+e[r];for(let e=0;e<6;++e)for(let n=0;n<6;++n)for(let r=0;r<6;++r)this.PALETTE_COLORS.push(t(e,n,r));let r=8;for(let e=0;e<24;++e,r+=10)this.PALETTE_COLORS.push(r+`, `+r+`, `+r)}escapeForHtml(e){return e.replace(/[&<>\"]/gm,e=>e==`&`?`&amp;`:e==`"`?`&quot;`:e==`<`?`&lt;`:e==`>`?`&gt;`:``)}linkify(e){return e.replace(r,e=>`<a href="${e}">${e}</a>`)}ansiToHtml(e,t){return this.process(e,t,!0)}ansiToJson(e,t){return t||={},t.json=!0,t.clearLine=!1,this.process(e,t,!0)}ansiToText(e){return this.process(e,{},!1)}process(e,t,n){let r=this,i=e.split(/\033\[/),a=i.shift();t??={},t.clearLine=/\r/.test(e);let o=i.map(e=>this.processChunk(e,t,n));if(t&&t.json){let e=r.processChunkJson(``);return e.content=a,e.clearLine=t.clearLine,o.unshift(e),t.remove_empty&&(o=o.filter(e=>!e.isEmpty())),o}return o.unshift(a),o.join(``)}processChunkJson(e,t,r){t=t===void 0?{}:t;let i=t.use_classes=t.use_classes!==void 0&&t.use_classes,a=t.key=i?`class`:`color`,o={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:t.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!o.content},s=e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!s)return o;o.content=s[4];let c=s[2].split(`;`);if(s[1]!==``||s[3]!==`m`||!r)return o;let l=this;for(;c.length>0;){let e=c.shift(),t=parseInt(e);if(isNaN(t)||t===0)l.fg=l.bg=null,l.decorations=[];else if(t===1)l.decorations.push(`bold`);else if(t===2)l.decorations.push(`dim`);else if(t===3)l.decorations.push(`italic`);else if(t===4)l.decorations.push(`underline`);else if(t===5)l.decorations.push(`blink`);else if(t===7)l.decorations.push(`reverse`);else if(t===8)l.decorations.push(`hidden`);else if(t===9)l.decorations.push(`strikethrough`);else if(t===21)l.removeDecoration(`bold`);else if(t===22)l.removeDecoration(`bold`),l.removeDecoration(`dim`);else if(t===23)l.removeDecoration(`italic`);else if(t===24)l.removeDecoration(`underline`);else if(t===25)l.removeDecoration(`blink`);else if(t===27)l.removeDecoration(`reverse`);else if(t===28)l.removeDecoration(`hidden`);else if(t===29)l.removeDecoration(`strikethrough`);else if(t===39)l.fg=null;else if(t===49)l.bg=null;else if(t>=30&&t<38)l.fg=n[0][t%10][a];else if(t>=90&&t<98)l.fg=n[1][t%10][a];else if(t>=40&&t<48)l.bg=n[0][t%10][a];else if(t>=100&&t<108)l.bg=n[1][t%10][a];else if(t===38||t===48){let e=t===38;if(c.length>=1){let t=c.shift();if(t===`5`&&c.length>=1){let t=parseInt(c.shift());if(t>=0&&t<=255){if(!i)this.PALETTE_COLORS||l.setupPalette(),e?l.fg=this.PALETTE_COLORS[t]:l.bg=this.PALETTE_COLORS[t];else{let r=t>=16?`ansi-palette-`+t:n[+(t>7)][t%8].class;e?l.fg=r:l.bg=r}}}else if(t===`2`&&c.length>=3){let t=parseInt(c.shift()),n=parseInt(c.shift()),r=parseInt(c.shift());if(t>=0&&t<=255&&n>=0&&n<=255&&r>=0&&r<=255){let a=t+`, `+n+`, `+r;i?e?(l.fg=`ansi-truecolor`,l.fg_truecolor=a):(l.bg=`ansi-truecolor`,l.bg_truecolor=a):e?l.fg=a:l.bg=a}}}}}return l.fg===null&&l.bg===null&&l.decorations.length===0||(o.fg=l.fg,o.bg=l.bg,o.fg_truecolor=l.fg_truecolor,o.bg_truecolor=l.bg_truecolor,o.decorations=l.decorations,o.decoration=l.decorations.slice(-1).pop()||null,o.was_processed=!0),o}processChunk(e,t,r){t||={};let i=this.processChunkJson(e,t,r),a=t.use_classes;if(i.decorations=i.decorations.filter(e=>{if(e===`reverse`){i.fg||=n[0][7][a?`class`:`color`],i.bg||=n[0][0][a?`class`:`color`];let e=i.fg;i.fg=i.bg,i.bg=e;let t=i.fg_truecolor;return i.fg_truecolor=i.bg_truecolor,i.bg_truecolor=t,i.isInverted=!0,!1}return!0}),t.json)return i;if(i.isEmpty())return``;if(!i.was_processed)return i.content;let o=[],s=[],c=[],l={},u=e=>{let t=[],n;for(n in e)e.hasOwnProperty(n)&&t.push(`data-`+n+`="`+this.escapeForHtml(e[n])+`"`);return t.length>0?` `+t.join(` `):``};return i.isInverted&&(l[`ansi-is-inverted`]=`true`),i.fg&&(a?(o.push(i.fg+`-fg`),i.fg_truecolor!==null&&(l[`ansi-truecolor-fg`]=i.fg_truecolor,i.fg_truecolor=null)):o.push(`color:rgb(`+i.fg+`)`)),i.bg&&(a?(o.push(i.bg+`-bg`),i.bg_truecolor!==null&&(l[`ansi-truecolor-bg`]=i.bg_truecolor,i.bg_truecolor=null)):o.push(`background-color:rgb(`+i.bg+`)`)),i.decorations.forEach(e=>{a?s.push(`ansi-`+e):e===`bold`?s.push(`font-weight:bold`):e===`dim`?s.push(`opacity:0.5`):e===`italic`?s.push(`font-style:italic`):e===`hidden`?s.push(`visibility:hidden`):e===`strikethrough`?c.push(`line-through`):c.push(e)}),c.length&&s.push(`text-decoration:`+c.join(` `)),a?`<span class="`+o.concat(s).join(` `)+`"`+u(l)+`>`+i.content+`</span>`:`<span style="`+o.concat(s).join(`;`)+`"`+u(l)+`>`+i.content+`</span>`}removeDecoration(e){let t=this.decorations.indexOf(e);t>=0&&this.decorations.splice(t,1)}}}))(),1),hf={"0,0,0":`var(--dsw-alias-label-primary)`,"255,255,255":`var(--dsw-alias-label-primary)`,"85,85,85":`var(--dsw-alias-label-tertiary)`,"187,0,0":`var(--dsw-alias-state-error-primary)`,"255,85,85":`var(--dsw-alias-state-error-secondary)`,"0,187,0":`var(--dsw-alias-state-success-primary)`,"0,255,0":`var(--dsw-alias-state-success-secondary)`,"187,187,0":`var(--dsw-alias-state-warn-primary)`,"255,255,85":`var(--dsw-alias-state-warn-secondary)`,"0,0,187":`var(--dsw-alias-state-business-primary)`,"85,85,255":`var(--dsw-static-blue-400)`},gf={bold:{fontWeight:700},dim:{opacity:.7},italic:{fontStyle:`italic`},underline:{textDecoration:`underline`},strikethrough:{textDecoration:`line-through`},hidden:{visibility:`hidden`}},_f=/\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)?/g,vf=/\u001b(?!\[)[\u0020-\u002f]*[\u0030-\u007e]?/g,yf=/[\u0000-\u0007\u000b-\u001a\u001c-\u001f\u007f]/g,bf=/\r|\u0008|\u001b\[[\u0030-\u003f]*[\u0020-\u002f]*K/,xf=/\u001b\[([\u0030-\u003f]*)[\u0020-\u002f]*m/g,Sf=8,Cf=/^[\p{Mn}\p{Me}\p{Cf}\u200b-\u200f\u2060]$/u,wf=RegExp(`\\p{Script=Han}|\\p{Script=Hiragana}|\\p{Script=Katakana}|\\p{Script=Hangul}|\\p{Emoji_Presentation}|[\\uff01-\\uff60\\u3000-\\u303e]`,`u`);function Tf(e){let t=e.codePointAt(0);return t===void 0||t<4352?!1:wf.test(e)}var Ef={fg:``,bg:``,attrs:[]},Df={22:[`1`,`2`],23:[`3`],24:[`4`],25:[`5`,`6`],27:[`7`],28:[`8`],29:[`9`]};function Of(e,t){let n=t===``?[`0`]:t.split(`;`),r=e;for(let e=0;e<n.length;e++){let t=String(n[e]);if(t===``||t===`0`){r=Ef;continue}if(t===`38`||t===`48`){let i=n[e+1]??``,a=i===`2`?4:i===`5`?2:0,o=n.slice(e,e+a+1).join(`;`);r=t===`38`?{...r,fg:o}:{...r,bg:o},e+=a;continue}let i=Df[t];if(i!==void 0){r={...r,attrs:r.attrs.filter(e=>!i.includes(e))};continue}let a=Number(t);t===`39`?r={...r,fg:``}:t===`49`?r={...r,bg:``}:a>=30&&a<=37||a>=90&&a<=97?r={...r,fg:t}:a>=40&&a<=47||a>=100&&a<=107?r={...r,bg:t}:r.attrs.includes(t)||(r={...r,attrs:[...r.attrs,t]})}return r}function kf(e){let t=[...e.attrs];return e.fg!==``&&t.push(e.fg),e.bg!==``&&t.push(e.bg),t.length===0?``:`\u001b[${t.join(`;`)}m`}function Af(e,t){return e.fg===t.fg&&e.bg===t.bg&&e.attrs.length===t.attrs.length&&e.attrs.every((e,n)=>e===t.attrs[n])}function jf(e,t){let n=/\u001b\[([\u0030-\u003f]*)[\u0020-\u002f]*([\u0040-\u007e])/g,r=[],i=0,a=t,o=0,s=(e,t)=>{let n=r[e];n?.spacer===!0&&e>0?r[e-1]={sgr:a,char:t}:n!==void 0&&Tf(n.char)&&r[e+1]?.spacer===!0&&(r[e+1]={sgr:a,char:t}),r[e]={sgr:a,char:t}},c=e=>{for(let t of e)if(t===`\r`)i=0;else if(t===`\b`)i=Math.max(0,i-1);else if(t===` `){let e=i+Sf-i%Sf;for(;i<e;i++)r[i]??={sgr:a,char:` `}}else if(Cf.test(t)){let e=i>0?r[i-1]:void 0;e!==void 0&&(r[i-1]={sgr:e.sgr,char:e.char+t})}else s(i,` `),r[i]={sgr:a,char:t},i++,Tf(t)&&(r[i]={sgr:a,char:``,spacer:!0},i++)};for(let t of e.matchAll(n)){c(e.slice(o,t.index)),o=t.index+t[0].length;let n=String(t[1]),l=String(t[2]);if(l===`K`){let e=String(n.split(`;`)[0]);if(e===`1`)for(let e=0;e<=i;e++)s(e,` `);else r.length=e===`2`?0:i}else l===`m`&&(a=Of(a,n))}c(e.slice(o));let l=``,u=t;for(let e=0;e<r.length;e++){let t=r[e]??{sgr:Ef,char:` `};Af(t.sgr,u)||(Af(u,Ef)||(l+=`\x1B[0m`),l+=kf(t.sgr),u=t.sgr);let n=e>0&&Tf(r[e-1]?.char??``);l+=t.spacer===!0&&!n?` `:t.char}return Af(u,a)||(Af(u,Ef)||(l+=`\x1B[0m`),l+=kf(a)),{text:l,sgr:a}}function Mf(e){let t=[],n=Ef;for(let r of e.split(`
41
+ `)){let e=r.replace(/\r+$/,``);if(bf.test(e)){let r=jf(e,n);t.push(r.text),n=r.sgr}else{t.push(e);for(let t of e.matchAll(xf))n=Of(n,String(t[1]))}}return t.join(`
42
+ `)}function Nf(e){return Mf(e.replace(_f,``).replace(vf,``)).replace(yf,``)}function Pf(e){let t={},n=e.bg===null?void 0:`rgb(${e.bg})`;if(n!==void 0&&(t.backgroundColor=n),e.fg!==null){let r=`rgb(${e.fg})`;t.color=n===void 0?hf[e.fg.replace(/\s+/g,``)]??r:r}for(let n of e.decorations)Object.assign(t,gf[n]);return Object.keys(t).length===0?void 0:t}function Ff(e){let t=[],n=[t];for(let r of mf.default.ansiToJson(Nf(e),{json:!0,remove_empty:!0})){let e=Pf(r);for(let[i,a]of r.content.split(`
43
+ `).entries())i>0&&(t=[],n.push(t)),a!==``&&t.push({text:a,style:e})}return n}function If(e,t,n){let r=e-t,i=Math.ceil(t/2);return{hidden:r,capped:r>0&&!n,headLines:i,tailLines:t-i}}var Lf=1e3;function Rf(e){let[t,n]=(0,P.useState)(!1);return{copied:t,onCopy:(0,P.useCallback)(()=>{t||ef(e).then(e=>{e&&(n(!0),window.setTimeout(()=>{n(!1)},Lf))})},[t,e])}}var zf={pill:`_pill_e3ygd_1`,interactive:`_interactive_e3ygd_15`,active:`_active_e3ygd_23`};function Bf({active:e=!1,className:t,children:r,onClick:i,...a}){return i?(0,F.jsx)(`button`,{type:`button`,className:n(zf.pill,zf.interactive,e&&zf.active,t),onClick:i,...a,children:r}):(0,F.jsx)(`span`,{className:n(zf.pill,e&&zf.active,t),children:r})}var Vf={block:`_block_1gdtu_1`,header:`_header_1gdtu_32`,prompt:`_prompt_1gdtu_70`,promptLine:`_promptLine_1gdtu_78`,runState:`_runState_1gdtu_91`,runStateLabel:`_runStateLabel_1gdtu_99`,cwd:`_cwd_1gdtu_108`,command:`_command_1gdtu_116`,status:`_status_1gdtu_128`,copyButton:`_copyButton_1gdtu_136`,output:`_output_1gdtu_156`,line:`_line_1gdtu_180`,expand:`_expand_1gdtu_185`,empty:`_empty_1gdtu_201`};function Hf(e,t){let n=e.replace(/[/\\]+$/,``);if(t!==void 0&&n===t.replace(/[/\\]+$/,``))return`~`;let r=n.split(/[/\\]/).pop();return r===void 0||r===``?e:r}function Uf(e,t,n){if(t!==void 0)return n.signal(t);if(e!==void 0&&e!==0)return n.exitCode(e)}function Wf(e,t,n,r){return e?{state:`ongoing`,label:r.running}:Uf(t,n,r)===void 0?{state:`done`,label:r.done}:{state:`error`,label:r.failed}}function Gf(e){return e.map((e,t)=>e.style===void 0?e.text:(0,F.jsx)(`span`,{style:e.style,children:e.text},t))}function Kf({command:e,cwd:t,home:r,output:i,exitCode:a,signal:o,running:s=!1,maxLines:c=16,className:l,labels:u}){let d=u,f=i??``,p=(0,P.useMemo)(()=>{let e=Ff(f),t=e[e.length-1];return e.length>1&&t!==void 0&&t.every(e=>e.text===``)?e.slice(0,-1):e},[f]),[m,h]=(0,P.useState)(!1),{copied:g,onCopy:_}=Rf(f),v=(0,P.useCallback)(()=>{h(e=>!e)},[]),y=Uf(a,o,d),b=Wf(s,a,o,d),x=(0,P.useMemo)(()=>(e.endsWith(`
44
+ `)?e.slice(0,-1):e).split(`
45
+ `),[e]),S=p.every(e=>e.every(e=>e.text.trim()===``)),{hidden:C,capped:w,headLines:T,tailLines:E}=If(p.length,c,m);return(0,F.jsxs)(`div`,{className:n(Vf.block,l),"data-terminal":``,"data-running":s?``:void 0,children:[(0,F.jsxs)(`div`,{className:Vf.header,children:[(0,F.jsxs)(`div`,{className:Vf.prompt,children:[(0,F.jsx)(`span`,{className:Vf.runStateLabel,children:b.label}),x.map((e,n)=>(0,F.jsxs)(`div`,{className:Vf.promptLine,children:[n===0&&(0,F.jsx)($e,{state:b.state,className:Vf.runState}),(0,F.jsx)(`span`,{className:Vf.cwd,children:n>0||t===void 0?`$`:Hf(t,r)}),(0,F.jsx)(`span`,{className:Vf.command,children:e})]},n))]}),y!==void 0&&(0,F.jsx)(Bf,{className:Vf.status,children:y}),!s&&!S&&(0,F.jsx)(`button`,{type:`button`,className:Vf.copyButton,onClick:_,children:g?d.copied:d.copy})]}),!s&&(S?(0,F.jsx)(`div`,{className:Vf.empty,children:d.noOutput}):(0,F.jsxs)(`div`,{className:Vf.output,children:[(w?p.slice(0,T):p).map((e,t)=>(0,F.jsx)(`div`,{className:Vf.line,children:Gf(e)},t)),C>0&&(0,F.jsx)(`button`,{type:`button`,className:Vf.expand,"aria-expanded":m,"aria-label":m?d.collapseAria:d.expandAria(C),onClick:v,children:m?d.collapse:d.expand(C)}),w&&p.slice(p.length-E).map((e,t)=>(0,F.jsx)(`div`,{className:Vf.line,children:Gf(e)},t))]}))]})}var qf={root:`_root_1xitv_9`,row:`_row_1xitv_14`,"piw-tool-row-sweep":`_piw-tool-row-sweep_1xitv_1`,leading:`_leading_1xitv_45`,title:`_title_1xitv_52`,sep:`_sep_1xitv_60`,chevron:`_chevron_1xitv_64`,summary:`_summary_1xitv_81`,summarySuffix:`_summarySuffix_1xitv_97`,diffStat:`_diffStat_1xitv_113`,fileLink:`_fileLink_1xitv_126`,errorSummary:`_errorSummary_1xitv_154`,bodyWrap:`_bodyWrap_1xitv_159`,inspectButton:`_inspectButton_1xitv_168`,bodyScroll:`_bodyScroll_1xitv_203`,ioCard:`_ioCard_1xitv_212`,ioSection:`_ioSection_1xitv_224`,ioLabel:`_ioLabel_1xitv_253`,ioDivider:`_ioDivider_1xitv_262`,ioText:`_ioText_1xitv_268`,codeBody:`_codeBody_1xitv_288`,terminalBody:`_terminalBody_1xitv_289`,diffBody:`_diffBody_1xitv_290`,readBody:`_readBody_1xitv_291`,imageBody:`_imageBody_1xitv_292`,searchBody:`_searchBody_1xitv_293`,webBody:`_webBody_1xitv_294`,searchRecovery:`_searchRecovery_1xitv_301`,imageLabel:`_imageLabel_1xitv_312`,imageMeta:`_imageMeta_1xitv_324`,visuallyHidden:`_visuallyHidden_1xitv_350`},Jf={root:`_root_1ulqw_1`,chevron:`_chevron_1ulqw_21`,label:`_label_1ulqw_35`},Yf={root:`_root_xlier_4`,trigger:`_trigger_xlier_19`,label:`_label_xlier_39`},Xf={panel:`_panel_105wx_10`,title:`_title_105wx_35`,titleRule:`_titleRule_105wx_45`,titleValue:`_titleValue_105wx_50`,titleLabel:`_titleLabel_105wx_55`,details:`_details_105wx_68`,route:`_route_105wx_88`,reasoning:`_reasoning_105wx_92`},Zf={actions:`_actions_qoqwk_5`,timeStart:`_timeStart_qoqwk_15`,timeEnd:`_timeEnd_qoqwk_26`,action:`_action_qoqwk_5`,visuallyHidden:`_visuallyHidden_qoqwk_94`};function Qf(e){try{let t=JSON.parse(e.text),n=t.command??t.file_path??t.path??t.url??t.query??t.pattern;if(typeof n==`string`)return n}catch{}return e.text}function $f({block:e,result:t,running:n,onInspect:i,cwd:a}){let[o,s]=(0,P.useState)(!1),c=t?.blocks.map(e=>e.text).join(`
46
+ `)??null,l=t?.isError?`error`:t?`ok`:n?`running`:`pending`,u=e.toolName===`bash`||e.toolName===`pwsh`,d={bash:`Bash`,pwsh:`PowerShell`,read:r(`读取`,`Read`),write:r(`写入`,`Write`),edit:r(`编辑`,`Edit`),grep:r(`搜索`,`Search`),glob:r(`搜索`,`Search`)}[e.toolName||``]||e.toolName||r(`工具调用`,`Tool call`),f=Qf(e);return(0,F.jsx)(`div`,{className:qf.root,"data-state":l,"data-tool":e.toolName,children:(0,F.jsx)(af,{icon:(0,F.jsx)(vt,{size:14}),title:d,open:o,onToggle:()=>s(e=>!e),rowClassName:qf.row,leadingClassName:qf.leading,titleClassName:qf.title,chevronClassName:qf.chevron,collapsedContent:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:qf.sep,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`${qf.summary} ${l===`error`?qf.errorSummary:``}`,children:l===`error`?c?.split(`
47
+ `,1)[0]:f})]}),children:(0,F.jsxs)(`div`,{className:qf.bodyWrap,children:[u?(0,F.jsx)(Kf,{command:f,cwd:a,output:c??void 0,running:c===null,exitCode:t?.isError?1:t?0:void 0,maxLines:1/0,className:qf.terminalBody,labels:{signal:e=>r(`信号 ${e}`,`Signal ${e}`),exitCode:e=>r(`退出码 ${e}`,`Exit code ${e}`),running:r(`运行中`,`Running`),failed:r(`失败`,`Failed`),done:r(`已完成`,`Done`),copy:r(`复制`,`Copy`),copied:r(`已复制`,`Copied`),noOutput:r(`无输出`,`No output`),collapseAria:r(`收起输出`,`Collapse output`),collapse:r(`收起`,`Collapse`),expandAria:e=>r(`展开其余 ${e} 行输出`,`Expand remaining ${e} output lines`),expand:e=>r(`… 其余 ${e} 行`,`… ${e} more lines`)}}):(0,F.jsxs)(`div`,{className:qf.ioCard,children:[(0,F.jsxs)(`div`,{className:qf.ioSection,children:[(0,F.jsx)(`span`,{className:qf.ioLabel,children:`IN`}),(0,F.jsx)(`span`,{className:qf.ioText,children:e.text})]}),c!==null&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:qf.ioDivider,"aria-hidden":!0}),(0,F.jsxs)(`div`,{className:qf.ioSection,children:[(0,F.jsx)(`span`,{className:qf.ioLabel,children:`OUT`}),(0,F.jsx)(`span`,{className:qf.ioText,"data-error":t?.isError||void 0,children:c||r(`无文本输出`,`No text output`)})]})]})]}),i&&(0,F.jsx)(`button`,{className:qf.inspectButton,type:`button`,onClick:i,children:r(`查看轨迹`,`View trajectory`)})]})})})}function ep({toolCount:e,messageCount:t,open:n,onToggle:i}){let a=[e>0&&r(`${e} 次工具调用`,`${e} tool calls`),t>0&&r(`${t} 条消息`,`${t} messages`)].filter(Boolean);return(0,F.jsxs)(`button`,{type:`button`,className:Jf.root,"data-open":n||void 0,"aria-expanded":n,onClick:i,children:[(0,F.jsx)(`span`,{className:Jf.label,children:a.length?a.join(` · `):r(`已思考`,`Thought`)}),(0,F.jsx)(ct,{className:Jf.chevron})]})}function tp(e){return`${e.toLocaleString()} tok`}function np({usage:e,model:t}){let[n,i]=(0,P.useState)(!1),a=(0,P.useRef)(null),o=(0,P.useRef)(null),[s,c]=(0,P.useState)(null);(0,P.useLayoutEffect)(()=>{if(!n)return;let e=()=>{let e=a.current?.getBoundingClientRect(),t=o.current?.getBoundingClientRect();e&&t&&c({top:Math.max(12,Math.min(window.innerHeight-t.height-12,e.top-t.height-8)),left:Math.max(12,Math.min(e.left,window.innerWidth-t.width-12))})};e();let t=e=>{!a.current?.contains(e.target)&&!o.current?.contains(e.target)&&i(!1)},r=e=>{e.key===`Escape`&&i(!1)};return document.addEventListener(`pointerdown`,t),document.addEventListener(`keydown`,r),document.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{document.removeEventListener(`pointerdown`,t),document.removeEventListener(`keydown`,r),document.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[n]);let l=e.input+e.cacheRead+e.cacheWrite,u=l>0?Math.round(e.cacheRead/l*100):null;return(0,F.jsxs)(`span`,{ref:a,className:Yf.root,children:[(0,F.jsxs)(`button`,{type:`button`,className:Yf.trigger,"aria-haspopup":`dialog`,"aria-expanded":n,onClick:()=>i(e=>!e),children:[(0,F.jsx)(Dt,{}),(0,F.jsxs)(`span`,{className:Yf.label,children:[r(`用量`,`Usage`),` `,tp(e.totalTokens)]})]}),n&&(0,At.createPortal)((0,F.jsxs)(`div`,{ref:o,className:Xf.panel,role:`dialog`,"aria-label":r(`本轮用量`,`Turn usage`),style:s??{top:-1e3,left:-1e3},children:[(0,F.jsxs)(`div`,{className:Xf.title,children:[(0,F.jsxs)(`span`,{className:Xf.titleLabel,children:[(0,F.jsx)(Dt,{}),r(`本轮用量`,`Turn usage`)]}),(0,F.jsx)(`span`,{className:Xf.titleValue,children:tp(e.totalTokens)})]}),(0,F.jsx)(`div`,{className:Xf.titleRule,"aria-hidden":!0}),(0,F.jsxs)(`dl`,{className:Xf.details,children:[t&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`dt`,{children:r(`提供方 / 模型`,`Provider / model`)}),(0,F.jsx)(`dd`,{className:Xf.route,children:t})]}),u!==null&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`dt`,{children:r(`缓存命中`,`Cache hit`)}),(0,F.jsxs)(`dd`,{children:[u,`%`]})]}),(0,F.jsx)(`dt`,{children:r(`未缓存输入`,`Uncached input`)}),(0,F.jsx)(`dd`,{children:tp(e.input)}),(0,F.jsx)(`dt`,{children:r(`缓存读取`,`Cache read`)}),(0,F.jsx)(`dd`,{children:tp(e.cacheRead)}),(0,F.jsx)(`dt`,{children:r(`缓存写入`,`Cache write`)}),(0,F.jsx)(`dd`,{children:tp(e.cacheWrite)}),(0,F.jsx)(`dt`,{children:r(`输出`,`Output`)}),(0,F.jsxs)(`dd`,{children:[tp(e.output),e.reasoning!==void 0&&(0,F.jsx)(`span`,{className:Xf.reasoning,children:r(`(其中推理 ${tp(e.reasoning)})`,` (including ${tp(e.reasoning)} reasoning)`)})]})]})]}),document.body)]})}function rp({text:e,timestamp:t,usage:n,model:i}){let{copied:a,onCopy:o}=Rf(e);return(0,F.jsxs)(`div`,{className:Zf.actions,children:[e&&(0,F.jsx)(`button`,{className:Zf.action,type:`button`,"aria-label":a?r(`已复制`,`Copied`):r(`复制回复`,`Copy reply`),onClick:o,children:(0,F.jsx)(ft,{})}),n&&(0,F.jsx)(np,{usage:n,model:i}),t&&(0,F.jsx)(`time`,{className:Zf.timeEnd,dateTime:t,children:new Date(t).toLocaleTimeString(r(`zh-CN`,`en-US`),{hour:`2-digit`,minute:`2-digit`})})]})}var ip=class{port=null;pending=new Map;sequence=0;disposed=!1;connection=0;frame;identity;host;timeoutMs;constructor(e,t,n,r=1e4){this.frame=e,this.identity=t,this.host=n,this.timeoutMs=r}async connect(e,t){if(this.disposed||this.port)throw Error(`Frame already connected or disposed`);let n=new URL(e,location.href);if(![`http:`,`https:`].includes(n.protocol)||n.username||n.password)throw Error(`Invalid frame document URL`);n.searchParams.set(`parentOrigin`,location.origin);for(let e of[`pluginId`,`generation`,`mountId`])n.searchParams.set(e,String(this.identity[e]));let r=++this.connection;if(await new Promise((e,t)=>{let r=setTimeout(()=>i(Error(`Frame document timed out`)),this.timeoutMs),i=n=>{clearTimeout(r),this.frame.removeEventListener(`load`,o),this.frame.removeEventListener(`error`,a),this.cancelLoad=null,n?t(n):e()},a=()=>i(Error(`Frame document failed`)),o=()=>i();this.cancelLoad=()=>i(Error(`Frame disposed`)),this.frame.addEventListener(`load`,o,{once:!0}),this.frame.addEventListener(`error`,a,{once:!0}),this.frame.src=n.href}),this.disposed||r!==this.connection||!this.frame.contentWindow)throw Error(`Frame connection superseded`);let i=this.frame.contentWindow,a=new MessageChannel;this.port=a.port1,this.port.onmessage=e=>{!this.disposed&&this.frame.contentWindow===i&&r===this.connection&&this.receive(e.data)},this.port.onmessageerror=()=>this.dispose(),this.port.start(),i.postMessage({type:`pi:hosted:connect`,protocol:1,pluginId:this.identity.pluginId,generation:this.identity.generation,mountId:this.identity.mountId},n.origin,[a.port2]),this.frame.addEventListener(`load`,this.navigated),await this.call(`initialize`,t)}cancelLoad=null;navigated=()=>this.dispose();async receive(e){if(!e||typeof e!=`object`)return;let t=e;if(typeof t.id==`string`){if(t.type===`response`){let e=this.pending.get(t.id);if(!e)return;this.pending.delete(t.id),clearTimeout(e.timer),t.ok===!0?e.resolve(t.value):e.reject(Object.assign(Error(t.error?.message??`Frame RPC failed`),t.error))}else if(t.type===`request`&&typeof t.method==`string`)try{let e=await this.host(t.method,t.input);this.port?.postMessage({type:`response`,id:t.id,ok:!0,value:e})}catch(e){let n=e;this.port?.postMessage({type:`response`,id:t.id,ok:!1,error:{code:n.code??`host_error`,message:n.message??String(e),status:n.status,reason:n.reason}})}}}call(e,t){if(this.disposed||!this.port)return Promise.reject(Error(`Frame is not connected`));let n=`${this.identity.mountId}:${++this.sequence}`;return new Promise((r,i)=>{let a=setTimeout(()=>{this.pending.delete(n),i(Error(`Frame ${e} timed out; edits were not acknowledged`))},this.timeoutMs);this.pending.set(n,{resolve:r,reject:i,timer:a});try{this.port.postMessage({type:`request`,id:n,method:e,input:t})}catch(e){clearTimeout(a),this.pending.delete(n),i(e)}})}dispose(){if(!this.disposed){this.disposed=!0,++this.connection,this.cancelLoad?.(),this.frame.removeEventListener(`load`,this.navigated);for(let e of this.pending.values())clearTimeout(e.timer),e.reject(Error(`Frame disposed`));this.pending.clear(),this.port?.close(),this.port=null}}},ap=new class{frames=new Set;incarnations=new Map;incarnation(e,t){return this.incarnations.get(`${e}/${t}`)??0}add(e){return this.frames.add(e),()=>this.frames.delete(e)}async retireWithin(e,t){let n=[...this.frames].filter(n=>n.identity.sessionId===e&&t.contains(n.adapter.frame));await Promise.all(n.map(async e=>{if(await e.ready,!e.retire)throw Error(`View cannot retire safely`);await e.retire()}))}async retireTools(e,t){let n=[...this.frames].filter(n=>n.identity.sessionId===e&&n.toolCallId&&t.includes(n.toolCallId));await Promise.all(n.map(async e=>{if(await e.ready,!e.retire)throw Error(`View cannot retire safely`);await e.retire()}));for(let t of n){let n=`${e}/${t.toolCallId}`;this.incarnations.set(n,(this.incarnations.get(n)??0)+1)}}async flush(e){let t=[...this.frames].filter(t=>t.identity.sessionId===e),n=(await Promise.allSettled(t.map(async e=>{await e.ready,await e.adapter.call(`flush`),await e.afterFlush?.()}))).find(e=>e.status===`rejected`);if(n?.status===`rejected`)throw n.reason;if(t.length!==[...this.frames].filter(t=>t.identity.sessionId===e).length||t.some(e=>!this.frames.has(e)))throw Error(`Plugin views changed during flush; retry without losing your prompt`)}};function op(e,t,n){let r=e=>e.flatMap(e=>e.blocks.filter(e=>e.kind===`toolCall`&&n.includes(e.toolName??``)).map(e=>e.toolCallId)),i=new Set(r(t));return r(e).filter(e=>!i.has(e))}function sp(e,t,n){let r=(0,P.useRef)(t);r.current=t;let[i,a]=(0,P.useState)({sessionId:e,messages:t,retiring:[]}),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(0);if(i.sessionId!==e)a({sessionId:e,messages:t,retiring:[]});else if(!i.retiring.length&&JSON.stringify(i.messages)!==JSON.stringify(t)){let e=op(i.messages,t,n).length?op(i.messages,[],n):[];a(e.length?{...i,retiring:e}:{...i,messages:t})}let u=JSON.stringify(i.retiring);return(0,P.useEffect)(()=>{if(!e||!i.retiring.length)return;let t=!0;return ap.retireTools(e,i.retiring).then(()=>{t&&(s(``),a(e=>({...e,messages:r.current,retiring:[]})))}).catch(e=>{t&&s(`Removed plugin view retained for recovery: ${String(e)}`)}),()=>{t=!1}},[e,u,c]),{messages:i.messages,error:o,retry:()=>l(e=>e+1)}}function cp(e){let t=[];for(let n of e){(n.role===`user`||t.length===0)&&t.push({id:n.id,index:t.length+1,messages:[],usage:null});let e=t[t.length-1];if(e.messages.push(n),n.usage){let t=e.usage;e.usage={input:(t?.input??0)+n.usage.input,output:(t?.output??0)+n.usage.output,cacheRead:(t?.cacheRead??0)+n.usage.cacheRead,cacheWrite:(t?.cacheWrite??0)+n.usage.cacheWrite,totalTokens:(t?.totalTokens??0)+n.usage.totalTokens,cost:(t?.cost??0)+n.usage.cost,...t?.reasoning!==void 0||n.usage.reasoning!==void 0?{reasoning:(t?.reasoning??0)+(n.usage.reasoning??0)}:{}}}}return t}function lp(e,t){let n=new Map;for(let r of e)r.role===`assistant`&&r.blocks.forEach((e,i)=>{if(e.kind!==`toolCall`||!t.includes(e.toolName??``))return;let a=e.toolCallId??`${r.id}-${i}`,o=n.get(a),s=r.id===`stream`;o&&!o.streaming&&s||n.set(a,{key:a,call:e,streaming:s})});return[...n.values()].map(({key:e,call:t})=>({key:e,call:t}))}function up(e,t){let n=lp(e.messages,t)[0];return n?`tool:${n.key}`:`message:${e.id}`}function dp(e){let t=new Set(e.flatMap(e=>e.blocks.filter(e=>e.kind===`toolCall`&&e.toolCallId).map(e=>e.toolCallId)));return new Map(e.filter(e=>e.role===`tool`&&e.toolCallId&&t.has(e.toolCallId)).map(e=>[e.toolCallId,e]))}var fp={root:`_root_10hwk_2`,ledger:`_ledger_10hwk_16`},pp={split:`_split_m0qel_1`,tablePane:`_tablePane_m0qel_15`,historyLoading:`_historyLoading_m0qel_25`,historyLoadingBar:`_historyLoadingBar_m0qel_34`,historyLoadingSpinner:`_historyLoadingSpinner_m0qel_48`,"history-loading-spin":`_history-loading-spin_m0qel_1`,table:`_table_m0qel_15`,historyLoadRow:`_historyLoadRow_m0qel_59`,historyLoadButton:`_historyLoadButton_m0qel_69`,visuallyHidden:`_visuallyHidden_m0qel_97`,eventColumn:`_eventColumn_m0qel_136`,contentColumn:`_contentColumn_m0qel_140`,eventHeader:`_eventHeader_m0qel_163`,virtualSpacer:`_virtualSpacer_m0qel_178`,turnRail:`_turnRail_m0qel_220`,requestBoundaryControl:`_requestBoundaryControl_m0qel_233`,requestBoundaryControlActive:`_requestBoundaryControlActive_m0qel_294`,event:`_event_m0qel_136`,selectionRail:`_selectionRail_m0qel_330`,turnLabel:`_turnLabel_m0qel_392`,turnLabelFull:`_turnLabelFull_m0qel_412`,turnLabelCompact:`_turnLabelCompact_m0qel_413`,turnLabelActive:`_turnLabelActive_m0qel_426`,eventInner:`_eventInner_m0qel_435`,kindSlot:`_kindSlot_m0qel_443`,content:`_content_m0qel_140`,kindTag:`_kindTag_m0qel_463`,kindTagIcon:`_kindTagIcon_m0qel_479`,kindTagLabel:`_kindTagLabel_m0qel_491`,message:`_message_m0qel_499`,user:`_user_m0qel_594`,systemNeutral:`_systemNeutral_m0qel_599`,contextGreen:`_contextGreen_m0qel_604`,compacted:`_compacted_m0qel_613`,compactedSummary:`_compactedSummary_m0qel_618`,promptDiffSections:`_promptDiffSections_m0qel_624`,promptDiffSection:`_promptDiffSection_m0qel_624`,promptDiffTitle:`_promptDiffTitle_m0qel_637`,promptDiff:`_promptDiff_m0qel_624`,promptDiffLinemeta:`_promptDiffLinemeta_m0qel_659`,promptDiffLinecontext:`_promptDiffLinecontext_m0qel_665`,promptDiffLineadded:`_promptDiffLineadded_m0qel_669`,promptDiffLineremoved:`_promptDiffLineremoved_m0qel_678`,assistantVioletBright:`_assistantVioletBright_m0qel_687`,toolAmber:`_toolAmber_m0qel_704`,subtoolAmber:`_subtoolAmber_m0qel_709`,contentText:`_contentText_m0qel_722`,toolCallOnly:`_toolCallOnly_m0qel_730`,collapsedTurnContent:`_collapsedTurnContent_m0qel_753`,collapsedTurnEllipsis:`_collapsedTurnEllipsis_m0qel_762`,collapsedTurnText:`_collapsedTurnText_m0qel_770`,resultPreview:`_resultPreview_m0qel_777`,resultRequest:`_resultRequest_m0qel_791`,inlineResultText:`_inlineResultText_m0qel_792`,toolCallNameTypeface:`_toolCallNameTypeface_m0qel_799`,toolCallPayload:`_toolCallPayload_m0qel_805`,inlineResult:`_inlineResult_m0qel_792`,noOutputText:`_noOutputText_m0qel_830`,arrow:`_arrow_m0qel_834`,error:`_error_m0qel_840`,overview:`_overview_m0qel_844`,details:`_details_m0qel_848`,errorPayload:`_errorPayload_m0qel_848`,resultBlockText:`_resultBlockText_m0qel_852`,jsonPayload:`_jsonPayload_m0qel_856`,jsonPreview:`_jsonPreview_m0qel_857`,detailsResizeHandle:`_detailsResizeHandle_m0qel_879`,detailsHeader:`_detailsHeader_m0qel_898`,detailsTitle:`_detailsTitle_m0qel_909`,requestDetailsDot:`_requestDetailsDot_m0qel_917`,requestDetailsName:`_requestDetailsName_m0qel_926`,detailsLocation:`_detailsLocation_m0qel_931`,close:`_close_m0qel_940`,detailTabs:`_detailTabs_m0qel_962`,detailTab:`_detailTab_m0qel_962`,detailTabActive:`_detailTabActive_m0qel_1000`,detailBody:`_detailBody_m0qel_1021`,detailBodySummary:`_detailBodySummary_m0qel_1030`,summaryScrollRegion:`_summaryScrollRegion_m0qel_1051`,markdownPayload:`_markdownPayload_m0qel_1062`,overviewParentLinks:`_overviewParentLinks_m0qel_1072`,overviewHierarchyNavLink:`_overviewHierarchyNavLink_m0qel_1077`,overviewHierarchyJumpIconTight:`_overviewHierarchyJumpIconTight_m0qel_1092`,requestTokenDetail:`_requestTokenDetail_m0qel_1116`,usagePanel:`_usagePanel_m0qel_1120`,usageGroup:`_usageGroup_m0qel_1124`,usageHeading:`_usageHeading_m0qel_1128`,timestampToggle:`_timestampToggle_m0qel_1153`,overviewSections:`_overviewSections_m0qel_1166`,overviewSection:`_overviewSection_m0qel_1166`,overviewHeading:`_overviewHeading_m0qel_1188`,overviewTitle:`_overviewTitle_m0qel_1203`,overviewTitleIcon:`_overviewTitleIcon_m0qel_1220`,overviewPreview:`_overviewPreview_m0qel_1238`,schemaTree:`_schemaTree_m0qel_1252`,markdownPreview:`_markdownPreview_m0qel_1268`,assistantContent:`_assistantContent_m0qel_1340`,payload:`_payload_m0qel_1341`,thinkingQuote:`_thinkingQuote_m0qel_1345`,thinkingQuoteOnlyPreview:`_thinkingQuoteOnlyPreview_m0qel_1353`,assistantContentRendered:`_assistantContentRendered_m0qel_1357`,thinkingToggle:`_thinkingToggle_m0qel_1361`,thinkingChevron:`_thinkingChevron_m0qel_1376`,assistantOutput:`_assistantOutput_m0qel_1403`,schema:`_schema_m0qel_1252`,schemaPreview:`_schemaPreview_m0qel_1429`,schemaIntro:`_schemaIntro_m0qel_1433`,schemaName:`_schemaName_m0qel_1441`,schemaDescription:`_schemaDescription_m0qel_1447`,schemaParameters:`_schemaParameters_m0qel_1454`,schemaParametersTitle:`_schemaParametersTitle_m0qel_1458`,payloadPreview:`_payloadPreview_m0qel_1483`,sourceBlocks:`_sourceBlocks_m0qel_1488`,sourceBlock:`_sourceBlock_m0qel_1488`,sourceBlockHeader:`_sourceBlockHeader_m0qel_1498`,sourceBlockJumpTarget:`_sourceBlockJumpTarget_m0qel_1499`,sourceBlockLabel:`_sourceBlockLabel_m0qel_1519`,sourceBlockJumpIcon:`_sourceBlockJumpIcon_m0qel_1524`,sourceBlockContent:`_sourceBlockContent_m0qel_1541`,messageImages:`_messageImages_m0qel_1551`,messageImagesPreview:`_messageImagesPreview_m0qel_1558`,assistantToolCalls:`_assistantToolCalls_m0qel_1563`,assistantToolCallsPreview:`_assistantToolCallsPreview_m0qel_1573`,assistantToolCallButton:`_assistantToolCallButton_m0qel_1582`,assistantToolCallIcon:`_assistantToolCallIcon_m0qel_1606`,assistantToolCallText:`_assistantToolCallText_m0qel_1617`,assistantToolCallName:`_assistantToolCallName_m0qel_1625`,assistantToolCallArgs:`_assistantToolCallArgs_m0qel_1632`,systemPrompt:`_systemPrompt_m0qel_1640`,toolCatalog:`_toolCatalog_m0qel_1644`,toolCatalogItem:`_toolCatalogItem_m0qel_1649`,toolCatalogSummary:`_toolCatalogSummary_m0qel_1653`,toolCatalogChevron:`_toolCatalogChevron_m0qel_1680`,toolCatalogIcon:`_toolCatalogIcon_m0qel_1681`,toolCatalogName:`_toolCatalogName_m0qel_1693`,toolCatalogDescription:`_toolCatalogDescription_m0qel_1698`,toolCatalogDefinition:`_toolCatalogDefinition_m0qel_1707`,toolCatalogFullDescription:`_toolCatalogFullDescription_m0qel_1712`,toolCatalogTree:`_toolCatalogTree_m0qel_1720`,resultBlocks:`_resultBlocks_m0qel_1725`,resultBlocksPreview:`_resultBlocksPreview_m0qel_1734`,noPayload:`_noPayload_m0qel_1750`},mp={root:`_root_wxaz8_1`,plot:`_plot_wxaz8_14`,labels:`_labels_wxaz8_22`,track:`_track_wxaz8_53`,earlierHistory:`_earlierHistory_wxaz8_64`,empty:`_empty_wxaz8_104`,lanes:`_lanes_wxaz8_118`,turnBoundaries:`_turnBoundaries_wxaz8_127`,turnBoundary:`_turnBoundary_wxaz8_144`,span:`_span_wxaz8_153`,selection:`_selection_wxaz8_253`,selectionEdges:`_selectionEdges_wxaz8_272`,hoverLine:`_hoverLine_wxaz8_283`},hp={timelineButton:`_timelineButton_1dmz1_1`,turnLabelButton:`_turnLabelButton_1dmz1_3`,empty:`_empty_1dmz1_5`};function gp(e,t,n){return Math.min(n,Math.max(t,e))}function _p({t:e,model:t,actualTime:n,selectedIndex:r,matchingIndexes:i,range:a,onRangeChange:o,onSelect:s}){let c=(0,P.useRef)(null),l=(0,P.useRef)(null),u=(0,P.useRef)(null),[d,f]=(0,P.useState)(null),[p,m]=(0,P.useState)(null),[h,g]=(0,P.useState)(null),[_,v]=(0,P.useState)(!1),y=Math.max(1,(t?.end??1)-(t?.start??0)),b=p&&t?gp(p.end-p.start,1,y):y,x=t?gp(p?.start??t.start,t.start,t.end-b):0,S=e=>{let t=e.currentTarget.getBoundingClientRect();return gp((e.clientX-t.left)/Math.max(1,t.width),0,1)},C=e=>{let t=e.target instanceof Element?e.target.closest(`[data-timeline-record-index]`):null,n=Number(t?.dataset.timelineRecordIndex);return t&&Number.isFinite(n)?n:null};if((0,P.useEffect)(()=>{m(null),o(null)},[n]),(0,P.useEffect)(()=>{t&&p&&(p.end<t.start||p.start>t.end)&&m(null)},[t,p]),(0,P.useEffect)(()=>{if(!t||!p||r===null)return;let e=t.spans.find(e=>e.index===r);if(!e||e.start>=x&&e.start<=x+b)return;let n=gp(e.start-b/2,t.start,t.end-b);m({start:n,end:n+b})},[t,r]),(0,P.useEffect)(()=>{let e=c.current;if(!e||!t)return;let r=e=>{e.preventDefault();let r=l.current?.getBoundingClientRect();if(!r)return;let i=gp((e.clientX-r.left)/Math.max(1,r.width),0,1),a=gp(b*Math.exp(e.deltaY*.0015),Math.min(n?20:4,y),y);if(a>=y*.999){m(null);return}let o=gp(x+i*(b-a),t.start,t.end-a);m({start:o,end:o+a})};return e.addEventListener(`wheel`,r,{passive:!1}),()=>e.removeEventListener(`wheel`,r)},[t,x,b,y,n]),!t)return(0,F.jsx)(`section`,{ref:c,className:mp.root,"aria-label":e(`会话时间线`,`Session timeline`),children:(0,F.jsxs)(`div`,{className:mp.plot,children:[(0,F.jsxs)(`div`,{className:mp.labels,"aria-hidden":`true`,children:[(0,F.jsx)(`span`,{children:e(`输入`,`Input`)}),(0,F.jsx)(`span`,{children:e(`模型`,`Model`)}),(0,F.jsx)(`span`,{children:e(`工具`,`Tool`)})]}),(0,F.jsx)(`div`,{className:mp.track,children:(0,F.jsx)(`span`,{className:mp.empty,children:e(`暂无轨迹`,`No trajectory yet`)})})]})});let w={"--trajectory-domain-left":`${-(x-t.start)/b*100}%`,"--trajectory-domain-width":`${y/b*100}%`},T=d??a,E=T?{"--trajectory-selection-left":`${(T.start-x)/b*100}%`,"--trajectory-selection-width":`${(T.end-T.start)/b*100}%`}:void 0;return(0,F.jsx)(`section`,{ref:c,className:mp.root,"aria-label":e(`会话时间线`,`Session timeline`),children:(0,F.jsxs)(`div`,{className:mp.plot,children:[(0,F.jsxs)(`div`,{className:mp.labels,"aria-hidden":`true`,children:[(0,F.jsx)(`span`,{children:e(`输入`,`Input`)}),(0,F.jsx)(`span`,{children:e(`模型`,`Model`)}),(0,F.jsx)(`span`,{children:e(`工具`,`Tool`)})]}),(0,F.jsxs)(`div`,{ref:l,className:mp.track,"data-panning":_||void 0,"aria-label":e(`时间线概览;拖动选择范围,滚轮缩放,右键拖动平移`,`Timeline overview; drag to select, scroll to zoom, right drag to pan`),tabIndex:0,onKeyDown:e=>{e.key===`Escape`&&(o(null),m(null))},onDoubleClick:()=>o(null),onContextMenu:e=>e.preventDefault(),onPointerDown:e=>{if(e.button!==0&&e.button!==2)return;let t=x+S(e)*b;u.current={pointerId:e.pointerId,clientX:e.clientX,time:t,index:C(e),pan:e.button===2,viewportStart:x},e.currentTarget.setPointerCapture(e.pointerId),e.button===2?v(!0):f({start:t,end:t})},onPointerMove:e=>{g(S(e));let n=u.current;if(n&&n.pointerId===e.pointerId){if(n.pan){if(!p)return;let r=e.currentTarget.getBoundingClientRect(),i=gp(n.viewportStart-(e.clientX-n.clientX)/Math.max(1,r.width)*b,t.start,t.end-b);m({start:i,end:i+b})}else{let t=x+S(e)*b;f({start:Math.min(n.time,t),end:Math.max(n.time,t)})}}},onPointerUp:e=>{let n=u.current;if(!n||n.pointerId!==e.pointerId)return;if(u.current=null,e.currentTarget.releasePointerCapture(e.pointerId),v(!1),f(null),n.pan){Math.abs(e.clientX-n.clientX)<3&&o(null);return}if(Math.abs(e.clientX-n.clientX)<3&&n.index!==null){o(null),s(n.index);return}let r=x+S(e)*b,i=Math.min(b,y/t.spans.length),a=(n.time+r)/2,c=Math.max(i,Math.abs(r-n.time)),l=gp(a-c/2,t.start,t.end-c);o({start:l,end:l+c})},onPointerCancel:()=>{u.current=null,f(null),v(!1)},onPointerLeave:()=>{u.current||g(null)},children:[h!==null&&!d&&(0,F.jsx)(`div`,{className:mp.hoverLine,style:{"--trajectory-hover-left":`${h*100}%`},"aria-hidden":`true`}),E&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:mp.selection,style:E,"aria-hidden":`true`}),(0,F.jsx)(`div`,{className:mp.selectionEdges,style:E,"aria-hidden":`true`})]}),(0,F.jsx)(`div`,{className:mp.turnBoundaries,style:w,"aria-hidden":`true`,children:t.boundaries.slice(1).map(e=>(0,F.jsx)(`span`,{className:mp.turnBoundary,style:{"--trajectory-turn-left":`${(e.time-t.start)/y*100}%`}},e.turn))}),(0,F.jsx)(`div`,{className:mp.lanes,style:w,children:t.spans.map(a=>{let o=(a.end-a.start)/y*100;return(0,F.jsx)(`button`,{type:`button`,className:`${mp.span} ${hp.timelineButton}`,"data-timeline-record-index":a.index,"data-timeline-span":a.lane===0?`user`:a.lane===2?`tool`:`message`,"data-equal-duration":n&&a.end===a.start||void 0,"data-current":r===a.index||void 0,"data-error":a.error||void 0,"data-selected":T?a.start<=T.end&&a.end>=T.start?`true`:`false`:void 0,"data-search-match":i?i.has(a.index)?`true`:`false`:void 0,"aria-label":e(`第 ${a.index} 条轨迹`,`Trajectory record ${a.index}`),title:e(`第 ${a.index} 条 · ${n?new Date(a.start).toLocaleTimeString():`事件顺序`}`,`Record ${a.index} · ${n?new Date(a.start).toLocaleTimeString():`event order`}`),style:{"--trajectory-span-left":`${(a.start-t.start)/y*100}%`,"--trajectory-span-width":`${o}%`,"--trajectory-span-gap":`min(${o*.08}%, 1px)`,"--trajectory-span-lane":a.lane},onClick:e=>{e.detail===0&&s(a.index)}},a.index)})})]})]})})}function vp(e,t){if(e.length===0)return null;let n=e.map(e=>Date.parse(e.timestamp)).find(Number.isFinite)??0,r=e.map((e,n)=>{let r=Date.parse(e.timestamp),i=t&&Number.isFinite(r)?r:n,a=e.endTimestamp?Date.parse(e.endTimestamp):NaN;return{index:e.index,start:i,end:t&&Number.isFinite(a)&&a>i?a:t?i:n+1,lane:e.kind===`user`?0:e.kind===`tool`?2:1,error:e.error===!0}}),i=e.flatMap((t,n)=>n===0||t.turn!==e[n-1].turn?[{turn:t.turn,time:r[n].start}]:[]),a=t?Math.min(n,...r.map(e=>e.start)):0,o=Math.max(...r.map(e=>e.end));return{start:a,end:t?o+Math.max(1,(o-a)/100):e.length,spans:r,boundaries:i}}function yp(e,t,n){return new Set(e.spans.filter(e=>e.start<=n&&e.end>=t).map(e=>e.index))}var bp={root:`_root_15786_1`,inner:`_inner_15786_12`,actions:`_actions_15786_22`,toggle:`_toggle_15786_29`,toggleIcon:`_toggleIcon_15786_59`,control:`_control_15786_69`,controlTrack:`_controlTrack_15786_107`,controlThumb:`_controlThumb_15786_118`,action:`_action_15786_22`,actionIcon:`_actionIcon_15786_163`,search:`_search_15786_168`,searchIcon:`_searchIcon_15786_192`,searchInput:`_searchInput_15786_196`};function xp(e){return e.replace(/\s+/g,` `).trim()}function Sp(e){try{return JSON.stringify(JSON.parse(e))}catch{return xp(e)}}function Cp(e){let t=new Map(e.filter(e=>e.role===`tool`&&e.toolCallId).map(e=>[e.toolCallId,e])),n=0;return cp(e).flatMap(e=>{let i=[],a=new Set(e.messages.flatMap(e=>e.blocks.filter(e=>e.kind===`toolCall`&&e.toolCallId).map(e=>e.toolCallId)));for(let o of e.messages)if(!(o.role===`tool`&&o.toolCallId&&a.has(o.toolCallId)))for(let[a,s]of o.blocks.entries()){let c=o.role===`user`?`user`:o.role===`tool`||s.kind===`toolCall`?`tool`:`message`,l=s.kind===`toolCall`&&s.toolCallId?t.get(s.toolCallId):void 0;i.push({id:`${o.id}-${a}`,...s.toolCallId||o.toolCallId?{callId:s.toolCallId??o.toolCallId}:{},kind:c,label:c===`tool`?r(`工具`,`Tool`):o.role===`user`?r(`用户`,`User`):r(`助手`,`Assistant`),...c===`tool`?{toolName:s.kind===`toolCall`?s.toolName||r(`工具`,`Tool`):o.toolName||r(`工具`,`Tool`)}:{},text:s.text,preview:s.kind===`toolCall`?Sp(s.text):xp(s.text),...l?{result:xp(l.blocks.map(e=>e.text).join(` `))}:{},timestamp:o.timestamp,...l?{endTimestamp:l.timestamp}:{},...o.usage&&a===o.blocks.length-1?{usage:o.usage}:{},...o.isError||l?.isError?{error:!0}:{},turn:e.index,index:++n})}return i})}function wp(e){return e===void 0?``:e.toLocaleString()}function Tp(e,t){return Math.round(Math.min(Math.max(e,320),Math.max(320,Math.min(720,t-280))))}function Ep({messages:e,inspectCallId:t}){let n=l(),i=(0,P.useMemo)(()=>Cp(e),[e,n]),a=i.at(-1)?.turn??0,[o,s]=(0,P.useState)(``),[c,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(new Set),[p,m]=(0,P.useState)(!1),[h,g]=(0,P.useState)(!1),[_,v]=(0,P.useState)(null),[y,b]=(0,P.useState)(null),x=(0,P.useRef)(null),S=(0,P.useRef)(null);(0,P.useEffect)(()=>{t&&u(i.find(e=>e.callId===t)?.id??null)},[t,i]);let C=i.find(e=>e.id===c)??null,w=o.trim().toLocaleLowerCase(),T=(0,P.useMemo)(()=>vp(i,h),[i,h]),E=T&&_?yp(T,_.start,_.end):null,D=w?new Set(i.filter(e=>`${e.label} ${e.toolName??``} ${e.preview} ${e.result??``}`.toLocaleLowerCase().includes(w)).map(e=>e.index)):null,O=i.filter(e=>!d.has(e.turn)&&(!p||e.kind!==`tool`)&&(!w||`${e.label} ${e.toolName??``} ${e.preview} ${e.result??``}`.toLocaleLowerCase().includes(w))),k=new Map;for(let e of O){let t=k.get(e.turn)??[];t.push(e),k.set(e.turn,t)}let ee=new Map;for(let e of i)ee.set(e.turn,(ee.get(e.turn)??0)+1);let te=Array.from({length:a},(e,t)=>t+1).flatMap(e=>d.has(e)?[{type:`collapsed`,turn:e,count:ee.get(e)??0}]:(k.get(e)??[]).map((e,t)=>({type:`record`,record:e,firstInTurn:t===0}))),ne=e=>{u(e.id),S.current?.querySelector(`[data-record-index="${e.index}"]`)?.scrollIntoView({block:`center`,behavior:`smooth`})};return(0,F.jsxs)(`div`,{className:fp.root,"data-conversation-composer-overlay":!0,"aria-label":r(`会话轨迹`,`Session trajectory`),children:[(0,F.jsx)(`div`,{className:bp.root,role:`toolbar`,"aria-label":r(`轨迹工具栏`,`Trajectory toolbar`),children:(0,F.jsxs)(`div`,{className:bp.inner,children:[(0,F.jsxs)(`div`,{className:bp.actions,children:[(0,F.jsxs)(`button`,{type:`button`,className:bp.toggle,"aria-pressed":h,title:h?r(`按事件顺序排列`,`Arrange by event order`):r(`按记录时间排列`,`Arrange by recorded time`),onClick:()=>g(e=>!e),children:[(0,F.jsxs)(`svg`,{className:bp.toggleIcon,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,F.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.25`}),(0,F.jsx)(`path`,{d:`M8 4.75V8l2.25 1.5`})]}),r(`时长`,`Duration`)]}),(0,F.jsxs)(`button`,{type:`button`,className:bp.action,"aria-pressed":a>0&&d.size===a,"aria-label":a>0&&d.size===a?r(`展开轮次`,`Expand turns`):r(`折叠轮次`,`Collapse turns`),onClick:()=>f(e=>e.size===a?new Set:new Set(Array.from({length:a},(e,t)=>t+1))),children:[(0,F.jsx)(`span`,{className:bp.actionIcon,"aria-hidden":`true`,children:d.size===a?`⊞`:`⊟`}),r(`轮次`,`Turns`)]}),(0,F.jsxs)(`button`,{type:`button`,className:bp.action,"aria-pressed":p,"aria-label":p?r(`展开调用`,`Expand calls`):r(`折叠调用`,`Collapse calls`),onClick:()=>m(e=>!e),children:[(0,F.jsx)(`span`,{className:bp.actionIcon,"aria-hidden":`true`,children:p?`⊞`:`⊟`}),r(`调用`,`Calls`)]})]}),(0,F.jsxs)(`label`,{className:bp.search,children:[(0,F.jsx)(tt,{size:11,className:bp.searchIcon}),(0,F.jsx)(`input`,{type:`search`,className:bp.searchInput,"aria-label":r(`搜索轨迹`,`Search trajectory`),placeholder:r(`搜索`,`Search`),value:o,onChange:e=>s(e.target.value)})]})]})}),(0,F.jsx)(_p,{t:r,model:T,actualTime:h,selectedIndex:C?.index??null,matchingIndexes:D,range:_,onRangeChange:v,onSelect:e=>{let t=i.find(t=>t.index===e);t&&ne(t)}}),(0,F.jsxs)(`div`,{className:fp.ledger,children:[(0,F.jsx)(`div`,{ref:S,className:pp.tablePane,children:(0,F.jsxs)(`table`,{className:pp.table,"data-scroll-ready":`true`,"aria-label":r(`轨迹记录`,`Trajectory records`),children:[(0,F.jsxs)(`colgroup`,{children:[(0,F.jsx)(`col`,{className:pp.eventColumn}),(0,F.jsx)(`col`,{className:pp.contentColumn})]}),(0,F.jsxs)(`tbody`,{children:[te.map(e=>e.type===`collapsed`?(0,F.jsxs)(`tr`,{tabIndex:0,"data-collapsed-summary":`turn`,"data-turn-start":`true`,"aria-label":r(`展开第 ${e.turn} 轮`,`Expand turn ${e.turn}`),onClick:()=>f(t=>{let n=new Set(t);return n.delete(e.turn),n}),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),f(t=>{let n=new Set(t);return n.delete(e.turn),n}))},children:[(0,F.jsx)(`td`,{className:pp.event,children:(0,F.jsx)(`span`,{className:pp.turnLabel,children:r(`第 ${e.turn} 轮`,`Turn ${e.turn}`)})}),(0,F.jsx)(`td`,{className:pp.content,children:(0,F.jsxs)(`span`,{className:pp.collapsedTurnContent,children:[(0,F.jsx)(`span`,{className:pp.collapsedTurnEllipsis,children:`…`}),(0,F.jsx)(`span`,{className:pp.collapsedTurnText,children:r(`${e.count} 条记录,点击展开`,`${e.count} records, click to expand`)})]})})]},`collapsed-${e.turn}`):(0,F.jsxs)(`tr`,{tabIndex:0,"data-record-index":e.record.index,"data-kind":e.record.kind,"data-turn-start":e.firstInTurn||void 0,"data-error":e.record.error||void 0,"data-selected":c===e.record.id||void 0,"data-timeline-focus":E?E.has(e.record.index)?`inside`:`outside`:void 0,"aria-selected":c===e.record.id,"aria-label":r(`第 ${e.record.turn} 轮,${e.record.label},${e.record.preview}`,`Turn ${e.record.turn}, ${e.record.label}, ${e.record.preview}`),onClick:()=>ne(e.record),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),ne(e.record))},children:[(0,F.jsxs)(`td`,{className:pp.event,children:[e.firstInTurn&&(0,F.jsx)(`button`,{type:`button`,className:hp.turnLabelButton,"aria-label":r(`折叠第 ${e.record.turn} 轮`,`Collapse turn ${e.record.turn}`),onClick:t=>{t.stopPropagation(),f(t=>new Set([...t,e.record.turn]))},children:(0,F.jsx)(`span`,{className:pp.turnLabel,children:r(`第 ${e.record.turn} 轮`,`Turn ${e.record.turn}`)})}),(0,F.jsx)(`div`,{className:pp.eventInner,children:(0,F.jsx)(`span`,{className:pp.kindSlot,children:(0,F.jsx)(`span`,{className:`${pp.kindTag} ${e.record.kind===`user`?pp.user:e.record.kind===`tool`?pp.toolAmber:pp.assistantVioletBright}`,children:(0,F.jsx)(`span`,{className:pp.kindTagLabel,children:e.record.label})})})}),c===e.record.id&&(0,F.jsx)(`span`,{className:pp.selectionRail,"aria-hidden":`true`})]}),(0,F.jsx)(`td`,{className:pp.content,children:(0,F.jsxs)(`span`,{className:e.record.result===void 0?pp.contentText:pp.resultPreview,title:e.record.result===void 0?e.record.preview:`${e.record.label} ${e.record.preview} → ${e.record.result}`,children:[(0,F.jsxs)(`span`,{className:e.record.result===void 0?void 0:pp.resultRequest,children:[e.record.kind===`tool`&&(0,F.jsx)(`span`,{className:pp.toolCallNameTypeface,children:e.record.toolName}),(0,F.jsx)(`span`,{className:e.record.kind===`tool`?pp.toolCallPayload:void 0,children:e.record.preview})]}),e.record.result!==void 0&&(0,F.jsxs)(`span`,{className:`${pp.inlineResult} ${e.record.error?pp.error:``}`,children:[(0,F.jsx)(`span`,{className:pp.arrow,children:`→`}),(0,F.jsx)(`span`,{className:pp.inlineResultText,children:e.record.result})]})]})})]},e.record.id)),te.length===0&&(0,F.jsx)(`tr`,{children:(0,F.jsx)(`td`,{colSpan:2,className:hp.empty,children:i.length===0?r(`暂无轨迹`,`No trajectory yet`):r(`没有匹配的记录`,`No matching records`)})})]})]})}),C&&(0,F.jsxs)(`aside`,{id:`trajectory-detail-panel`,className:pp.details,"aria-label":r(`轨迹详情`,`Trajectory details`),style:y===null?void 0:{width:y},children:[(0,F.jsx)(`div`,{className:pp.detailsResizeHandle,role:`separator`,"aria-label":r(`调整轨迹详情宽度`,`Resize trajectory details`),"aria-controls":`trajectory-detail-panel`,"aria-orientation":`vertical`,tabIndex:0,title:r(`拖动调整详情宽度,双击恢复`,`Drag to resize details; double click to reset`),onDoubleClick:()=>b(null),onPointerDown:e=>{if(e.button!==0)return;let t=e.currentTarget.parentElement,n=t?.parentElement?.getBoundingClientRect().width;t&&n&&(x.current={pointerId:e.pointerId,startX:e.clientX,startWidth:t.getBoundingClientRect().width,splitWidth:n},e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault())},onPointerMove:e=>{let t=x.current;t&&t.pointerId===e.pointerId&&b(Tp(t.startWidth+t.startX-e.clientX,t.splitWidth))},onPointerUp:e=>{x.current?.pointerId===e.pointerId&&(x.current=null,e.currentTarget.releasePointerCapture(e.pointerId))},onPointerCancel:()=>{x.current=null},onKeyDown:e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let t=e.currentTarget.parentElement,n=t?.parentElement?.getBoundingClientRect().width;t&&n&&(b(Tp(t.getBoundingClientRect().width+(e.key===`ArrowLeft`?16:-16),n)),e.preventDefault())}}),(0,F.jsxs)(`div`,{className:pp.detailsHeader,children:[(0,F.jsxs)(`span`,{className:pp.detailsTitle,children:[C.kind===`tool`?(0,F.jsx)(`span`,{className:pp.requestDetailsDot}):(0,F.jsx)(Dt,{size:14}),(0,F.jsx)(`span`,{className:pp.requestDetailsName,children:C.toolName??C.label}),(0,F.jsxs)(`span`,{className:pp.detailsLocation,children:[r(`第 ${C.turn} 轮`,`Turn ${C.turn}`),` · #`,C.index]})]}),(0,F.jsx)(`button`,{type:`button`,className:pp.close,"aria-label":r(`关闭详情`,`Close details`),onClick:()=>u(null),children:(0,F.jsx)(ut,{})})]}),(0,F.jsxs)(`div`,{className:pp.detailBody,children:[(0,F.jsxs)(`dl`,{className:pp.overview,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{children:r(`时间`,`Time`)}),(0,F.jsx)(`dd`,{children:new Date(C.timestamp).toLocaleString(r(`zh-CN`,`en-US`))})]}),C.callId&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{children:r(`调用 ID`,`Call ID`)}),(0,F.jsx)(`dd`,{children:C.callId})]}),C.usage&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{children:r(`输入`,`Input`)}),(0,F.jsx)(`dd`,{children:wp(C.usage.input)})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{children:r(`缓存读取`,`Cache read`)}),(0,F.jsx)(`dd`,{children:wp(C.usage.cacheRead)})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{children:r(`缓存写入`,`Cache write`)}),(0,F.jsx)(`dd`,{children:wp(C.usage.cacheWrite)})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{children:r(`输出`,`Output`)}),(0,F.jsx)(`dd`,{children:wp(C.usage.output)})]})]})]}),(0,F.jsx)(`div`,{className:pp.overviewHeading,children:r(`内容`,`Content`)}),C.kind===`tool`?(0,F.jsx)(`pre`,{className:pp.payload,children:C.text}):(0,F.jsx)(`div`,{className:pp.markdownPayload,children:(0,F.jsx)(nf,{text:C.text})}),C.result!==void 0&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:pp.overviewHeading,children:r(`结果`,`Result`)}),(0,F.jsx)(`pre`,{className:pp.payload,children:C.result})]})]})]})]})]})}var Dp={surface:`_surface_ri079_1`,backing:`_backing_ri079_2`,compact:`_compact_ri079_6`,material:`_material_ri079_21`},Op=(0,P.forwardRef)(function({compact:e=!1,className:t,style:r,children:i,...a},o){let s=(0,P.useId)(),c=(0,P.useContext)(Fe),l=(0,P.useRef)(null),u=(0,P.useCallback)(e=>{l.current=e,typeof o==`function`?o(e):o&&(o.current=e)},[o]);(0,P.useLayoutEffect)(()=>{if(l.current&&c)return Le(l.current,c)},[c]);let d=(0,P.useRef)(null);(0,P.useLayoutEffect)(()=>{document.body.appendChild(d.current)},[]);let f={"--dsh-menu-anchor":`--dsh-menu-${s.replaceAll(`:`,``)}`};return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{...a,ref:u,"data-menu-material":`translucent`,className:n(Dp.surface,e&&Dp.compact,t),style:{...r,...f},children:[(0,F.jsx)(`div`,{"aria-hidden":`true`,className:Dp.material}),i]}),(0,At.createPortal)((0,F.jsx)(`div`,{ref:d,"aria-hidden":`true`,"data-menu-backing":``,className:n(Dp.backing,e&&Dp.compact),style:{...f,visibility:r?.visibility}}),document.body)]})}),kp={root:`_root_1sp26_1`,trigger:`_trigger_1sp26_9`,triggerLabel:`_triggerLabel_1sp26_45`,triggerEffort:`_triggerEffort_1sp26_56`,triggerIcon:`_triggerIcon_1sp26_67`,chevron:`_chevron_1sp26_88`,chevronOpen:`_chevronOpen_1sp26_94`,menu:`_menu_1sp26_101`,status:`_status_1sp26_129`,empty:`_empty_1sp26_130`,error:`_error_1sp26_137`,warning:`_warning_1sp26_138`,retry:`_retry_1sp26_157`,groups:`_groups_1sp26_121`,group:`_group_1sp26_121`,groupTitle:`_groupTitle_1sp26_177`,option:`_option_1sp26_189`,selected:`_selected_1sp26_214`,optionCopy:`_optionCopy_1sp26_223`,modelName:`_modelName_1sp26_230`,check:`_check_1sp26_240`,cell:`_cell_1sp26_250`,cellLabel:`_cellLabel_1sp26_273`,cellValue:`_cellValue_1sp26_278`,cellChevron:`_cellChevron_1sp26_288`};function Ap({openSignal:e=0,current:t,models:n,disabled:i,onSelect:a,thinkingLevel:o,thinkingLevels:s,onSelectThinkingLevel:c}){let l={off:r(`关闭`,`Off`),minimal:r(`极低`,`Minimal`),low:r(`低`,`Low`),medium:r(`中`,`Medium`),high:r(`高`,`High`),xhigh:r(`极高`,`Extra high`)},[u,d]=(0,P.useState)(!1),f=(0,P.useRef)(e);(0,P.useEffect)(()=>{e!==f.current&&(f.current=e,i||d(!0))},[e,i]);let[p,m]=(0,P.useState)(`root`),[h,g]=(0,P.useState)(!1),[_,v]=(0,P.useState)({visibility:`hidden`,left:0,top:0}),y=(0,P.useId)(),b=(0,P.useRef)(null),x=(0,P.useRef)(null),S=(0,P.useRef)(null),C=(0,P.useMemo)(()=>{let e=new Map;for(let t of n)e.set(t.provider,[...e.get(t.provider)??[],t]);return[...e]},[n]),w=n.find(e=>`${e.provider}/${e.id}`===t)?.name||(t&&t!==`unknown/unknown`?t:r(`选择模型`,`Choose a model`)),T=s.length>1&&o?l[o]??o:null,E=(e=!1)=>{d(!1),m(`root`),e&&x.current?.focus()};(0,P.useEffect)(()=>{if(!u)return;let e=e=>{!b.current?.contains(e.target)&&!S.current?.contains(e.target)&&E()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[u]),(0,P.useLayoutEffect)(()=>{if(!u||!x.current||!S.current)return;let e=()=>{if(!x.current||!S.current)return;let e=x.current.getBoundingClientRect(),t=S.current.getBoundingClientRect(),n=Math.max(16,Math.min(e.right-t.width,innerWidth-t.width-16)),r=e.top-t.height-8>=16?e.top-t.height-8:Math.min(e.bottom+8,innerHeight-t.height-16);v({left:n,top:r})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[u,p,n.length]);let D=e=>{if(e.key===`Escape`){e.preventDefault(),p===`root`?E(!0):m(`root`);return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let t=[...S.current?.querySelectorAll(`button[role^="menuitem"]`)??[]].filter(e=>!e.disabled);t[(t.indexOf(document.activeElement)+(e.key===`ArrowDown`?1:-1)+t.length)%t.length]?.focus()},O=async e=>{if(`${e.provider}/${e.id}`===t)E(!0);else{g(!0);try{await a(e.provider,e.id),E(!0)}catch{}finally{g(!1)}}},k=async e=>{if(e===o)E(!0);else{g(!0);try{await c(e),E(!0)}catch{}finally{g(!1)}}};return(0,F.jsxs)(`div`,{ref:b,className:kp.root,onKeyDown:D,children:[(0,F.jsxs)(`button`,{ref:x,className:kp.trigger,type:`button`,"aria-label":r(`切换模型,当前 ${w}${T?`,推理强度${T}`:``}`,`Change model, current ${w}${T?`, reasoning effort ${T}`:``}`),"aria-haspopup":`menu`,"aria-expanded":u,"aria-controls":u?`${y}-menu`:void 0,title:T?`${w} · ${T}`:w,disabled:i||h,onClick:()=>u?E():d(!0),children:[(0,F.jsx)(Et,{className:kp.triggerIcon,size:16}),(0,F.jsx)(`span`,{className:kp.triggerLabel,children:w}),T&&(0,F.jsx)(`span`,{className:kp.triggerEffort,children:T}),(0,F.jsx)(ct,{className:`${kp.chevron} ${u?kp.chevronOpen:``}`})]}),u&&(0,At.createPortal)((0,F.jsx)(Op,{ref:S,id:`${y}-menu`,role:`menu`,"aria-label":r(`选择模型`,`Choose model`),className:kp.menu,style:_,children:p===`root`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`button`,{type:`button`,role:`menuitem`,className:kp.cell,onClick:()=>m(`model`),children:[(0,F.jsx)(`span`,{className:kp.cellLabel,children:r(`模型`,`Model`)}),(0,F.jsx)(`span`,{className:kp.cellValue,children:w}),(0,F.jsx)(lt,{className:kp.cellChevron})]}),T&&(0,F.jsxs)(`button`,{type:`button`,role:`menuitem`,className:kp.cell,onClick:()=>m(`effort`),children:[(0,F.jsx)(`span`,{className:kp.cellLabel,children:r(`推理强度`,`Reasoning effort`)}),(0,F.jsx)(`span`,{className:kp.cellValue,children:T}),(0,F.jsx)(lt,{className:kp.cellChevron})]})]}):p===`model`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:kp.groups,children:C.map(([e,n])=>(0,F.jsxs)(`section`,{className:kp.group,role:`group`,"aria-label":e,children:[(0,F.jsx)(`div`,{className:kp.groupTitle,children:e}),n?.map(e=>(0,F.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":`${e.provider}/${e.id}`===t,className:`${kp.option} ${`${e.provider}/${e.id}`===t?kp.selected:``}`,title:e.name||e.id,disabled:h,onClick:()=>{O(e)},children:[(0,F.jsx)(`span`,{className:kp.optionCopy,children:(0,F.jsx)(`span`,{className:kp.modelName,children:e.name||e.id})}),(0,F.jsx)(`span`,{className:kp.check,children:`${e.provider}/${e.id}`===t&&(0,F.jsx)(st,{})})]},e.id))]},e))}),n.length===0&&(0,F.jsx)(`div`,{className:kp.empty,children:r(`暂无可用模型`,`No models available`)})]}):(0,F.jsx)(`div`,{className:kp.groups,children:s.map(e=>(0,F.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e===o,className:`${kp.option} ${e===o?kp.selected:``}`,disabled:h,onClick:()=>{k(e)},children:[(0,F.jsx)(`span`,{className:kp.optionCopy,children:(0,F.jsx)(`span`,{className:kp.modelName,children:l[e]??e})}),(0,F.jsx)(`span`,{className:kp.check,children:e===o&&(0,F.jsx)(st,{})})]},e))})}),document.body)]})}var jp={backdrop:`_backdrop_1x9ns_1`,mask:`_mask_1x9ns_13`,image:`_image_1x9ns_20`,close:`_close_1x9ns_30`};function Mp({src:e,alt:t,labels:n,onClose:r}){let i=(0,P.useRef)(null),a=(0,P.useRef)(null);return(0,P.useEffect)(()=>{a.current=document.activeElement instanceof HTMLElement?document.activeElement:null,i.current?.focus();let e=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e),a.current?.focus()}},[r]),(0,At.createPortal)((0,F.jsxs)(`div`,{className:jp.backdrop,role:`dialog`,"aria-modal":`true`,"aria-label":n.dialog,children:[(0,F.jsx)(`div`,{className:jp.mask,"aria-hidden":`true`,onMouseDown:r}),(0,F.jsx)(`img`,{className:jp.image,src:e,alt:t}),(0,F.jsx)(`button`,{ref:i,type:`button`,className:jp.close,"aria-label":n.close,onClick:r,children:(0,F.jsx)(ut,{size:16})})]}),document.body)}function Np(e){if(e<1024)return`${e}B`;let t=e/1024;if(t<1024)return`${t<10?t.toFixed(1):Math.round(t)}KB`;let n=t/1024;if(n<1024)return`${n<10?n.toFixed(1):Math.round(n)}MB`;let r=n/1024;return`${r<10?r.toFixed(1):Math.round(r)}GB`}var Pp={card:`_card_p20fp_1`,failed:`_failed_p20fp_16`,icon:`_icon_p20fp_20`,spinner:`_spinner_p20fp_29`,"file-card-spin":`_file-card-spin_p20fp_1`,body:`_body_p20fp_43`,retry:`_retry_p20fp_51`,name:`_name_p20fp_61`,meta:`_meta_p20fp_71`,metaFailed:`_metaFailed_p20fp_80`,remove:`_remove_p20fp_84`,removeFailed:`_removeFailed_p20fp_126`,progressTrack:`_progressTrack_p20fp_132`,progressBar:`_progressBar_p20fp_143`,"file-card-progress":`_file-card-progress_p20fp_1`};function Fp({name:e,bytes:t,status:n,error:i,onRemove:a,onRetry:o}){let s=re(e).toUpperCase().slice(0,8),c=n===`uploading`?r(`上传中…`,`Uploading…`):n===`error`?i||r(`上传失败`,`Upload failed`):`${s} ${Np(t)}`;return(0,F.jsxs)(`div`,{className:`${Pp.card} ${n===`error`?Pp.failed:``}`,title:e,children:[(0,F.jsx)(`span`,{className:Pp.icon,"aria-hidden":`true`,children:n===`uploading`?(0,F.jsx)(`span`,{className:Pp.spinner}):(0,F.jsx)(_,{path:e,size:28})}),n===`error`?(0,F.jsxs)(`button`,{type:`button`,className:`${Pp.body} ${Pp.retry}`,onClick:o,"aria-label":r(`重试上传 ${e}`,`Retry upload ${e}`),children:[(0,F.jsx)(`span`,{className:Pp.name,children:e}),(0,F.jsx)(`span`,{className:`${Pp.meta} ${Pp.metaFailed}`,children:c})]}):(0,F.jsxs)(`span`,{className:Pp.body,"aria-label":r(`待发送文件 ${e}`,`Pending file ${e}`),children:[(0,F.jsx)(`span`,{className:Pp.name,children:e}),(0,F.jsx)(`span`,{className:Pp.meta,children:c})]}),(0,F.jsx)(`button`,{type:`button`,className:`${Pp.remove} ${n===`error`?Pp.removeFailed:``}`,"aria-label":r(`移除 ${e}`,`Remove ${e}`),onClick:a,children:(0,F.jsx)(dt,{size:12})}),n===`uploading`&&(0,F.jsx)(`span`,{className:Pp.progressTrack,"aria-hidden":`true`,children:(0,F.jsx)(`span`,{className:Pp.progressBar})})]})}var Ip={rail:`_rail_1b0gl_1`,imageItem:`_imageItem_1b0gl_9`,thumbnail:`_thumbnail_1b0gl_15`,remove:`_remove_1b0gl_33`,retryImage:`_retryImage_1b0gl_58`};function Lp({file:e,status:t,error:n,onRemove:i,onRetry:a}){let[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(!1),u=(0,P.useCallback)(()=>l(!1),[]),d=/^(image\/(png|jpeg|webp|gif))$/.test(e.type)||/\.(png|jpe?g|webp|gif)$/i.test(e.name);return(0,P.useEffect)(()=>{if(!d)return;let t=URL.createObjectURL(e);return s(t),()=>URL.revokeObjectURL(t)},[e,d]),d?(0,F.jsxs)(`div`,{className:Ip.imageItem,title:e.name,children:[(0,F.jsx)(`button`,{type:`button`,className:Ip.thumbnail,"aria-label":r(`预览 ${e.name}`,`Preview ${e.name}`),disabled:o===null,onClick:()=>l(!0),children:o&&(0,F.jsx)(`img`,{src:o,alt:e.name})}),(0,F.jsx)(`button`,{type:`button`,className:Ip.remove,"aria-label":r(`移除 ${e.name}`,`Remove ${e.name}`),onClick:i,children:(0,F.jsx)(dt,{size:12})}),t===`uploading`&&(0,F.jsx)(`span`,{className:`pi-image-uploading`,role:`status`,children:r(`上传中`,`Uploading`)}),t===`error`&&(0,F.jsx)(`button`,{type:`button`,className:Ip.retryImage,"aria-label":r(`重试上传 ${e.name}`,`Retry upload ${e.name}`),title:n||r(`上传失败`,`Upload failed`),onClick:a,children:r(`重试`,`Retry`)}),c&&o&&(0,F.jsx)(Mp,{src:o,alt:e.name,labels:{dialog:r(`图片预览`,`Image preview`),close:r(`关闭预览`,`Close preview`)},onClose:u})]}):(0,F.jsx)(Fp,{name:e.name,bytes:e.size,status:t,error:n,onRemove:i,onRetry:a})}var Rp={gallery:`_gallery_33xub_1`,frame:`_frame_33xub_18`,loading:`_loading_33xub_51`,error:`_error_33xub_52`};function zp(e,t){let n=e/t,r=Math.min(4,Math.max(.25,n)),i=r>=1?{width:240,height:240/r}:{width:240*r,height:240},a=Math.min(1,e/i.width,t/i.height);return{width:Math.max(1,Math.round(i.width*a)),height:Math.max(1,Math.round(i.height*a)),objectPosition:n<.25?`center top`:n>4?`left center`:`center`}}function Bp({name:e,messageId:t,index:n,file:i,tile:a,loadImage:o}){let[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(!1),[d,f]=(0,P.useState)(!1),[p,m]=(0,P.useState)(0),[h,g]=(0,P.useState)(null),_=(0,P.useRef)(o);_.current=o,(0,P.useEffect)(()=>{let e=!0,r=null;return c(null),u(!1),g(null),i?(r=URL.createObjectURL(i),c(r)):_.current(t,n).then(t=>{let n=URL.createObjectURL(t);e?(r=n,c(n)):URL.revokeObjectURL(n)}).catch(()=>{e&&u(!0)}),()=>{e=!1,r&&URL.revokeObjectURL(r)}},[i,t,n,p]);let v=!a&&h?zp(h.width,h.height):null;return l?(0,F.jsx)(`button`,{type:`button`,className:Rp.error,"data-variant":a?`tile`:`single`,onClick:()=>m(e=>e+1),children:r(`图片加载失败,重试`,`Image failed to load. Retry`)}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{type:`button`,className:Rp.frame,"data-variant":a?`tile`:`single`,"aria-label":r(`预览 ${e}`,`Preview ${e}`),title:r(`查看原图`,`View original image`),disabled:!s,onClick:()=>f(!0),style:v?{width:v.width,height:v.height}:void 0,children:s?(0,F.jsx)(`img`,{src:s,alt:e,onLoad:e=>g({width:e.currentTarget.naturalWidth,height:e.currentTarget.naturalHeight}),onError:()=>u(!0),style:v?{objectPosition:v.objectPosition}:void 0}):(0,F.jsx)(`span`,{className:Rp.loading,children:r(`加载中`,`Loading`)})}),d&&s&&(0,F.jsx)(Mp,{src:s,alt:e,labels:{dialog:r(`图片预览`,`Image preview`),close:r(`关闭预览`,`Close preview`)},onClose:()=>f(!1)})]})}function Vp(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function L(e,...t){throw Vp(e,...t)}function Hp(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Up(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var Wp=Up();function Gp(){return Wp&&`documentMode`in document?document.documentMode:null}var Kp=Gp();function qp(e){return Wp&&e.test(navigator.platform)}function Jp(e){return Wp&&e.test(navigator.userAgent)}var Yp=qp(/Mac|iPod|iPhone|iPad/),Xp=Jp(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function Zp(){return!(!Wp||!(`InputEvent`in window)||Kp)&&`getTargetRanges`in new window.InputEvent(`input`)}var Qp=Zp();function $p(){return Wp&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var em=$p(),tm=Jp(/Android/),nm=Jp(/Version\/[\d.]+.*Safari/)&&!tm,rm=Jp(/^(?=.*Chrome).*/i),im=Wp&&tm&&rm,am=Jp(/AppleWebKit\/[\d.]+/)&&Yp&&!rm;function om(){return 2047}var sm=om(),cm=nm||em||am?`\xA0`:`​`,lm=`
48
+
49
+ `,um=Xp?`\xA0`:cm,dm={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},fm={directionless:1,unmergeable:2},pm={center:2,end:6,justify:4,left:1,right:3,start:5};function mm(e){let t={};for(let n of Object.keys(e))t[e[n]]=n;return t}var hm=mm(pm),gm={normal:0,segmented:2,token:1},_m=mm(gm),vm=Symbol.for(`@lexical/ctrlOrOtherKey`),ym=`$config`;function bm(e){return()=>{}}function xm(e){return{type:e}}var Sm=xm(`SELECTION_CHANGE_COMMAND`),Cm=xm(`CLICK_COMMAND`),wm=xm(`BEFORE_INPUT_COMMAND`),Tm=xm(`INPUT_COMMAND`),Em=xm(`COMPOSITION_START_COMMAND`),Dm=xm(`COMPOSITION_END_COMMAND`),Om=xm(`DELETE_CHARACTER_COMMAND`),km=xm(`INSERT_LINE_BREAK_COMMAND`),Am=xm(`INSERT_PARAGRAPH_COMMAND`),jm=xm(`CONTROLLED_TEXT_INSERTION_COMMAND`),Mm=xm(`PASTE_COMMAND`),Nm=xm(`REMOVE_TEXT_COMMAND`),Pm=xm(`DELETE_WORD_COMMAND`),Fm=xm(`DELETE_LINE_COMMAND`),Im=xm(`FORMAT_TEXT_COMMAND`),Lm=xm(`UNDO_COMMAND`),Rm=xm(`REDO_COMMAND`),zm=xm(`KEYDOWN_COMMAND`),Bm=xm(`KEY_ARROW_RIGHT_COMMAND`),Vm=xm(`MOVE_TO_END`),Hm=xm(`KEY_ARROW_LEFT_COMMAND`),Um=xm(`MOVE_TO_START`),Wm=xm(`KEY_ARROW_UP_COMMAND`),Gm=xm(`KEY_ARROW_DOWN_COMMAND`),Km=xm(`KEY_ENTER_COMMAND`),qm=xm(`KEY_SPACE_COMMAND`),Jm=xm(`KEY_BACKSPACE_COMMAND`),Ym=xm(`KEY_ESCAPE_COMMAND`),Xm=xm(`KEY_DELETE_COMMAND`),Zm=xm(`KEY_TAB_COMMAND`),Qm=xm(`DROP_COMMAND`),$m=xm(`DRAGSTART_COMMAND`),eh=xm(`DRAGOVER_COMMAND`),th=xm(`DRAGEND_COMMAND`),nh=xm(`COPY_COMMAND`),rh=xm(`CUT_COMMAND`),ih=xm(`SELECT_ALL_COMMAND`),ah=xm(`CLEAR_EDITOR_COMMAND`),oh=xm(`CLEAR_HISTORY_COMMAND`),sh=xm(`CAN_REDO_COMMAND`),ch=xm(`CAN_UNDO_COMMAND`),lh=xm(`FOCUS_COMMAND`),uh=xm(`BLUR_COMMAND`),dh=xm(`KEY_MODIFIER_COMMAND`);function fh(e,t){return{...t,[vm]:e}}var ph=fh(`metaKey`,{ctrlKey:!Yp,metaKey:Yp}),mh=fh(`altKey`,{altKey:Yp,ctrlKey:!Yp}),hh=[[`altKey`,1],[`ctrlKey`,2],[`metaKey`,4],[`shiftKey`,8]];function gh(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var _h=class{byKey=new Map;byCode=new Map;add(e){let{key:t,modifiers:n={}}=e;t.length>0||L(399);let r=t.toLowerCase();for(let i of function(e){let t=[0];for(let[n,r]of hh){let i=e[n]||!1;i===`any`?t=t.concat(t.map(e=>e|r)):i&&(t=t.map(e=>e|r))}return t}(n))gh(this.byKey,`${i}:${r}`,e),t.length===1&&(/[0-9]/.test(t)?gh(this.byCode,`${i}:Digit${t}`,e):/[a-z]/.test(r)&&gh(this.byCode,`${i}:Key${r.toUpperCase()}`,e));return this}matches(e){let t=e.key;if(!t)return[];let n=function(e){let t=0;for(let[n,r]of hh)e[n]&&(t|=r);return t}(e),r=this.byKey.get(`${n}:${t.toLowerCase()}`),i=r?r.slice():[];if(this.byCode.size>0&&!(t.length===1&&t.charCodeAt(0)<=127)){let t=this.byCode.get(`${n}:${e.code}`);t&&i.push(...t)}return i}match(e){return this.matches(e)[0]}};function vh(e){let t=new _h;for(let n of e)t.add(n);return t}function yh(e){let t=new Map;return{dispose(){for(let e of t.values())e.dispose();t.clear()},register(n,r){let i=t.get(n);i===void 0&&(i={dispose:e(n,r),holders:new Set},t.set(n,i));let a=()=>{let e=t.get(n);e&&e.holders.delete(a)&&e.holders.size===0&&(t.delete(n),e.dispose())};return i.holders.add(a),a}}}function bh(){let e;try{e=`0.53.0+prod.esm`}catch{}return e??`"<unknown>+source"`}var xh=bh(),Sh=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}},Ch=null;function wh(e,t=1e3){return e instanceof Th?e.clone():e.size<t?new Map(e):new Th().init(new Map(e),void 0,e.size)}var Th=class e{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e().init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return t===void 0?this._old&&this._old.get(e):t}get(e){let t=this.getWithTombstone(e);return t===Ch?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)n===Ch?e.delete(t):e.set(t,n);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return n!==Ch&&n!==void 0||(this._size++,n===Ch&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,Ch),this._size--),t}getOrInsert(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}getOrInsertComputed(e,t){let n=this.get(e);if(n!==void 0)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(e){if(t)for(let n of t){let t=n[0],r=e.get(t);r!==Ch&&(r!==void 0&&(n[1]=r),yield n)}for(let n of e)n[1]===Ch||t&&t.has(n[0])||(yield n)}else t&&(yield*t)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.entries())e(n,t,this)}get[Symbol.toStringTag](){return`GenMap`}[Symbol.iterator](){return this.entries()}},Eh=!1;function Dh(e,t,...n){let r=Eh,i;try{Eh=e,i=t()}finally{Eh=r}var a;return(a=i)===null||typeof a!=`object`&&typeof a!=`function`||typeof a.then!=`function`||L(421),i}function Oh(){return Eh}function kh(e){let t=e.exportJSON(Eh),n=e.constructor;return t.type!==n.getType()&&L(130,n.name),R(e)&&!Array.isArray(t.children)&&L(59,n.name),t}function Ah(){return ax()._blockCursorElement}function jh(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-slot`)}var Mh=am||em||nm;function Nh(){let e=Vb().createElement(`img`);e.setAttribute(`data-lexical-decorator-boundary`,`true`),e.alt=``;for(let[t,n]of[[`position`,`absolute`],[`width`,`0px`],[`height`,`0px`],[`border`,`0px`],[`margin`,`0px`],[`padding`,`0px`]])e.style.setProperty(t,n,`important`);return e}function Ph(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-decorator-boundary`)}var Fh=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&L(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&L(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&L(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&n===0?`before`:`after`;let r=Ih(e,this.element);if(r===null)return`after`;let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return`after`;if(t===e)return n<=i?`before`:`after`;let a=Ih(e,t);if(a===null)return`after`;let o=Array.prototype.indexOf.call(e.childNodes,a);return o>=0&&o<=i?`before`:`after`}getInsertionAnchor(){return this.before}};function Ih(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var Lh=class e extends Fh{withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()||this.getDecoratorBoundaryAnchor(`trailing`)}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;jh(t);)e=t,t=t.nextSibling;Ph(t)&&(e=t,t=t.nextSibling);let n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===Ah()?n:e}getDecoratorBoundaryAnchor(e){let t;if(e===`leading`){let e=super.getFirstChildAnchor();for(t=e?e.nextSibling:this.element.firstChild;jh(t);)t=t.nextSibling}else t=this.before?this.before.previousSibling:this.element.lastChild,t!==null&&t===Ah()&&(t=t.previousSibling);return Ph(t)?t:null}setDecoratorBoundaryAnchor(e,t){let n=this.getDecoratorBoundaryAnchor(e);if(t!==(n!==null)){if(n!==null)this.element.removeChild(n);else if(e===`leading`){let e=this.getFirstChildAnchor();this.element.insertBefore(Nh(),e?e.nextSibling:this.element.firstChild)}else this.element.insertBefore(Nh(),this.before)}}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){let t=this.element,n=this.after===null?t.firstChild:this.after.nextSibling,r=e===`empty`&&jh(n)?null:e;if(t.__lexicalLastChildKind!==r){if(t.__lexicalLastChildKind=r,r===null)this.removeManagedLineBreak();else{let e=r===`decorator`&&Mh;this.insertManagedLineBreak(e)}}}removeManagedLineBreak(){let e=this.element,t=this.getManagedLineBreak();if(t){t.remove();for(let t of e.querySelectorAll(`:scope > [data-lexical-managed-linebreak]`))t.remove();e.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.element,n=this.getManagedLineBreak();if(n){let r=e?n.nextSibling:n;if(r&&r===t.querySelector(`:scope > br[data-lexical-managed-linebreak]`))return;this.removeManagedLineBreak()}let r=this.before||this.getDecoratorBoundaryAnchor(`trailing`),i=Vb().createElement(`br`);if(i.setAttribute(`data-lexical-managed-linebreak`,`true`),t.insertBefore(i,r),e){let e=Vb().createElement(`img`);e.setAttribute(`data-lexical-managed-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,t.insertBefore(e,i),t.__lexicalLineBreak=e}else t.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=Ah(),i=this.element.childNodes,a=Math.min(r,i.length),o=0;for(let e=t;e<a;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=Rh(t,n);i.push(r);let a=Rh(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function Rh(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&L(225),n.reverse()}var zh=!1,Bh=0;function Vh(){Bh=performance.now()}function Hh(e){return Zb(e)&&e.hasAttribute(`data-lexical-managed-linebreak`)}function Uh(e,t,n){let r=Pb(Cb(n)),i=r&&Wb(r,n._rootElement),a=null,o=null;i!==null&&i.anchorNode===e&&(a=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;s!==null&&nb(t,s,a,o,!1)}function Wh(e,t,n){if(B(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return Dy(t)&&n.isAttached()}function Gh(e,t,n){for(let r=e;r&&!yx(r);r=hb(r)){let e=By(r,t);if(e!==void 0){let t=Ly(e,n);if(t)return dv(t)||!Zb(r)?void 0:[r,t]}}}function Kh(e,t,n,r){zh=!0;let i=e._inputState.unprocessedBeforeInputData===null&&performance.now()-Bh>100;try{iC(e,()=>{let a=Hw()||function(e){return e.read(`latest`,()=>{let e=Hw();return e===null?null:e.clone()})}(e),o=new Map,s=e._editorState,c=e._blockCursorElement,l=!1,u=``;for(let n of t){let t=n.type,d=n.target,f=Gh(d,e,s);if(!f)continue;let[p,m]=f;if(t===`characterData`)r?z(m)&&m.isAttached()&&m.markDirty():i&&z(m)&&Dy(d)&&Wh(a,d,m)&&Uh(d,m,e);else{l=!0;for(let t of n.addedNodes){let n=By(t,e);if(t!==c&&t.parentNode===d&&(n?e.getElementByKey(n)!==t:!(e._slotsUsed&&Zb(t)&&t.hasAttribute(`data-lexical-slot`)||yx(t)))){if(Xp){let e=(Zb(t)?t.innerText:null)||t.nodeValue;e&&(u+=e)}d.removeChild(t)}}for(let e of n.removedNodes){let t=c===e;if(t||Ph(e)||Hh(e)){let t=n.nextSibling,r=n.previousSibling;d.insertBefore(e,t&&t.parentNode!==d?r?r.parentNode===d?r.nextSibling:null:d.firstChild:t)}t||o.set(p,m)}}}for(let[t,n]of o)n.reconcileObservedMutation(t,e);let d=n.takeRecords();for(let t of d)for(let n of t.addedNodes)n.nodeName!==`BR`||By(n,e)||Hh(n)||n.remove();n.takeRecords(),a!==null&&(l&&qy(a),Xp&&fb(e)&&a.insertRawText(u))})}finally{zh=!1}}function qh(e,t,n){let r=e._observer;if(r!==null){let i=r.takeRecords();(!n||i.length>0)&&Kh(e,i,r,t)}}function Jh(e){(function(e){Cb(e).addEventListener(`textInput`,Vh,!0)})(e),e._observer=new MutationObserver((t,n)=>{Kh(e,t,n)})}function Yh(e,t,n){let{isEqual:r}=e;return t===n||r!==void 0&&r(t,n)}function Xh(e,t){return Yh(e,t,e.defaultValue)}function Zh(e){return typeof e==`object`&&!!e}function Qh(e,t){let n=rg(e,t).getter;return Zh(n)&&n.getterTable!==void 0||L(405,t),ng(n.getterTable)}function $h(e,t){let n=rg(e,t).setter;return Zh(n)&&n.setterTable!==void 0||L(406,t),ng(n.setterTable)}function eg(e,t,n){let{meta:r}=rg(e,t);for(let e=0;;)if(r.kind===`aliased`){if(e===n)return ng(r.aliases);e++,r=r.inner.meta}else r.kind===`nullable`||r.kind===`optional`?r=r.inner.meta:r.kind===`array`?r=r.item.meta:L(407,t,String(n))}function tg(e,t){let n=rg(e,t),{setter:r}=n;Zh(r)&&r.setterTable!==void 0||L(408,t);let i=String(n.defaultValue);return ug(r.setterTable,i)||L(409,t,i),r.setterTable[i]}function ng(e){return Object.assign(Object.create(null),e)}function rg(e,t){let n=e.get(t);return n===void 0&&L(410,t),n}function ig(e,t,n,r,i){i!==void 0&&ag.add(i);let a=n===void 0,o=a?e(void 0):n;return a&&cg(o),Object.assign(e,{accepts:i,defaultValue:o,isEqual:r,meta:t})}var ag=new WeakSet,og=new WeakSet;function sg(e){return typeof e==`object`&&e&&og.add(e),e}function cg(e){if(typeof e==`object`&&e&&!Object.isFrozen(e)&&!og.has(e)){Object.freeze(e);for(let t of Object.values(e))cg(t)}}function lg(e,t){let{accepts:n}=e;return n===void 0?function(e,t){let{accepts:n}=e;if(n!==void 0)return lg(e,t)?{parsed:e(t)}:void 0;let r=e(t);return Xh(e,r)&&t!==e.defaultValue?void 0:{parsed:r}}(e,t)!==void 0:n.call(e,t)}function ug(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function dg(e=``){return ig(t=>typeof t==`string`?t:e,{kind:`string`},void 0,void 0,e=>typeof e==`string`)}var fg=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function pg(e=0,t={}){let{integer:n,clamp:r}=t,i=n&&t.min!==void 0?Math.ceil(t.min):t.min,a=n&&t.max!==void 0?Math.floor(t.max):t.max,o=e=>typeof e==`string`&&fg.test(e)?Number(e):e,s=e=>typeof e==`number`&&Number.isFinite(e)&&(!n||Number.isInteger(e)),c=e=>s(e)&&(i===void 0||e>=i)&&(a===void 0||e<=a);return ig(t=>{let n=o(t);return r&&s(n)?i!==void 0&&n<i?i:a!==void 0&&n>a?a:n:c(n)?n:e},{clamp:r,integer:n,kind:`number`,max:a,min:i},void 0,void 0,e=>r?s(o(e)):c(o(e)))}function mg(e,...t){let n=sg(t.length===0?e[0]:t[0]),r=new Set(e);return ig(e=>e!==void 0&&r.has(e)?e:n,{kind:`enum`,values:e},n,void 0,e=>r.has(e)&&(e!==void 0||n===void 0))}function hg(){return e=>function(e){return{meta:{fields:e,kind:`node`}}}(e)}function gg(e,t){let n=e=>typeof e==`string`&&ug(t,e);return ig(r=>n(r)?t[r]:e(r),{aliases:t,inner:e,kind:`aliased`},e.defaultValue,e.isEqual,t=>n(t)||lg(e,t))}function _g(e,t){return yg(0,e,{getter:{field:t.field,getterTable:t.getterTable,method:t.getter,when:t.when},setter:{field:t.field,method:t.setter,setterTable:t.setterTable}},!0===t.derived)}function vg(e,t){return yg(0,e,{getter:t.getter,setter:t.setter},!0===t.derived)}function yg(e,t,n,r=!1){return Object.assign(e=>t(e),{accepts:t.accepts,defaultValue:t.defaultValue,...r?{derived:!0}:{},getter:n.getter,isEqual:t.isEqual,meta:t.meta,setter:n.setter})}var bg=`latest`,xg=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;derived;schema;constructor(e,t){this.key=e,this.derived=!0===t.derived;let n=`meta`in(r=t.parse)&&typeof r.meta==`object`&&r.meta!==null&&`kind`in r.meta&&typeof r.meta.kind==`string`&&`defaultValue`in r?t.parse:void 0;var r;this.schema=n,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Mg).bind(t),this.isEqual=t.isEqual?t.isEqual.bind(t):n!==void 0&&n.isEqual!==void 0?(e,t)=>Yh(n,e,t):Object.is,this.defaultValue=n===void 0?this.parse(void 0):n.defaultValue,this.resetOnCopyNode=t.resetOnCopyNode||!1}};function Sg(e,t){return new xg(e,t)}function Cg(e,t,n=bg){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function wg(e,t,n){let r;if(RS(),typeof n==`function`){let i=e.getLatest(),a=Cg(i,t);if(r=Tg(t,n(a)),t.isEqual(a,r))return i}else r=Tg(t,n);let i=e.getWritable();return kg(i).updateFromKnown(t,r),i}function Tg(e,t){let{schema:n}=e;return n!==void 0&&n.meta.kind===`set`?e.parse(t):t}function Eg(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of Yx(typeof e==`function`?e:e.replace))if(r&&r.stateConfigs)for(let e of r.stateConfigs){let r;`stateConfig`in e?(r=e.stateConfig,e.flat&&n.add(r.key)):r=e,t.set(r.key,r)}return{flatKeys:n,sharedConfigMap:t}}var Dg=new Set([`__proto__`,`constructor`,`prototype`]),Og=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.knownState.set(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return jg(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){if(Dg.has(i))continue;let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;i&&n in i?(delete i[n],this.unknownState=jg(i)):r.has(e)||this.size++,r.set(e,t)}updateFromUnknown(e,t){if(Dg.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function kg(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new Og(t,function(e){return e.__state?e.__state.sharedNodeState:gy(ax(),e.getType()).sharedNodeState}(t));return t.__state=n,n}function Ag(e,t){let n=e.getWritable(),r=t.$;return(n.__state||r)&&kg(e).updateFromJSON(r),n}function jg(e){if(e)for(let t in e)return e}function Mg(e){return e}function Ng(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function Pg(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function Fg(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function Ig(e){return!mv(e)&&e.getTextContent!==cv.prototype.getTextContent}var Lg=Symbol.for(`@lexical/CachedTextSize`);function Rg(e,t){return t_.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=e_.get(r);if(i===void 0&&L(345,r),R(i)){let a=n_.get(r);if(a!==void 0&&R(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=r_.get(r),t=e&&e.__lexicalTextContent;typeof t!=`string`&&L(346,i.getType()),n+=t.length}e<t-1&&!i.isInline()&&(n+=2)}else if(y_(i).size>0)n+=i.getTextContentSize();else{let e=i[Lg];e===void 0&&L(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:Hg})}function zg(e){R(e)||y_(e).size>0||e[Lg]===void 0&&(e[Lg]=z(e)?e.__text.length:e.getTextContentSize())}var Bg=4,Vg,Hg,Ug,Wg=``,Gg=null,Kg=null,qg=null;function Jg(){return{firstTextKey:qg,format:Gg,style:Kg}}function Yg(e){e.firstTextKey!==null&&(Gg=e.format,Kg=e.style,qg=e.firstTextKey)}function Xg(e){if(qg!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&L(348),t===null)return;let n=n_.get(t);z(n)&&(Gg=n.getFormat(),Kg=n.getStyle(),qg=t)}var Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_=!1,c_=!1;function l_(e,t){let n=e_.get(e),r=n_.has(e);if(t!==null){let n=P_(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(Hg._keyToDOMMap.delete(e),R(n)){let e=Qx(n,e_);u_(e,0,e.length-1,null)}if(n!==void 0){for(let e of y_(n).values()){let t=x_(e);l_(e,null),t!==null&&t.remove()}lb(a_,Ug,Zg,n,`destroyed`)}}}function u_(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&l_(t,r)}}function d_(e,t){e.setProperty(`text-align`,t)}var f_=`40px`;function p_(e,t){let n=Vg.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty(`padding-inline-start`,t===0?``:`calc(${t} * var(--lexical-indent-base-value, ${f_}))`),sb(e,`class`),sb(e,`style`)}function m_(e,t){let n=e.style;t===0?d_(n,``):t===1?d_(n,`left`):t===2?d_(n,`center`):t===3?d_(n,`right`):t===4?d_(n,`justify`):t===5?d_(n,`start`):t===6&&d_(n,`end`),sb(e,`style`)}function h_(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(mv(e))return null;let n=e.getParent();return n===null||Db(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function g_(e){let t=Vb().createElement(`div`);return t.setAttribute(`data-lexical-slot`,e),t.style.display=`none`,t}function __(e,t,n){t||e.contentEditable===`false`?bx(n,Hg):n.removeAttribute(`contenteditable`)}function v_(e,t,n){let r=Wg,i=Jg();Wg=``;let a=``,o=dv(e);for(let[r,i]of n){let n=g_(r);__(t,o,n),t.appendChild(n),Wg=``;let s=Jg();C_(i,sx(e,n,Hg)),Yg(s),b_(e,r,t,n),a+=Wg}return Yg(i),Wg=r,a}function y_(e){return mT(e)&&e.__slots!==null?e.__slots:pT}function b_(e,t,n,r){let i=o_.$getSlotTargetElement(e,t,n,Hg);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=``)}function x_(e){let t=r_.get(e);return t===void 0?null:t.parentElement}function S_(e,t,n){let r=y_(e),i=y_(t);for(let[e,t]of r)if(!i.has(e)){let e=x_(t);l_(t,null),e!==null&&e.remove()}let a=Wg,o=Jg(),s=``,c=null,l=dv(t);for(let[e,a]of i){let i=r.get(e),o=i===void 0?null:x_(i);Wg=``;let u=Jg();if(o===null){o=g_(e);let r=null;for(let e of n.children)if(!e.hasAttribute(`data-lexical-slot`)){r=e;break}n.insertBefore(o,r),C_(a,sx(t,o,Hg))}else i===a?k_(a,o):(i!==void 0&&l_(i,o),C_(a,sx(t,o,Hg)));if(Yg(u),__(n,l,o),b_(t,e,n,o),s+=Wg,o.parentElement===n){let e=c===null?n.firstChild:c.nextSibling;e!==o&&n.insertBefore(o,e),c=o}}return Yg(o),Wg=a,s}function C_(e,t){let n=n_.get(e);if(n===void 0&&L(60),t!==null){let r=e_.get(e);if(r!==void 0){let i=r_.get(e);if(i!==void 0){let a=hT(r)?r.__slotHost:null,o=hT(n)?n.__slotHost:null,s=r.__parent!==n.__parent||a!==o,c=o!==null&&i.parentElement!==t.element;if(s||c)return t.insertChild(i),k_(e,t.element)}}}let r=o_.$createDOM(n,Hg);if(function(e,t,n){let r=n._keyToDOMMap;zy(t,n,e),r.set(e,t)}(e,r,Hg),z(n)?r.setAttribute(`data-lexical-text`,`true`):dv(n)&&(r.setAttribute(`data-lexical-decorator`,`true`),vx(r,{captureSelection:!0})),R(n)){let e=Wg,t=n.__indent,i=n.__size;h_(r,n),t!==0&&p_(r,t);let a=y_(n),o=a.size>0?v_(n,r,a):``;if(i===0)r.__lexicalTextContent=o,r.__lexicalFirstTextKey=null,Wg+=o,a.size>0&&(r.__lexicalSlotTextLength=o.length);else{let t=i-1;if(w_(Qx(n,n_),n,0,t,sx(n,r,Hg)),o!==``){let t=r.__lexicalTextContent||``;r.__lexicalTextContent=o+t,Wg=e+o+t}a.size>0&&(r.__lexicalSlotTextLength=o.length)}if(Ig(n)){let t=n.getTextContent();r.__lexicalTextContent=t,Wg=e+t}let s=n.__format;s!==0&&m_(r,s),n.isInline()||(D_(0,n,r),E_(n,r))}else{let t=n.getTextContent();if(dv(n)){let t=n.decorate(Hg,Vg);t!==null&&A_(e,t),r.contentEditable=`false`;let i=y_(n);i.size>0&&v_(n,r,i)}Wg+=t}return t!==null&&t.insertChild(r),o_.$decorateDOM(n,null,r,Hg),zg(n),lb(a_,Ug,Zg,n,`created`),r}function w_(e,t,n,r,i){let a=Wg,o=Jg();Wg=``,Gg=null,Kg=null,qg=null;let s=n;for(;s<=r;++s){let t=Jg();C_(e[s],i);let n=n_.get(e[s]);n!==null&&z(n)?Gg===null&&(Gg=n.getFormat(),Kg=n.getStyle(),qg=n.__key):R(n)&&s<r&&!n.isInline()&&(Wg+=lm),Yg(t)}let c=Hg._keyToDOMMap.get(t.__key);c===void 0&&L(349,t.__key),c.__lexicalTextContent=Wg,c.__lexicalFirstTextKey=qg,Wg=a+Wg,Yg(o)}function T_(e){return dv(e)&&!e.isInline()}function E_(e,t,n=sx(e,t,Hg)){n.setDecoratorBoundaryAnchor(`leading`,T_(e.getFirstChild())),n.setDecoratorBoundaryAnchor(`trailing`,T_(e.getLastChild()))}function D_(e,t,n){let r=sx(t,n,Hg),i=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return mS(e)?`line-break`:dv(e)&&e.isInline()?`decorator`:null}return`empty`}return null}(t,n_);r.setManagedLineBreak(i)}function O_(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=n_.get(i);if(e===void 0){i=null;break}if(e.__parent===t)break;i=e.__parent}if(i!==null&&!n.has(i)){let e=n_.get(r);if(z(e))return Gg=e.getFormat(),void(Kg=e.getStyle())}}t.__lexicalFirstTextKey=qg}function k_(e,t){let n=e_.get(e),r=n_.get(e);n!==void 0&&r!==void 0||L(61);let i=s_||$g.has(e)||Qg.has(e),a=mb(Hg,e);if(n===r&&!i){let e;if(R(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&L(355,n.getType()),e=t,Xg(a)}else e=n.getTextContent();return Wg+=e,a}if(n!==r&&i&&lb(a_,Ug,Zg,r,`updated`),o_.$updateDOM(r,n,a,Hg)){let n=C_(e,null);return t===null&&L(62),t.replaceChild(n,a),l_(e,null),n}if(R(n)){R(r)||L(334,e);let t=r.__indent;(s_||t!==n.__indent)&&p_(a,t);let o=r.__format;(s_||o!==n.__format)&&m_(a,o);let s=i&&(y_(r).size>0||y_(n).size>0)?S_(n,r,a):``;if(i){let e=Wg;if(function(e,t,n){var r;Gg=null,Kg=null,qg=null,function(e,t,n){let r=Wg,i=e.__size,a=t.__size;Wg=``;let o=n.element,s=Hg._keyToDOMMap.get(t.__key);s===void 0&&L(351,t.__key);let c=a-i;if(!s_&&Math.abs(c)<=1&&i>=Bg&&e.__first===t.__first&&(c!==0||!Hg._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=i_.get(e.__key);if(!s_&&!Ig(t)&&typeof i==`string`&&l!==void 0){let a=function(e,t){let n=t.size;if(n===0||n>=e.__size)return null;let r=e.__last,i=null,a=0;for(;r!==null&&a<n;){if(!t.has(r))return null;i=r;let e=n_.get(r);if(e===void 0)return null;r=e.__prev,a++}return a!==n||r!==null&&t.has(r)?null:i}(t,l);if(a!==null){let u=l.size;if(c===0){let e=Rg(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=n_.get(n);if(e===void 0)break;let t=Jg();k_(n,o),z(e)&&Gg===null&&(Gg=e.getFormat(),Kg=e.getStyle(),qg=e.__key),Yg(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=n_.get(n);if(e===void 0)break;let t;if(R(e)){let r=Hg._keyToDOMMap.get(n),i=r&&r.__lexicalTextContent;typeof i!=`string`&&L(352,e.getType()),t=i}else t=e.getTextContent();d+=t,c<u-1&&R(e)&&!e.isInline()&&(d+=lm),n=e.__next,c++}let f=s.__lexicalSlotTextLength||0,p=f>0?i.slice(f):i,m=p.slice(0,p.length-e)+d;s.__lexicalTextContent=m,Wg=r+m,O_(t,s,l);return}if(function(e,t,n,r,i,a,o,s){if(s!==1&&s!==-1||o!==(s===1?2:1))return!1;let c=o-s,l=e.__last;for(let e=0;e<c-1;e++){if(l===null)return!1;let e=e_.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=n_.get(a),d=e_.get(l);if(u===void 0||d===void 0||u.__prev!==d.__prev)return!1;let f=[],p=a;for(let e=0;e<o;e++){if(p===null)return!1;f.push(p);let e=n_.get(p);p=e?e.__next:null}let m=[];p=l;for(let e=0;e<c;e++){if(p===null)return!1;m.push(p);let e=e_.get(p);p=e?e.__next:null}let h=new Set(m),g=new Set(f),_=[],v=0,y=0;for(;v<c&&y<o;)if(f[y]===m[v])_.push({key:f[y],kind:`reconcile`}),v++,y++;else if(g.has(m[v])){if(h.has(f[y]))return!1;_.push({key:f[y],kind:`create`,nextIndex:y}),y++}else _.push({key:m[v],kind:`destroy`}),v++;for(;v<c;)_.push({key:m[v++],kind:`destroy`});for(;y<o;)_.push({key:f[y],kind:`create`,nextIndex:y}),y++;let b=Rg(l,c);for(let e of _){let t=Jg();if(e.kind===`reconcile`)k_(e.key,n.element);else if(e.kind===`destroy`)l_(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<o;n++){let e=Hg._keyToDOMMap.get(f[n]);if(e!==void 0){t=e;break}}C_(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=n_.get(e.key);t&&z(t)&&Gg===null&&(Gg=t.getFormat(),Kg=t.getStyle(),qg=t.__key)}Yg(t)}let x=``;for(let e=0;e<o;e++){let t=n_.get(f[e]);if(t===void 0)return!1;let n;if(R(t)){let r=Hg._keyToDOMMap.get(f[e]),i=r&&r.__lexicalTextContent;typeof i!=`string`&&L(350,t.getType()),n=i}else n=t.getTextContent();x+=n,e<o-1&&R(t)&&!t.isInline()&&(x+=lm)}let S=r.__lexicalSlotTextLength||0,C=S>0?i.slice(S):i;return r.__lexicalTextContent=C.slice(0,C.length-b)+x,!0}(e,0,n,s,i,a,u,c)){let e=s.__lexicalTextContent;typeof e!=`string`&&L(353),Wg=r+e,O_(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=n_.get(t);if(e===void 0)break;let r=s_||$g.has(t)||Qg.has(t),i=Jg();if(r)k_(t,o);else{let n,r;if(R(e)){r=r_.get(t);let i=r&&r.__lexicalTextContent;typeof i!=`string`&&L(354,e.getType()),n=i}else n=e.getTextContent();Wg+=n,r!==void 0&&Xg(r)}z(e)?Gg===null&&(Gg=e.getFormat(),Kg=e.getStyle(),qg=e.__key):R(e)&&n<a-1&&!e.isInline()&&(Wg+=lm),Yg(i),t=e.__next,n++}s.__lexicalTextContent=Wg,s.__lexicalFirstTextKey=qg,Wg=r+Wg;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)k_(r,o);else{let e=P_(r),t=C_(i,null);try{e.parentNode===o?o.replaceChild(t,e):n.insertChild(t)}catch(n){if(typeof n==`object`&&n){let a=`${n.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw Error(a)}throw n}l_(r,null)}let a=n_.get(i);z(a)&&Gg===null&&(Gg=a.getFormat(),Kg=a.getStyle(),qg=a.__key)}else{let r=Qx(e,e_),s=Qx(t,n_);if(r.length!==i&&L(227),s.length!==a&&L(228),i===0)a!==0&&w_(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&y_(t).size===0&&n.element.__lexicalLineBreak==null;u_(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f],i=Jg();if(e===r)u=j_(k_(r,a.element)),d++,f++;else{if(l===void 0&&(l=M_(n,f)),c===void 0)c=M_(t,d);else if(!c.has(e)){d++,Yg(i);continue}if(!l.has(e)){let t=P_(e);t.parentNode===a.element&&(u=j_(t)),l_(e,a.element),d++,c.delete(e),Yg(i);continue}if(c.has(r)){let e=mb(Hg,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=j_(k_(r,a.element)),d++,f++}else C_(r,a.withBefore(u??a.before)),f++}let o=n_.get(r);o!==null&&z(o)?Gg===null&&(Gg=o.getFormat(),Kg=o.getStyle(),qg=o.__key):R(o)&&f<=s&&!o.isInline()&&(Wg+=lm),Yg(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:Hg.getElementByKey(t);w_(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&u_(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=Wg,s.__lexicalFirstTextKey=qg,Wg=r+Wg}(e,t,sx(t,n,Hg)),Db(t)||(r=t,Gg==null||Gg===r.__textFormat||c_||r.setTextFormat(Gg),function(e){Kg==null||Kg===e.__textStyle||c_||e.setTextStyle(Kg)}(t))}(n,r,a),r.isInline()||(mv(r)||D_(0,r,a),E_(r,a)),s!==``){let t=a.__lexicalTextContent||``;a.__lexicalTextContent=s+t,Wg=e+s+t,a.__lexicalSlotTextLength=s.length}else(y_(r).size>0||y_(n).size>0)&&(a.__lexicalSlotTextLength=0);if(Ig(r)){let t=r.getTextContent();a.__lexicalTextContent=t,Wg=e+t}}else{let e=a.__lexicalTextContent;typeof e!=`string`&&L(356,n.getType()),Wg+=e,Xg(a)}if((s_||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(h_(a,r),mv(r)&&!s_))for(let e of r.getChildren())R(e)&&h_(mb(Hg,e.getKey()),e)}else{let t=r.getTextContent();if(dv(r)){let t=r.decorate(Hg,Vg);t!==null&&A_(e,t),i&&(y_(r).size>0||y_(n).size>0)&&S_(n,r,a)}Wg+=t}if(!c_&&mv(r)){let e=r.getLatest();if(e.__cachedText!==Wg){let t=e.getWritable();t.__cachedText=Wg,r=t}}return o_.$decorateDOM(r,n,a,Hg),zg(r),a}function A_(e,t){let n=Hg._pendingDecorators,r=Hg._decorators;if(n===null){if(r[e]===t)return;n=Hy(Hg)}n[e]=t}function j_(e){let t=e.nextSibling;return t!==null&&t===Hg._blockCursorElement&&(t=t.nextSibling),t}function M_(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function N_(e,t,n,r,i,a){Wg=``,Gg=null,Kg=null,qg=null,s_=r===2,Hg=n,Vg=n._config,o_=n._config.dom||xS,Ug=n._nodes,Zg=Hg._listeners.mutation,Qg=i,$g=a,e_=e._nodeMap,t_=e,n_=t._nodeMap,c_=t._readOnly,r_=wh(n._keyToDOMMap),i_=function(){let e=new Map,t=t=>{for(let n of t){let t=n_.get(n);if(t===void 0)continue;let r=t.__parent;if(r===null)continue;let i=e.get(r);i===void 0&&(i=new Set,e.set(r,i)),i.add(n)}};return t(Qg.keys()),t($g),e}();let o=new Map;return a_=o,k_(`root`,null),Hg=void 0,Ug=void 0,Qg=void 0,$g=void 0,e_=void 0,t_=void 0,n_=void 0,Vg=void 0,r_=void 0,i_=void 0,a_=void 0,o_=xS,o}function P_(e){let t=r_.get(e);return t===void 0&&L(75,e),t}function F_(e,t,n){RS();let r=e.__key,i=e.getParent();if(i===null)return void(gT(e)!==null&&L(367,r,String(gT(e))));let a=function(e){let t=Hw();if(!B(t)||!R(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return xb(i,e)&&n.set(e.__key,0,`element`),xb(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(B(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&(Kw(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(Kw(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else pw(a)&&t&&e.isSelected()&&e.selectPrevious();lT(e.getWritable(),t&&!o&&B(a)?a:null),n||Db(i)||i.canBeEmpty()||!i.isEmpty()||F_(i,t),t&&a&&mv(i)&&i.isEmpty()&&i.selectEnd()}var I_=Symbol.for(`ephemeral`);function L_(e){return e[I_]||!1}var R_={configurable:!0,enumerable:!1,value:void 0,writable:!0},z_=class{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=Hx(this);return e===void 0&&L(64,this.name),e}static clone(e){L(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||$x(this.constructor);return Object.assign(t,{extends:n}),typeof e==`string`&&Object.assign(t,{type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&=this.__state.getWritable(this).resetOnCopyNode()}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",R_),Object.defineProperty(this,Lg,R_),jy(this,e)}getType(){return this.__type}isInline(){L(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=Ly(e);if(t===null)break;e=t.__parent===null?gT(t):t.__parent}return!1}isSelected(e){let t=e||Hw();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(z(this))return n;if(B(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(dv(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:Ly(e)}getParentOrThrow(){let e=this.getParent();return e===null&&L(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(Db(t)||gT(e)!==null)return R(e)||e===this&&dv(e)||L(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&L(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:Ly(e)}getPreviousSiblings(){return fT(this.getPreviousSibling(),`previous`).reverse()}getNextSibling(){let e=this.getLatest().__next;return e===null?null:Ly(e)}getNextSiblings(){return fT(this.getNextSibling(),`next`)}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=hE(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?fE(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&L(279),!1)))}isParentOf(e){return xb(e,this)}getNodesBetween(e){let t=this.isBefore(e),n=[],r=this,i=!0,a=0;for(;r!==null&&((i||a===0)&&n.push(r),!r.is(e));){!i&&a>0&&a--;let e=i&&R(r)?t?r.getFirstChild():r.getLastChild():null;e!==null&&a++;let n=e||(t?r.getNextSibling():r.getPreviousSibling());i=n!==null,r=n||r.getParent()}return t?n:n.reverse()}isDirty(){let e=HS()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(L_(this))return this;let e=Ly(this.__key);return e===null&&L(442,this.__key,this.__type),e}getWritable(){if(L_(this))return this;RS();let e=BS(),t=HS(),n=this.__key,r=t._cloneNotNeeded,i=r.get(n),a=e._selection;if(a!==null&&a.setCachedNodes(null),i!==void 0)return Ny(i),i;let o=e._nodeMap,s=o.get(n);s===void 0&&L(442,n,this.__type);let c=px(s);return r.set(n,c),o.set(n,c),Ny(c),c}getTextContent(){return AT(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){L(70)}updateDOM(e,t,n){L(71)}getDOMSlot(e){return new Fh(e)}exportDOM(e){return{element:ox(e).$createDOM(this,e)}}exportJSON(e=!1){let t=function(e,t){let n=Tx(wx(e.constructor)),{generated:r,isCompactDefault:i}=n,a=r===null?void 0:t?r.exportCompactJSON:r.exportJSON;return a===void 0?function(e,t,n){let r=n?{type:e.__type}:{};return R(e)&&(r.children=[]),function(e,t,n,r){for(let i=0;i<t.length;i++){let a=t[i];if(r&&a.derived)continue;let o;if(a.kind===`ownField`){let t=Lx(e)[a.field];o=a.getterTable===void 0?t:ug(a.getterTable,t)?a.getterTable[t]:void 0}else o=a.getter.call(e);a.kind===`ownField`&&a.when!==void 0&&(!Rx(a,o)&&a.when.call(e)||(o=void 0)),r&&Rx(a,o)||(n[a.key]=o)}}(e,t,r,n),n||(r.type=e.__type,r.version=1),r}(e,n.getters,t):t?a(e,i):a(e)}(this,e),n=this.__state?this.__state.toJSON():void 0;return n!==void 0&&Object.assign(t,n),t}static importJSON(e){L(18,this.name)}updateFromJSON(e){return Vx(Ag(this,e),e)}static transform(){return null}remove(e){F_(this,!0,e)}replace(e,t){RS();let n=Hw();n!==null&&(n=n.clone()),Ab(this,e);let r=this.getLatest(),i=this.__key,a=_T(r);a!==null&&L(400,i,r.getType(),a.getKey(),a.getType());let o=e.__key,s=e.getWritable(),c=this.getParentOrThrow().getWritable(),l=c.__size,u=s.getParent();lT(s,B(n)?n:null);let d=r.getPreviousSibling(),f=r.getNextSibling();F_(r,!1,!0),sT(c,s,d&&d.getWritable(),f&&f.getWritable()),c.__size=u!==null&&u.is(c)?l-1:l;let p=0;if(t&&(R(this)&&R(s)||L(139),p=s.getChildrenSize(),s.splice(p,0,this.getChildren())),B(n)){qy(n);for(let e of[n.anchor,n.focus])e.key===i&&(t&&e.type===`element`?e.set(s.__key,p+e.offset,`element`):ow(e,s))}return Fy()===i&&Py(o),s}insertAfter(e,t=!0){return uT(this,`next`,e,t)}insertBefore(e,t=!0){return uT(this,`previous`,e,t)}isParentRequired(){return!1}createParentElementNode(){return oy()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){return dT(JT(this,`previous`),e,t)}selectNext(e,t){return dT(JT(this,`next`),e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function B_(e){return e instanceof z_}function V_(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&Ng(n,e,t)||t&&Ng(n,t,e)||e&&Pg(n,e,t)||t&&Pg(n,t,e))}(c,l))}function H_(e,t){let n=e.mergeWithSibling(t),r=HS()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function U_(e){let t,n,r=e;if(!Iy(r)){if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&z(t)&&t.isSimpleText()&&!t.isUnmergeable()&&!Iy(t);){if(t.__text!==``){if(V_(t,r)){r=H_(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&z(n)&&n.isSimpleText()&&!n.isUnmergeable()&&!Iy(n);){if(n.__text!==``){if(V_(r,n)){r=H_(r,n);break}break}n.remove()}}else r.remove()}}function W_(e){return G_(e.anchor),G_(e.focus),e}function G_(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),z(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!R(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var K_=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function q_(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!K_.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function J_(e,t,n,r,i){let a=q_(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}var Y_=e=>{let t=Qh(e,`format`),n=$h(e,`format`),r=tg(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=J_(t.indent,0,0,1/0),e.__textFormat=q_(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}};function X_(e,t){e.__detail=t.__detail,e.__format=t.__format,e.__mode=t.__mode,e.__style=t.__style,e.__text=t.__text}var Z_=e=>{let t=Qh(e,`mode`),n=eg(e,`detail`,0),r=eg(e,`format`,0),i=$h(e,`mode`),a=tg(e,`mode`);return{exportJSON:function(e){return{detail:e.__detail,format:e.__format,mode:t[e.__mode],style:e.__style,text:e.__text,type:e.__type,version:1}},exportCompactJSON:function(e){let n={type:e.__type},r=e.__detail;r!==void 0&&r!==0&&(n.detail=r);let i=e.__format;i!==void 0&&i!==0&&(n.format=i);let a=t[e.__mode];a!==void 0&&a!==`normal`&&(n.mode=a);let o=e.__style;o!==void 0&&o!==``&&(n.style=o);let s=e.__text;return s!==void 0&&s!==``&&(n.text=s),n},updateFromJSON:function(e,t){let o=t.detail;e.__detail=typeof o==`string`&&o in n?n[o]:q_(o,0);let s=t.format;e.__format=typeof s==`string`&&s in r?r[s]:q_(s,0);let c=t.mode;e.__mode=typeof c==`string`&&c in i?i[c]:a;let l=t.style;e.__style=typeof l==`string`?l:``;let u=t.text;return e.__text=typeof u==`string`?u:``,e},afterCloneFrom:X_}},Q_=e=>{let t=Qh(e,`format`),n=$h(e,`format`),r=tg(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=J_(t.indent,0,0,1/0),e.__textFormat=q_(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}},$_=()=>({exportJSON:function(e){return{type:e.__type,version:1}},exportCompactJSON:function(e){return{type:e.__type}}}),ev=e=>{let t=Qh(e,`mode`),n=eg(e,`format`,0);return{exportJSON:function(e){return{detail:e.__detail,mode:t[e.__mode],text:e.__text,format:e.__format,style:e.__style,type:e.__type,version:1}},exportCompactJSON:function(e){let t={type:e.__type},n=e.__format;n!==void 0&&n!==0&&(t.format=n);let r=e.__style;return r!==void 0&&r!==``&&(t.style=r),t},updateFromJSON:function(e,t){let r=t.format;e.__format=typeof r==`string`&&r in n?n[r]:q_(r,0);let i=t.style;return e.__style=typeof i==`string`?i:``,e}}};function tv(e){return!1}function nv(){return{...hm,0:``}}function rv(){return{...pm,"":0}}var iv=nv(),av=rv(),ov=hg()({direction:_g(mg([null,`ltr`,`rtl`]),{field:`__dir`}),format:_g(mg([``,`left`,`start`,`center`,`right`,`end`,`justify`]),{field:`__format`,getter:`getFormatType`,getterTable:iv,setter:`setFormat`,setterTable:av}),indent:_g(pg(0,{integer:!0,min:0}),{field:`__indent`}),textFormat:vg(pg(),{getter:{field:`__textFormat`,method:`getSerializedTextFormat`,when:`shouldSerializeTextStyles`},setter:{field:`__textFormat`}}),textStyle:vg(dg(),{getter:{field:`__textStyle`,method:`getSerializedTextStyle`,when:`shouldSerializeTextStyles`},setter:{field:`__textStyle`}})});function sv(e){if(Db(e)&&!tv(HS())){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}var cv=class extends z_{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for(`ElementNode`),{$transform:sv,extends:z_,generated:Y_,json:ov})}constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style=``,this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=``,this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&L(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__style=e.__style,function(e,t){e.__dir=t.__dir,e.__format=t.__format,e.__indent=t.__indent,e.__textFormat=t.__textFormat,e.__textStyle=t.__textStyle}(this,e)}getFormat(){return this.getLatest().__format}getFormatType(){return hm[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){return fT(this.getFirstChild(),`next`)}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&ST(this).length===0}isDirty(){let e=HS()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[];for(let t of ST(this)){let n=CT(this,t);if(R(n))for(let t of n.getAllTextNodes())e.push(t)}let t=this.getFirstChild();for(;t!==null;){if(z(t)&&e.push(t),R(t))for(let n of t.getAllTextNodes())e.push(n);t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;R(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;R(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=e>=this.getChildrenSize(),n=t?this.getLastChild():this.getChildAtIndex(e);return R(n)&&(t?n.getLastDescendant():n.getFirstDescendant())||n}getFirstChild(){let e=this.getLatest().__first;return e===null?null:Ly(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&L(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:Ly(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&L(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=AT(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),R(i)&&r!==n-1&&!i.isInline()&&(e+=lm)}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of xT(e).values()){let e=Ly(n);e!==null&&(t+=e.getTextContentSize())}return t}(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),R(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=pm[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=dm[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Ay(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){RS();let n=Hw(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(z(e)||R(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(z(e)||R(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return B(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):Fw(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){let t=this.getWritable();return t.__format=e!==``&&pm[e]||0,t}setStyle(e){let t=this.getWritable();return t.__style=e||``,t}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){let t=this.getWritable();return t.__indent=e,t}splice(e,t,n){L_(this)&&L(324,this.__key,this.__type);let r=this.getChildrenSize(),i=this.getWritable();e+t<=r||L(226,String(e),String(t),String(r));for(let e of n);let a=i.__key,o=[],s=[],c=this.getChildAtIndex(e+t),l=null,u=r-t+n.length;if(e!==0){if(e===r)l=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(l=t.getPreviousSibling())}}t>0&&(s=function(e,t,n,r){let i=[],a=t;for(let e=0;e<n;e++){a===null&&L(100);let e=a.getNextSibling();i.push(a.getWritable()),a=e}return aT(e,r&&r.getWritable(),a&&a.getWritable()),e.__size-=i.length,i.map(e=>(oT(e),e.__prev=null,e.__next=null,e.__parent=null,e.__key))}(i,l===null?this.getFirstChild():l.getNextSibling(),t,l));let d=n.length>0&&l!==null?l.getWritable():null;for(let e of n){d!==null&&e.is(d)&&(l=d.getPreviousSibling(),d=l&&l.getWritable()),c!==null&&e.is(c)&&(c=c.getNextSibling());let t=e.getWritable();t.__parent===a&&u--,cT(t);let n=e.__key;sT(i,t,d,c&&c.getWritable()),e.__key===a&&L(76),o.push(n),d=t}if(i.__size=u,s.length){let e=Hw();if(B(e)){let t=new Set(s),n=new Set(o);for(let r of[e.anchor,e.focus])lv(r,t,n)&&Kw(r,r.getNode(),this,l,c);u!==0||this.canBeEmpty()||Db(this)||this.remove()}}return i}getDOMSlot(e){return new Lh(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(Zb(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`,t.setAttribute(`data-lexical-indent`,String(e)));let n=this.getDirection();n&&(t.dir=n)}return{element:t}}shouldSerializeTextStyles(){if(Db(this))return!1;for(let e=this.getFirstChild();e!==null;e=e.getNextSibling())if(z(e))return!1;return!0}getSerializedTextFormat(){let e=this.getTextFormat();return e!==0&&this.shouldSerializeTextStyles()?e:void 0}getSerializedTextStyle(){let e=this.getTextStyle();return e!==``&&this.shouldSerializeTextStyles()?e:void 0}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){t.read(`latest`,()=>{let n=sx(this,e,t),r=n.element;n.after&&n.after.parentNode!==r&&(n=n.withAfter(null)),n.before&&n.before.parentNode!==r&&(n=n.withBefore(null));let i=n.getManagedLineBreak();i&&n.insertManagedLineBreak(i.nodeName===`IMG`);let a=n.getFirstChild();for(let e of this.getChildrenKeys()){let i=t.getElementByKey(e);if(!i)continue;let o,s=a;for(;s&&!(o=By(s,t))&&yx(s);)s=s.nextSibling;s!==i&&r.insertBefore(i,o?s:a||n.getInsertionAnchor()),a=i.nextSibling}E_(this,e,n)})}};function R(e){return e instanceof cv}function lv(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var uv=class extends z_{__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&L(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function dv(e){return e instanceof uv}function fv(e){let t=e.getLatest().__cachedText;return t===null||!LS()&&HS()._dirtyType!==0?null:t}var pv=class extends cv{__cachedText;$config(){return this.config(`root`,{extends:cv})}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){L(51)}getTextContent(){let e=fv(this);return e===null?super.getTextContent():e}getTextContentSize(){let e=fv(this);return e===null?super.getTextContentSize():e.length}remove(){L(52)}replace(e){L(53)}insertBefore(e){L(54)}insertAfter(e){L(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)R(e)||dv(e)||L(282);return super.splice(e,t,n)}static importJSON(e){return Gy().updateFromJSON(e)}collapseAtStart(){return!0}};function mv(e){return e instanceof pv}function hv(e){let t={};if(!e)return t;let n=``,r=``,i=null,a=!1,o=!1,s=!1,c=0,l=e.length,u=-1;for(let d=0;d<l;d++){let l=e[d];if(a)l===`*`&&e[d+1]===`/`&&(a=!1,d++);else if(o)u===-1&&(u=d),o=!1;else if(i===null){if(l!==`/`||e[d+1]!==`*`){if(l!==`"`&&l!==`'`){if(l!==`(`){if(l!==`)`){if(s||l!==`:`||c!==0){if(l===`;`&&c===0){u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1);let i=n.trim(),a=r.trim();i!==``&&a!==``&&(t[i]=a),n=``,r=``,s=!1;continue}u===-1&&(u=d)}else u!==-1&&(n+=e.slice(u,d),u=-1),s=!0}else u===-1&&(u=d),c=Math.max(0,c-1)}else u===-1&&(u=d),c++}else u===-1&&(u=d),i=l}else u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1),a=!0,d++}else u===-1&&(u=d),l===`\\`?o=!0:l===i&&(i=null)}u!==-1&&(s?r+=e.slice(u,l):n+=e.slice(u,l));let d=n.trim(),f=r.trim();return d!==``&&f!==``&&(t[d]=f),t}function gv(e,t,n){let r=n.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===`!important`?e.setProperty(t,r.slice(0,i).trim(),`important`):e.setProperty(t,n,``)}function _v(e,t,n=``){if(t===n)return;let r=hv(n),i=hv(t);for(let t in i)delete r[t],gv(e,t,i[t]);for(let t in r)e.removeProperty(t)}var vv=hg()({detail:_g(gg(pg(),fm),{field:`__detail`}),format:_g(gg(pg(),dm),{field:`__format`}),mode:_g(mg([`normal`,`token`,`segmented`]),{field:`__mode`,getterTable:_m,setterTable:gm}),style:_g(dg(),{field:`__style`}),text:_g(dg(),{field:`__text`,getter:`getTextContent`,setter:`setTextContent`})});function yv(e,t){return 16&t?`code`:128&t?`mark`:32&t?`sub`:64&t?`sup`:null}function bv(e,t){return 1&t?`strong`:2&t?`em`:`span`}function xv(e,t,n,r,i){let a=r.classList,o=cb(i,`base`);o!==void 0&&a.add(...o),o=cb(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in dm){let r=dm[e];if(o=cb(i,e),o!==void 0){if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}sb(r,`class`)}function Sv(e,t,n){let r=n.isComposing(),i=e+(r?cm:``),a=ax(),o=ox(a).$getDOMSlot(n,t,a),s=o.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(Vb().createTextNode(i));let c=s,l=c.nodeValue;if(l!==i){if(r||Xp||rm){let[e,t,n]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(l,i);c.replaceData(e,t,n)}else c.nodeValue=i}}function Cv(e,t,n,r,i,a){Sv(i,e,t);let o=a.theme.text;o!==void 0&&xv(0,0,r,e,o)}function wv(e,t){let n=Vb().createElement(t);return n.appendChild(e),n}function Tv(e){return e!=null&&!0===e.__isInlineFormattable}var Ev=class extends z_{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config(`text`,{extends:z_,generated:Z_,importDOM:{"#text":()=>({conversion:jv,priority:0}),b:()=>({conversion:Ov,priority:0}),code:()=>({conversion:Pv,priority:0}),em:()=>({conversion:Pv,priority:0}),i:()=>({conversion:Pv,priority:0}),mark:()=>({conversion:Pv,priority:0}),s:()=>({conversion:Pv,priority:0}),span:()=>({conversion:Dv,priority:0}),strong:()=>({conversion:Pv,priority:0}),sub:()=>({conversion:Pv,priority:0}),sup:()=>({conversion:Pv,priority:0}),u:()=>({conversion:Pv,priority:0})},json:vv})}constructor(e=``,t){super(t),this.__text=e,this.__format=0,this.__style=``,this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return _m[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Fy()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=dm[e];return(this.getFormat()&t)!==0}isSimpleText(){let e=this.getLatest();return e.__type===`text`&&e.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Ay(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=yv(0,n),i=bv(0,n),a=r===null?i:r,o=Vb().createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=Vb().createElement(i),o.appendChild(s)),Cv(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&_v(o.style,c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=yv(0,i),s=yv(0,a),c=bv(0,i),l=bv(0,a);if((o===null?c:o)!==(s===null?l:s))return!0;if(o===s&&c!==l){let e=t.firstChild;e??L(48);let i=Vb().createElement(l);return Cv(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??L(49)),Sv(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&xv(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&(_v(t.style,p,f),sb(t,`style`)),!1}exportDOM(e){let{element:t}=super.exportDOM(e);return Zb(t)||L(132),t.style.whiteSpace=`pre-wrap`,this.hasFormat(`lowercase`)?t.style.textTransform=`lowercase`:this.hasFormat(`uppercase`)?t.style.textTransform=`uppercase`:this.hasFormat(`capitalize`)&&(t.style.textTransform=`capitalize`),this.hasFormat(`bold`)&&(t=wv(t,`b`)),this.hasFormat(`italic`)&&(t=wv(t,`i`)),this.hasFormat(`strikethrough`)&&(t=wv(t,`s`)),this.hasFormat(`underline`)&&(t=wv(t,`u`)),{element:t}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?dm[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?fm[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=Ay(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=gm[e];if(this.getLatest().__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.getLatest().__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){RS();let n=e,r=t,i=Hw(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!B(i))return Fw(o,n,o,r,`text`,`text`);{let e=Fy();e!==i.anchor.key&&e!==i.focus.key||Py(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=Hw();if(r&&B(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){RS();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=Fy(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=Hw();if(B(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=Fv(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=Fg(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=Fv(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=Fg(t,n);let a=n.__key;i===r&&Py(a),y.push(n)}let b=g?g.offset:null,x=_?_.offset:null,S=0;for(let e of y){if(!g&&!_)break;let t=S+e.getTextContentSize();if(g!==null&&b!==null&&b<=t&&b>=S&&(g.set(e.getKey(),b-S,`text`),b<t&&(g=null)),_!==null&&x!==null&&x<=t&&x>=S){_.set(e.getKey(),x-S,`text`);break}S=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&Ny(t),n!==null&&Ny(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),B(v)&&Gw(v,u,t,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||L(50);let n=this.__key,r=e.__key,i=this.__text,a=i.length;Fy()===r&&Py(n);let o=Hw();if(B(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&qw(i,t,n,e,a),s!==null&&s.key===r&&qw(s,t,n,e,a)}let s=e.__text,c=t?s+i:i+s;this.setTextContent(c);let l=this.getWritable();return e.remove(),l}isTextEntity(){return!1}};function Dv(e){return{forChild:Iv(e.style),node:null}}function Ov(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:Iv(t.style,n?void 0:`bold`),node:null}}var kv=new WeakMap;function Av(e){if(!Zb(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function jv(e){let t=e;e.parentElement===null&&L(129);let n=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=kv.get(n))===void 0&&!Av(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)kv.set(r[e],i);return i}(t)!==null)return{node:Qw(n)};if(n=n.replace(/\r/g,``).replace(/[ \t\n]+/g,` `),n===``)return{node:null};if(n[0]===` `){let e=t,r=!0;for(;e!==null&&(e=Mv(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===` `){let e=t,r=!0;for(;e!==null&&(e=Mv(e,!0))!==null;)if((e.textContent||``).replace(/^( |\t|\r?\n)+/,``).length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===``?{node:null}:{node:Fv(n)}}function Mv(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,Zb(n)){let e=n.style.display;if(e===``&&!tx(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(Dy(n))return n;if(n.nodeName===`BR`)return null}}var Nv={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function Pv(e){let t=Nv[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Iv(e.style,t),node:null}}function Fv(e=``){return kb(new Ev(e))}function z(e){return e instanceof Ev}function Iv(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign,l=e.textTransform;return e=>((z(e)||Tv(e))&&(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),l!==`lowercase`&&l!==`uppercase`&&l!==`capitalize`||e.hasFormat(l)||e.toggleFormat(l),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}function Lv(e,t){let{type:n,key:r,offset:i}=e,a=jb(e.key);return n===`text`?(z(a)||L(266,a.getType(),r),YT(a,t,i)):(R(a)||L(267,a.getType(),r),Xv(a,e.offset,t))}function Rv(e,t){let{origin:n,direction:r}=t,i=r===`next`;HT(t)?e.set(n.getKey(),t.offset,`text`):UT(t)?z(n)?e.set(n.getKey(),XT(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(WT(t)&&R(n)||L(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function zv(e){let t=Hw(),n=B(t)?t:Iw();return Bv(n,e),qy(n),n}function Bv(e,t){Rv(e.anchor,t.anchor),Rv(e.focus,t.focus)}function Vv(e){let{anchor:t,focus:n}=e,r=Lv(t,`next`),i=Lv(n,`next`),a=lE(r,i)<=0?`next`:`previous`;return sE(iE(r,a),iE(i,a))}function Hv(e){let{direction:t,origin:n}=e,r=JT(n,RT(t)).getNodeAtCaret();return r?JT(r,t):QT(n.getParentOrThrow(),t)}function Uv(e,t=`root`){let n=[e];for(let r=WT(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Hv(r));return n}function Wv(e){return!!e&&e.origin.isAttached()}function Gv(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=Yv(e,r),o=a.anchor.origin;for(;o!==null&&!Db(o);)o=o.getParent();let s=R(o)?o.getFirstChild():null,c=Uv(a.anchor,n),l=Uv(a.focus.getFlipped(),n),u=new Set,d=[];for(let e of a.iterNodeCarets(n))if(WT(e))u.add(e.origin.getKey());else if(UT(e)){let{origin:t}=e;R(t)&&!u.has(t.getKey())||d.push(t)}let f=new Set;for(let e of d){let t=e.getParent();t===null||u.has(t.getKey())||f.add(t),My(e)}for(let e of f)!e.canBeEmpty()&&!Db(e)&&e.isEmpty()&&e.isAttached()&&e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),a=Hv(JT(t,r)),o=t.getMode();if(Math.abs(e.distance)===n&&i===`removeEmptySlices`||o===`token`&&e.distance!==0)a.remove();else if(e.distance!==0){i=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(o===`segmented`){let e=t.origin,n=Fv(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=YT(n,r,t.offset)}n.is(c[0].origin)&&(c[0]=t),n.is(l[0].origin)&&(l[0]=t.getFlipped())}}let p=Kv(c),m=Kv(l),h=function(e,t,n){let r=e&&e.getParentAtCaret(),i=t&&t.getParentAtCaret(),a=r&&i&&hE(r,i);if(!a||a.type!==`branch`)return null;let o=(e,t)=>{let r;for(let i=e;i&&!i.is(a.commonAncestor);i=i.getParent()){if(Db(i))return;t&&!n.has(i.__key)||!ix(i)||(r=i)}return r},s=o(r,!1),c=s&&o(i,!0);return s&&c&&ST(c).length===0?[s,c]:null}(p,m,u);if(h){let[e,t]=h;QT(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}else if(m){let e=function(e){if(WT(e)){let t=e.origin;if(ix(t))return t}else{let t=e.getParentAtCaret();if(t&&ix(t))return t}return null}(m),t=e&&e.getParent(),n=e&&e.getParents().findLast(Eb);if(e&&t&&!mv(t)&&e.isEmpty()&&u.has(e.getKey())&&ST(e).length===0&&(!n||u.has(n.getKey()))){e.remove(!0);let n=t;for(;n&&!mv(n)&&n.isEmpty();){let e=n.getParent();if(e&&mv(e)&&e.getChildrenSize()<=1&&n.canBeEmpty())break;let t=n;n=e,t.remove(!0)}}}Ky(o,s)!==null||o===null||o.isAttached()||Ky(Gy(),null);let g=Kv([p,m,...c,...l]);if(g)return oE(iE(g,e.direction));L(269,JSON.stringify(c.map(e=>e.origin.__key)))}function Kv(e){let t=e.find(Wv);return t&&qv(t)}function qv(e){let t=function(e){let t=e;for(;WT(t);){let e=eE(t);if(!WT(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(z(t.origin))return HT(t)?t:YT(t.origin,n,n);let r=t.getAdjacentCaret();return UT(r)&&z(r.origin)?YT(r.origin,n,RT(n)):t}function Jv(e){return HT(e)&&e.offset!==XT(e.origin,e.direction)}function Yv(e,t){return e.direction===t?e:sE(iE(e.focus,t),iE(e.anchor,t))}function Xv(e,t,n){let r=e.getChildrenSize(),i=(t>0?Math.min(Math.ceil(t),r):0)-+(n===`next`),a=i<0||i>=r?null:e.getChildAtIndex(i);return a===null?QT(e,n):JT(a,n)}function Zv(e){let{origin:t,offset:n,direction:r}=e;if(n===XT(t,r))return e.getSiblingCaret();if(n===XT(t,RT(r)))return Hv(e.getSiblingCaret());let[i]=t.splitText(n);return z(i)||L(281),iE(JT(i,`next`),r)}function Qv(e,t){for(let n of e)if(n!==null&&n.caret.origin.is(t))return n}function $v(e,t=null){let{origin:n}=e.caret,[r,i]=e.getSliceIndices();if(r===i)return null;if(r===0&&i===n.getTextContentSize())return n;let a=n.getParent(),o=t&&a&&Ww(t,a)?n.getIndexWithinParent():-1,s=t?[t.anchor,t.focus].map(e=>[e,e.key===n.__key&&e.type===`text`?e.offset-r:a!==null&&e.key===a.__key&&e.offset===o?0:null]):[],c=n.splitText(r,i),l=c[r===0?0:1];a&&t&&t!==Hw()&&Gw(t,a,o,c.length-1);for(let[e,t]of s)t!==null&&e.set(l.__key,t,`text`);return l}function ey(e,t){return!0}function ty(e,{$copyElementNode:t=Ob,$splitTextPointCaretNext:n=Zv,rootMode:r=`shadowRoot`,$shouldSplit:i=ey,removeEmptyDestination:a=!1}={}){if(HT(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(WT(e)){let e=Hv(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=fT((s=e).getNodeAtCaret(),s.direction);(r.length>0||!a&&n.canBeEmpty()&&i(n,`last`))&&o.insert(t(n).splice(0,0,r))}var s;return o}function ny(e,t,n){let r=iE(t,`next`);HT(r)&&(r.offset===0?r=JT(r.origin,`previous`).getFlipped():r.offset===r.origin.getTextContentSize()&&(r=JT(r.origin,`next`))),r.origin.is(e)&&(UT(r)||L(342,e.getKey(),e.getType()),r=Hv(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=ty(e,n))r=e;return HT(r)&&L(283),r.insert(e.isInline()?oy().append(e):e),iE(JT(e.getLatest(),`next`),t.direction)}function ry(e,t){let n=Yv(B(t)?Vv(t):t,`next`),r=yT(n.anchor.origin),i=yT(e.getLatest());if(r===null?i!==null:!r.is(i))return!1;let a=qv(QT(e,`next`)),o=iE(qv(QT(e,`previous`)),`next`);return lE(n.anchor,a)<=0&&lE(n.focus,o)>=0}var iy=class extends cv{$config(){return this.config(`paragraph`,{children:`inline`,extends:cv,generated:Q_,importDOM:{p:()=>({conversion:ay,priority:0})}})}createDOM(e){let t=Vb().createElement(`p`),n=cb(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(Zb(t)){this.isEmpty()&&t.append(Vb().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}exportJSON(e=!1){let t=super.exportJSON(e);if(t.textFormat===void 0||t.textStyle===void 0){let n=this.getChildren().find(z),r=n?n.getFormat():this.getTextFormat(),i=n?n.getStyle():this.getTextStyle();e&&r===0||(t.textFormat=r),e&&i===``||(t.textStyle=i)}return t}extractWithChild(e,t,n){if(!B(t)||this.getFormatType()===``&&this.getIndent()===0&&this.getStyle()===``)return!1;if(ry(this,t)){let e=this.getTextContent();return e!==``&&t.getTextContent()===e}return!1}insertNewAfter(e,t){let n=oy();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){if(this.getChildren().every(e=>z(e)&&!/\S/.test(e.getTextContent()))){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function ay(e){let t=oy();if(_x(t,e),hx(e,t),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in pm&&t.setFormat(n)}return gx(t,e),{node:t}}function oy(){return kb(new iy)}function sy(e){return e instanceof iy}var cy=hg()({detail:vg(pg(2),{getter:{field:`__detail`},setter:null}),mode:vg(mg([`normal`]),{getter:{field:`__mode`,getterTable:{0:`normal`}},setter:null}),text:vg(dg(` `),{getter:{field:`__text`,method:`getTextContent`},setter:null})}),ly=class extends Ev{$config(){return this.config(`tab`,{extends:Ev,generated:ev,json:cy})}constructor(e=void 0){super(` `,e),this.__detail=2}createDOM(e){let t=super.createDOM(e),n=cb(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}setTextContent(e){return super.setTextContent(` `)}spliceText(e,t,n,r){return n===``&&t===0||n===` `&&t===1||L(286),this}setDetail(e){return e!==2&&L(127),this}setMode(e){return e!==`normal`&&L(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function uy(){return kb(new ly)}function dy(e){return e instanceof ly}var fy=null;function py(e){fy=e}var my=Symbol(`INTERNAL_SKIP_AFTER_CLONE_FROM`),hy=1;function gy(e,t){let n=_y(e,t);return n===void 0&&L(30,t),n}function _y(e,t){return e._nodes.get(t)}var vy=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function yy(e,t){let n=t===void 0?(()=>{let t=e.getRootNode();return Oy(t)||Ib(t)?Yb(t):null})():t;if(!Zb(n)||n.hasAttribute(`data-lexical-slot`))return!1;let r=Vy(n),i=n.nodeName;return B_(r)&&(i===`INPUT`||i===`TEXTAREA`||n.contentEditable===`true`&&wy(n)==null)}function by(e){let t=e===null?null:Xb(e);return Qb(t)&&yy(t)}function xy(e,t,n){let r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch{return!1}return Cy(t)===e&&e.read(`latest`,()=>!yy(t))}function Sy(e){return e instanceof TS}function Cy(e){let t=e;for(;t!=null;){let e=wy(t);if(Sy(e))return e;t=hb(t)}return null}function wy(e){return e?e.__lexicalEditor:null}function Ty(e){return dy(e)||e.isToken()}function Ey(e){return Ty(e)||e.isSegmented()}function Dy(e){return Qb(e)&&e.nodeType===3}function Oy(e){return Qb(e)&&e.nodeType===9}function ky(e){let t=e;for(;t!=null;){if(Dy(t))return t;t=t.firstChild}return null}function Ay(e,t,n){let r=dm[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~dm.superscript:t===`superscript`?i&=~dm.subscript:t===`lowercase`?(i&=~dm.uppercase,i&=~dm.capitalize):t===`uppercase`?(i&=~dm.lowercase,i&=~dm.capitalize):t===`capitalize`&&(i&=~dm.lowercase,i&=~dm.uppercase),i}function jy(e,t){let n=function(){let e=fy;return fy=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);RS(),zS();let r=HS(),i=BS(),a=``+hy++;i._nodeMap.set(a,e),R(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.set(a,e),r._dirtyType===0&&(r._dirtyType=1),e.__key=a}function My(e){cT(e.getParent()===null?e:e.getWritable())}function Ny(e){zS(),L_(e)&&L(323,e.__key,e.__type);let t=e.__parent===null?hT(e)?e.__slotHost:null:e.__parent,n=BS(),r=HS(),i=n._nodeMap,a=r._dirtyElements;t!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent===null?hT(e)?e.__slotHost:null:e.__parent}}(t,i,a);let o=e.__key;r._dirtyType===0&&(r._dirtyType=1),R(e)?a.set(o,!0):r._dirtyLeaves.add(o)}function Py(e){RS();let t=HS(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=Ly(n);e!==null&&e.getWritable()}if(e!==null){let t=Ly(e);t!==null&&t.getWritable()}}}function Fy(){return LS()?null:HS()._compositionKey}function Iy(e){return!em&&(nm||am)&&e.__text===``&&e.__key===HS()._compositionKey}function Ly(e,t){let n=(t||BS())._nodeMap.get(e);return n===void 0?null:n}function Ry(e,t){let n=By(e,HS());return n===void 0?null:Ly(n,t)}function zy(e,t,n){e[`__lexicalKey_${t._key}`]=n}function By(e,t){return e[`__lexicalKey_${t._key}`]}function Vy(e,t){let n=e;for(;n!=null;){let e=Ry(n,t);if(e!==null)return e;n=hb(n)}return null}function Hy(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Uy(e){return e.read(()=>Gy().getTextContent())}function Wy(e,t){let n=fx(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=Ly(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:`history-merge`}:void 0)}function Gy(){return BS()._nodeMap.get(`root`)}function Ky(e,t){if(!(Db(e)&&e.isAttached()&&(mv(e)?e.getChildrenSize()===0:e.isEmpty())&&(mv(e)||t!==null&&ix(t))))return null;let n=oy();return e.append(n),n}function qy(e){RS();let t=BS();e!==null&&(e.dirty=!0,e.setCachedNodes(null),B(e)&&HS()._slotsUsed&&jw(e)),t._selection=e}function Jy(e){RS(),qh(HS(),e)}function Yy(e){let t=function(e,t){let n=e;for(;n!=null;){let e=By(n,t);if(e!==void 0)return e;n=hb(n)}return null}(e,HS());return t===null?null:Ly(t)}function Xy(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Zy(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}var Qy=0;function $y(){return Wp?Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5):`s${(++Qy).toString(36)}`}function eb(e){return Dy(e)?e.nodeValue:null}function tb(e,t,n){let r=Pb(Cb(t));if(r===null)return;let i=Wb(r,t._rootElement),a=i.anchorNode,{anchorOffset:o,focusOffset:s}=i;if(a!==null){let t=eb(a),r=Vy(a);if(t!==null&&z(r)){if((t===cm||t===um)&&n){let e=n.length;t=n,o=e,s=e}t!==null&&nb(r,t,o,s,e)}}}function nb(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing(),s=!em&&(nm||am);if(a.isToken()&&o)return;let c=t;if((o||i)&&(!t.endsWith(cm)||s&&t===a.getTextContent()||(c=t.slice(0,-cm.length)),i&&!s)){let e=um,t;for(;(t=c.indexOf(e))!==-1;)c=c.slice(0,t)+c.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let l=a.getTextContent();if(i||c!==l){let t=Hw();if(c===``){if(o&&!i&&s)return void rb(a,``,t);if(Py(null),nm||em||am)a.remove();else{let e=HS();rb(a,``,t),setTimeout(()=>{e.update(()=>{a.isAttached()&&a.getTextContent()===``&&a.remove()})},20)}return}let l=a.getParent(),u=Uw(),d=a.getTextContentSize(),f=Fy(),p=a.getKey();if(a.isToken()&&!o||f!==null&&p===f&&!o||B(u)&&(l!==null&&!l.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===e.__key&&u.anchor.offset===0&&!a.canInsertTextBefore()&&!o||u.focus.key===e.__key&&u.focus.offset===d&&!a.canInsertTextAfter()&&!o))return void a.markDirty();if(!B(t)||n===null||r===null)return void rb(a,c,t);if(t.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=Fv(a.getTextContent());a.replace(e),a=e}rb(a,c,t)}}}function rb(e,t,n){if(e.setTextContent(t),B(n)){let t=e.getKey(),r=!1;for(let i of[`anchor`,`focus`]){let a=n[i];a.type===`text`&&a.key===t&&(a.offset=XT(e,a.offset,`clamp`),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function ib(e){let t=e;for(;t!==null;){let e=t.getParent();if(e===null)return null;if(mv(e))return t;t=e}return null}function ab(e,t){let{anchor:n,focus:r}=e,i=n.key,a=n.offset,o=n.type,s=r.key,c=r.offset,l=r.type;if(W_(e),!mv(t))return e;let u=ib(n.getNode());return R(u)&&u.isShadowRoot()&&u.is(ib(r.getNode()))&&(n.set(i,a,o),r.set(s,c,l)),e}function ob(e){let t=Gy();if(B(e)){let t=e.anchor,n=e.focus,r=t.getNode();if(mv(r))return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),ab(e,r),e;let i=r.getTopLevelElementOrThrow(),a=i.getParent();return a===null?(R(i)&&(t.set(i.getKey(),0,`element`),n.set(i.getKey(),i.getChildrenSize(),`element`),ab(e,i)),e):(t.set(a.getKey(),0,`element`),n.set(a.getKey(),a.getChildrenSize(),`element`),ab(e,a),e)}{let e=t.select(0,t.getChildrenSize());return qy(ab(e,t)),e}}function sb(e,t){e.getAttribute(t)===``&&e.removeAttribute(t)}function cb(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=_E(i);return n[t]=e,e}return i}function lb(e,t,n,r,i){if(n.size===0)return;let a=r.__type,o=r.__key,s=t.get(a);s===void 0&&L(33,a);let c=s.klass,l=e.get(c);l===void 0&&(l=new Map,e.set(c,l));let u=l.get(o),d=u===`destroyed`&&i===`created`;(u===void 0||d)&&l.set(o,d?`updated`:i)}function ub(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function db(e,t){let n=e.offset;if(e.type===`element`)return ub(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?ub(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function fb(e){let t=Cb(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function pb(e,t,...n){return eC(e,t,n[0],e)}function mb(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&L(75,t),n}function hb(e){let t=e.assignedSlot||e.parentElement;if(t!==null)return t;let n=e.parentNode;return Ib(n)?n.host:null}function gb(e){return Oy(e)?e:Zb(e)?e.ownerDocument:null}function _b(e,t){let n=parseFloat(e);return isFinite(n)?e.endsWith(`%`)?n*t/100:n:0}function vb(e,t,n,r){let i=t.clientWidth,a=t.scrollWidth-i;if(a<=0)return 0;let o=e.getComputedStyle(t);if(o.overflowX!==`auto`&&o.overflowX!==`scroll`)return 0;let s=t.getBoundingClientRect(),c=t.offsetWidth,l=c>0&&Math.abs(s.width-c)>1?s.width/c:1,u=o.direction===`rtl`,d=s.left+t.clientLeft*l,f=d+_b(o.scrollPaddingLeft,i)*l,p=d+(i-_b(o.scrollPaddingRight,i))*l,m=n,h=Math.max(r,n+1);h-m>p-f&&(u?m=h-1:h=m+1);let g=0;if(m<f?g=m-f:h>p&&(g=h-p),g===0)return 0;let _=t.scrollLeft,v=_+g/l,y=g>0?Math.ceil(v):Math.floor(v),b=u?Math.min(0,Math.max(-a,y)):Math.max(0,Math.min(a,y)),x=_*l;return Math.abs(b)<Math.abs(_)&&m+x>=f&&h+x<=p&&(b=0),b===_?0:(t.scrollLeft=b,(t.scrollLeft-_)*l)}function yb(e){RS(),HS()._updateTags.add(e)}function bb(e){RS(),HS()._deferred.push(e)}function xb(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function Sb(e){let t=gb(e);return t?t.defaultView:null}function Cb(e){let t=e._window;return t===null&&L(78),t}function wb(e){return R(e)&&e.isInline()||dv(e)&&e.isInline()}function Tb(e){let t=e.getLatest();for(;t!==null;){if(gT(t)!==null&&R(t))return t;let e=t.getParentOrThrow();if(Db(e))return e;t=e}return t}function Eb(e){return R(e)&&e.isShadowRoot()}function Db(e){return mv(e)||Eb(e)}function Ob(e,t=!1){let n=e.constructor.clone(e,my);return jy(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function kb(e){let t=HS(),n=e.getType(),r=_y(t,n);r===void 0&&L(200,e.constructor.name,n);let{replace:i,replaceWithKlass:a}=r;if(i!==null){let t=i(e),r=t.constructor;return a===null?t instanceof e.constructor&&r!==e.constructor||L(202,r.name,r.getType(),e.constructor.name,n):t instanceof a||L(201,a.name,a.getType(),r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&L(203,e.constructor.name,n,r.name,r.getType()),t}return e}function Ab(e,t){!mv(e.getParent())||R(t)||dv(t)||L(99)}function jb(e){let t=Ly(e);return t===null&&L(63,e),t}function Mb(e){if(!e||e.isInline())return!1;if(dv(e))return!0;if(R(e)){if(e.isShadowRoot()){let t=e.getParent();return!(R(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function Nb(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function Pb(e){return Wp?(e||window).getSelection():null}function Fb(e){let t=Sb(e);return t?t.getSelection():null}function Ib(e){return $b(e)&&`host`in e}var Lb=[];function Rb(e){let t=e.getRootNode();if(t===e||!Ib(t))return Lb;let n=[t],r=t.host;for(;;){let e=r.getRootNode();if(e===r||!Ib(e))break;n.push(e),r=e.host}return n}function*zb(e){let t=[e],n;for(;n=t.pop();){yield*n.querySelectorAll(`[data-lexical-editor="true"]`);let e=(Oy(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r;for(;r=e.nextNode();)r.shadowRoot&&t.push(r.shadowRoot)}}function Bb(e){return e===null?document:e.ownerDocument}function Vb(){let e=GS();return Bb(e===null?null:e._rootElement)}function Hb(e,t){if(t===null||typeof e.getComposedRanges!=`function`)return null;let n=Rb(t);if(n.length===0)return null;let r=e.getComposedRanges;try{let t=r.call(e,{shadowRoots:n})[0];if(t!==void 0)return t}catch{}try{let t=r.apply(e,n)[0];if(t!==void 0)return t}catch{}return null}function Ub(e,t){let n=Hb(e,t);if(n!==null){let e=Gb(n);if(e!==null)return e}return e.rangeCount>0?e.getRangeAt(0):null}function Wb(e,t){let n=Hb(e,t);return n===null?e:Kb(n,qb(e))}function Gb(e){let t=e.startContainer.ownerDocument;if(t===null)return null;let n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch{return null}}function Kb(e,t){let{startContainer:n,startOffset:r,endContainer:i,endOffset:a}=e;return t===`backward`?{anchorNode:i,anchorOffset:a,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:a}}function qb(e){return e.direction}function Jb(e){let t=e.getRootNode();return Oy(t)||Ib(t)?t.activeElement:null}function Yb(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){let e=t.shadowRoot.activeElement;if(e===null)break;t=e}return t}function Xb(e){let t=e.target;if(t!==null&&Zb(t)&&t.shadowRoot!==null&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0)return t[0]}return t}function Zb(e){return Qb(e)&&e.nodeType===1}function Qb(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function $b(e){return Qb(e)&&e.nodeType===11}var ex=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function tx(e){return!(!Zb(e)||!e.style.display.startsWith(`inline`))||ex.test(e.nodeName)}var nx=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function rx(e){return(!Zb(e)||!e.style.display.startsWith(`inline`))&&nx.test(e.nodeName)}function ix(e){if(dv(e)&&!e.isInline())return!0;if(!R(e)||Db(e))return!1;let t=e.getFirstChild(),n=t===null||mS(t)||z(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function ax(){return HS()}function ox(e=ax()){return e._config.dom||xS}function sx(e,t,n=ax()){let r=ox(n).$getDOMSlot(e,t,n);return R(e)&&(cx(r)||L(344,e.getKey(),e.getType())),r}function cx(e){return e instanceof Lh}function lx(e,t,n=ax()){return ky(sx(e,t,n).element)}var ux=new WeakMap,dx=new Map;function fx(e){if(!e._readOnly&&e.isEmpty())return dx;e._readOnly||L(192);let t=ux.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),ux.set(e,t)),t}function px(e){let t=e.constructor.clone(e,my);return t.afterCloneFrom(e),t}function mx(e){return(t=px(e))[I_]=!0,t;var t}function hx(e,t){let n=e.getAttribute(`data-lexical-indent`);if(n!==null){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}function gx(e,t){let n=t.getAttribute(`dir`);return n===`ltr`||n===`rtl`?e.setDirection(n):e}function _x(e,t){let n=t.style.textAlign;return n&&n in pm?e.setFormat(n):e}function vx(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function yx(e){return!0===e.__lexicalUnmanaged}function bx(e,t=ax()){let n=t.isEditable();e.contentEditable=n?`true`:`false`,n?e.__lexicalEditor=t:delete e.__lexicalEditor}function xx(e,t){let n=e;for(;n!=null;){if(!0===n.__lexicalCapturedSelection)return!0;if(Zb(n)&&n.hasAttribute(`data-lexical-slot`)||By(n,t)!==void 0)return!1;n=hb(n)}return!1}function Sx(e,t){return ug(e,t)&&e[t]!==z_[t]}var Cx=new WeakMap;function wx(e){let t=Cx.get(e);return t===void 0?function(e){let t=e.prototype!=null&&ym in e.prototype?e.prototype[ym]():void 0,n=function(e){if(!(e===z_||e.prototype instanceof z_)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{TS.version&&(n=JSON.parse(TS.version))}catch{}L(290,e.name,t,n)}return e===uv||e===cv||e===z_}(e),r=!n&&Sx(e,`getType`)?e.getType:void 0,i=r&&!(Ex in r)?r.call(e):void 0,a,o=i;if(t){if(i)a=t[i];else{for(let[e,n]of Object.entries(t))o=e,a=n;if(!a)for(let e of Object.getOwnPropertySymbols(t)){let n=t[e];if(n){a=n;break}}}}let s={compiled:void 0,composed:void 0,config:{declaresOwnConfig:ug(e.prototype,ym),klass:e,ownNodeConfig:a,ownNodeType:o},ownFieldsValidated:!1};Cx.set(e,s);try{let t=function(e){let t=e.prototype,n=new Map,{fieldsBaseFirst:r}=Nx(e);for(let[i,a]of r){let r=Ix(e,i,a);if(r===null)continue;if(Zh(r)){let t=r.field;if(t===`__proto__`&&L(430,e.name,i),r.setterTable!==void 0){let{setterTable:t}=r,{meta:n}=a;for(let r of n.kind===`enum`?n.values:[a.defaultValue])ug(t,String(r))||L(431,e.name,i,JSON.stringify(r))}n.set(i,{field:t,key:i,kind:`ownField`,schema:a,setterTable:r.setterTable});continue}let o=t[r];typeof o!=`function`&&L(432,e.name,i,r),n.set(i,{key:i,kind:`field`,schema:a,setter:o})}return n.size===0?Dx:[...n.values()]}(e),r=function(e){let t=e.prototype,n=new Map;for(let[r,i]of Nx(e).fieldsDerivedFirst){let a=Fx(e,r,i);if(a===null)continue;if(Zh(a)){let o=a.field;o===`__proto__`&&L(426,e.name,r);let s=a.when,c;if(s!==void 0){let n=t[s];typeof n!=`function`&&L(427,e.name,r,s),c=n}n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,field:o,getterTable:a.getterTable,isEqual:i.isEqual,key:r,kind:`ownField`,schema:i,when:c});continue}let o=t[a];typeof o!=`function`&&L(428,e.name,r,a),n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,getter:o,isEqual:i.isEqual,key:r,kind:`method`,schema:i})}return n.size===0?Px:[...n.values()]}(e),i=Nx(e),c=function(e,t,n){let r,i=e;for(let{klass:t,ownNodeConfig:n}of Yx(e))n&&n.generated!==void 0&&(r===void 0?(r=n.generated,i=t):n.generated===r&&(i=t));return r===void 0?null:i===e||function(e,t){if(e.getters.length!==t.getters.length||e.setters.length!==t.setters.length)return!1;for(let n=0;n<e.getters.length;n++){let r=e.getters[n],i=t.getters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.derived!==i.derived||r.isEqual!==i.isEqual||!Object.is(r.defaultValue,i.defaultValue)||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.getterTable===void 0!=(i.getterTable===void 0)))return!1}for(let n=0;n<e.setters.length;n++){let r=e.setters[n],i=t.setters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.setterTable===void 0!=(i.setterTable===void 0)))return!1}return!0}(n,Tx(wx(i)))?r:null}(e,0,{getters:r,setters:t});s.compiled={flatStates:i.flatStates,generated:c===null?null:c(i.fields),getters:r,isCompactDefault:zx(r),setters:t},function(e,t,n,r){if(!t&&n){if(!Sx(e,`getType`)){let t=e,r=function(){return this===t?n:z_.getType.call(this)};r[Ex]=!0,e.getType=r}if(Sx(e,`clone`)||(e.clone=(t,n)=>{py(t);let r=new e;return n!==my&&r.afterCloneFrom(t),r}),Sx(e,`importJSON`)||(e.importJSON=r&&r.$importJSON||function(e){return t=>{let n=Xx(e);return n.updateFromJSON===z_.prototype.updateFromJSON?function(e,t){return Vx(e.__state||t.$!==void 0?Ag(e,t):e,t)}(n,t):n.updateFromJSON(t)}}(e)),!Sx(e,`importDOM`)&&r){let{importDOM:t}=r;t&&(e.importDOM=()=>t)}let t=e.prototype;ug(t,`getTextContent`)&&!ug(t,`getTextContentSize`)&&(e.prototype.getTextContentSize=z_.prototype.getTextContentSize)}}(e,n,o,a),function(e){for(let{klass:t,ownNodeConfig:n}of Yx(e)){let e=t.prototype;if(ug(e,`afterCloneFrom`))continue;let r=Jx(t);if(r.length===0)continue;let i=Object.getPrototypeOf(e),a=n&&n.generated!==void 0?Tx(wx(t)).generated:null,o=a!==null&&a.afterCloneFrom||((e,t)=>{let n=e,i=t;for(let e=0;e<r.length;e++){let t=r[e];n[t]=i[t]}});e.afterCloneFrom=function(e){i.afterCloneFrom.call(this,e),o(this,e)},e.afterCloneFrom[Kx]=!0}}(e),function(e,t){t&&t.inline!==void 0&&ug(e.prototype,ym)&&!Object.prototype.hasOwnProperty.call(e.prototype,`isInline`)&&Object.defineProperty(e.prototype,"isInline",{configurable:!0,value:t.inline?Ux:Wx,writable:!0})}(e,a)}catch(t){throw Cx.delete(e),t}return s}(e):t}function Tx(e){let{compiled:t}=e;return t===void 0&&L(422,e.config.klass.name),t}var Ex=Symbol(`lexical.synthesizedGetType`),Dx=[];function Ox(e,t,n,r){let i=n.method===void 0?r:n.method,a=Nx(e).declaredBy.get(t);if(a===void 0)return n;let o=e.prototype,s=a.prototype;return kx(o,s,i)&&kx(o,s,r)?n:i}function kx(e,t,n){return e[n]===t[n]}function Ax(e){return`set${e.charAt(0).toUpperCase()}${e.slice(1)}`}function jx(e){return`get${e.charAt(0).toUpperCase()}${e.slice(1)}`}var Mx={declaredBy:new Map,fields:new Map,fieldsBaseFirst:[],fieldsDerivedFirst:[],flatStates:[]};function Nx(e){let t=wx(e);return t.composed===void 0&&(t.composed=function(e){let t=[],n=[],r=[];for(let{klass:i,ownNodeConfig:a}of Yx(e)){let e=a&&a.json;n.push(i),t.push(e&&e.meta.kind===`node`?Object.entries(e.meta.fields):[]);let o=[];if(a&&a.stateConfigs)for(let e of a.stateConfigs)`stateConfig`in e&&e.flat&&o.push(e.stateConfig);r.push(o)}let i=new Map;for(let e=0;e<t.length;e++)for(let[n,r]of t[e])i.has(n)||i.set(n,r);let a=new Map,o=new Map,s=new Map;for(let e=t.length-1;e>=0;e--){for(let[r,s]of t[e]){let t=i.get(r);t===void 0||a.has(r)||a.set(r,t),t===void 0||s!==t||o.has(r)||o.set(r,n[e])}for(let t of r[e])s.has(t.key)||s.set(t.key,t)}return i.size===0&&s.size===0?Mx:{declaredBy:o,fields:a,fieldsBaseFirst:[...a],fieldsDerivedFirst:[...i],flatStates:[...s.values()]}}(e)),t.composed}var Px=[];function Fx(e,t,n){let r=n.getter;if(r===null)return null;let i=r===void 0?jx(t):r;return Zh(i)?Ox(e,t,i,jx(t)):i}function Ix(e,t,n){let r=n.setter;if(r===null)return null;let i=r===void 0?Ax(t):r;return Zh(i)?Ox(e,t,i,Ax(t)):i}function Lx(e){return e}function Rx(e,t){let{defaultValue:n,isEqual:r}=e;return t===void 0||t===n||r!==void 0&&r(t,n)}function zx(e){let t;return(n,r)=>{t===void 0&&(t=new Map(e.map(e=>[e.key,e])));let i=t.get(n);return i!==void 0&&Rx(i,r)}}function Bx(e){let{setterTable:t,schema:n}=e,{defaultValue:r}=n;return t===void 0?r:t[String(r)]}function Vx(e,t){let{flatStates:n,generated:r,setters:i}=Tx(wx(e.constructor)),a=function(e,t,n){let r=e;for(let e=0;e<n.length;e++){let i=n[e],a=t[i.key];if(a!==void 0){let e=i.parse(a);r=wg(r,i,()=>e)}}return r}(e,t,n);return r!==null&&r.updateFromJSON!==void 0?r.updateFromJSON(a,t):function(e,t,n){for(let r=0;r<n.length;r++){let i=n[r],a=i.schema(t[i.key]);i.kind===`ownField`?Lx(e)[i.field]=i.setterTable===void 0?a:ug(i.setterTable,a)?i.setterTable[a]:Bx(i):i.setter.call(e,a)}return e}(a,t,i)}function Hx(e){return wx(e).config}function Ux(){return!0}function Wx(){return!1}function Gx(e){let t=[];for(let n of[e.getter,e.setter])Zh(n)&&n.field!==`__proto__`&&!t.includes(n.field)&&t.push(n.field);return t}var Kx=`__lexicalSynthesizedAfterCloneFrom`;function qx(e){let{declaredBy:t,fieldsBaseFirst:n}=Nx(e),r=[];for(let[i,a]of n)if(t.get(i)===e)for(let e of Gx(a))r.includes(e)||r.push(e);return r}function Jx(e){let t=qx(e);if(t.length===0)return t;let n=new Set;for(let{klass:t}of Yx(e))if(t!==e)for(let e of qx(t))n.add(e);return n.size===0?t:t.filter(e=>!n.has(e))}function*Yx(e){for(let t=e;t&&(t===z_||B_(t.prototype));){let e=Hx(t),n=e.declaresOwnConfig;yield n?e:{...e,ownNodeConfig:void 0},t=n&&e.ownNodeConfig&&e.ownNodeConfig.extends||$x(t)}}function Xx(e){let t=ax();RS();let n=t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e)),r=new n.klass;return n.replace===null?r:kb(r)}var Zx=(e,t)=>{let n=e;for(;n!=null&&!mv(n);){if(t(n))return n;n=n.getParent()}return null};function Qx(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t===null?Ly(r):t.get(r);e??L(174),n.push(r),r=e.__next}return n}function $x(e){let t=Object.getPrototypeOf(e);if(typeof t==`function`&&t!==Function.prototype)return t;let n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}function eS(e){return new iS(wh(e._nodeMap),null,e._slotsUsed)}function tS(){return new iS(new Map([[`root`,new pv]]),null,!1)}function nS(e){let t=e.constructor,n=kh(e);if(R(e)){let t=n.children,r=e.getChildren();for(let e=0;e<r.length;e++)t.push(nS(r[e]))}let r=ST(e);if(r.length>0){let i={};for(let n of r){let r=CT(e,n);r===null&&L(366,t.name,n),i[n]=nS(r)}n.$slots=i}return n}function rS(e){return e instanceof iS}var iS=class e{_nodeMap;_movedNodes;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,n=!1){this._nodeMap=e,this._movedNodes=null,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size<=1&&this._selection===null}read(e,t){return XS(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return n._readOnly=!0,n._parsed=this._parsed,n}toJSON(e){return Dh(typeof e==`boolean`&&e,()=>XS(null,this,()=>({root:nS(Gy())})))}},aS=`history-push`,oS=`history-merge`,sS=`skip-dom-selection`,cS=`skip-selection-focus`,lS=`composition-end`,uS=class extends cv{$config(){return this.config(`artificial`,{extends:cv})}createDOM(e){return Vb().createElement(`div`)}},dS=class extends z_{$config(){return this.config(`linebreak`,{extends:z_,generated:$_,importDOM:{br:e=>hS(e)||gS(e)?null:{conversion:fS,priority:0}}})}getTextContent(){return`
50
+ `}createDOM(){return Vb().createElement(`br`)}updateDOM(){return!1}isInline(){return!0}};function fS(e){return{node:pS()}}function pS(){return kb(new dS)}function mS(e){return e instanceof dS}function hS(e){let t=e.parentElement;if(t!==null&&rx(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&_S(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&_S(n))return!0}}return!1}function gS(e){let t=e.parentElement;if(t!==null&&rx(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&_S(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&_S(r))return!0}return!1}function _S(e){return Dy(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||``)}function vS(e){console.warn(e)}function yS(e,t,n,r,i){let a=e._keyToDOMMap;a.clear(),e._editorState=tS(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),t!==null&&CC(e,t),e._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},composedSegmentedKey:null,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,isShiftKeyDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,lastPointerType:``,mouseDrag:null,postDeleteSelectionToRestore:null,savedInputMode:void 0,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null};let o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=``,function(e,t){delete e[`__lexicalKey_${t._key}`]}(t,e)),n!==null&&(n.textContent=``,a.set(`root`,n),zy(n,e,`root`))}function bS(e){let t=new Set,n=new Set;for(let{klass:r,ownNodeConfig:i}of Yx(e)){let e=r.transform;if(!n.has(e)){n.add(e);let i=r.transform();i&&t.add(i)}if(i){let e=i.$transform;e&&t.add(e)}}return t}var xS={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=_y(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>R(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,n,r)=>null,$shouldExclude:(e,t,n)=>R(e)&&e.excludeFromCopy(`html`),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function SS(e){let t=e||{},n=GS(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=tS(),s=t.namespace||(i===null?$y():i._config.namespace),c=t.editorState,l=[pv,Ev,dS,ly,iy,uS,...t.nodes||[]],{onError:u,onWarn:d,html:f}=t,p=t.editable===void 0||t.editable,m;if(e===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let e=0;e<l.length;e++){let n=l[e],r=null,i=null;if(n&&typeof n==`object`){let e=n;n=e.replace,r=e.with,i=e.withKlass||null}if(typeof n!=`function`||!n.prototype||!(n===z_||n.prototype instanceof z_)){let r=`<unknown>`;try{r=JSON.parse(xh)}catch{}L(365,String(e-l.length+(t.nodes?t.nodes.length:0)),typeof n==`function`?`${n.name}${typeof n.getType==`function`?` (type ${String(n.getType())})`:``}`:String(n),String(r))}Hx(n);let a=n.getType(),o=bS(n);m.set(a,{exportDOM:f&&f.export?f.export.get(n):void 0,klass:n,replace:r,replaceWithKlass:i,sharedNodeState:Eg(l[e]),transforms:o})}}let h=new TS(o,i,m,{disableEvents:a,dom:{...xS,...e&&e.dom},namespace:s,theme:r},u||console.error,d||vS,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(m,f?f.import:void 0),p,e);return c!==void 0&&(h._pendingEditorState=c,h._dirtyType=2),function(e){e.registerCommand(wm,NC,0),e.registerCommand(Tm,FC,0),e.registerCommand(Em,LC,0),e.registerCommand(Dm,RC,0),e.registerCommand(zm,YC,0)}(h),h}function CS(e,t){let n=e.get(t);e.delete(t),n&&n()}function wS(e,t,n){return e.set(t,n),CS.bind(null,e,t)}var TS=class{static version=xh;_headless;_recordNodeMoves;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_keyDownShortcuts;_inputState;_lastNotifiedSelection;_createEditorArgs;constructor(e,t,n,r,i,a,o,s,c){this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Th,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Map,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=$y(),this._onError=i,this._onWarn=a,this._htmlConversions=o,this._editable=s,this._headless=t!==null&&t._headless,this._recordNodeMoves=!1,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._keyDownShortcuts=null,this._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},composedSegmentedKey:null,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,isShiftKeyDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,lastPointerType:``,mouseDrag:null,postDeleteSelectionToRestore:null,savedInputMode:void 0,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null},this._lastNotifiedSelection=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return wS(this._listeners.update,e)}registerEditableListener(e){return wS(this._listeners.editable,e)}registerDecoratorListener(e){return wS(this._listeners.decorator,e)}registerTextContentListener(e){return wS(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return aC(wS(t,e,e(this._rootElement,null)||void 0),()=>function(e,t,n){let r=e.get(t);r&&r(),e.set(t,t(...n)||void 0)}(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&L(35);let r=this._commands;r.has(e)||r.set(e,[new Sh,new Sh,new Sh,new Sh,new Sh]);let i=r.get(e);i===void 0&&L(36,String(e));let a=function(e){return 7&e}(n),o=i[a];return a===n?o.addBack(t):o.addFront(t),()=>{o.delete(t),i.every(e=>e.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&L(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=fx(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return Wy(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,...t){return pb(this,e,...t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=cb(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,yS(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||function(e){let t=lC.get(e);if(t===void 0)return void nw();let n=uC.get(t);if(n===void 0)return void nw();lC.delete(e);let r=wy(e);Sy(r)?(function(e){if(e._parentEditor!==null){let t=Zy(e),n=t[t.length-1]._key;QC.get(n)===e&&QC.delete(n)}else QC.delete(e._key)}(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&L(198);let i=XC(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),n!=null&&t.classList.remove(...n)),e!==null){let t=Sb(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,Jh(this),this._updateTags.add(oS),ZS(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;lC.set(e,n);let r=uC.get(n);r===void 0&&(r={editors:new Set,hasShadowEditor:void 0},uC.set(n,r)),r.editors.add(t),r.hasShadowEditor=void 0,e.__lexicalEditor=t;let i=XC(e);i.push(dC.register(n));let a={blur:uh,click:vC,compositionend:VC,compositionstart:IC,copy:nh,cut:rh,dragend:th,dragover:eh,dragstart:$m,drop:Qm,focus:lh,input:PC,keydown:HC,paste:Mm,pointerdown:wC,...Qp&&{beforeinput:MC},...em&&{keyup:UC,mousedown:xC}};for(let[n,r]of Object.entries(a))i.push(oC(e,n,i=>{tw(i)||(ew(i),n===`blur`&&(CC(t,e),t._inputState.isShiftKeyDown=!1,t._inputState.isInsertLineBreak=!1),(t.isEditable()||n===`click`||n===`copy`)&&(typeof r==`function`?r(i,t):pb(t,r,i)))}));let o,s=()=>{t._inputState.mouseDrag=null},c=n=>{let i=t._inputState,a=i.mouseDrag;if(o&&o.defaultPrevented&&!n.buttons&&(i.isSelectionChangeFromMouseDown=!1),!a||n.pointerType!==`mouse`)return;let c=n.type===`pointerup`;if(n.type===`pointercancel`||!c&&n.buttons!==1)return s();i.mouseDrag=c?null:n,iC(t,()=>{let o=Pb(Cb(t));if(a.type!==`mousedown`){let r=c&&o&&B(Hw())&&Bw(Uw(),o,t,new Event(`selectionchange`));return r&&qy(r),EC(t,n,c&&o?Wb(o,e).focusNode:null)}let l=Rw(o,t);if(a.defaultPrevented||!a.shiftKey&&l&&!l.isCollapsed())s();else if(o&&i.isSelectionChangeFromMouseDown){ZC(t,o,new Event(`selectionchange`),r),EC(t,a,Wb(o,e).focusNode);let n=Hw();B(n)&&n.isCollapsed()&&!n.is(Uw())&&_C(t,n)}})};i.push(sC(n,{pointercancel:c,pointermove:c,pointerup:c},!0),oC(Cb(t),`blur`,s),t.registerEditableListener(s),sC(e,{contextmenu:s,dragstart:s,keydown:e=>e.getModifierState&&e.getModifierState(e.key)||s(),mousedown:e=>{let n=t._inputState;n.mouseDrag=e.button!==0||e.detail!==1||e.defaultPrevented||n.lastPointerType!==`mouse`||!t.isEditable()||t.isComposing()||xx(Xb(e),t)?null:e}}),oC(e,`pointerdown`,e=>{o=e,t._inputState.lastPointerType=e.pointerType},!0)),em&&i.push(function(e,t){let n=null,r={capture:!0,passive:!0};return aC(oC(e,`touchstart`,e=>{let t=e.touches.length===1?e.touches[0]:null;n=t?{x:t.clientX,y:t.clientY}:null},r),oC(e,`touchend`,e=>{let r=e.changedTouches[0];n!==null&&r&&e.touches.length===0&&Math.abs(r.clientX-n.x)<=yC&&Math.abs(r.clientY-n.y)<=yC&&t(e),n=null},r))}(e,n=>function(e,t,n){t._inputState.savedInputMode!==void 0&&(SC(e,t,n)||(Yb(n.ownerDocument)===n&&n.blur(),CC(t,n)))}(n,t,e)))}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(oS),ZS(this);QS(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){let n=e.isEmpty(),r=e;r._readOnly&&(r=eS(e),r._selection=e._selection?e._selection.clone():null),qh(this);let i=this._pendingEditorState,a=t===void 0?null:t.tag;i===null||i.isEmpty()||(a!=null&&this._updateTags.add(a),ZS(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,iC(this,()=>{if(a&&this._updateTags.add(a),n&&(Hp(38),Gy().append(oy())),e._parsed)for(let[e,t]of r._nodeMap.entries())R(t)?this._dirtyElements.set(e,!0):this._dirtyLeaves.add(e)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return function(e,t,n){let r=tS(),i=DS,a=kS,o=OS,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Map,t._dirtyType=0,DS=r,kS=!1,OS=t,py(null);try{let i=t._nodes;YS(e.root,i),n&&n(),r._readOnly=!0,r._parsed=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,DS=i,kS=a,OS=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(...e){let[t,n]=e.length===1?[`force-commit`,e[0]]:e;return t===`force-commit`&&(PS.has(this)||ZS(this)),(t===`pending`?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):rC(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),iC(this,()=>{let r=Hw(),i=Gy();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||qy(r.clone()),yb(`focus`),bb(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=Pb(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,QS(`editable`,this,!0,e),this._slotsUsed&&this.update(()=>US()))}toJSON(){return{editorState:this._editorState.toJSON(Oh())}}};function ES(e,t,n,r,i,a){if(R(e)){let o=e.__first;for(;o!==null;){let e=r.get(o);if(e===void 0)break;let s=R(e);e.__parent!==t||s&&a.has(o)||((s||mT(e)&&e.__slots!==null)&&ES(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o)),o=e.__next}}for(let o of mT(e)&&e.__slots!==null?e.__slots.values():[]){let e=r.get(o);e!==void 0&&hT(e)&&e.__slotHost===t&&((R(e)||mT(e)&&e.__slots!==null)&&ES(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o))}}var DS=null,OS=null,kS=!1,AS=!1,jS=!1,MS=new Set,NS=new Set,PS=new Set,FS=0,IS={characterData:!0,childList:!0,subtree:!0};function LS(){return kS||DS!==null&&DS._readOnly}function RS(){kS&&L(13)}function zS(){FS>99&&L(14)}function BS(){return DS===null&&L(195,WS()),DS}function VS(e){BS()!==null&&OS===null&&(OS=e),OS!==e&&Hp(378)}function HS(){return OS===null&&L(337,WS()),OS}function US(){HS()._dirtyType=2}function WS(){let e=0,t=new Set,n=TS.version;if(typeof window<`u`)for(let r of zb(document)){let i=wy(r);if(Sy(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function GS(){return OS}function KS(e,t,n){let r=t.__type,i=gy(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function qS(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function JS(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function YS(e,t){let n=e.type,r=t.get(n);r===void 0&&L(17,n);let i=r.klass;e.type!==i.getType()&&L(18,i.name);let a=i.importJSON(e),o=e.children;if(R(a)&&Array.isArray(o))for(let e=0;e<o.length;e++){let n=YS(o[e],t);a.append(n)}let s=e.$slots;if(s){mT(a)||L(379,i.name);for(let e in s)MT(a,e,YS(s[e],t))}return a}function XS(e,t,n){let r=DS,i=kS,a=OS;DS=t,kS=!0,OS=e;try{return n()}finally{DS=r,kS=i,OS=a}}function ZS(e,t){e._pendingEditorState!==null&&OS!==e&&qh(e,!1,!0);let n=jS;jS=!0;try{let n=function(e){if(NS.has(e))return!1;NS.add(e);try{for(let t=0;e._pendingEditorState!==null;t++){let n=e._pendingEditorState._selection,r=e._rootElement;if(!$S(e,n))return!1;let i=(n===null||B(n))&&(e._headless||r===null||!r.isConnected);if(i||t===100)return e._lastNotifiedSelection=n===null?null:n.clone(),!i;rC(e,()=>e.dispatchCommand(Sm),void 0,!0)}return!1}finally{NS.delete(e)}}(e);(function(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return void(!e._updating&&e._deferred.length>0&&tC(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=DS,u=kS,d=OS,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){OS=e,DS=n,kS=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=N_(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),AS)throw t;yS(e,null,r,n),Jh(e),e._dirtyType=2,AS=!0,ZS(e,a),AS=!1;return}finally{p.observe(r,IS),e._updating=f,DS=l,kS=u,OS=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set),e._updateTags=new Set;let y=e._deferred;f||(e._deferred=[]),function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=Hy(e)),delete r[a])}(e,n);let b=i?null:Pb(Cb(e));if(e._editable&&b!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){OS=e,DS=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&Nb(t,e,r),Xw(o,s,e,b,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(B(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(Jb(t))){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())Mb(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);t!==null&&Mb(t)&&(s=!0,c=e.getElementByKey(t.__key))}if(s){let n=sx(a,e.getElementByKey(a.__key),e).element;r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=Vb().createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=_E(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&Nb(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,IS),OS=d,DS=l}}let x=PS.has(e);PS.add(e);try{m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a);let r=e._pendingDecorators;r!==null&&(e._decorators=r,e._pendingDecorators=null,QS(`decorator`,e,!0,r)),function(e,t,n){let r=Uy(t),i=Uy(n);r!==i&&QS(`textcontent`,e,!0,i)}(e,t||a,n),QS(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v})}finally{x||PS.delete(e)}f||tC(e,y),function(e){let t=e._updates;if(t.length===0)return void(e._cascadeCount=0);if(function(e){MS.has(e)||(MS.add(e),setTimeout(()=>{MS.delete(e),e._cascadeCount=0},0))}(e),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,void e._onWarn(Vp(437,e._config.namespace));let n=t.shift();if(n){let[t,r]=n;rC(e,t,r)}}(e)})(e,t),n&&e._onWarn(Vp(436))}finally{jS=n}}function QS(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e],i=Array.from(n);for(let[e,t]of i){t&&t();let i=e(...r),a=typeof i==`function`?i:void 0;n.has(e)?n.set(e,a):a&&a()}}finally{t._updating=i}}function $S(e,t){let n=e._lastNotifiedSelection;return t===null?n!==null:!t.is(n)}function eC(e,t,n,r){let i=Zy(e),a;if(!jS)for(let e=0;e<i.length;e++)i[e]._updating||(i[e]._cascadeCount=0);if(t===Sm){if(OS!==e||kS){let i=!1;return iC(e,()=>{i=eC(e,t,n,r)}),i}let i=BS()._selection;e._lastNotifiedSelection=i===null?null:i.clone()}for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let s=i[o];if(o>0&&s._updating){a=s;break}let c=s._commands.get(t);if(c!==void 0){let t=c[e];if(t.size>0){let e=!1;if(iC(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{eC(a,t,n,r)}),!1}function tC(e,t){if(e._deferred===t&&(e._deferred=[]),t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function nC(e,t){let n=e._updates,r=t||!1;for(;n.length!==0;){let t=n.shift();if(t){let[n,i]=t,a=e._pendingEditorState,o;i!==void 0&&(o=i.onUpdate,i.skipTransforms&&(r=!0),i.discrete&&(a===null&&L(191),a._flushSync=!0),o&&e._deferred.push(o),JS(e,i.tag)),a==null?rC(e,n,i):n()}}return r}function rC(e,t,n,r=!1){let i=e._updateTags,a,o=!1,s=!1;n!==void 0&&(a=n.onUpdate,JS(e,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),a&&e._deferred.push(a);let c=e._editorState,l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=eS(l||c),u=!0),l._flushSync=s;let d=DS,f=kS,p=OS,m=e._updating,h=e._lastNotifiedSelection;DS=l,kS=!1,e._updating=!0,OS=e;let g=e._headless||e.getRootElement()===null;py(null);try{u&&(g?c._selection!==null&&(l._selection=c._selection.clone()):l._selection=function(e,t){let n=e.getEditorState()._selection,r=Pb(Cb(e));return B(n)||n==null?Bw(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),o=nC(e,o),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(B(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(l,e),e._dirtyType!==0&&(o?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);z(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&U_(t)}}(l,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=Fy(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);z(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&U_(r),r!==void 0&&qS(r,a)&&KS(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){FS++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&qS(c,a)&&KS(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,FS++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),nC(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||(R(t)&&ES(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(mT(t)&&t.__slots!==null&&ES(t,e,i,a,o,n),i.has(e)||n.delete(e),o.push(e))}let s=HS(),c=s._cloneNotNeeded;for(let e of o)a.delete(e),c.delete(e);let l=s._compositionKey;l===null||a.has(l)||(s._compositionKey=null)}(c,l,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(l._flushSync=!0);let i=l._selection;if(B(i)){e._slotsUsed&&jw(i);let t=l._nodeMap,n=i.anchor.key,r=i.focus.key;t.get(n)!==void 0&&t.get(r)!==void 0||L(19)}else pw(i)&&i._nodes.size===0&&(l._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=c;let n=c._selection;e._lastNotifiedSelection=n===null?null:n.clone(),e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),ZS(e);return}finally{DS=d,kS=f,OS=p,e._updating=m,FS=0}r||(e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,ZS(e)):u&&vy(()=>{ZS(e)}):(l._flushSync=!1,u&&(i.clear(),e._deferred=[],e._pendingEditorState=null,e._lastNotifiedSelection=h)))}function iC(e,t,n){OS===e&&n===void 0?LS()?rC(e,t,n):t():rC(e,t,n)}function aC(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function oC(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}function sC(e,t,n){return aC(...Object.entries(t).map(([t,r])=>oC(e,t,r,n)))}var cC=30,lC=new WeakMap,uC=new WeakMap,dC=yh(e=>(e.addEventListener(`selectionchange`,$C),()=>e.removeEventListener(`selectionchange`,$C)));function fC(e,t,n,r,i,a){let o=e.anchor,s=e.focus,c=o.getNode(),l=HS(),u;if(a!==void 0)u=a;else{let e=Pb(Cb(l));u=e===null?null:Wb(e,l._rootElement)}let d=u===null?null:u.anchorNode,f=o.key,p=l.getElementByKey(f),m=n.length;return f!==s.key||!z(c)||(!i&&(!Qp||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&m<2||Xy(n))&&o.offset!==s.offset&&!c.isComposing()||Ey(c)||c.isDirty()&&m>1||(i||!Qp)&&p!==null&&!c.isComposing()&&d!==lx(c,p,l)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=Ty(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(z(t)||R(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,c)}function pC(e,t){return Dy(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function mC(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=Wb(e,t._rootElement),s=t._inputState;if(s.isSelectionChangeFromDOMUpdate){s.isSelectionChangeFromDOMUpdate=!1;let e=s.selectionChangeFromDOMUpdatePoints;if(s.selectionChangeFromDOMUpdatePoints=null,pC(r,i)&&pC(a,o)&&!s.postDeleteSelectionToRestore&&(e===null||e.anchorNode===r&&e.anchorOffset===i&&e.focusNode===a&&e.focusOffset===o))return}iC(t,()=>{if(!n)return void qy(null);if(!xy(t,r,a))return;let c=s.mouseDrag;!c||c.type===`mousedown`&&c.defaultPrevented||EC(t,c,a);let l=TC.has(c),u=Hw();if(s.postDeleteSelectionToRestore&&B(u)&&u.isCollapsed()){let e=u.anchor,t=s.postDeleteSelectionToRestore.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(u=s.postDeleteSelectionToRestore.clone(),qy(u))}if(s.postDeleteSelectionToRestore=null,B(u)){let n=u.anchor;if(u.isCollapsed())e.type===`Range`&&r===a&&(u.dirty=!0),_C(t,u);else{let e=n.key,t=u.focus,r=t.key,a=u.getNodes(),s=a.length,c=u.isBackward(),[d,f]=l?[n.offset,t.offset]:[i,o],p=c?f:d,m=c?d:f,h=c?r:e,g=c?e:r,_=sm,v=!1;for(let e=0;e<s;e++){let t=a[e],n=t.getTextContentSize();if(z(t)&&n!==0&&!(e===0&&t.__key===h&&p===n||e===s-1&&t.__key===g&&m===0)&&(v=!0,_&=t.getFormat(),_===0))break}u.format=v?_:0}}(function(e,t,n=!1){(n||$S(e,t))&&e.dispatchCommand(Sm)})(t,u,u!==null&&(u.dirty&&!l||!B(u)))})}function hC(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function gC(e,t){hC(e,t.getFormat(),t.getStyle())}function _C(e,t){let n=t.anchor,r=n.getNode(),i=Cb(e).event,a=i?i.timeStamp:performance.now(),{format:o,style:s,offset:c,key:l,timeStamp:u}=e._inputState.collapsedSelectionFormat;a<u+200&&n.offset===c&&n.key===l?hC(t,o,s):n.type===`text`?(z(r)||L(141),gC(t,r)):(e.isComposing()||Gy().getTextContent()!==``)&&(R(r)||L(259),r.isEmpty()?Vw(t,``):hC(t,t.format,``))}function vC(e,t){iC(t,()=>{let n=Hw(),r=Pb(Cb(t)),i=Uw();if(r){if(B(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!mv(t)&&Gy().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`||em&&t._inputState.lastPointerType!==`mouse`){let n=Wb(r,t._rootElement).anchorNode;(Zb(n)||Dy(n))&&qy(Bw(i,r,t,e))}}if(Xp&&r!==null&&r.rangeCount===0){let n=t._rootElement;if(n!==null&&e.target===n){let a=e.clientY,o=n.childNodes.length;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(Zb(t)){let n=t.getBoundingClientRect();if(a<=(n.top+n.bottom)/2){o=e;break}}}r.setBaseAndExtent(n,o,n,o);let s=Bw(i,r,t,e);s===null?r.removeAllRanges():qy(s)}}pb(t,Cm,e)})}var yC=10,bC=`input:not(:disabled),textarea:not(:disabled),select:not(:disabled),button:not(:disabled),a[href],area[href],label,summary,iframe,object,embed,audio[controls],video[controls],[tabindex],[contenteditable]:not([contenteditable="false"])`;function xC(e,t){let n=t.getRootElement();n!==null&&(SC(e,t,n)?(e.preventDefault(),Yb(n.ownerDocument)!==n&&(t._inputState.savedInputMode===void 0&&(t._inputState.savedInputMode=n.getAttribute(`inputmode`)),n.setAttribute(`inputmode`,`none`),n.focus({preventScroll:!0}))):CC(t,n))}function SC(e,t,n){if(t._inputState.lastPointerType===`mouse`)return!1;let r=Xb(e);if(!Qb(r))return!1;let i=!1;for(let e=r;e!==null;e=hb(e)){if(e===n)return i;if(e.nodeType===1){let t=e;if(t.matches(bC))return!1;t.getAttribute(`data-lexical-decorator`)===`true`&&(i=!0)}}return!1}function CC(e,t){let n=e._inputState.savedInputMode;n!==void 0&&(e._inputState.savedInputMode=void 0,n===null?t.removeAttribute(`inputmode`):t.setAttribute(`inputmode`,n))}function wC(e,t){let n=Xb(e),r=e.pointerType;Qb(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&iC(t,()=>{xx(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}var TC=new WeakSet;function EC(e,t,n=null){let r=Hw(),i=r&&r.clone();(function(e,t,n){let r=Uw(),i=t.type===`mousedown`,a=i&&!t.shiftKey,o=n&&Vy(n);dv(o)&&(i?a&&o.isInline()&&o.selectPrevious():B(r)&&qy(r.clone()));let s=Hw(),c=s||(a?Iw():B(r)?r.clone():null),l=e.getRootElement(),u=l&&l.getRootNode();if(!B(c)||a&&!c.isCollapsed()||!Oy(u)&&!Ib(u))return;let{anchor:d,focus:f}=c;if(!i&&B(r)){let{key:e,offset:t,type:n}=r.anchor;d.set(e,t,n,!0)}let{clientX:p,clientY:m}=t,h=u.elementFromPoint&&u.elementFromPoint(p,m),g=h&&Vy(h),_=(e,t)=>R(e)?t===`next`?e.getLastDescendant():e.getFirstDescendant():e,v=[null],y=R(g)&&!g.isInline()&&(mv(g)?Zx(f.getNode(),Pw):g);for(let e of y?QT(y,`next`):[])v.push(JT(e.origin,`previous`),e);let b=Cb(e),x=b.document.createRange(),S=null;for(let t of v){let n=t?_(t.origin,t.direction):g;if(!dv(n)||!n.isInline()||n===S)continue;let r=e.getElementByKey(n.getKey());if(!r)continue;x.selectNodeContents(r);let i=x.getBoundingClientRect(),o=r.getBoundingClientRect(),{bottom:l,left:u,right:h,top:v}=i.height>o.height?i:o;if(t&&(m<v||m>l)){S=n;continue}let y=b.getComputedStyle(hb(r)||r).direction===`rtl`,C=2*p>u+h!==y,w=C?`next`:`previous`,T=t&&t.getNodeAtCaret(),E=T&&e.getElementByKey(T.getKey()),D=E?E.getClientRects():[],O=D[C?0:D.length-1];if(!t||t.direction===w&&b.getComputedStyle(r).cssFloat===`none`&&(!T||mS(T)||O&&(C===y?2*O.right>u+h:2*O.left<u+h))){if(!n.is(_(db(f,C),w))){let e=JT(n,w);Rv(f,e),a&&Rv(d,e)}s||qy(c);return}}if(dv(o)&&!i){let t=b.document,n=t.caretPositionFromPoint&&t.caretPositionFromPoint(p,m,{shadowRoots:Ib(u)?[u]:[]}),r=n&&Ew(n.offsetNode,n.offset,null,e);if(r){let[{key:e,offset:t,type:n}]=r;f.set(e,t,n)}}})(e,t,n);let a=Hw(),o=e._inputState.mouseDrag;o&&a&&!a.is(i)&&TC.add(o),t.type===`mousedown`&&B(a)&&Vw(a,B(i)?i.anchor.key:``)}function DC(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function OC(e){let{lastKeyCode:t}=HS()._inputState;if(e==null||e.length<=1||t==null)return;let n=t.length===1?t:t===`Enter`?`
51
+ `:t===`Tab`?` `:null;if(!n)return;let r=Hw();if(!B(r)||!r.isCollapsed())return;let i=r.anchor.getNode();if(!z(i))return;let{offset:a}=r.anchor;if(i.getTextContentSize()===a){let e=i.getNextSibling();if(n===`
52
+ `){if(em)return;if(mS(e))e.selectEnd();else if(!e){let e=Zx(i,Pw),t=e&&e.getNextSibling();R(t)&&t.selectStart()}}else n===` `?dy(e)&&e.selectEnd():z(e)&&e.getTextContent()[0]===n&&e.select(1,1)}else i.getTextContent()[a]===n&&i.select(a+1,a+1)}function kC(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function AC(e){Yp&&!em&&rm&&(kC(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>kC(e),0))}function jC(e,t){let n=Xb(e);if(Zb(n)&&xx(n,t))return!0;let r=t.getRootElement();if(r===null)return!1;let i=Yb(r.ownerDocument);return i!==null&&r.contains(i)&&(xx(i,t)||yy(r,i))}function MC(e,t){let n=e.inputType;n===`deleteCompositionText`||Xp&&fb(t)||n!==`insertCompositionText`&&iC(t,()=>{jC(e,t)||pb(t,wm,e)},{event:e})}function NC(e){let t=e.inputType,n=DC(e),r=HS(),i=r._inputState,a=Hw();if(t===`insertText`&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(kC(i),e.preventDefault(),B(a)&&!a.isCollapsed()){let e=a.isBackward()?a.anchor:a.focus;a.anchor.set(e.key,e.offset,e.type),a.focus.set(e.key,e.offset,e.type)}return!0}if(t===`deleteContentBackward`){if(a===null){let e=Uw();if(!B(e))return!0;qy(e.clone())}if(B(a)){let t=a.anchor.key===a.focus.key;if(function(e,t){return e.lastKeyCode===`MediaLast`&&t<e.lastKeyDownTimeStamp+cC}(i,e.timeStamp)&&r.isComposing()&&t){if(Py(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{iC(r,()=>{Py(null)})},cC),B(a)){let e=a.anchor.getNode();e.markDirty(),z(e)||L(142),gC(a,e)}}else{if(Py(null),em&&n!==null&&!n.collapsed&&(a.applyDOMRange(n),!a.isCollapsed()))return e.preventDefault(),a.removeText(),!0;e.preventDefault();let o=a.anchor.getNode(),s=o.getTextContent(),c=o.canInsertTextAfter(),l=a.anchor.offset===0&&a.focus.offset===s.length,u=im&&t&&!l&&c;if(u&&a.isCollapsed()&&(u=!dv(db(a.anchor,!0))),!u){pb(r,Om,!0);let e=Hw();im&&B(e)&&e.isCollapsed()&&(i.postDeleteSelectionToRestore=e,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!B(a))return t!==`historyUndo`&&t!==`historyRedo`||(e.preventDefault(),pb(r,t===`historyUndo`?Lm:Rm)),!0;let o=e.data;i.unprocessedBeforeInputData!==null&&tb(!1,r,i.unprocessedBeforeInputData);let s=!1;if((!a.dirty||i.unprocessedBeforeInputData!==null)&&a.isCollapsed()&&!mv(a.anchor.getNode())&&n!==null){let{key:e,offset:i,type:o}=a.anchor,c=r._slotsUsed&&Ow(a.anchor);a.applyDOMRange(n);let l=t.endsWith(`Forward`);if(!1!==c&&(l||t.endsWith(`Backward`))){let n=iw(e,i,o),{anchor:r,focus:u}=a,d=!Aw(Ow(r),c)||!Aw(Ow(u),c),f=!d&&c!==null&&(l?r.isBefore(n)||u.isBefore(n):n.isBefore(r)||n.isBefore(u));(d||f)&&(r.set(e,i,o),u.set(e,i,o),s=f&&t===`deleteContentForward`)}}i.unprocessedBeforeInputData=null;let c=a.anchor,l=a.focus,u=c.getNode(),d=l.getNode();if(t===`insertText`||t===`insertTranspose`){if(o===`
53
+ `)e.preventDefault(),pb(r,km,!1);else if(o===lm)e.preventDefault(),pb(r,Am);else if(o==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),a.insertRawText(t)}else o!=null&&fC(a,n,o,e.timeStamp,!0)?(e.preventDefault(),pb(r,jm,o),OC(o)):i.unprocessedBeforeInputData=o;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:pb(r,jm,e),OC((e.dataTransfer?e.dataTransfer.getData(`text/plain`):null)??e.data);break;case`insertFromComposition`:{i.compositionPhase=`idle`;let t=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;let n=r._compositionKey;Py(null),t||pb(r,jm,e),zC(n);break}case`insertLineBreak`:Py(null),i.isInsertLineBreak=!1,pb(r,km,!1);break;case`insertParagraph`:Py(null),i.isInsertLineBreak?(i.isInsertLineBreak=!1,pb(r,km,!1)):pb(r,Am);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:pb(r,Mm,e);break;case`deleteByComposition`:(function(e,t){return e!==t||R(e)||R(t)||!Ty(e)||!Ty(t)})(u,d)&&pb(r,Nm,e);break;case`deleteByDrag`:yb(cS),pb(r,Nm,e);break;case`deleteByCut`:pb(r,Nm,e);break;case`deleteContent`:pb(r,Om,!1);break;case`deleteWordBackward`:pb(r,Pm,!0);break;case`deleteWordForward`:pb(r,Pm,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:pb(r,Fm,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:pb(r,s?Om:Fm,!1);break;case`formatStrikeThrough`:pb(r,Im,`strikethrough`);break;case`formatBold`:pb(r,Im,`bold`);break;case`formatItalic`:pb(r,Im,`italic`);break;case`formatUnderline`:pb(r,Im,`underline`);break;case`historyUndo`:pb(r,Lm);break;case`historyRedo`:pb(r,Rm)}return!0}function PC(e,t){e.stopPropagation();let n=t._inputState;kC(n),iC(t,()=>{jC(e,t)||t.dispatchCommand(Tm,e)},{event:e}),n.unprocessedBeforeInputData=null}function FC(e){let t=HS(),n=t._inputState,r=Hw(),i=e.data,a=DC(e),o=!1,s=!1;if(i!=null&&B(r)){let c=Pb(Cb(t)),l=c===null?null:Wb(c,t._rootElement),u=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&!t.isComposing();u&&(n.hadOrphanedCompositionEvents=!0);let d=r.anchor.getNode(),f=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&t.isComposing()&&z(d)&&Ey(d);if(!u&&!f&&fC(r,a,i,e.timeStamp,!1,l)){if(o=!0,n.compositionPhase===`ending-firefox`){let e=BC(t,i);if(n.compositionPhase=`idle`,e)return yb(lS),Jy(),!0}let a=r.anchor.getNode();if(c===null||l===null)return!0;let u=r.isBackward(),d=u?r.anchor.offset:r.focus.offset,f=u?r.focus.offset:r.anchor.offset;Qp&&!r.isCollapsed()&&z(a)&&l.anchorNode!==null&&a.getTextContent().slice(0,d)+i+a.getTextContent().slice(d+f)===eb(l.anchorNode)||(pb(t,jm,i),s=e.inputType===`insertText`);let p=i.length;Xp&&p>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(r.anchor.offset-=p,r._cachedNodes=null,r._cachedIsBackward=null),im&&t.isComposing()&&(n.lastKeyDownTimeStamp=0,Py(null))}}return o||(tb(!1,t,i===null?void 0:i),n.compositionPhase===`ending-firefox`&&(BC(t,i||void 0),yb(`composition-end`),n.compositionPhase=`idle`)),Jy(s),!0}function IC(e,t){pb(t,Em,e)}function LC(e){let t=HS(),n=t._inputState,r=Hw();if(B(r)&&!t.isComposing()){n.compositionPhase=`composing`,n.hadOrphanedCompositionEvents=!1;let i=r.anchor,a=r.anchor.getNode();if(Py(i.key),yb(`composition-start`),e.timeStamp<n.lastKeyDownTimeStamp+cC||i.type===`element`||!r.isCollapsed()||!im&&(a.getFormat()!==r.format||z(a)&&a.getStyle()!==r.style)||z(a)&&(Ey(a)||i.offset===0&&!a.canInsertTextBefore()||i.offset===a.getTextContentSize()&&!a.canInsertTextAfter())){em||!nm&&!am?pb(t,jm,um):function(e){cw(e,``,!0)}(r);let e=Hw();B(e)&&Py(e.anchor.key)}}return!0}function RC(e){let t=HS();return t._inputState.compositionPhase=`idle`,BC(t,e.data),yb(lS),!0}function zC(e){let t=HS()._inputState,n=t.composedSegmentedKey;if(t.composedSegmentedKey=null,e===null||e!==n)return;let r=Ly(e);if(!z(r)||r.getType()===`text`||Ey(r)||!r.isAttached())return;let i=Hw(),a=B(i)&&i.anchor.key===e?i.anchor.offset:null,o=Fv(r.getTextContent());if(o.setFormat(r.getFormat()),o.setStyle(r.getStyle()),r.replace(o),a!==null){let e=Math.min(a,o.getTextContentSize());o.select(e,e)}}function BC(e,t){let n=e._compositionKey;if(Py(null),n!==null&&t!=null){if(t===``){let t=Ly(n),r=e.getElementByKey(n),i=r!==null&&z(t)?lx(t,r,e):null;if(i!==null&&i.nodeValue!==null&&z(t)){let n=Pb(Cb(e)),r=n&&Wb(n,e._rootElement),a=null,o=null;r!==null&&r.anchorNode===i&&(a=r.anchorOffset,o=r.focusOffset),nb(t,i.nodeValue,a,o,!0)}return zC(n),!1}if(t[t.length-1]===`
54
+ `){let t=Hw();if(B(t)||pw(t)){if(B(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return pb(e,Km,null),zC(n),!1}}let r=Ly(n);if(r!==null&&z(r)&&Ey(r)){r.markDirty();let e=Hw(),i=r.getTextContentSize(),a=B(e)&&e.anchor.key===n?e.anchor.offset:i;return r.select(a,a).insertText(t),!0}}return tb(!0,e,t),zC(n),!1}function VC(e,t){let n=t._inputState;Xp?n.compositionPhase=`ending-firefox`:(e.data===``||em||!nm&&!am)&&pb(t,Dm,e)}function HC(e,t){let n=t._inputState;em&&(n.isShiftKeyDown=e.key===`Shift`||n.isShiftKeyDown&&e.shiftKey&&e.key!==`CapsLock`),n.lastKeyDownTimeStamp=e.timeStamp,n.lastKeyCode=e.key,e.key!==`Backspace`&&kC(n),t.isComposing()||!em&&(nm||am)&&e.keyCode===229||pb(t,zm,e)}function UC(e,t){e.shiftKey&&e.key!==`CapsLock`||(t._inputState.isShiftKeyDown=!1)}var WC={altKey:`any`,ctrlKey:`any`,metaKey:`any`,shiftKey:`any`},GC={ctrlKey:!0},KC={metaKey:!0},qC={shiftKey:`any`},JC={altKey:`any`,shiftKey:`any`};function YC(e){let t=HS();if(e.key==null)return!0;let n=t._keyDownShortcuts;n===null&&(n=vh(function(){let e=(e,t,n)=>({key:e,modifiers:t,onMatch:(e,t)=>{pb(t,n,e)}}),t=(e,t,n,r)=>({key:e,modifiers:t,onMatch:(e,t)=>{e.preventDefault(),pb(t,n,r)}}),n=(e,t)=>({key:`Enter`,modifiers:e,onMatch:(e,n)=>{let r=n._inputState;r.isInsertLineBreak=t&&(!em||r.isShiftKeyDown),pb(n,Km,e),e.defaultPrevented&&(r.isInsertLineBreak=!1)}}),r=(e,t)=>({key:e,modifiers:ph,onMatch:(e,n)=>{let r=n._editorState._selection;r===null||B(r)||by(e)||(e.preventDefault(),pb(n,t,e))}});return[e(`ArrowRight`,qC,Bm),e(`ArrowLeft`,qC,Hm),e(`ArrowUp`,JC,Wm),e(`ArrowDown`,JC,Gm),n({...WC,shiftKey:!0},!0),n({...WC,shiftKey:!1},!1),e(` `,WC,qm),{key:`Backspace`,modifiers:qC,onMatch:(e,t)=>{pb(t,Jm,e)&&AC(t._inputState)}},e(`Escape`,WC,Ym),e(`Delete`,{},Xm),t(`Backspace`,mh,Pm,!0),t(`Delete`,mh,Pm,!1),t(`b`,ph,Im,`bold`),t(`u`,ph,Im,`underline`),t(`i`,ph,Im,`italic`),e(`Tab`,qC,Zm),t(`z`,ph,Lm,void 0),t(`z`,{...ph,shiftKey:!0},Rm,void 0),...Yp?[{key:`o`,modifiers:GC,onMatch:(e,t)=>{e.preventDefault(),pb(t,km,!0)}},e(`ArrowLeft`,{metaKey:!0,...qC},Um),e(`ArrowRight`,{metaKey:!0,...qC},Vm),t(`h`,GC,Om,!0),t(`d`,GC,Om,!1),t(`Backspace`,KC,Fm,!0),t(`Delete`,KC,Fm,!1),t(`k`,GC,Fm,!1)]:[e(`Home`,qC,Um),e(`End`,qC,Vm),t(`y`,GC,Rm,void 0)],{key:`a`,modifiers:ph,onMatch:(e,t)=>{e.preventDefault(),pb(t,ih,e)&&AC(t._inputState)}},r(`c`,nh),r(`x`,rh)]}()),t._keyDownShortcuts=n);let r=n.match(e);return r&&r.onMatch(e,t),function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(dh,e),!0}function XC(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}function ZC(e,t,n,r){if(r!==void 0)for(let e of r.editors)e._inputState.isSelectionChangeFromMouseDown=!1;let i=Wb(t,e._rootElement).anchorNode;(Zb(i)||Dy(i))&&qy(Bw(Uw(),t,e,n))}var QC=new Map;function $C(e){let t=e.target;if(Zb(t)&&(t.nodeName===`INPUT`||t.nodeName===`TEXTAREA`))return;let n=Fb(t);if(n===null)return;let r=gb(t),i=null,a=r===null?void 0:uC.get(r);if(r!==null){if(a!==void 0){let e=a.editors,t=a.hasShadowEditor;if(t===void 0){t=!1;for(let n of e)if(n._rootElement!==null&&Ib(n._rootElement.getRootNode())){t=!0;break}a.hasShadowEditor=t}if(t){let t=null;for(let r of e){let e=r._rootElement;if(e===null)continue;let a=Wb(n,e).anchorNode;if(a!==null&&Cy(a)===r){if(Ib(e.getRootNode())){i=r;break}t===null&&(t=r)}}i===null&&t!==null&&(i=t)}else{let e=n.anchorNode;e===null||Zb(e)&&e.shadowRoot!==null||(i=Cy(e))}}if(i===null){let e=Yb(r);i=e===null?null:Cy(e)}}if(i===null)return;i._inputState.isSelectionChangeFromMouseDown&&iC(i,()=>ZC(i,n,e,a));let o=Zy(i),s=o[o.length-1],c=s._key,l=QC.get(c),u=l||s;u!==i&&mC(n,u,!1),mC(n,i,!0),i===s?l&&QC.delete(c):QC.set(c,i)}function ew(e){e._lexicalHandled=!0}function tw(e){return!0===e._lexicalHandled}var nw=bm(),rw=class{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:lE(qv(Lv(this,`next`)),qv(Lv(e,`next`)))<0}getNode(){let e=Ly(this.key);return e===null&&L(20),e}set(e,t,n,r){let i=this._selection,a=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,LS()||(Fy()===a&&Py(e),i!==null&&(i.setCachedNodes(null),B(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}};function iw(e,t,n){return new rw(e,t,n)}function aw(e,t){let n=t.__key,r=e.offset,i=`element`;if(z(t)){i=`text`;let e=t.getTextContentSize();r>e&&(r=e)}else if(!R(t)){let e=t.getNextSibling();if(z(e))n=e.__key,r=0,i=`text`;else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function ow(e,t){if(R(t)){let n=t.getLastDescendant();R(n)||z(n)?aw(e,n):aw(e,t)}else aw(e,t)}function sw(e,t,n,r){let i=e.getNode(),a=i.getChildAtIndex(e.offset),o=Fv();if(o.setFormat(n),o.setStyle(r),sy(a))a.splice(0,0,[o]);else if(a!==null){let e=Db(i)?oy().append(o):o;a.insertBefore(e)}else if(Db(i)){let e=i.getLastChild();R(e)&&!e.isInline()&&e.isEmpty()?e.append(o):i.append(oy().append(o))}else i.append(o);e.is(t)&&t.set(o.__key,0,`text`),e.set(o.__key,0,`text`)}function cw(e,t,n){let r=e.format,i=e.style;if(!e.isCollapsed()){let a=(e.focus.isBefore(e.anchor)?e.focus:e.anchor).getNode();if(z(a)&&(r=a.getFormat(),i=a.getStyle()),e.removeText(),e.format=r,e.style=i,t===``&&!n)return;if(Fy()===null)return e.anchor.type===`element`&&sw(e.anchor,e.focus,r,i),void lw(e,t,r,i)}e.anchor.type===`element`&&sw(e.anchor,e.focus,r,i);let a=e.anchor.getNode();z(a)||L(398);let o=e.anchor.offset,s=a.getParentOrThrow(),c=a.getTextContentSize();if(Ey(a)||o===0&&(!a.canInsertTextBefore()||!s.canInsertTextBefore()&&!a.__prev)||o===c&&(!a.canInsertTextAfter()||!s.canInsertTextAfter()&&!a.__next)){if(a.isSegmented()&&o!==0&&o!==c){if(Fy()!==null)a.setMode(`normal`).setFormat(r).setStyle(i),HS()._inputState.composedSegmentedKey=a.getKey();else{let t=Fv(a.getTextContent());t.setFormat(r),t.setStyle(i);let n=Hw()===e;a.replace(t),e.setTextNodeRange(t,o,t,o),n&&Hw()!==e&&qy(e)}(t!==``||n)&&cw(e,t,n);return}if(t===``&&!n)return;if(o===0||o===c){let c=o===0,l=c?`previous`:`next`,u=JT(a,l).getNodeAtCaret(),d;z(u)&&(c?u.canInsertTextAfter():u.canInsertTextBefore())&&!Ey(u)?d=u:(d=Fv().setFormat(r).setStyle(i),JT((c?s.canInsertTextBefore():s.canInsertTextAfter())?a:s,l).insert(d));let f=c?void 0:0;d.select(f,f),cw(e,t,n);return}let l=Fv(t);l.setFormat(r),l.setStyle(i),a.replace(l),l.select();return}if(t===``&&!n)return;let l=s.isInline()&&o===0&&!a.__prev,u=s.isInline()&&o===c&&!a.__next,d=a.getFormat()!==r||a.getStyle()!==i;if(l||u||d){if(a.getTextContent()!==``||l||u)return void lw(e,t,r,i);a.setFormat(r),a.setStyle(i)}a.spliceText(o,0,t,!0),a.isComposing()&&e.anchor.type===`text`&&e.anchor.set(e.anchor.key,e.anchor.offset-t.length,e.anchor.type)}function lw(e,t,n,r){let i=e.anchor.getNode();z(i)||L(398);let a=e.anchor.offset,o=Fv(t).setFormat(n).setStyle(r),s=i.getParentOrThrow(),c=a===0,l=c||a===i.getTextContentSize();if(l&&s.isInline()&&!(c?i.__prev:i.__next))JT(s,c?`previous`:`next`).insert(o);else{let e=l?i:i.splitText(a)[0];c?e.insertBefore(o,!1):e.insertAfter(o,!1)}i.getTextContent()===``&&i.isAttached()&&i.remove(),o.selectEnd(),o.isComposing()&&e.anchor.type===`text`&&e.anchor.set(e.anchor.key,e.anchor.offset-t.length,e.anchor.type)}var uw=class e{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!pw(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t=this.getNodes().filter(e=>gT(e)===null),n=t.length;if(n===0)return;let r=t[n-1],i;if(z(r))i=r.select();else{let e=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(e,e)}i.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=this._nodes,n=[];for(let e of t){let t=Ly(e);t!==null&&n.push(t)}return LS()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t=``;for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes().filter(e=>gT(e)===null);if((Hw()||Uw())===this&&e[0]){let t=JT(e[0],`next`);zv(sE(t,t))}for(let t of e)t.remove();dw()}};function dw(){let e=Gy();if(e.getChildrenSize()===0&&bT(Hw())===null){let t=oy();e.append(t),t.select()}}function B(e){return e instanceof fw}var fw=class e{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!B(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,a=0;for(let n of e)if(WT(n)){let{origin:e}=n;t.length===0?i.add(e):(a++,t.push(e))}else{let{origin:e}=n;R(e)&&a!==0?a--:t.push(e)}if(r&&t.push(r.caret.origin),UT(e.focus)&&R(e.focus.origin)&&e.focus.getNodeAtCaret()===null)for(let n=QT(e.focus.origin,`previous`);WT(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=eE(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!R(e)||a>0||e.isEmpty()||i.has(e))break;t.pop()}if(t.length===0&&e.isCollapsed()){let n=qv(e.anchor),r=qv(e.anchor.getFlipped()),i=e=>HT(e)?e.origin:e.getNodeAtCaret(),a=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(a)}return t}(Yv(Vv(this),`next`));return LS()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){return this.anchor.set(e.__key,t,`text`),this.focus.set(n.__key,r,`text`),this}getTextContent(){if(this.isCollapsed())return``;let e=this.getNodes(),t=Vv(this).getTextSlices(),n=``,r=!0;for(let i=0;i<e.length;i++){let a=e[i];if(R(a)&&!a.isInline()){r||(n+=`
55
+ `);let e=``;for(let t of ST(a)){let n=CT(a,t);n!==null&&(e+=n.getTextContent())}e===``?r=!a.isEmpty():(n+=e,r=!1)}else if(r=!1,z(a)){let e=Qv(t,a);n+=e?e.getTextContent():a.getTextContent()}else(dv(a)||mS(a))&&(n+=a.getTextContent())}return n}applyDOMRange(e){let t=HS(),n=t.getEditorState()._selection,r=Nw(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(r===null)return;let[i,a,o]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(a.key,a.offset,a.type,!0),o&&(this.dirty=!0),W_(this)}clone(){let t=this.anchor,n=this.focus;return new e(iw(t.key,t.offset,t.type),iw(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=Ay(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=dm[e];return(this.format&t)!==0}insertRawText(e){this.insertNodes(Qw(e))}insertText(e){cw(this,e,!1)}removeText(){let e=Hw()===this,t=this.anchor.key;Bv(this,Gv(Vv(this))),this.isCollapsed()&&Vw(this,t),e&&Hw()!==this&&qy(this)}formatText(e,t=null){gw(this,e,t)}insertNodes(e){if(e.length===0)return;this.isCollapsed()||this.removeText();let t=this.anchor.getNode();if(this.anchor.type===`element`&&R(t)&&t.isShadowRoot()&&gT(t)!==null){let n=t.getFirstChild()??t.append(oy()).getFirstChild();if(n!==null&&!R(n)){let e=oy();n.insertBefore(e),n=e}if(n!==null){n.selectStart();let t=Hw();return B(t)||L(369),t.insertNodes(e)}}if(this.anchor.type===`element`&&Db(t)){let n=rT(e),r=n.getLastDescendant();t.splice(this.anchor.offset,0,n.getChildren()),r!==null&&r.selectEnd();return}let n=this.isBackward()?this.focus:this.anchor,r=n.getNode(),i=Zx(r,ix),a=e[e.length-1];if(R(i)&&`__language`in i){if(`__language`in e[0])this.insertText(e[0].getTextContent());else{let[,t]=eT(this);i.splice(t,0,e),a.selectEnd()}return}if(!e.some(e=>(R(e)||dv(e))&&!e.isInline())){R(i)||L(211,r.constructor.name,r.getType());let[t,n]=eT(this,!0);(R(t)?t:i).splice(n,0,e),a.selectEnd();return}if(i===null){let t=rT(e),n=t.getLastDescendant(),r=Lv(this.anchor,`next`);for(let e of t.getChildren())r=ny(e,r);n!==null&&n.selectEnd();return}if(R(i)&&(gT(i)!==null||!i.isParentRequired()&&!Db(i.getParentOrThrow()))){let[,t]=eT(this),n=$w(e);i.splice(t,0,n);let r=n[n.length-1];r===void 0?i.select(t,t):r.selectEnd();return}let o=rT(e),s=o.getLastDescendant(),c=o.getChildren(),l=function(e){let t=function(e){let t=e.getNode();if(e.offset>0)return e.type===`element`&&R(t)?t.getChildAtIndex(e.offset-1):null;for(let e=t;e!==null&&!ix(e)&&!Db(e);e=e.getParent()){let t=e.getPreviousSibling();if(t!==null)return t}return null}(e);return mS(t)&&mS(t.getPreviousSibling())}(n),u=R(i)&&i.isEmpty()?null:this.insertParagraph();u&&!i.isAttached()&&(r=this.anchor.getNode(),i=Zx(r,ix));let d=c[c.length-1],f=c[0];var p=f;l||!R(p)||!ix(p)||p.isEmpty()||!R(i)||i.isEmpty()&&!i.canMergeWhenEmpty()||(R(i)||L(211,r.constructor.name,r.getType()),i.append(...f.getChildren()),f=c[1]),f&&(i===null&&L(212,r.constructor.name,r.getType()),function(e,t){let n=t.getParentOrThrow().getLastChild(),r=t,i=[t];for(;r!==n;)r.getNextSibling()||L(140),r=r.getNextSibling(),i.push(r);let a=e;for(let e of i)a=a.insertAfter(e)}(i,f));let m=Zx(s,ix),h=s.selectEnd();u&&(R(m)&&(u.canMergeWhenEmpty()||ix(d))?(m.append(...u.getChildren()),u.remove()):u.isEmpty()&&u.remove()),R(i)&&i.isEmpty()&&i.remove();let g=R(i)?i.getLastChild():null;mS(g)&&m!==i&&g.remove();let _=qv(Lv(h.anchor,`next`));Rv(h.anchor,_),Rv(h.focus,_)}insertParagraph(){this.isCollapsed()||this.removeText();let e=this.anchor.getNode();if(this.anchor.type===`element`&&Db(e)){let t=oy();return e.splice(this.anchor.offset,0,[t]),t.select(),t}let[,t]=eT(this),n=Zx(this.anchor.getNode(),ix);if(n!==null&&gT(n)!==null)return null;R(n)||L(213);let r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...i),a.selectStart(),a):null}insertLineBreak(e){let t=pS();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=this.getNodes();if(this.isCollapsed())return[...e];let t=this.isBackward(),n=Vv(this).getTextSlices(),r=[];for(let t of e){let e=Qv(n,t),i=e?$v(e,this):t;i!==null&&r.push(i)}if(e.length===1&&r.length===1&&z(r[0])){let e=r[0],[n,i]=t?[this.focus,this.anchor]:[this.anchor,this.focus];n.set(e.getKey(),0,`text`),i.set(e.getKey(),e.getTextContentSize(),`text`)}return r}modify(e,t,n){if(iT(this,e,t,n))return;let r=e===`move`,i=HS(),a=Pb(Cb(i));if(!a)return;let o=i._blockCursorElement,s=i._rootElement,c=this.focus.getNode();s===null||o===null||!R(c)||c.isInline()||c.canBeEmpty()||Nb(o,i,s);let l=mb(i,this.focus.key),u=l;if(this.focus.type===`text`&&(u=z(c)?lx(c,l,i):null),this.dirty){let e=mb(i,this.anchor.key),t=e;if(this.anchor.type===`text`){let n=this.anchor.getNode();t=z(n)?lx(n,e,i):null}t&&u&&Jw(a,t,this.anchor.offset,u,this.focus.offset)}if(n===`character`&&z(c)&&c.isUnmergeable()&&(t?this.focus.offset===0:this.focus.offset===c.getTextContentSize())){let e=JT(c,t?`previous`:`next`).getNodeAtCaret();if(z(e)){if(!r){let n=e.getTextContentSize();t?this.focus.set(e.__key,n-1,`text`):this.focus.set(e.__key,1,`text`),this.dirty=!0;return}{let n=i.getElementByKey(e.getKey()),r=n?lx(e,n,i):null;if(r){let e=t?r.length:0;Jw(a,r,e,r,e)}}}}if(yw(a,e,t?`backward`:`forward`,n,s),a.rangeCount>0){let e=Hb(a,i._rootElement),n=e||a.getRangeAt(0),o=this.anchor.getNode(),s=mv(o)?o:Tb(o);this.applyDOMRange(n),this.dirty=!0,r||(bw(this,t,s),(e?a.direction!==`backward`:a.anchorNode===n.startContainer&&a.anchorOffset===n.startOffset)||vw(this))}n===`lineboundary`&&iT(this,e,t,n,`decorators`)}forwardDeletion(e,t,n){if(!n&&(e.type===`element`&&R(t)&&e.offset===t.getChildrenSize()||e.type===`text`&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(e===null?null:e.getNextSibling());if(R(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e)){let e=R(n)?n.getNextSibling():null;if(!(R(n)&&n.isEmpty()&&R(e)&&e.isShadowRoot()))return}let r=Lv(t,e?`previous`:`next`),i=aE(r);if(i.getTextSlices().every(e=>e===null||e.distance===0)){if(t.type===`element`){let e=r.getNodeAtCaret();if(R(e)&&Mb(e)){let t=e.getParent();e.remove();let n=Ky(t,e);n!==null&&n.selectStart();return}}let e={type:`initial`};for(let t of i.iterNodeCarets(`shadowRoot`))if(WT(t)){if(!t.origin.isInline()){if(t.origin.isShadowRoot()){if(e.type===`merge-block`)break;if(R(i.anchor.origin)&&i.anchor.origin.isEmpty()){let e=qv(t);Bv(this,sE(e,e)),i.anchor.origin.remove()}return}e.type!==`merge-next-block`&&e.type!==`merge-block`||(e={block:e.block,caret:t,type:`merge-block`})}}else{if(e.type===`merge-block`)break;if(UT(t)){if(R(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(i.anchor.origin))break}else e={block:t.origin,type:`merge-next-block`};continue}if(dv(t.origin)){if(!t.origin.isIsolated()){if(e.type===`merge-next-block`&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&R(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();let e=Lw();e.add(t.origin.getKey()),qy(e)}else{let e=t.origin,n=e.getParent();e.remove();let r=Ky(n,e);r!==null&&r.selectStart()}}return}if(mS(t.origin))return void t.origin.remove();break}}if(e.type===`merge-block`){let{caret:t,block:n}=e;return ST(n).length>0?void 0:t.origin.isEmpty()&&!n.isEmpty()&&t.origin.getParent()===n.getParent()?void t.origin.remove(!0):(Bv(this,sE(!t.origin.isEmpty()&&n.isEmpty()?Hv(JT(n,t.direction)):i.anchor,t)),this.removeText())}for(let e=t.getNode();e!==null;){if(gT(e)!==null)return;if(R(e)&&e.isShadowRoot())break;e=e.getParent()}}let a=this.focus;if(xw(this,e,`character`),this.isCollapsed()){if(e&&t.offset===0&&function(e,t){for(let n=t;n;n=n.getParent()){if(R(n)){if(n.collapseAtStart(e))return!0;if(Db(n))break}if(n.getPreviousSibling())break}return!1}(this,t.getNode()))return}else{let r=a.type===`text`?a.getNode():null;if(n=t.type===`text`?t.getNode():null,r!==null&&r.isSegmented()){let t=a.offset,i=r.getTextContentSize();if(r.is(n)||e&&t!==i||!e&&t!==0)return void Tw(r,e,t)}else if(n!==null&&n.isSegmented()){let i=t.offset,a=n.getTextContentSize();if(n.is(r)||e&&i!==0||!e&&i!==a)return void Tw(n,e,i)}(function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&n.type===`text`&&r.type===`text`){let e=n.offset,o=r.offset,s=e<o,c=s?e:o,l=s?o:e,u=l-1;c!==u&&!Xy(a=i.getTextContent().slice(c,l))&&!ww(a)&&(t?r.set(r.key,u,r.type):n.set(n.key,u,n.type))}var a})(this,e)}}t||_w(this),this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type===`element`&&this.anchor.offset===0&&dw()}deleteLine(e){mw(this,e,`lineboundary`)}deleteWord(e){mw(this,e,`word`)}isBackward(){let e=this._cachedIsBackward;if(e!==null)return e;let t=this.focus.isBefore(this.anchor);return LS()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}};function pw(e){return e instanceof uw}function mw(e,t,n){let r=e.isCollapsed(),{anchor:i,focus:a}=e,o=!1;if(r){if(n===`word`&&e.forwardDeletion(i,i.getNode(),t))return;o=xw(e,t,n),n===`lineboundary`&&function(e){for(let t of Vv(e).iterNodeCarets(`shadowRoot`))if(UT(t)&&mS(t.origin))return void Rv(e.focus,Hv(t))}(e)}n!==`lineboundary`||e.isCollapsed()||Zx(i.getNode(),ix)===Zx(a.getNode(),ix)||a.set(i.key,i.offset,i.type),e.isCollapsed()?o||e.deleteCharacter(t):(r||_w(e),e.removeText())}function hw(e,t){if(pw(e)){for(let n of e.getNodes())Tv(n)&&n.setFormat(t(n.getFormat()));return}let n=e.isCollapsed()?[]:e.getNodes(),r=n.length?Vv(e).getTextSlices():[],i,a,o,s=!1,c=0;for(let l of n)if(z(l)){i&&a&&(i.set(a.__key,0,`text`),i=void 0);let n=Qv(r,l);if(!s&&n&&n.distance===0){let t=e.isBackward()?e.focus:e.anchor;t.type===`text`&&t.key===l.__key&&(i=t)}if(s=!0,n&&n.distance===0)continue;let u=t(l.getFormat()),d=i?l.getTextContentSize():0,f=n&&!Ey(l)?$v(n,e):l;f!==null&&(f.setFormat(u),o===void 0&&(o=u,a=f,i&&f.getTextContentSize()!==d&&(i.set(f.__key,0,`text`),i=void 0)),c=u)}else R(l)?l.setTextFormat(t(l.getTextFormat())):Tv(l)&&l.setFormat(t(l.getFormat()));s?o!==void 0&&(e.format=o|c):(e.setFormat(t(e.format)),Py(null))}function gw(e,t,n=null){let r=n===null&&B(e)?Ay(e.format,t,null):n;hw(e,e=>Ay(e,t,r))}function _w(e){let t=Gy();!t.isEmpty()&&ry(t,e)&&(e.anchor.set(t.getKey(),0,`element`),e.focus.set(t.getKey(),t.getChildrenSize(),`element`))}function vw(e){let t=e.focus,n=e.anchor,r=n.key,i=n.offset,a=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,a,!0)}function yw(e,t,n,r,i){let a=r===`character`?Wb(e,i):null,o=a&&a.focusNode,s=a?a.focusOffset:0;if(e.modify(t,n,r),a===null||!function(e,t,n){return e!==null&&e.nodeType===3&&(n===`backward`?t>0:n===`forward`&&t<e.length)}(o,s,n))return;let c=Wb(e,i);c.focusNode===o&&c.focusOffset===s&&e.modify(t,n,r)}function bw(e,t,n){let r=e.getNodes(),i=r.filter(e=>xb(e,n));if(i.length===0||i.length===r.length)return!1;let a=t?i[0]:i[i.length-1],o=R(a)?a:a.getParentOrThrow();return t?o.selectStart():o.selectEnd(),!0}function xw(e,t,n){if(iT(e,`extend`,t,n))return!1;let r=HS(),i=Pb(Cb(r));if(!i||typeof i.modify!=`function`)return!1;let a=r._blockCursorElement,o=r._rootElement,s=e.anchor,c=e.focus.getNode();o===null||a===null||!R(c)||c.isInline()||c.canBeEmpty()||Nb(a,r,o);let l=e=>{let t=e.getNode(),n=r.getElementByKey(e.key);return n!==null&&e.type===`text`&&z(t)?lx(t,n,r):n},u=s.getNode(),d=l(s);if(d===null)return!1;let f=s.offset,p=e.isCollapsed(),m=e.focus,h=p?d:l(m);if(h===null)return!1;let g=m.offset;if(Jw(i,h,g,h,g),yw(i,`move`,t?`backward`:`forward`,n,o),i.rangeCount===0)return!1;let _=Hb(i,o)||i.getRangeAt(0),v=_.startContainer,y=_.startOffset;if(n===`lineboundary`&&Dy(v)&&Cy(v)===r){let e=Yy(v);if(dv(e)&&e.isInline()&&!e.isIsolated()){let n=r.getElementByKey(e.getKey());n!==null&&n.contains(v)&&(v=n,y=t?0:n.childNodes.length)}}if(p&&n===`character`&&s.type===`text`&&z(u)&&u.isUnmergeable()&&f===(t?0:u.getTextContentSize())){let n=JT(u,t?`previous`:`next`).getNodeAtCaret();if(z(n)){let r=t?n.getTextContentSize()-1:1;return e.focus.set(n.__key,r,`text`),e.dirty=!0,!1}}if(p&&n===`character`&&s.type===`text`){let n=t?0:u.getTextContentSize(),r=v===d?y:f===n?-1:n;if(r>=0)return r!==f&&(e.focus.set(s.key,r,`text`),e.dirty=!0),!1}let b=r._slotsUsed&&Vy(v),x=b?yT(u):null,S=b?yT(b):null;if(b&&!Aw(S,x)&&Sw(e.focus,u,x,S,`deletion`,()=>!t))return!0;let[C,w,T,E]=t?[v,y,d,f]:[d,f,v,y],D=mv(u)?u:Tb(u);return e.applyDOMRange({collapsed:!1,endContainer:T,endOffset:E,startContainer:C,startOffset:w}),e.dirty=!0,!bw(e,t,D)&&t&&vw(e),!1}function Sw(e,t,n,r,i,a){let o=r&&function(e,t){for(let n=_T(e);n!==null;){let e=yT(n);if(Aw(e,t))return e!==null||n.isAttached()?n:null;n=e&&_T(e)}return null}(r,n);if(o===null&&n===null)return!1;let s=a(),c=o&&o.getParent(),l,u;if(o===null||c===null||t!==null&&(o.is(t)||o.isParentOf(t))){let t=o||n;if(!R(t))return t!==null&&function(e,t,n){R(t)?e.set(t.getKey(),n?t.getChildrenSize():0,`element`):e.set(t.getKey(),n?t.getTextContentSize():0,`text`)}(e,t,s),!0;l=t,u=s?t.getChildrenSize():0}else l=c,u=o.getIndexWithinParent()+ +(s===(i===`selection`));return i===`deletion`?function(e,t,n,r){for(;;){let i=t.getChildAtIndex(r?n:n-1);if(z(i))return void e.set(i.getKey(),r?0:i.getTextContentSize(),`text`);if(!R(i)||Db(i))break;t=i,n=r?0:i.getChildrenSize()}e.set(t.getKey(),n,`element`)}(e,l,u,!s):e.set(l.getKey(),u,`element`),!0}function Cw(){try{let e=RegExp(`\\p{Emoji}`,`u`),t=e.test.bind(e);if(t(`❤️`)&&t(`#️⃣`)&&t(`👍`))return t}catch{}return()=>!1}var ww=Cw();function Tw(e,t,n){let r=e,i=r.getTextContent().split(/(?=\s)/g),a=i.length,o=0,s=0;for(let e=0;e<a;e++){let r=e===a-1;if(s=o,o+=i[e].length,t&&o===n||o>n||r){i.splice(e,1),r&&(s=void 0);break}}let c=i.join(``).trim();c===``?r.remove():(r.setTextContent(c),r.select(s,s))}function Ew(e,t,n,r){let i,a=t,o=!1;if(Zb(e)){let s=!1,c=e.childNodes,l=c.length,u=r._blockCursorElement;a===l&&l>0&&(s=!0,a=l-1),By(e,r)!==void 0||xx(e,r)||(o=!0);let d=c[a],f=!1;if(d===u)d=c[a+1],f=!0;else if(u!==null){let n=u.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,u)&&a--}if(i=Yy(d),z(i))a=XT(i,s?`next`:`previous`);else{let c=Yy(e);if(c===null)return null;if(R(c)){let o=r.getElementByKey(c.getKey());o===null&&L(214);let l=sx(c,o,r);[c,a]=l.resolveChildIndex(c,o,e,t),R(c)||L(215),s&&a>=c.getChildrenSize()&&(a=Math.max(0,c.getChildrenSize()-1));let u=c.getChildAtIndex(a);if(R(u)&&function(e,t,n){let r=e.getParent();return n===null||r===null||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){let e=s?u.getLastDescendant():u.getFirstDescendant();e===null?c=u:(u=e,c=R(u)?u:u.getParentOrThrow()),a=0}z(u)?(i=u,c=null,a=XT(u,s?`next`:`previous`)):u!==c&&s&&!f&&(R(c)||L(216),a=Math.min(c.getChildrenSize(),a+1))}else{let n=_T(c),i=n===null?c:n,o=i.getIndexWithinParent(),s=r.getElementByKey(c.getKey()),l=`after`;if(s!==null&&Yy(e)===c){let n=sx(c,s,r);n.element===s?t===0&&dv(c)&&(l=`before`):l=n.resolveLeafPosition(s,e,t)}a=l===`before`?o:o+1,c=i.getParentOrThrow()}if(R(c))return[iw(c.__key,a,`element`),o]}}else i=Yy(e);return z(i)?[iw(i.__key,XT(i,a,`clamp`),`text`),o]:null}function Dw(e,t,n){let r=e.getNode();if(Iy(r))return;let i=e.offset===0;if(!i&&e.offset!==r.getTextContent().length)return;let a=i?`previous`:`next`,o=JT(r,a).getNodeAtCaret();if(i===t||!R(o)||!o.isInline()||i&&n){if(i&&!t)z(o)&&!r.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,`text`);else if(o===null&&(n||!i&&t)){let t=r.getParent();if(R(t)&&t.isInline()&&(i||!t.canInsertTextAfter()&&t.getTextContentSize()>1)){let n=JT(t,a).getNodeAtCaret();z(n)&&e.set(n.__key,i?n.getTextContent().length:0,`text`)}}}else e.set(o.__key,i?o.getChildrenSize():0,`element`)}function Ow(e){let t=Ly(e.key);return t===null?null:yT(t)}function kw(e,t,n){let r=Ow(e),i=Ow(t);return!Aw(r,i)&&Sw(t,Ly(e.key),r,i,`selection`,n)}function Aw(e,t){return e===null?t===null:e.is(t)}function jw(e){let t=kw(e.anchor,e.focus,()=>function(e,t){let n=function(e,t){let n=new Map;for(let t=null,r=e;r!==null;t=r,r=uE(r))n.set(r.getKey(),t);for(let e=null,r=t;r!==null;e=r,r=uE(r)){let t=n.get(r.getKey());if(t===void 0)continue;let i=r.getLatest();return t===null?e===null?{commonAncestor:i,type:`same`}:{b:e,commonAncestor:i,type:`ancestor`}:e===null?{a:t,commonAncestor:i,type:`descendant`}:{a:t,b:e,commonAncestor:i,type:`branch`}}return null}(e.origin,t.origin);if(n===null)return null;switch(n.type){case`same`:return dE(e,t);case`ancestor`:return e.type===`child`&&gT(n.b)===null?-1:1;case`descendant`:return t.type===`child`&&gT(n.a)===null?1:-1;case`branch`:{let e=gT(n.a)&&n.a.getKey(),t=gT(n.b)&&n.b.getKey();if(e&&t){for(let r of xT(n.commonAncestor).values())if(r===e||r===t)return r===e?-1:1}return e?-1:t?1:n.a.isBefore(n.b)?-1:1}}}(Lv(e.anchor,`next`),Lv(e.focus,`next`))!==1);return t&&(e.dirty=!0),t}function Mw(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;let r=0;for(let e=n&&n.previousSibling;e;e=e.previousSibling)r++;return r}function Nw(e,t,n,r,i,a){if(e===null||n===null||!xy(i,e,n))return null;let o=Ew(e,t,B(a)?a.anchor:null,i);if(o===null)return null;let s=Ew(n,r,B(a)?a.focus:null,i);if(s===null)return null;let[c,l]=o,[u,d]=s;if(c.type===`element`&&u.type===`element`){let t=Yy(e),r=Yy(n);if(dv(t)&&dv(r))return null}let f=i._slotsUsed&&kw(c,u,()=>function(e,t,n,r){if(e===n)return r>=t;let i=e.compareDocumentPosition(n);return i&Node.DOCUMENT_POSITION_CONTAINED_BY?Mw(e,n)>=t:i&Node.DOCUMENT_POSITION_CONTAINS?r>Mw(n,e):(i&Node.DOCUMENT_POSITION_FOLLOWING)!==0}(e,t,n,r));return function(e,t){if(e.type===`text`&&t.type===`text`){let n=e.isBefore(t),r=e.is(t);Dw(e,n,r),Dw(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}(c,u),[c,u,l||d||f]}function Pw(e){return R(e)&&!e.isInline()}function Fw(e,t,n,r,i,a){let o=BS(),s=new fw(iw(e,t,i),iw(n,r,a),0,``);return s.dirty=!0,o._selection=s,s}function Iw(){return new fw(iw(`root`,0,`element`),iw(`root`,0,`element`),0,``)}function Lw(){return new uw(new Set)}function Rw(e,t){return Bw(null,e,t,null)}var zw=new Set([` `,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`Backspace`,`Delete`,`End`,`Enter`,`Home`,`Tab`]);function Bw(e,t,n,r){let i=n._window;if(i===null)return null;let a=r||i.event,o=a?a.type:void 0,s=o===`selectionchange`,c=o===`keydown`&&a,l=c&&Xb(c),u=c&&(c.ctrlKey||c.metaKey||zw.has(c.key))&&Qb(l)&&Cy(l)===n,d=!zh&&(s||u||o===`beforeinput`||o===`compositionstart`||o===`compositionend`||o===`click`&&a&&a.detail===3||o===`drop`||o===void 0),f,p,m,h;if(B(e)&&!d)return e.clone();{if(t===null)return null;let r=Wb(t,n._rootElement);if(f=r.anchorNode,p=r.focusNode,m=r.anchorOffset,h=r.focusOffset,(s||u||o===void 0)&&B(e)&&!xy(n,f,p))return e.clone()}let g=Nw(f,m,p,h,n,e);if(g===null)return null;let[_,v,y]=g,b=B(e)?e:null,x=new fw(_,v,b?b.format:0,b?b.style:``);return b&&Vw(x,b.anchor.key),x.dirty=y,x}function Vw(e,t){let n=e.anchor;if(n.key===t)return;let r=n.getNode(),i=0,a=``;z(r)?(i=r.getFormat(),a=r.getStyle()):R(r)&&(i=r.getTextFormat(),a=r.getTextStyle()),e.format===i&&e.style===a||(e.format=i,e.style=a,e.dirty=!0)}function Hw(){return BS()._selection}function Uw(){return HS()._editorState._selection}function Ww(e,t){let n=t.__key;return e.anchor.key===n||e.focus.key===n}function Gw(e,t,n,r=1){if(Ww(e,t))for(let i of[e.anchor,e.focus]){i.key===t.__key&&(n<=i.offset&&r>0||n<i.offset&&r<0)&&i.set(t.__key,Math.max(0,i.offset+r),`element`);let e=i.getNode();if(R(e)){let t=e.getChildrenSize(),n=i.offset>=t,r=e.getChildAtIndex(n?t-1:i.offset);z(r)&&i.set(r.__key,n?r.getTextContentSize():0,`text`)}}}function Kw(e,t,n,r,i){let a=r||i;if(z(a)||R(a)){let t=z(a);e.set(a.__key,r===null?0:t?a.getTextContentSize():a.getChildrenSize(),t?`text`:`element`)}else{let r=t.getIndexWithinParent();e.set(n.__key,r===-1?n.getChildrenSize():r,`element`)}}function qw(e,t,n,r,i){e.type===`text`?e.set(n,e.offset+(t?0:i),`text`):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,`element`)}function Jw(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function Yw(e,t,n){let r=mb(e,t.getKey());if(R(t)){let i=sx(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function Xw(e,t,n,r,i,a){let o=a.getRootNode(),s=Oy(o)||Ib(o)?Yb(o):null;if(i.has(`collaboration`)&&s!==a||s!==null&&yy(s,s))return;let c=Wb(r,a),l;if(!B(t))return void(e!==null&&xy(n,c.anchorNode,c.focusNode)&&r.removeAllRanges());let u=t.anchor,d=t.focus,f=u.getNode(),p=d.getNode(),[m,h]=Yw(n,f,u.offset),[g,_]=Yw(n,p,d.offset),v=t.format,y=t.style,b=t.isCollapsed(),x=m,S=g,C=!1;if(u.type===`text`?(x=z(f)?lx(f,m,n):null,C=f.getFormat()!==v||f.getStyle()!==y):B(e)&&e.anchor.type===`text`&&(C=!0),d.type===`text`&&(S=z(p)?lx(p,g,n):null),x===null||S===null)return;let w=b&&z(p)&&Iy(p)&&Dy(S)&&S.nodeValue===cm?cm.length:_;if(b&&(e===null||C||B(e)&&(e.format!==v||e.style!==y))&&function(e,t,n,r,i,a){e._inputState.collapsedSelectionFormat={format:t,key:i,offset:r,style:n,timeStamp:a}}(n,v,y,u.offset,u.key,performance.now()),(r.type!==`Range`||!b)&&c.anchorOffset===h&&c.focusOffset===w&&c.anchorNode===x&&c.focusNode===S){if(s===null||!a.contains(s)){let e=s===null?null:Cy(s);e!==null&&e!==n||i.has(`skip-selection-focus`)||a.focus({preventScroll:!0})}if(u.type!==`element`)return}if(Jw(r,x,h,S,w),Xp&&t.isCollapsed()&&a!==null&&!i.has(`skip-selection-focus`)){let e=Jb(a);if(e===null||!a.contains(e)){let e=Yb(a.ownerDocument),t=e===null?null:Cy(e);t!==null&&t!==n||a.focus({preventScroll:!0})}}if(!i.has(`skip-scroll-into-view`)&&t.isCollapsed()&&a!==null&&a===Jb(a)){let e=B(t)&&t.anchor.type===`element`?function(e,t,n){let r=t.childNodes[n];if(!Zb(r))return r||null;let i=By(r,e),a=i===void 0?null:Ly(i);return a===null||R(a)?r:sx(a,r,e).element}(n,x,h):(l===void 0&&(l=Ub(r,a)),l);if(e!==null){let t;if(Dy(e)){let n=e.ownerDocument.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=Zb(e)?e.getBoundingClientRect():function(e){let t=e.getBoundingClientRect(),{startContainer:n,startOffset:r}=e;if(!e.collapsed||t.width!==0||t.height!==0||!Dy(n)||n.length===0)return t;let i=e.cloneRange();return r>0?i.setStart(n,r-1):i.setEnd(n,1),i.getBoundingClientRect()}(e);(function(e,t,n,r=null){let i=gb(n),a=Sb(i);if(i===null||a===null)return;let o=n.getBoundingClientRect();if(t.bottom<o.top)return;if(r!==null&&t.height>0){let{left:e,right:i}=t,o=Zb(r)?r:hb(r);for(;o!==null&&n.contains(o);){let t=vb(a,o,e,i);e-=t,i-=t,o=o===n?null:hb(o)}}let{top:s,bottom:c}=t,l=0,u=0,d=n;for(;d!==null;){let t=d===i.body;if(t){let t=a.visualViewport;if(t){let e=t.offsetTop;l=e,u=e+t.height}else l=0,u=Cb(e).innerHeight;let n=a.getComputedStyle(i.documentElement),r=parseFloat(n.scrollPaddingTop),o=parseFloat(n.scrollPaddingBottom);isFinite(r)&&(l+=r),isFinite(o)&&(u-=o)}else{let e=d===n?o:d.getBoundingClientRect();l=e.top,u=e.bottom}let r=0;if(s<l?r=-(l-s):c>u&&(r=c-u),r!==0){if(t)a.scrollBy(0,r);else{let e=d.scrollTop;d.scrollTop+=r;let t=d.scrollTop-e;s-=t,c-=t}}if(t)break;d=hb(d)}})(n,t,a,x)}}(function(e,t,n,r,i){let a=e._inputState;a.isSelectionChangeFromDOMUpdate=!0,a.selectionChangeFromDOMUpdatePoints=t!==void 0&&n!==void 0&&r!==void 0&&i!==void 0?{anchorNode:t,anchorOffset:n,focusNode:r,focusOffset:i}:null})(n,x,h,S,w)}function Zw(e,t){for(let n of e.split(/(\r?\n|\t)/))n===`
56
+ `||n===`\r
57
+ `?t.linebreak():n===` `?t.tab():n!==``&&t.text(n)}function Qw(e){let t=[];return Zw(e,{linebreak:()=>t.push(pS()),tab:()=>t.push(uy()),text:e=>t.push(Fv(e))}),t}function $w(e){let t=[];for(let n of e)mS(n)||(!R(n)&&!dv(n)||n.isInline()?t.push(n):R(n)&&t.push(...$w(n.getChildren())));return t}function eT(e,t=!1){let n=e;e.isCollapsed()||n.removeText();let r=Hw();B(r)&&(n=r),B(n)||L(161);let i=n.anchor,a=i.getNode(),o=i.offset;for(;!ix(a)&&gT(a)===null;){let e=a;if([a,o]=tT(a,o,t),e.is(a))break}return[a,o]}function tT(e,t,n=!1){let r=e.getParent();if(!r){let e=oy();return Gy().append(e),e.select(),[Gy(),0]}if(z(e)){let n=e.splitText(t);if(n.length===0)return[r,e.getIndexWithinParent()];let i=t===0?0:1;return[r,n[0].getIndexWithinParent()+i]}if(!R(e)||t===0)return[r,e.getIndexWithinParent()];let i=e.getChildAtIndex(t);if(i){let r=new fw(iw(e.__key,t,`element`),iw(e.__key,t,`element`),0,``),a=e.insertNewAfter(r);if(a)a.append(i,...i.getNextSiblings());else if(n)return[e,t]}return[r,e.getIndexWithinParent()+1]}function nT(e){return mS(e)||wb(e)||z(e)||e.isParentRequired()}function rT(e){let t=oy(),n=null;for(let r=0;r<e.length;r++){let i=e[r];if(nT(i)){if(n===null){n=i.createParentElementNode(),t.append(n);let a=e[r+1];if(mS(i)&&(a===void 0||!nT(a)))continue}n.append(i)}else t.append(i),n=null}return t}function iT(e,t,n,r,i=`decorators-and-blocks`){if(t===`move`&&r===`character`&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let a=Lv(e.focus,n?`previous`:`next`),o=r===`lineboundary`,s=t===`move`,c=a,l=i===`decorators-and-blocks`,u=!1;if(!Jv(c)){for(let e of c){l=!1;let{origin:t}=e;if(dv(t)){if(t.isIsolated()){u=!0;break}if(c=e,o&&t.isInline())continue}break}if(u)return!0;if(l)for(let e of aE(a).iterNodeCarets(t===`extend`?`shadowRoot`:`root`)){if(WT(e))e.origin.isInline()||(c=e);else{if(R(e.origin))continue;dv(e.origin)&&!e.origin.isInline()&&(c=e)}break}}if(c===a)return!1;if(s&&!o&&dv(c.origin)&&c.origin.isKeyboardSelectable()){let e=Lw();return e.add(c.origin.getKey()),qy(e),!0}return c=qv(c),s&&Rv(e.anchor,c),Rv(e.focus,c),l||!o}function aT(e,t,n){let r=t===null?null:t.__key,i=n===null?null:n.__key;t===null?e.__first=i:t.__next=i,n===null?e.__last=r:n.__prev=r}function oT(e){let t=HS();if(!t._recordNodeMoves)return;let n=t._editorState._nodeMap;if(n.has(e.__key)){let t=BS(),r=t._movedNodes||=new WeakMap,i=r.get(n);i===void 0&&(i=new Set,r.set(n,i)),i.add(e.__key)}}function sT(e,t,n,r){let i=t.__key;n===null?e.__first=i:n.__next=i,r===null?e.__last=i:r.__prev=i,t.__prev=n===null?null:n.__key,t.__next=r===null?null:r.__key,t.__parent=e.__key}function cT(e){gT(e)!==null&&L(380,e.__key,String(gT(e)));let t=e.getParent();if(t!==null){let n=t.getWritable();oT(e);let r=e.getPreviousSibling(),i=e.getNextSibling();aT(n,r&&r.getWritable(),i&&i.getWritable()),e.__prev=null,e.__next=null,e.__parent=null,n.__size--}}function lT(e,t){let n=t&&e.getParent(),r=t&&n&&Ww(t,n)?e.getIndexWithinParent():-1,i=t&&n&&r!==-1?[t.anchor,t.focus].filter(e=>e.type===`element`&&e.key===n.__key&&e.offset===r+1):null;return t&&n&&r!==-1&&t.isBackward(),cT(e),t&&n&&r!==-1&&Gw(t,n,r,-1),t&&(t._cachedIsBackward=null),i}function uT(e,t,n,r){RS();let i=t===`next`;Ab(e,n);let a=e.getWritable(),o=n.getWritable();e.getParentOrThrow();let s=Hw(),c=r&&B(s)?s:null,l=lT(o,c),u=e.getParentOrThrow().getWritable(),d=c&&(i&&l!==null&&l.length>0||Ww(c,u))?e.getIndexWithinParent()+ +!!i:-1,f=i?e.getNextSibling():e.getPreviousSibling(),p=f&&f.getWritable();if(sT(u,o,i?a:p,i?p:a),u.__size++,c&&d!==-1&&(Gw(c,u,d),i&&l!==null))for(let e of l)e.set(u.__key,d+1,`element`);return n}function dT(e,t,n){RS();let{origin:r,direction:i}=e,a=i===`next`,o=_T(r);if(o!==null)return a?o.selectNext(t,n):o.selectPrevious(t,n);let s=e.getNodeAtCaret(),c=r.getParentOrThrow();if(s===null)return a?c.select():c.select(0,0);if(R(s))return a?s.select(0,0):s.select();if(z(s))return s.select(t,n);let l=s.getIndexWithinParent()+ +!a;return c.select(l,l)}function fT(e,t){let n=[];for(let r=e;r!==null;r=t===`next`?r.getNextSibling():r.getPreviousSibling())n.push(r);return n}var pT=new Map;function mT(e){return R(e)||dv(e)}function hT(e){return R(e)||dv(e)}function gT(e){let t=e.getLatest();return hT(t)?t.__slotHost:null}function _T(e){let t=gT(e);if(t===null)return null;let n=Ly(t);return R(n)||dv(n)||L(370),n}function vT(e){let t=_T(e);if(t===null)return null;let n=e.getLatest().__key;for(let[e,r]of xT(t))if(r===n)return e;return null}function yT(e){let t=e.getLatest();for(;t!==null;){if(gT(t)!==null)return t;t=t.getParent()}return null}function bT(e){if(e===null)return null;let t=B(e)?e.anchor.getNode():e.getNodes()[0]??null;return t===null?null:yT(t)}function xT(e){let t=e.getLatest();return mT(t)&&t.__slots!==null?t.__slots:pT}function ST(e){return Array.from(xT(e).keys())}function CT(e,t){let n=xT(e).get(t);return n===void 0?null:Ly(n)}var wT=[`__proto__`,`constructor`,`prototype`],TT=Symbol(`slotMapOwner`);function ET(e){let t=e.__slots;return t!==null&&t[TT]===e||(t=new Map(t),t[TT]=e,e.__slots=t),t}var DT=new WeakMap,OT=[];function kT(e){for(let{ownNodeConfig:t}of Yx(e)){let e=t&&t.slots;if(e)return e}return OT}function AT(e){let t=``;for(let n of xT(e).values()){let e=Ly(n);e!==null&&(t+=e.getTextContent())}return t}function jT(e,t,n){let r=n.get(e),i=n.get(t);return r===void 0?i===void 0?e<t?-1:+(e>t):1:i===void 0?-1:r-i}function MT(e,t,n){t!==`__proto__`&&t!==`constructor`&&t!==`prototype`||L(373,t);let r=e.getLatest();if(r.__slots!==null&&r.__slots.get(t)===n.getLatest().__key)return r;(!R(n)&&!dv(n)||n.isInline())&&L(374,n.__key);let i=e.getWritable(),a=ET(i),o=a.get(t);o!==void 0&&NT(o);let s=n.getWritable(),c=_T(s);if(c!==null){let e=vT(s);e!==null&&ET(c.getWritable()).delete(e),s.__slotHost=null}return cT(s),s.__slotHost=i.__key,a.set(t,s.__key),function(e){let t=e.__slots;if(t===null||t.size<2)return;let n=function(e){let t=DT.get(e);if(t===void 0){let n=kT(e),r=new Map;for(let t of n)wT.includes(t)&&L(371,e.name,t),r.has(t)&&L(372,e.name,t),r.set(t,r.size);t=r,DT.set(e,t)}return t}(e.constructor),r=null,i=!0;for(let e of t.keys()){if(r!==null&&jT(r,e,n)>0){i=!1;break}r=e}if(i)return;let a=Array.from(t).sort(([e],[t])=>jT(e,t,n));t.clear();for(let[e,n]of a)t.set(e,n)}(i),HS()._slotsUsed=!0,BS()._slotsUsed=!0,i}function NT(e){let t=Ly(e);if(t===null)return;let n=t.getWritable();hT(n)||L(377,e),n.__slotHost=null,n.remove()}var PT={next:`previous`,previous:`next`},FT=class{origin;constructor(e){this.origin=e}[Symbol.iterator](){return cE({hasNext:UT,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return JT(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return JT(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n=`next`){let r=n===this.direction?t:Array.from(t).reverse(),i=this,a=this.getParentAtCaret(),o=new Map;for(let t=i.getAdjacentCaret();t!==null&&o.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();o.set(e.getKey(),e)}for(let e of r){if(o.size>0){let t=i.getNodeAtCaret();if(t){if(o.delete(t.getKey()),o.delete(e.getKey()),!(t.is(e)||i.origin.is(e))){let n=e.getParent();n&&n.is(a)&&e.remove(),t.replace(e)}}else t===null&&L(263,Array.from(o).join(` `))}else i.insert(e);i=JT(e,this.direction)}for(let e of o.values())e.remove();return this}},IT=class e extends FT{type=`child`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:QT(e,this.direction)}getParentCaret(e=`root`){return JT(zT(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=RT(this.direction);return JT(this.getNodeAtCaret(),e)||QT(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}},LT={root:mv,shadowRoot:Db};function RT(e){return PT[e]}function zT(e,t=`root`){return e===null||LT[t](e)?null:gT(e)===null?e:null}var BT=class e extends FT{type=`sibling`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:JT(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return R(this.origin)?QT(this.origin,this.direction):null}getParentCaret(e=`root`){return JT(zT(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=RT(this.direction);return JT(this.getNodeAtCaret(),e)||QT(this.origin.getParentOrThrow(),e)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof e||t instanceof VT)&&this.direction===t.direction&&this.origin.is(t.origin)}},VT=class e extends FT{type=`text`;offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:YT(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e=`root`){return JT(zT(this.getParentAtCaret(),e),this.direction)}getFlipped(){return YT(this.origin,RT(this.direction),this.offset)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof BT||t instanceof e)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return JT(this.origin,this.direction)}};function HT(e){return e instanceof VT}function UT(e){return e instanceof BT}function WT(e){return e instanceof IT}var GT={next:class extends VT{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends VT{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},KT={next:class extends BT{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends BT{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},qT={next:class extends IT{direction=`next`;getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends IT{direction=`previous`;getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function JT(e,t){return e?new KT[t](e):null}function YT(e,t,n){return e?new GT[t](e,XT(e,n)):null}function XT(e,t,n=`error`){let r=e.getTextContentSize(),i=t===`next`?r:t===`previous`?0:t;return(i<0||i>r)&&(n!==`clamp`&&Hp(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function ZT(e,t){return new nE(e,t)}function QT(e,t){return R(e)?new qT[t](e):null}function $T(e){return e&&e.getChildCaret()||e}function eE(e){return e&&$T(e.getAdjacentCaret())}var tE=class e{type=`node-caret-range`;direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new e(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=this.anchor.getLatest(),t=this.focus.getLatest();return HT(e)&&HT(t)&&e.isSameNodeCaret(t)?[ZT(e,t.offset-e.offset),null]:[HT(e)?rE(e,`anchor`):null,HT(t)?rE(t,`focus`):null]}iterNodeCarets(e=`root`){let t=HT(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=HT(n),i=t=>t.isSameNodeCaret(n)?null:eE(t)||t.getParentCaret(e);return cE({hasNext:e=>e!==null&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets(`root`)}},nE=class{type=`slice`;caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return YT(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function rE(e,t){let{direction:n,origin:r}=e;return ZT(e,XT(r,t===`focus`?RT(n):n)-e.offset)}function iE(e,t){return e.direction===t?e:e.getFlipped()}function aE(e){return sE(e,iE(QT(Gy(),RT(e.direction)),e.direction))}function oE(e){return sE(e,e)}function sE(e,t){return e.direction!==t.direction&&L(265),new tE(e,t,e.direction)}function cE(e){let{initial:t,hasNext:n,step:r,map:i}=e,a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};let e={done:!1,value:i(a)};return a=r(a),e}}}function lE(e,t){let n=hE(e.origin,t.origin);switch(n===null&&L(275,e.origin.getKey(),t.origin.getKey()),n.type){case`same`:return dE(e,t);case`ancestor`:return e.type===`child`?-1:1;case`descendant`:return t.type===`child`?1:-1;case`branch`:return fE(n)}}function uE(e){return e.getParent()||_T(e)}function dE(e,t){let n=e.type===`text`,r=t.type===`text`;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:e.type===`child`?-1:1}function fE(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function pE(e,t){return t.is(e)}function mE(e){return R(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function hE(e,t){if(e.is(t))return{commonAncestor:e,type:`same`};let n=new Map;for(let[t,r]=mE(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,i]=mE(t);r;i=r,r=r.getParent()){let a=n.get(r);if(a!==void 0)return a===null?(pE(e,r)||L(276),{commonAncestor:r,type:`ancestor`}):i===null?(pE(t,r)||L(277),{commonAncestor:r,type:`descendant`}):((R(a)||pE(e,a))&&(R(i)||pE(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||L(278),{a,b:i,commonAncestor:r,type:`branch`})}return null}function gE(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function _E(...e){let t=[];for(let n of e)if(n&&typeof n==`string`)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}function vE(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}var yE={tag:oS};function bE(){let e=Gy();e.isEmpty()&&e.append(oy())}var xE={config:{setOptions:yE,updateOptions:yE},init:({$initialEditorState:e=bE})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){let i=r.getInitResult();if(!i.initialized){i.initialized=!0;let{$initialEditorState:r}=i;if(rS(r))e.setEditorState(r,n);else if(typeof r==`function`)e.update(()=>{r(e)},t);else if(r&&(typeof r==`string`||typeof r==`object`)){let t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[pv,Ev,dS,ly,iy]};function SE(e,...t){throw function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e,...t)}function CE(){let e;try{e=`0.53.0+prod.esm`}catch{}return e??`"<unknown>+source"`}var wE=CE(),TE=new Set([`__proto__`,`constructor`,`prototype`]);function EE(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)!TE.has(e)&&Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=EE(n[e],r[e]));return e}return t}function DE(e){return e.id===0}function OE(e){return e.id===2}var kE=new Set,AE=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:0}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):gE;for(let n of this.configs)e=t(e,n);return e}init(e){let t=this.state;OE(t)||SE(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:3,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:4,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==4&&SE(307,String(t.id),`5`),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:5,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==5&&SE(308,String(n.id),`5`);let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:6})}(n),()=>{let e=this.state;e.id!==7&&SE(309,String(n.id),`7`),this.state=function(e){return Object.assign(e,{id:5})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==6&&SE(310,String(t.id),`6`),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:7})}(t),n}getSignal(){return this._signal===void 0&&SE(311),this._signal}getInitResult(){this.extension.init===void 0&&SE(312,this.extension.name);let e=this.state;return function(e){return e.id>=4}(e)||SE(313,String(e.id),`4`),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=3}(e)||SE(314,String(e.id),`3`),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&SE(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&SE(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=7}(e)||SE(316,String(e.id),`7`),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||kE}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=5})(e)||SE(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},jE=Symbol.for(`@lexical/extension/LexicalBuilder`);function ME(){}function NE(e){throw e}function PE(e){return Array.isArray(e)?e:[e]}var FE=wE,IE=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=FE,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[PE(xE)];for(let e of t)n.push(PE(e));return new e(n)}static maybeFromEditor(t){let n=t[jE];return n&&(n.PACKAGE_VERSION!==FE&&SE(292,n.PACKAGE_VERSION,FE),n instanceof e||SE(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&SE(294),n}constructEditor(){let{$initialEditorState:e,onError:t,onWarn:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(SS({...r,...t?{onError:e=>{t(e,i)}}:{},...n?{onWarn:e=>{n(e,i)}}:{}}),{[jE]:this});for(let e of this.sortedExtensionReps())e.build(i);return i}buildEditor(){let e=ME;function t(){try{e()}finally{e=ME}}let n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=aC(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&SE(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);if(r){let e=r.get(t);e?e.push(...n):r.set(t,n)}else this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&SE(296);let[t]=PE(e);typeof t.name!=`string`&&SE(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&SE(298,t.name),!n){n=new AE(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&SE(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&SE(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=PE(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(OE(i))return;let a=n.extension.name;var o;DE(i)||SE(300,a,r||`[unknown]`),DE(o=i)||SE(304,String(o.id),`0`),i=Object.assign(o,{id:1}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=function(e){return function(e){return e.id===1}(e)||SE(305,String(e.id),`1`),Object.assign(e,{id:2})}(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())DE(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&SE(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],i=n.signal;for(let n of t){let t=n.register(e,i);t&&r.push(t)}for(let n of t){let t=n.afterRegistration(e);t&&r.push(t)}return aC(...r)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.onWarn!==void 0&&(e.onWarn=o.onWarn),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of vE(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&SE(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&EE(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=Array.from(t));let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=NE,e}};function LE(e,t){let n=IE.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function RE(e){let t=ax().getElementByKey(e.getKey());if(t===null)return null;let n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function zE(e){let t=mv(e)?e:e.getParent();return t&&RE(t)}function BE(e,t,n=`self`){let r=e.getStartEndPoints();if(r!==null&&t.isSelected(e)&&!Ey(t)){let[i,a]=e.isBackward()?[r[1],r[0]]:r,o=!B(e)||i.type!==`element`&&a.type!==`element`?void 0:Qv(Vv(e).getTextSlices(),t),[s,c]=o?o.getSliceIndices():[t.__key===i.key?i.offset:0,t.__key===a.key?a.offset:void 0],l=t.__text.slice(s,c);l!==t.__text&&(n===`clone`&&(t=mx(t)),t.__text=l)}return t}function VE(e){let t=HE(e);return t!==null&&t.writingMode===`vertical-rl`}function HE(e){let t=e.anchor.getNode();return R(t)?RE(t):zE(t)}function UE(e,t){let n=VE(e)?!t:t;GE(e)&&(n=!n);let r=Lv(e.focus,n?`previous`:`next`);if(Jv(r))return!1;if(HT(r)&&!dy(r.origin)&&r.origin.isUnmergeable()){let e=r.getNodeAtCaret();if(z(e)&&!dy(e))return!0}for(let e of aE(r)){if(WT(e))return!e.origin.isInline();if(!R(e.origin)){if(dv(e.origin))return!0;break}}return!1}function WE(e,t,n,r){e.modify(t?`extend`:`move`,n,r)}function GE(e){let t=HE(e);return t!==null&&t.direction===`rtl`}function KE(e,t,n){let r=GE(e),i;i=VE(e)||r?!n:n,WE(e,t,i,`character`)}function qE(e,t){if(e==null)return!1;let n=Object.getPrototypeOf(e);return n!=null&&n.constructor!=null&&n.constructor.name===t.name}function JE(e,...t){throw function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e,...t)}var YE;function XE(e,t){let{key:n}=t;return e&&n in e?e[n]:t.defaultValue}function ZE(e){return YE&&YE.editor===e?YE:void 0}function QE(e,t){if(`cfg`in t){let{cfg:n,updater:r}=t;return[n,r(XE(e,n))]}return t}function $E(e,t){let n=t;for(let r of e){let[e,i]=QE(n,r),a=e.key;if(n===t&&XE(n,e)===i)continue;let o=n===t||n===void 0?eD(t):n;o[a]=i,n=o}return n}function eD(e){return Object.create(e||null)}function tD(e,t){return[e,t]}function nD(e,t,n,r=ax()){let i=YE,a=ZE(r);try{return YE={...a,editor:r,[e]:t},n()}finally{YE=i}}function rD(e,t=()=>{}){return(n,r=ax())=>i=>{let a=ZE(r),o=a&&a[e],s=$E(n,o||t(r));return s&&s!==o?nD(e,s,i,r):i()}}function iD(e,t,n,r){return Object.assign(Sg(Symbol(t),{isEqual:r,parse:n}),{[e]:!0})}var aD=`@lexical/html/DOM`,oD=Symbol.for(`@lexical/html/DOMExportContext`);function sD(e,t,n){return iD(oD,e,t,n)}var cD=sD(`isExport`,Boolean);function lD(e){let t=LE(e,aD);return t?t.output.defaults:void 0}function uD(e){let t=LE(e,aD);return t?t.output.runtime:void 0}function dD(e=ax()){let t=uD(e);return t?t.getSessionConfig():ox(e)}var fD=rD(oD,lD);function pD(e,t=null,n=ax()){return fD([tD(cD,!0)],n)(()=>{let r=Gy(),i=dD(n),a=bT(t),o=e.append.bind(e);for(let e of(R(a)?a:r).getChildren())hD(n,e,o,t,i);return e})}function mD(e,t=null){return(typeof document>`u`||typeof window>`u`&&global.window===void 0)&&JE(338),VS(e),pD(Vb().createElement(`div`),t,e).innerHTML}function hD(e,t,n,r=null,i=ox(e)){let a=i.$shouldInclude(t,r,e),o=i.$shouldExclude(t,r,e),s=t;r!==null&&z(t)&&(s=BE(r,t,`clone`));let{element:c,after:l,append:u,$getChildNodes:d}=i.$exportDOM(s,e);if(!c)return!1;let f=Vb().createDocumentFragment(),p=d?d():R(s)?s.getChildren():[],m=a&&pw(r)&&R(t)?null:r,h=f.append.bind(f),g=null;for(let n of p){let o=hD(e,n,h,m,i);o&&(g=n),!a&&o&&i.$extractWithChild(t,n,r,`html`,e)&&(a=!0)}if(a&&!o){if((Zb(c)||$b(c))&&(u?u(f):c.append(f),function(e,t){let n=e.lastChild;if(mS(t)&&Zb(e)&&rx(e)&&n!==null&&n.nodeName===`BR`){let t=Vb().createElement(`br`);t.setAttribute(`data-lexical-managed-linebreak`,`true`),e.append(t)}}(c,g)),$b(c)){if(l){let e=l.call(s,c);e&&c.replaceChildren(e)}n(c)}else if(n(c),l){let e=l.call(s,c);e&&c.replaceWith(e)}}else n(f);return a}function gD(e,t,n=null){let r=Bb(n),i=n?Rb(n):[],a=n!==null&&i.length>0;if(a&&typeof r.caretPositionFromPoint==`function`){let a=r.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&function(e,t){for(let n=e;n!==null;){if(n===t)return!0;n=hb(n)}return!1}(a.offsetNode,n))return{node:a.offsetNode,offset:a.offset}}if(a){let i=n.getRootNode();if(Ib(i)){let a=i.elementFromPoint(e,t);if(a!==null&&n.contains(a)){let n=function(e,t,n,r){let i=r.createRange(),a=e=>t<e.top?e.top-t:t>e.bottom?t-e.bottom:0,o=t=>e<t.left?t.left-e:e>t.right?e-t.right:0,s=r.createTreeWalker(n,NodeFilter.SHOW_TEXT),c=null,l=1/0,u=1/0;for(let e=s.nextNode();e;e=s.nextNode()){i.selectNodeContents(e);for(let t of i.getClientRects()){let n=a(t),r=o(t);(n<l||n===l&&r<u)&&(l=n,u=r,c=e)}}if(c===null)return null;let d=0,f=1/0,p=1/0;for(let t=0;t<=c.length;t++){i.setStart(c,t),i.collapse(!0);let n=i.getBoundingClientRect(),r=a(n),o=Math.abs(e-n.left);(r<f||r===f&&o<p)&&(f=r,p=o,d=t)}return{node:c,offset:d}}(e,t,a,r);if(n!==null)return n}}}if(typeof r.caretRangeFromPoint==`function`){let n=r.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(typeof r.caretPositionFromPoint==`function`){let n=r.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}function _D(e,...t){throw function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e,...t)}function vD(e,t=Hw()){return t??_D(166),B(t)&&t.isCollapsed()||t.getNodes().length===0?``:mD(e,t)}function yD(e,t){let n=e.getData(`text/plain`)||e.getData(`text/uri-list`);n!=null&&t.insertRawText(n)}var bD=`application/x-lexical-drag`;function xD(e,t){let n={editorKey:t.getKey()};e.setData(bD,JSON.stringify(n))}function SD(e){let t=e;if(HT(t)){if(t.offset===0)t=Hv(t.getSiblingCaret());else{if(t.offset!==t.origin.getTextContentSize())return t;t=t.getSiblingCaret()}}for(;;){let e=t.getParentAtCaret();if(e===null||!e.isInline()||e.isShadowRoot())return t;if(WT(t))t=Hv(JT(e,`next`));else{if(t.getNodeAtCaret()!==null)return t;t=JT(e,`next`)}}}function CD(e,t,n){let r=e.dataTransfer;if(r===null)return!1;let i=function(e){let t=e.getData(bD);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}return(r=n)!==null&&typeof r==`object`&&`editorKey`in r&&typeof r.editorKey==`string`?n:null;var r}(r);if(i===null)return!1;let a=function(e,t){let n=gD(e.clientX,e.clientY,t.getRootElement());if(n===null)return null;let r=Vy(n.node);if(r===null)return null;if(z(r))return YT(r,`next`,n.offset);let i=r.getParent();if(R(r)){let e=t.getElementByKey(r.getKey());if(e===null)return null;let a=sx(r,e,t);return n.node===a.element||i?Xv(...a.resolveChildIndex(r,e,n.node,n.offset),`next`):null}return i&&Xv(i,r.getIndexWithinParent()+1,`next`)}(e,t);if(a===null)return!1;let o=i.editorKey===t.getKey(),s=Hw();if(o){if(!B(s)||s.isCollapsed())return!1;if(function(e,t){let{anchor:n,focus:r}=Yv(Vv(t),`next`),i=SD(e);return lE(SD(n),i)<=0&&lE(i,SD(r))<=0}(a,s))return e.preventDefault(),!0}let c=qv(a),l=HT(c)?ty(c):c;if(l===null)return!1;let u=l.getFlipped();o&&B(s)&&s.removeText();let d=l.origin.isAttached()?l:u;if(d.origin.isAttached()||_D(438),n(r,zv(oE(d)),t),!o){let e=t.getRootElement(),n=e?e.ownerDocument:null,r=n?function(e,t){for(let n of zb(t)){let t=wy(n);if(Sy(t)&&t.getKey()===e&&Zb(n))return n}return null}(i.editorKey,n):null;r!==null&&r.dispatchEvent(new InputEvent(`beforeinput`,{bubbles:!0,cancelable:!0,inputType:`deleteByDrag`}))}return e.preventDefault(),!0}function wD(e,t){return CD(e,t,(e,t)=>yD(e,t))}function TD(e,t){t.update(()=>{if(e!==null){let n=qE(e,KeyboardEvent)?null:e.clipboardData,r=Hw();if(r!==null&&!r.isCollapsed()&&n!=null){e.preventDefault();let i=vD(t);i!==null&&n.setData(`text/html`,i),n.setData(`text/plain`,r.getTextContent())}}})}function ED(e){return aC(e.registerCommand(Om,e=>{let t=Hw();return!!B(t)&&(t.deleteCharacter(e),!0)},0),e.registerCommand(Pm,e=>{let t=Hw();return!!B(t)&&(t.deleteWord(e),!0)},0),e.registerCommand(Fm,e=>{let t=Hw();return!!B(t)&&(t.deleteLine(e),!0)},0),e.registerCommand(jm,e=>{let t=Hw();if(!B(t))return!1;if(typeof e==`string`)t.insertText(e);else{let n=e.dataTransfer;if(n!=null)yD(n,t);else{let n=e.data;n&&t.insertText(n)}}return!0},0),e.registerCommand(Nm,()=>{let e=Hw();return!!B(e)&&(e.removeText(),!0)},0),e.registerCommand(km,e=>{let t=Hw();return!!B(t)&&(t.insertLineBreak(e),!0)},0),e.registerCommand(Am,()=>{let e=Hw();return!!B(e)&&(e.insertLineBreak(),!0)},0),e.registerCommand(Hm,e=>{let t=Hw();if(!B(t))return!1;let n=e,r=n.shiftKey;return!!UE(t,!0)&&(n.preventDefault(),KE(t,r,!0),!0)},0),e.registerCommand(Bm,e=>{let t=Hw();if(!B(t))return!1;let n=e,r=n.shiftKey;return!!UE(t,!1)&&(n.preventDefault(),KE(t,r,!1),!0)},0),e.registerCommand(Jm,t=>!!B(Hw())&&(!em||!Qp)&&(t.preventDefault(),e.dispatchCommand(Om,!0)),0),e.registerCommand(Xm,t=>!!B(Hw())&&(t.preventDefault(),e.dispatchCommand(Om,!1)),0),e.registerCommand(Km,t=>{if(!B(Hw()))return!1;if(t!==null){if((em||nm||am)&&Qp)return!1;t.preventDefault()}return e.dispatchCommand(km,!1)},0),e.registerCommand(ih,()=>{let e=Hw();return ob(B(e)&&yT(e.anchor.getNode())!==null?e:null),!0},0),e.registerCommand(nh,t=>!(!B(Hw())||by(t)||(TD(t,e),0)),0),e.registerCommand(rh,t=>!(!B(Hw())||by(t)||(function(e,t){TD(e,t),t.update(()=>{let e=Hw();B(e)&&e.removeText()},{tag:`cut`})}(t,e),0)),0),e.registerCommand(Mm,t=>!(!B(Hw())||by(t)||(function(e,t){e.preventDefault(),t.update(()=>{let t=Hw(),n=qE(e,ClipboardEvent)?e.clipboardData:null;n!=null&&B(t)&&yD(n,t)},{tag:`paste`})}(t,e),0)),0),e.registerCommand(Qm,t=>wD(t,e),0),e.registerCommand($m,t=>{let n=Hw();return!!B(n)&&(n.isCollapsed()||t.dataTransfer===null||xD(t.dataTransfer,e),!0)},0))}function DD(e){return JSON.stringify([e.exportJSON(),R(e)?e.getChildrenKeys():null])}function OD(e,t,n){let r=n(),i=0,a=r,o=0,s=null,c=new Set;return(l,u,d,f,p,m)=>{let h=n();if(m.has(`composition-start`)&&(a=r,o=i,s=l,c.clear()),s!==null){for(let e of f)c.add(e);for(let e of p.keys())c.add(e)}if(m.has(`historic`))return i=0,r=h,s=null,c.clear(),2;let g=m.has(lS);g&&s&&(r=a,i=o,l=s);let _=m.has(`paste`)||m.has(`cut`)?0:function(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;let a=t._selection,o=e._selection;if(i)return 1;if(!(B(a)&&B(o)&&o.isCollapsed()&&a.isCollapsed()))return 0;let s=function(e,t,n){let r=e._nodeMap,i=[];for(let e of t){let t=r.get(e);t!==void 0&&i.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);n===void 0||mv(n)||i.push(n)}return i}(t,n,r);if(s.length===0)return 0;if(s.length>1){let n=t._nodeMap,r=n.get(a.anchor.key),i=n.get(o.anchor.key);return r&&i&&!e._nodeMap.has(r.__key)&&z(r)&&r.__text.length===1&&a.anchor.offset===1?2:0}let c=s[0],l=e._nodeMap.get(c.__key);if(!z(l)||!z(c)||l.__mode!==c.__mode)return 0;let u=l.__text,d=c.__text;if(u===d)return 0;let f=a.anchor,p=o.anchor;if(f.key!==p.key||f.type!==`text`)return 0;let m=f.offset,h=p.offset,g=d.length-u.length;return g===1&&h===m-1?2:g===-1&&h===m+1?3:g===-1&&h===m?4:0}(l,u,f,p,e.isComposing()),v=!1,y=(()=>{let n=d===null||d.editor===e,a=m.has(aS),o=!a&&n&&m.has(`history-merge`);if(g&&s!==null&&n&&!a&&function(e,t,n){for(let r of e){let e=t._nodeMap.get(r),i=n._nodeMap.get(r);if(!(e===i||e&&i&&t.read(()=>DD(e))===n.read(()=>DD(i))))return!1}return!0}(c,s,u))return v=!0,0;if(o)return 0;if(_===1)return 2;if(l===null)return 1;let y=u._selection;if(!(f.size>0||p.size>0))return y===null?2:0;let b=typeof t==`number`?t:t.peek();return!1===a&&_!==0&&_===i&&h<r+b&&n||!a&&f.size===1&&function(e,t,n){let r=t._nodeMap.get(e),i=n._nodeMap.get(e),a=t._selection,o=n._selection;return!(B(a)&&B(o)&&a.anchor.type===`element`&&a.focus.type===`element`&&o.anchor.type===`text`&&o.focus.type===`text`||!z(r)||!z(i)||r.__parent!==i.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>i.exportJSON()))}(Array.from(f)[0],l,u)?0:1})();return g&&(s=null,c.clear()),v||(r=h,i=_),y}}function kD(e,t){if(t!==null&&t.editor===e.editor)return t;let{editor:n}=e,r=n.getEditorState();return r.isEmpty()?null:{editor:n,editorState:r}}function AD(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}function jD(e,t,n,r=Date.now,i,a=null){let o=OD(e,n,r),s=()=>{i&&i(t)};return s(),aC(e.registerCommand(Lm,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(i.length!==0){let a=t.current,o=i.pop();if(o){let t=kD(o,a);t!==null&&(r.push(t),e.dispatchCommand(sh,!0))}i.length===0&&e.dispatchCommand(ch,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:`historic`})}}(e,t,i),!0),0),e.registerCommand(Rm,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(r.length!==0){let a=t.current,o=r.pop();if(o){let t=kD(o,a);t!==null&&(i.push(t),e.dispatchCommand(ch,!0))}r.length===0&&e.dispatchCommand(sh,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:`historic`})}}(e,t,i),!0),0),e.registerCommand(ah,()=>(AD(t,i),!1),0),e.registerCommand(oh,()=>(AD(t,i),e.dispatchCommand(sh,!1),e.dispatchCommand(ch,!1),!0),0),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:i,dirtyElements:c,tags:l})=>{let u=t.current,d=t.redoStack,f=t.undoStack,p=u===null?null:u.editorState;if(u!==null&&n===p)return;let m=o(r,n,u,i,c,l);if(m===1){d.length!==0&&(t.redoStack=[],e.dispatchCommand(sh,!1));let n=function(e,t,n){return n===null?null:n.editor===e?{...n}:t.isEmpty()?null:{editor:e,editorState:t}}(e,r,u);if(n!==null){f.push(n);let t=typeof a==`number`||a===null?a:a.peek();t!==null&&f.length>t&&f.splice(0,f.length-t),e.dispatchCommand(ch,!0)}}else if(m===2)return;t.current={editor:e,editorState:n},s()}))}function MD(){return{current:null,redoStack:[],undoStack:[]}}function ND({editor:e,editable:t,...n}){let r=(0,P.useRef)(null);return(0,P.useLayoutEffect)(()=>{let t=r.current;if(e!==null&&t!==null)return e.setRootElement(t),()=>{e.setRootElement(null)}},[e]),(0,P.useLayoutEffect)(()=>{e!==null&&e.setEditable(t)},[e,t]),(0,F.jsx)(`div`,{ref:r,contentEditable:e!==null&&t,suppressContentEditableWarning:!0,role:`textbox`,"aria-multiline":`true`,"data-composer-input":!0,...n})}var PD=`color: var(--dsw-alias-state-business-primary)`;function FD(){let e=Gy().getFirstChild();if(!R(e))return null;let t=e.getFirstChild();return z(t)?t:null}function ID(e,t){return e.registerNodeTransform(Ev,e=>{let n=FD();if(n===null||e.getKey()!==n.getKey()){e.getStyle()===PD&&e.setStyle(``);return}let r=e.getTextContent(),i=t(),a=r===i?.trimEnd()?r:i;if(a===null||!r.startsWith(a))e.getStyle()===PD&&e.setStyle(``);else if(r.length>a.length){let[t]=e.splitText(a.length);t!==void 0&&t.getStyle()!==PD&&t.setStyle(PD)}else e.getStyle()!==PD&&e.setStyle(PD)})}function LD(e){e.update(()=>{FD()?.markDirty()})}var RD=(0,P.forwardRef)(function(e,t){let n=(0,P.useRef)(e);n.current=e;let[r]=(0,P.useState)(()=>SS({namespace:`pi-composer`,onError:e=>{throw e}})),[i,a]=(0,P.useState)(!1);return(0,P.useImperativeHandle)(t,()=>({focus:()=>r.focus()}),[r]),(0,P.useLayoutEffect)(()=>{let e=()=>{let e=r.getRootElement();return e&&!e.contains(e.ownerDocument.activeElement)&&yb(sS),!1},t=[r.registerCommand(uh,()=>(r.update(e,{discrete:!0}),!1),4),r.registerCommand(Sm,e,4),r.registerNodeTransform(pv,e),ED(r),jD(r,MD(),1e3),ID(r,()=>n.current.claimToken),r.registerUpdateListener(({editorState:e,dirtyElements:t,dirtyLeaves:r})=>{if(t.size===0&&r.size===0)return;let i=e.read(()=>Gy().getTextContent());i!==n.current.value&&n.current.onChange(i)})];return()=>{for(let e of t)e()}},[r]),(0,P.useLayoutEffect)(()=>{(r.getEditorState().read(()=>Gy().getTextContent())!==e.value||r.getEditorState().isEmpty())&&(r.update(()=>{let t=Gy(),n=r.getRootElement()?.contains(document.activeElement);n||yb(sS);let i=oy();for(let[t,n]of e.value.split(`
58
+ `).entries())t&&i.append(pS()),n&&i.append(Fv(n));t.clear().append(i),n&&i.selectEnd()},{discrete:!0}),e.value||r.dispatchCommand(oh,void 0))},[r,e.value]),(0,P.useLayoutEffect)(()=>{LD(r)},[r,e.claimToken]),(0,F.jsx)(`div`,{className:$t.scroll,"data-input-scroll":!0,children:(0,F.jsxs)(`div`,{className:$t.grow,children:[(0,F.jsx)(ND,{editor:r,editable:e.editable,className:$t.input,"aria-label":e.ariaLabel,"aria-disabled":!e.editable||void 0,"aria-haspopup":`listbox`,"aria-expanded":e.menuOpen,"aria-activedescendant":e.activeOption,"data-phase":e.claimToken?`claimed`:`plain`,"data-placeholder":e.placeholder,"data-composer-composing":i||void 0,style:e.hint===null?void 0:{"--dsh-composer-hint":JSON.stringify(e.hint)},onKeyDownCapture:t=>{e.onKeyDown(t),t.defaultPrevented&&t.stopPropagation()},onPasteCapture:t=>{e.onPaste(t),t.defaultPrevented&&t.stopPropagation()},onCompositionStart:()=>a(!0),onCompositionEnd:()=>a(!1)}),e.value===``&&(0,F.jsx)(`div`,{"aria-hidden":!0,className:$t.placeholder,"data-composer-placeholder":!0,children:e.placeholder})]})})});function zD(e,t){return typeof e==`string`?e:e?.[t]}function BD(e,t,n,r){let i=new Map;for(let n of[...e,...t.map(e=>({...e,section:`commands`}))])i.has(n.name)||i.set(n.name,{...n,section:n.section??`commands`});for(let e of n){for(let t of e.definition.commands??[])i.set(t.id,{name:t.id,label:zD(t.presentation?.label,r)??t.title,description:zD(t.presentation?.description,r)??t.description,icon:t.presentation?.icon,section:t.presentation?.section??`commands`,input:t.input,pluginId:e.id,action:t.action});for(let t of e.definition.menuItems??[])t.menu===`composer`&&i.set(`${e.id}:${t.id}`,{name:t.title,label:t.title,section:`add`,pluginId:e.id,action:t.action,menuOnly:!0})}return[...i.values()].sort((e,t)=>Number(t.section===`add`)-Number(e.section===`add`))}function VD(e){let t=e.input?.token;return[e.name,...typeof t==`string`?[t]:t?[t.zh,t.en]:[]]}function HD(e,t){let n=/^\/(\S+)(?:\s([\s\S]*))?$/.exec(e.trimStart());if(!n)return;let r=t.find(e=>!e.menuOnly&&e.name===n[1])??t.find(e=>!e.menuOnly&&VD(e).includes(n[1]));return r?{command:r,token:`/${n[1]}`,text:(n[2]??``).trim()}:void 0}function UD(e,t,n){let r=t.toLocaleLowerCase();return e.filter(e=>(!n||!e.menuOnly)&&[...VD(e),e.label??``].some(e=>e.toLocaleLowerCase().includes(r)))}function WD(e,t,n,r,i){if(!(!t||t.idle&&(r.trim()||i))){for(let r of e){let e=r.definition.composerAction?.(t,n);if(!(!e||(t.idle?e.kind!==`invoke`:e.kind!==`stop`)))return{...e,pluginId:r.id,sessionId:t.sessionId}}if(!t.idle)return{kind:`stop`,sessionId:t.sessionId,label:n===`zh`?`暂停执行`:`Pause`,title:n===`zh`?`暂停当前执行,保留已有进度`:`Pause execution and keep existing progress`};if(t.paused)return{kind:`resume`,sessionId:t.sessionId,label:n===`zh`?`继续执行`:`Continue`,title:n===`zh`?`基于已有进度继续执行`:`Continue from existing progress`}}}async function GD(e,t,n,r,i,a){if(i()!==e.sessionId)throw Error(`Session changed`);if(e.kind===`stop`)return r();if(e.kind===`resume`){if(!a)throw Error(`Resume is unavailable`);return a()}if(!e.pluginId)throw Error(`Missing plugin for composer action`);let o=await t(e.pluginId,e.action,e.input);if(i()!==e.sessionId)throw Error(`Session changed`);if(!e.sendResultMessage)return;let s=o?.message;if(typeof s!=`string`||!s.trim())throw Error(`Plugin action did not return a message`);await n(s)}var KD=12;function qD(e,t,n){let[r,i]=(0,P.useState)(t);return(0,P.useLayoutEffect)(()=>{let n=e.current;if(n===null)return;let r=()=>{i(Math.min(t,Math.max(0,n.getBoundingClientRect().bottom-KD)))};return r(),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0),()=>{window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}},[e,t,n]),r}var JD={menu:`_menu_1lxmu_1`,viewport:`_viewport_1lxmu_44`,item:`_item_1lxmu_51`,active:`_active_1lxmu_70`,sectionTitle:`_sectionTitle_1lxmu_74`,itemIcon:`_itemIcon_1lxmu_88`,itemName:`_itemName_1lxmu_103`,itemAlias:`_itemAlias_1lxmu_113`,itemDescription:`_itemDescription_1lxmu_126`,trailing:`_trailing_1lxmu_140`,drillHintText:`_drillHintText_1lxmu_151`,drillHint:`_drillHint_1lxmu_151`,drill:`_drill_1lxmu_151`,groupTitle:`_groupTitle_1lxmu_194`,skeletonRow:`_skeletonRow_1lxmu_204`,skeletonBar:`_skeletonBar_1lxmu_213`,"dsh-menu-skeleton":`_dsh-menu-skeleton_1lxmu_1`,crumbs:`_crumbs_1lxmu_229`,crumb:`_crumb_1lxmu_229`,crumbCurrent:`_crumbCurrent_1lxmu_264`,crumbSeparator:`_crumbSeparator_1lxmu_270`};function YD(){return[{name:`file`,label:r(`文件`,`File`),section:`add`,icon:T,menuOnly:!1},{name:`compact`,label:r(`压缩`,`Compact`),icon:j,description:r(`压缩当前会话内容`,`Compact the current session`)},{name:`model`,label:r(`模型`,`Model`),icon:k,description:r(`选择本会话使用的模型`,`Choose the model for this session`)},{name:`new`,label:r(`新会话`,`New session`),icon:ae,description:r(`创建新会话`,`Create a new session`)}]}function XD({commands:e,active:t,onHover:n,onPick:i,grouped:a=!0}){let o=(0,P.useRef)(null),s=qD(o,400,e.length);return(0,P.useLayoutEffect)(()=>{o.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`})},[t,e.length]),(0,F.jsx)(Op,{ref:o,className:JD.menu,"data-trigger-menu":``,style:{maxHeight:s},children:(0,F.jsxs)(`div`,{className:JD.viewport,role:`listbox`,"aria-label":r(`指令`,`Commands`),"aria-activedescendant":e[t]?`pi-command-${t}`:void 0,children:[e.map((o,s)=>(0,F.jsxs)(P.Fragment,{children:[a&&(s===0||o.section!==e[s-1]?.section)&&(0,F.jsx)(`div`,{className:JD.sectionTitle,role:`presentation`,children:o.section===`add`?r(`添加`,`Add`):r(`指令`,`Commands`)}),(0,F.jsxs)(`button`,{id:`pi-command-${s}`,type:`button`,role:`option`,"aria-selected":s===t,className:`${JD.item} ${s===t?JD.active:``}`,onMouseDown:e=>{e.preventDefault(),i(o)},onMouseMove:s===t?void 0:()=>n(s),children:[o.icon&&(0,F.jsx)(`span`,{className:JD.itemIcon,"aria-hidden":!0,children:(0,F.jsx)(o.icon,{size:14})}),(0,F.jsx)(`span`,{className:JD.itemName,children:o.label??o.name}),o.label&&o.label.toLowerCase()!==o.name.toLowerCase()&&(0,F.jsx)(`span`,{className:JD.itemAlias,children:o.name}),o.description&&(0,F.jsx)(`span`,{className:JD.itemDescription,children:o.description})]})]},`${o.pluginId??`pi`}:${o.name}`)),e.length===0&&(0,F.jsx)(`div`,{className:JD.groupTitle,children:r(`没有匹配的指令`,`No matching commands`)})]})})}var ZD={mask:`_mask_dzmab_3`,"fade-in":`_fade-in_dzmab_1`,wrap:`_wrap_dzmab_27`,illustration:`_illustration_dzmab_37`,title:`_title_dzmab_42`,desc:`_desc_dzmab_47`};function QD({disabled:e,labels:t}){return(0,At.createPortal)((0,F.jsx)(`div`,{className:ZD.mask,role:`status`,children:(0,F.jsxs)(`div`,{className:ZD.wrap,children:[(0,F.jsx)(`div`,{className:ZD.illustration,"aria-hidden":`true`,children:e?(0,F.jsx)(eO,{}):(0,F.jsx)($D,{})}),(0,F.jsx)(`div`,{className:ZD.title,children:t.title}),!e&&t.desc!==void 0&&(0,F.jsx)(`div`,{className:ZD.desc,children:t.desc})]})}),document.body)}var $D=()=>(0,F.jsxs)(`svg`,{width:`115`,height:`84`,viewBox:`0 0 115 84`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsxs)(`g`,{clipPath:`url(#piwDropOverlayClip)`,children:[(0,F.jsx)(`rect`,{y:`17.0742`,width:`44.1832`,height:`43.6431`,rx:`12`,transform:`rotate(-22.7338 0 17.0742)`,fill:`#9CE5ED`}),(0,F.jsx)(`rect`,{x:`73.4043`,y:`8.54297`,width:`43.7267`,height:`50.5284`,rx:`8`,transform:`rotate(17.403 73.4043 8.54297)`,fill:`#679EFE`}),(0,F.jsx)(`path`,{d:`M30.4917 28.1369L40.8865 33.4564L37.2232 34.9524L29.5302 31.0159L26.7919 39.2122L23.1285 40.7082L26.8287 29.6338L16.8967 24.5516L20.5601 23.0556L27.7902 26.7549L30.3639 19.052L34.0273 17.556L30.4917 28.1369Z`,fill:`white`}),(0,F.jsx)(`path`,{d:`M77.5088 26.3047L101.057 33.7966`,stroke:`white`,strokeWidth:`3`}),(0,F.jsx)(`path`,{d:`M72.2646 42.7871L86.3938 47.2823`,stroke:`white`,strokeWidth:`3`}),(0,F.jsx)(`path`,{d:`M74.8867 34.5469L98.4353 42.0388`,stroke:`white`,strokeWidth:`3`}),(0,F.jsx)(`rect`,{x:`31.583`,y:`38.6641`,width:`44.9157`,height:`44.3666`,rx:`12`,transform:`rotate(-0.134233 31.583 38.6641)`,fill:`#3964FE`}),(0,F.jsx)(`path`,{d:`M38.9521 73.0337C39.6129 71.7086 41.7113 66.0937 43.5113 61.1663C44.1607 59.3885 46.7484 59.3923 47.4591 61.1465C48.9728 64.8828 50.7969 68.6922 51.9988 69.1925C54.2946 70.1482 57.9854 59.3573 68.0064 70.1801`,stroke:`white`,strokeWidth:`3`}),(0,F.jsx)(`circle`,{cx:`60.6157`,cy:`52.247`,r:`4.38794`,transform:`rotate(22.5996 60.6157 52.247)`,fill:`white`})]}),(0,F.jsx)(`defs`,{children:(0,F.jsx)(`clipPath`,{id:`piwDropOverlayClip`,children:(0,F.jsx)(`rect`,{width:`115`,height:`84`,fill:`white`})})})]}),eO=()=>(0,F.jsxs)(`svg`,{width:`115`,height:`84`,viewBox:`0 0 115 84`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M29.6829 4.63701L11.0677 12.4368C4.95519 14.998 2.07624 22.0294 4.6374 28.1419L12.2285 46.259C14.7896 52.3715 21.8211 55.2505 27.9336 52.6893L46.5488 44.8895C52.6613 42.3283 55.5403 35.2969 52.9791 29.1844L45.388 11.0673C42.8269 4.9548 35.7954 2.07585 29.6829 4.63701Z`,fill:`#979DA6`}),(0,F.jsx)(`path`,{d:`M30.4915 28.1375L40.8863 33.4569L37.223 34.9529L29.53 31.0165L26.7917 39.2128L23.1283 40.7088L26.8285 29.6344L16.8965 24.5522L20.5599 23.0562L27.79 26.7555L30.3637 19.0526L34.0271 17.5566L30.4915 28.1375Z`,fill:`white`}),(0,F.jsx)(`path`,{d:`M107.496 19.2285L81.0381 10.9357C76.8221 9.61423 72.333 11.9607 71.0116 16.1768L60.6844 49.1246C59.363 53.3406 61.7095 57.8297 65.9255 59.1511L92.383 67.4439C96.599 68.7654 101.088 66.4189 102.41 62.2029L112.737 29.255C114.058 25.039 111.712 20.55 107.496 19.2285Z`,fill:`#979DA6`}),(0,F.jsx)(`path`,{d:`M77.5088 26.3047L101.057 33.7967`,stroke:`white`,strokeWidth:`3`}),(0,F.jsx)(`path`,{d:`M72.2646 42.7871L86.3938 47.2823`,stroke:`white`,strokeWidth:`3`}),(0,F.jsx)(`path`,{d:`M74.8867 34.5469L98.4353 42.0388`,stroke:`white`,strokeWidth:`3`}),(0,F.jsx)(`path`,{d:`M66.5798 30.1418L41.481 30.2006C33.5281 30.2193 27.0962 36.6815 27.1148 44.6343L27.172 69.0742C27.1907 77.0271 33.6529 83.459 41.6057 83.4404L66.7045 83.3816C74.6574 83.363 81.0894 76.9008 81.0707 68.9479L81.0135 44.5081C80.9949 36.5552 74.5327 30.1232 66.5798 30.1418Z`,fill:`#F59E0B`}),(0,F.jsx)(`path`,{d:`M54 70.7969C61.732 70.7969 68 64.5289 68 56.7969C68 49.0649 61.732 42.7969 54 42.7969C46.268 42.7969 40 49.0649 40 56.7969C40 64.5289 46.268 70.7969 54 70.7969Z`,stroke:`white`,strokeWidth:`3.5`}),(0,F.jsx)(`path`,{d:`M44 46.7969L64 66.7969`,stroke:`white`,strokeWidth:`3.5`,strokeLinecap:`round`})]});function tO(e){let t=[],n=e;for(;;){let e=/(^|\n\n)附件 ("(?:\\.|[^"\\])*"):([^\n]+)$/u.exec(n);if(!e||!/[\\/]pi-web[\\/]attachments[\\/][a-f0-9]{64}[\\/]/u.test(e[3]))break;let r;try{r=JSON.parse(e[2])}catch{break}t.unshift({name:r,image:/\.(?:png|jpe?g|webp|gif)$/iu.test(r)}),n=n.slice(0,e.index)}return{text:n,attachments:t}}var nO={keys:`_keys_38b9q_1`,key:`_key_38b9q_1`,tooltip:`_tooltip_38b9q_20`,separator:`_separator_38b9q_30`,joined:`_joined_38b9q_32`};function rO({keys:e,variant:t=`plain`,className:r}){return(0,F.jsx)(`span`,{className:n(nO.keys,t===`tooltip`&&nO.tooltip,t===`tooltip`&&e.includes(`+`)&&nO.joined,r),children:e.map((e,t)=>(0,F.jsx)(`kbd`,{className:e===`+`?nO.separator:nO.key,children:e},t))})}var iO={bubble:`_bubble_ugtpz_1`,"tooltip-in":`_tooltip-in_ugtpz_1`,label:`_label_ugtpz_26`},aO={pointer:`pointer`,keyboard:`keyboard`},oO=`data-input-modality`,sO=new Set([`Tab`,`Home`,`End`,`PageUp`,`PageDown`]),cO=!1,lO=!1,uO;function dO(){document.documentElement.setAttribute(oO,lO?aO.pointer:aO.keyboard)}function fO(){return cO}typeof window<`u`&&(window.addEventListener(`pointerdown`,()=>{cO=!0,lO=!0,uO=void 0,dO()},!0),window.addEventListener(`keydown`,e=>{typeof e.key==`string`&&(cO=!1,e.isComposing?uO=void 0:(uO=e.composedPath()[0],(sO.has(e.key)||e.key.startsWith(`Arrow`))&&(lO=!1,dO())))},!0),window.addEventListener(`focusin`,e=>{uO!==void 0&&e.composedPath()[0]!==uO&&(uO=void 0,lO&&(lO=!1,dO()))},!0),window.addEventListener(`blur`,()=>{uO=void 0}));var pO=(0,P.createContext)(null);function mO({label:e,shortcutKeys:t,side:n=`right`,align:r=`center`,delayMs:i=0,gap:a=8,disabled:o=!1,portal:s=!1,maxWidth:c,children:l}){let u=(0,P.useRef)(null),d=l.props.ref,f=(0,P.useCallback)(e=>{u.current=e,typeof d==`function`?d(e):d!=null&&(d.current=e)},[d]),[p,m]=(0,P.useState)(null),h=(0,P.useRef)(null),g=p===null?null:typeof e==`function`?e():e,_=p===null?0:n===`right`?p.top+(p.bottom-p.top)/2:n===`top`?p.top-a:p.bottom+a,v=(0,P.useRef)(null),y=(0,P.useRef)({hover:!1,focus:!1}),b=(0,P.useContext)(pO),[x,S]=(0,P.useState)(!1),C=(0,P.useCallback)(e=>{b?.(e)},[b]),w=p!==null&&!o;(0,P.useEffect)(()=>{let e=h.current;if(p===null||!w||x||e===null)return;let t,i=n,o=()=>{if(t===void 0)return;let{inlineSize:o,blockSize:s}=t,c=n===`right`?0:r===`end`?o:o/2,l=Math.max(12,Math.min(p.x-c,window.innerWidth-12-o)),u=p.bottom+a+s<=window.innerHeight-12,d=p.top-a-s>=12;i===`bottom`&&!u&&d?i=`top`:i===`top`&&!d&&u&&(i=`bottom`),e.style.left=`${l+c}px`,e.style.top=`${i===`right`?(p.top+p.bottom)/2:i===`top`?p.top-a:p.bottom+a}px`,e.dataset.side=i,e.style.visibility=`visible`},s=new ResizeObserver(e=>{t=e[0]?.borderBoxSize[0],o()});return s.observe(e,{box:`border-box`}),window.addEventListener(`resize`,o),()=>{s.disconnect(),window.removeEventListener(`resize`,o)}},[r,a,p,n,x,w]),(0,P.useEffect)(()=>(C(w),()=>{C(!1)}),[C,w]);let T=(0,P.useCallback)(()=>{v.current!==null&&(clearTimeout(v.current),v.current=null)},[]);(0,P.useEffect)(()=>(o&&(T(),y.current={hover:!1,focus:!1},m(null)),T),[T,o]);let E=()=>{if(o)return;let e=u.current;if(e===null)return;let t=e.getBoundingClientRect();m({x:n===`right`?t.right+10:r===`end`?t.right:t.left+t.width/2,top:t.top,bottom:t.bottom}),C(!0)},D=()=>{T(),i<=0?E():v.current=setTimeout(()=>{v.current=null,E()},i)},O=()=>{m(null),C(!1)},k=()=>{T(),!y.current.hover&&!y.current.focus&&O()},ee=w&&!x&&(0,F.jsxs)(`span`,{ref:h,className:iO.bubble,"data-side":n,"data-portal":s||void 0,"data-align":r,"data-has-shortcut":t?.length?!0:void 0,style:{left:p.x,top:_,visibility:`hidden`,...c===void 0?{}:{maxWidth:c}},role:`tooltip`,"aria-label":t?.length?[g,t.join(` `)].filter(Boolean).join(` `):void 0,children:[g&&(0,F.jsx)(`span`,{className:iO.label,children:g}),t!==void 0&&t.length>0&&(0,F.jsx)(rO,{keys:t,variant:`tooltip`})]});return(0,F.jsxs)(pO.Provider,{value:S,children:[(0,P.cloneElement)(l,{ref:f,onMouseEnter:e=>{l.props.onMouseEnter?.(e),y.current.hover=!0,D()},onMouseLeave:e=>{l.props.onMouseLeave?.(e),y.current.hover=!1,T(),O()},onClick:e=>{l.props.onClick?.(e),y.current.focus=!1,T(),O()},onFocus:e=>{l.props.onFocus?.(e),fO()||(y.current.focus=!0,T(),E())},onBlur:e=>{l.props.onBlur?.(e),y.current.focus=!1,k()}}),s?ee!==!1&&(0,At.createPortal)(ee,document.body):ee]})}var hO={dock:`_dock_1dh5u_3`,panel:`_panel_1dh5u_11`,header:`_header_1dh5u_40`,lead:`_lead_1dh5u_57`,chevron:`_chevron_1dh5u_57`,count:`_count_1dh5u_58`,list:`_list_1dh5u_59`,row:`_row_1dh5u_60`,content:`_content_1dh5u_61`,actions:`_actions_1dh5u_62`,action:`_action_1dh5u_62`,editor:`_editor_1dh5u_67`,status:`_status_1dh5u_69`,error:`_error_1dh5u_70`,kind:`_kind_1dh5u_79`,preview:`_preview_1dh5u_80`,attachments:`_attachments_1dh5u_81`,file:`_file_1dh5u_83`,paused:`_paused_1dh5u_86`};function gO({session:e,connected:t,onUpdate:n}){let[i,a]=(0,P.useState)(!0),[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(null),[u,d]=(0,P.useState)(``),f=(0,P.useRef)(!1),p=(0,P.useId)(),m=(0,P.useRef)(null),h=(0,P.useRef)(null);(0,P.useLayoutEffect)(()=>{if(h.current&&o===null&&c===null){let e=document.activeElement;(!e||e===document.body||m.current?.contains(e))&&m.current?.querySelector(`[data-prompt-id="${CSS.escape(h.current)}"] [data-edit-prompt]`)?.focus(),h.current=null}},[o,c,e?.queuedPrompts]);let g=[...(e?.promptQueue?.steering??[]).map((e,t)=>({id:`steer-${t}`,label:r(`引导`,`Steer`),...tO(e)})),...(e?.promptQueue?.followUp??[]).map((e,t)=>({id:`native-${t}`,label:r(`排队`,`Queue`),...tO(e)})),...(e?.queuedPrompts??[]).map(e=>({id:e.id,label:r(`排队`,`Queue`),text:e.text,attachments:e.attachments,item:e}))];if((0,P.useEffect)(()=>{g.length===0&&a(!0),o&&!g.some(e=>e.id===o.id&&e.item?.status===`queued`)&&s(null)},[g.length,o,e?.queuedPrompts]),!g.length&&!e?.hasPendingPrompts)return null;let y=g.length===1||!i||o!==null||c!==null,b=r(`${g.length} 条待处理提示词`,`${g.length} pending prompts`),x=e=>{h.current=e},S=async(e,i)=>{if(f.current||!t)return!1;f.current=!0,l(e.id),d(``);try{return await n(e.id,e.revision,i),!0}catch(e){return d(e instanceof Error?e.message:r(`队列操作失败`,`Queue action failed`)),!1}finally{f.current=!1,l(null)}},C=async()=>{if(!o)return;let e=o;await S(e,{kind:`edit`,text:e.text})&&(s(null),x(e.id))},T=(e,t,n,r,i=!1)=>(0,F.jsx)(mO,{portal:!0,label:e,side:`top`,delayMs:500,disabled:t,children:(0,F.jsx)(`button`,{className:hO.action,type:`button`,"aria-label":e,disabled:t,onClick:n,"data-edit-prompt":i||void 0,children:r})});return(0,F.jsx)(`section`,{className:hO.dock,"aria-label":r(`待处理提示词`,`Pending prompts`),"data-queue-dock":``,children:(0,F.jsxs)(`div`,{className:hO.panel,children:[g.length>1&&(0,F.jsxs)(`button`,{type:`button`,className:hO.header,"aria-label":b,"aria-controls":p,"aria-expanded":y,disabled:o!==null||c!==null,onClick:()=>a(e=>!e),children:[(0,F.jsx)(`span`,{className:hO.lead,"aria-hidden":!0,children:(0,F.jsx)(D,{})}),(0,F.jsx)(`span`,{className:hO.count,role:`status`,children:b}),!y&&g.some(e=>e.item?.status===`sending`)&&(0,F.jsx)(`span`,{className:hO.status,children:r(`发送中…`,`Sending…`)}),(0,F.jsx)(`span`,{className:hO.chevron,"aria-hidden":!0,children:y?(0,F.jsx)(E,{}):(0,F.jsx)(M,{})})]}),g.length===0&&(0,F.jsxs)(`div`,{className:hO.header,children:[(0,F.jsx)(`span`,{className:hO.lead,"aria-hidden":!0,children:(0,F.jsx)(D,{})}),(0,F.jsx)(`span`,{className:hO.count,role:`status`,children:r(`等待 Pi 接收`,`Waiting for Pi`)})]}),(0,F.jsx)(`ol`,{ref:m,id:p,className:hO.list,hidden:!y,children:g.map(n=>{let i=n.item,a=!t||c!==null||i?.status===`sending`;return(0,F.jsxs)(`li`,{className:hO.row,"data-prompt-id":n.id,children:[g.length===1&&(0,F.jsx)(`span`,{className:hO.lead,"aria-hidden":!0,children:(0,F.jsx)(D,{})}),(0,F.jsx)(`span`,{className:hO.kind,children:n.label}),(0,F.jsxs)(`div`,{className:hO.content,children:[n.attachments.length>0&&(0,F.jsx)(`span`,{className:hO.attachments,children:n.attachments.map((e,t)=>(0,F.jsxs)(`span`,{className:hO.file,title:e.name,children:[(0,F.jsx)(_,{path:e.name}),(0,F.jsx)(`span`,{children:e.name})]},t))}),o?.id===n.id?(0,F.jsx)(`textarea`,{className:hO.editor,autoFocus:!0,rows:2,maxLength:32e3,"aria-label":r(`编辑排队提示词`,`Edit queued prompt`),value:o.text,disabled:c!==null,onChange:e=>s({...o,text:e.target.value}),onKeyDown:e=>{e.nativeEvent.isComposing||e.keyCode===229||(e.key===`Escape`&&(e.preventDefault(),s(null),x(n.id)),e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),C()))}}):n.text&&(0,F.jsx)(`span`,{className:hO.preview,title:n.text,children:n.text}),i?.error&&(0,F.jsx)(`span`,{className:hO.error,role:`alert`,children:i.error})]}),i?.status===`sending`&&(0,F.jsx)(`span`,{className:hO.status,role:`status`,children:r(`发送中…`,`Sending…`)}),i&&(0,F.jsx)(`div`,{className:hO.actions,children:o?.id===n.id?(0,F.jsxs)(F.Fragment,{children:[T(r(`保存修改`,`Save changes`),a||!o.text.trim()&&n.attachments.length===0,()=>{C()},(0,F.jsx)(A,{})),T(r(`取消编辑`,`Cancel edit`),c!==null,()=>{s(null),x(n.id)},(0,F.jsx)(O,{}))]}):(0,F.jsxs)(F.Fragment,{children:[T(r(`编辑`,`Edit`),a,()=>{s({id:i.id,revision:i.revision,text:i.text}),d(``)},(0,F.jsx)(ee,{}),!0),T(r(`删除`,`Delete`),a,()=>{S(i,{kind:`remove`})},(0,F.jsx)(w,{})),T(r(`发送(引导)`,`Send (steer)`),a||!!e?.idle||!!e?.interactions?.length,()=>{S(i,{kind:`steer`})},(0,F.jsx)(v,{}))]})})]},n.id)})}),u&&(0,F.jsx)(`div`,{className:hO.error,role:`alert`,children:u}),e?.paused&&(0,F.jsx)(`div`,{className:hO.paused,role:`status`,children:r(`已暂停,继续后处理`,`Paused; processed on resume`)})]})})}var _O={controls:`_controls_1d60f_1`,action:`_action_1d60f_2`};function vO({hasDraft:e,canSend:t,canStop:n,pauseLabel:i,pauseTitle:a,pauseIcon:o,onStop:s}){let c=e=>e.preventDefault(),l=(0,F.jsx)(mO,{label:a??i,side:`top`,delayMs:500,disabled:!n,children:(0,F.jsx)(`button`,{className:e?_O.action:$t.primary,type:`button`,"aria-label":i,disabled:!n,onMouseDown:c,onClick:s,children:o??(0,F.jsx)(pe,{size:16})})});return(0,F.jsxs)(`div`,{className:_O.controls,role:`group`,"aria-label":r(`追加提示词`,`Append prompt`),children:[l,e&&(0,F.jsx)(mO,{label:r(`当前任务完成后排队处理`,`Queue after the current task finishes`),shortcutKeys:[`Enter`],side:`top`,delayMs:500,disabled:!t,children:(0,F.jsx)(`button`,{className:$t.primary,type:`submit`,"aria-label":r(`发送消息`,`Send message`),disabled:!t,onMouseDown:c,children:(0,F.jsx)(C,{size:16})})})]})}function yO(e,t,n){let r=(0,P.useRef)(null),i=(0,P.useRef)(null),a=(0,P.useRef)(null),o=(0,P.useRef)(!0),s=(0,P.useRef)(0),[c,l]=(0,P.useState)(!1),u=(0,P.useCallback)(()=>{let e=r.current;e&&(e.scrollTop=e.scrollHeight,s.current=e.scrollTop,l(!1))},[]),d=(0,P.useCallback)(()=>{o.current=!0,u()},[u]),f=(0,P.useCallback)(()=>{let e=r.current;if(!e)return;let t=e.scrollHeight-e.clientHeight-e.scrollTop;e.scrollTop<s.current-1?o.current=!1:t<=24&&(o.current=!0),s.current=e.scrollTop,l(!o.current&&t>1)},[]),p=(0,P.useCallback)(e=>{e.deltaY<0&&(o.current=!1)},[]);return(0,P.useLayoutEffect)(()=>{if(o.current=!0,l(!1),!t)return;u();let e=new ResizeObserver(()=>{let e=r.current;e&&(e.style.setProperty(`--piw-composer-height`,`${a.current?.getBoundingClientRect().height??152}px`),o.current?u():l(e.scrollHeight-e.clientHeight-e.scrollTop>1))});for(let t of[r.current,i.current,a.current])t&&e.observe(t);return()=>e.disconnect()},[e,t,u]),(0,P.useLayoutEffect)(()=>{t&&n&&d()},[t,n,d]),(0,P.useLayoutEffect)(()=>{t&&o.current&&u()}),{scroll:r,content:i,composer:a,onScroll:f,onWheel:p,showLatest:t&&c,returnToLatest:d}}function bO({message:e,results:t,loadImage:n,running:i=!1,onInspect:a,cwd:o}){if(e.role===`tool`&&e.toolCallId&&t.has(e.toolCallId))return null;if(e.role===`user`){let t=e.blocks.filter(e=>e.kind===`text`).map(e=>e.text).join(`
59
+ `),i=e.localFiles?{text:t,attachments:e.localFiles.map(e=>({name:e.name,image:/\.(?:png|jpe?g|webp|gif)$/iu.test(e.name)||/^image\/(?:png|jpeg|webp|gif)$/.test(e.type)}))}:tO(t),a=e.blocks.map((e,t)=>({block:e,index:t})).filter(({block:e})=>e.kind===`image`),o=i.attachments.filter(e=>e.image),s=e.localFiles?.filter(e=>/\.(?:png|jpe?g|webp|gif)$/iu.test(e.name)||/^image\/(?:png|jpeg|webp|gif)$/.test(e.type));return(0,F.jsx)(`div`,{className:tn.userRow,"data-message-role":`user`,children:(0,F.jsxs)(`div`,{className:tn.userStack,children:[(a.length>0||i.attachments.some(e=>!e.image))&&(0,F.jsxs)(`div`,{className:tn.attachmentRow,"data-message-attachments":!0,children:[a.map(({index:t},c)=>(0,F.jsx)(Bp,{name:o[c]?.name??s?.[c]?.name??r(`图片`,`Image`),messageId:e.id,index:t,file:s?.[c],tile:a.length>1||i.attachments.length>a.length,loadImage:n},t)),i.attachments.filter(e=>!e.image).map((e,t)=>(0,F.jsxs)(`span`,{className:tn.fileCard,title:e.name,children:[(0,F.jsx)(_,{path:e.name,className:tn.fileIcon}),(0,F.jsxs)(`span`,{className:tn.fileContent,children:[(0,F.jsx)(`span`,{className:tn.fileName,children:e.name}),(0,F.jsxs)(`span`,{className:tn.fileMeta,children:[re(e.name).toUpperCase(),` `,r(`文件`,`file`)]})]})]},`${e.name}-${t}`))]}),i.text&&(0,F.jsx)(`div`,{className:tn.bubble,children:i.text})]})})}return(0,F.jsx)(`div`,{className:`pi-message`,"data-message-role":e.role,children:e.blocks.map((e,n)=>e.kind===`thinking`?(0,F.jsx)(sf,{text:e.text,running:i},n):e.kind===`toolCall`?(0,F.jsx)($f,{block:e,result:e.toolCallId?t.get(e.toolCallId):void 0,running:i,cwd:o,onInspect:e.toolCallId&&a?()=>a(e.toolCallId):void 0},e.toolCallId||n):e.kind===`image`?(0,F.jsx)(`div`,{className:`pi-image-note`,children:e.text},n):(0,F.jsx)(nf,{text:e.text},n))})}function xO({turn:e,results:t,model:n,loadImage:i,onInspect:a,renderPluginSlot:o,renderToolView:s,artifactTools:c,viewTools:l,running:u=!1,cwd:d,superseded:f=!1}){let p=[...e.messages].reverse().find(e=>e.role===`assistant`&&e.blocks.some(e=>e.kind===`text`&&e.text.trim())),m=p?.blocks.filter(e=>e.kind===`text`)??[],h=[];for(let t of e.messages)t.role===`assistant`&&t.blocks.forEach((e,n)=>{t===p&&e.kind===`text`||e.kind===`toolCall`&&(l.includes(e.toolName??``)||c.includes(e.toolName??``))||h.push({message:t,block:e,index:n})});let[g,_]=(0,P.useState)(!1),v=h.filter(({block:e})=>e.kind===`toolCall`).length,y=new Set(h.filter(({block:e})=>e.kind!==`toolCall`).map(({message:e})=>e.id)).size,b=m.map(e=>e.text).join(`
60
+ `),x=u||g,[S,C]=(0,P.useState)(new Set),w=e.messages.filter(e=>e.role===`assistant`&&e.error),T=[...e.messages].reverse().find(e=>e.role===`assistant`),E=f||T&&!T.error&&T.id!==w.at(-1)?.id?[]:w.filter(e=>!S.has(e.id));return(0,F.jsxs)(`div`,{className:`pi-turn`,"data-turn":e.index,children:[e.messages.filter(e=>e.role===`user`||e.role===`notice`).map(e=>(0,F.jsx)(bO,{message:e,results:t,loadImage:i},e.id)),h.length>0&&(0,F.jsxs)(F.Fragment,{children:[m.length>0&&(0,F.jsx)(ep,{toolCount:v,messageCount:y,open:x,onToggle:()=>_(e=>!e)}),(x||m.length===0)&&(0,F.jsx)(`div`,{className:`pi-turn-process-content`,children:h.map(({message:e,block:n,index:r})=>(0,F.jsx)(bO,{message:{...e,blocks:[n]},results:t,loadImage:i,running:e.id===`stream`,cwd:d,onInspect:a},`${e.id}-${r}`))})]}),lp(e.messages,l).map(({key:e,call:n})=>(0,F.jsx)(`div`,{"data-tool-view":n.toolName,children:s?.(n,n.toolCallId?t.get(n.toolCallId):void 0,u&&!t.has(n.toolCallId??``))},e)),m.length>0&&p&&(0,F.jsx)(bO,{message:{...p,blocks:m},results:t,loadImage:i,running:p.id===`stream`}),e.messages.filter(e=>e.role===`tool`&&(!e.toolCallId||!t.has(e.toolCallId))).map(e=>(0,F.jsx)(bO,{message:e,results:t,loadImage:i},e.id)),E.map(e=>(0,F.jsxs)(`div`,{className:`pi-model-error`,role:`alert`,children:[(0,F.jsxs)(`div`,{className:`pi-model-error-title`,children:[(0,F.jsx)(`strong`,{children:r(`模型请求失败`,`Model request failed`)}),(0,F.jsx)(`button`,{type:`button`,className:`pi-error-dismiss`,"aria-label":r(`关闭错误`,`Dismiss error`),onClick:()=>C(t=>new Set(t).add(e.id)),children:`×`})]}),(0,F.jsx)(`span`,{children:/usage limit has been reached/i.test(e.error??``)?r(`模型服务的使用额度已耗尽。请切换模型或等待额度恢复后重试。`,`The model service usage limit has been reached. Switch models or try again after the limit resets.`):e.error})]},`${e.id}-error`)),!u&&E.length===0&&(p||e.usage&&e.usage.totalTokens>0)&&(0,F.jsx)(rp,{text:b,timestamp:p?.timestamp,usage:e.usage,model:p?.model??n}),o(`turn.tail`,{id:e.id,completed:!u,messageIds:e.messages.map(e=>e.id),toolCallIds:e.messages.flatMap(e=>e.blocks.filter(e=>e.kind===`toolCall`&&e.toolCallId).map(e=>e.toolCallId))})]})}function SO({hero:e,suspended:t=!1,session:n,connection:i,onSend:a,onUpload:o,onDiscardAttachment:s,onStop:c,onResume:u,onCompact:d,onNewSession:f,commands:p,models:m,modelsStatus:h,onConfigureModels:g,onSetModel:_,onSetThinkingLevel:v,onUpdateQueuedPrompt:y,renderPluginSlot:b,plugins:x,onPluginAction:S}){let C=l(),w=n?.sessionId??``,[T,E]=(0,P.useState)({}),D=T[w],O=D?.text??``,k=D?.attachments??[],ee=D?.error??``,te=e=>{E(t=>({...t,[w]:e(t[w]??{text:``,attachments:[],error:``})}))},ne=e=>te(t=>({...t,text:e})),A=e=>te(t=>({...t,attachments:typeof e==`function`?e(t.attachments):e})),re=e=>te(t=>({...t,error:e})),ie=(0,P.useRef)(T);ie.current=T;let[j,ae]=(0,P.useState)(!1),[oe,M]=(0,P.useState)(null),[se,ce]=(0,P.useState)(0),[le,ue]=(0,P.useState)(0),[de,fe]=(0,P.useState)(!1),pe=(0,P.useRef)(0),me=(0,P.useRef)(null),N=(0,P.useRef)(new Map),he=(0,P.useRef)(new Set),_e=(0,P.useRef)(null),ve=(0,P.useRef)(null),ye=(0,P.useRef)(n?.sessionId);ye.current=n?.sessionId;let be=(0,P.useRef)(!1),xe=(0,P.useRef)(t);(0,P.useEffect)(()=>{xe.current&&!t&&ve.current?.focus(),xe.current=t},[t]);let Se=i===`connected`&&n!==null,Ce=Se&&h===`ready`&&m.length===0,we=Se&&m.some(e=>`${e.provider}/${e.id}`===n.model),Te=Se&&!n.idle,Ee=Se&&!j&&!t,De=Ee&&!Te,Oe=k.length===0&&[`/compact`,`/new`,`/model`].includes(O.trim()),ke=(0,P.useMemo)(()=>BD(YD(),p,x,C),[p,x,C]),Ae=HD(O,ke),je=Ae?.command.pluginId?Ae.command:void 0,Me=Ae?.command.input?`${Ae.token}${/\s$/.test(O)||Ae.text?` `:``}`:null,Ne=Ae?.command.input&&!Ae.text?zD(Ae.command.input.hint,C)??null:null,Pe=Ee&&!n?.interactions?.length&&!(Te&&O.trimStart().startsWith(`/`))&&(h===`ready`&&we||!Te&&(Oe||!!je))&&(O.trim().length>0||k.length>0)&&k.every(e=>e.status===`ready`)&&(!je||k.length===0||je.input?.attachments===!0),Fe=WD(x,n,C,O,k.length),Ie=Fe?.icon,Le=De&&(Fe?.kind===`resume`||Fe?.kind===`invoke`)&&(Fe.kind===`invoke`&&!Fe.sendResultMessage||h===`ready`&&we),Re=Te&&!j&&!t,ze=oe===`slash`?O.slice(1).toLowerCase():``,Be=oe===null?[]:UD(Te?ke.filter(e=>!e.pluginId&&e.name===`file`):ke,ze,oe===`slash`);(0,P.useEffect)(()=>{M(null)},[n?.sessionId,Te]),(0,P.useEffect)(()=>()=>{for(let e of Object.values(ie.current))for(let t of e.attachments)he.current.add(t.key),t.receipt&&t.discard(t.receipt.id).catch(()=>{});for(let e of N.current.values())e.abort();N.current.clear()},[]),(0,P.useEffect)(()=>{if(oe===null)return;let e=e=>{e.target instanceof Node&&!_e.current?.contains(e.target)&&M(null)};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[oe]);let Ve=async e=>{if(Ee&&(De||!e.pluginId&&e.name===`file`)){if(oe===`slash`&&[`file`,`model`,`compact`,`new`].includes(e.name)&&ne(``),M(null),!e.pluginId&&e.name===`file`)me.current?.click();else if(e.pluginId&&e.action&&e.menuOnly){ae(!0);try{await S(e.pluginId,e.action,{args:[]}),re(``)}catch(e){re(e instanceof Error?e.message:String(e))}finally{ae(!1)}}else if(!e.pluginId&&e.name===`model`)ue(e=>e+1);else if(!e.pluginId&&(e.name===`compact`||e.name===`new`)){ae(!0);try{await(e.name===`compact`?d():f())}catch{}finally{ae(!1)}}else ne(`/${zD(e.input?.token,C)??e.name} `),ve.current?.focus()}},He=(0,P.useCallback)((e,t)=>{let n=new AbortController;N.current.set(e,n),o(t,n.signal).then(t=>{he.current.has(e)?s(t.id).catch(()=>{}):A(n=>n.map(n=>n.key===e?{...n,status:`ready`,receipt:t,error:void 0}:n))}).catch(t=>{if(he.current.has(e))return;let n=t instanceof Error?t.message:r(`上传失败`,`Upload failed`);re(n),A(t=>t.map(t=>t.key===e?{...t,status:`error`,error:n}:t))}).finally(()=>{N.current.get(e)===n&&N.current.delete(e)})},[o,s,w]),Ue=(0,P.useRef)(w);(0,P.useEffect)(()=>{let e=Ue.current;if(e===w)return;Ue.current=w;let t=ie.current[e];for(let e of t?.attachments??[])he.current.add(e.key),N.current.get(e.key)?.abort();let n=ie.current[w],r=(n?.attachments??[]).map(e=>({key:ge(),file:e.file,discard:s,status:`uploading`}));E(i=>({...i,...t?{[e]:{...t,attachments:t.attachments.map(e=>({...e,receipt:void 0,status:`error`}))}}:{},...n?{[w]:{...n,attachments:r,error:``}}:{}})),r.forEach(e=>He(e.key,e.file))},[w]);let We=e=>{he.current.add(e.key),N.current.get(e.key)?.abort(),e.receipt&&e.discard(e.receipt.id).catch(()=>{}),e.status===`error`&&!k.some(t=>t.key!==e.key&&t.status===`error`)&&re(``),A(t=>t.filter(t=>t.key!==e.key))},Ge=(0,P.useCallback)(e=>{if(!Ee||e.length===0)return;let t=Math.max(0,20-k.length),n=e.slice(0,t).filter(e=>e.size>0&&e.size<=20971520);n.length===e.length?re(``):re(r(`最多添加 20 个文件,单个文件不得超过 20 MB 且不能为空`,`Add up to 20 nonempty files, each no larger than 20 MB`));let i=n.map(e=>({key:ge(),file:e,discard:s,status:`uploading`}));A(e=>[...e,...i]),i.forEach(e=>He(e.key,e.file))},[k.length,Ee,He,s]);(0,P.useEffect)(()=>{let e=e=>e.dataTransfer?.types.includes(`Files`)??!1,t=()=>{pe.current=0,fe(!1)},n=t=>{e(t)&&(t.preventDefault(),pe.current++,fe(!0))},r=t=>{e(t)&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=Ee?`copy`:`none`))},i=t=>{e(t)&&(pe.current=Math.max(0,pe.current-1),pe.current===0&&fe(!1))},a=n=>{if(!e(n))return;n.preventDefault();let r=[...n.dataTransfer?.files??[]];t(),Ge(r)};return document.addEventListener(`dragenter`,n),document.addEventListener(`dragover`,r),document.addEventListener(`dragleave`,i),document.addEventListener(`drop`,a),window.addEventListener(`dragend`,t),()=>{document.removeEventListener(`dragenter`,n),document.removeEventListener(`dragover`,r),document.removeEventListener(`dragleave`,i),document.removeEventListener(`drop`,a),window.removeEventListener(`dragend`,t)}},[Ee,Ge]);let Ke=async(e=Te?`followUp`:void 0)=>{if(!Pe||be.current)return;be.current=!0,ae(!0);let t=O.trim(),n=k;Oe||(ne(``),A([]));try{if(Oe)t===`/model`?ue(e=>e+1):await(t===`/compact`?d():f()),ne(``);else if(je?.pluginId&&je.action&&Ae){re(``);let e=await S(je.pluginId,je.action,{args:Ae.text.split(/\s+/).filter(Boolean),text:Ae.text,attachments:n.map(e=>e.receipt.id)});typeof e?.message==`string`&&e.message?await a(e.message,n.map(e=>e.receipt.id),n.map(e=>e.file)):n.length&&(A(n),re(r(`指令未发送附件,文件仍保留在输入框`,`The command did not send the files; they remain in the composer`))),ne(``)}else await a(t,n.map(e=>e.receipt.id),n.map(e=>e.file),e)}catch{Oe||(ne(t),A(n))}finally{be.current=!1,ae(!1)}},qe=async()=>{if(Re&&!be.current){be.current=!0,ae(!0);try{await c()}catch{}finally{be.current=!1,ae(!1)}}},Je=async()=>{if(Le&&Fe&&!be.current){be.current=!0,ae(!0),re(``);try{await GD(Fe,S,e=>a(e,[],[]),c,()=>ye.current,u)}catch(e){Fe.kind!==`resume`&&ye.current===Fe.sessionId&&re(e instanceof Error?e.message:String(e))}finally{be.current=!1,ae(!1)}}};return(0,F.jsxs)(`div`,{hidden:t,className:`${$t.root} ${e?$t.hero:``} ${t?$t.suspended:``}`,children:[de&&(0,F.jsx)(QD,{disabled:!Ee,labels:{title:Ee?r(`松开以上传文件`,`Drop to upload files`):r(`当前无法上传文件`,`Files cannot be uploaded now`),desc:Ee?r(`最多 20 个文件,每个不超过 20 MB`,`Up to 20 files, 20 MB each`):void 0}}),(0,F.jsx)(gO,{session:n,onUpdate:y,connected:Se},n?.sessionId),(0,F.jsxs)(`form`,{ref:_e,className:$t.card,"data-composer-card":!0,onSubmit:e=>{e.preventDefault(),Ke()},children:[oe!==null&&(0,F.jsx)(XD,{commands:Be,active:se,grouped:!ze,onHover:ce,onPick:e=>{Ve(e)}}),(0,F.jsx)(`input`,{ref:me,className:`pi-file-input`,type:`file`,multiple:!0,tabIndex:-1,"aria-label":r(`选择要上传的文件`,`Choose files to upload`),onChange:e=>{Ge([...e.target.files??[]]),e.target.value=``}}),k.length>0&&(0,F.jsx)(`div`,{className:`pi-attachment-rail`,role:`group`,"aria-label":r(`待发送附件`,`Pending attachments`),children:k.map(e=>(0,F.jsx)(Lp,{file:e.file,status:e.status,error:e.error,onRemove:()=>We(e),onRetry:()=>{re(``),A(t=>t.map(t=>t.key===e.key?{...t,status:`uploading`,error:void 0}:t)),He(e.key,e.file)}},e.key))}),(0,F.jsx)(RD,{ref:ve,value:O,claimToken:Me,hint:Ne,editable:Se&&!j&&!t,placeholder:Ce?r(`先连接模型,再开始对话`,`Connect a model to start chatting`):Se&&h===`ready`&&!we?r(`先选择模型,再开始对话`,`Choose a model to start chatting`):Se?n&&x.map(e=>e.definition.composerPlaceholder?.(n,C)).find(Boolean)||r(`给 Pi 发送消息`,`Message Pi`):r(`打开 Pi 中 /web 给出的完整地址`,`Open the full address provided by /web in Pi`),ariaLabel:r(`给当前 Pi 会话发送消息`,`Send a message to the current Pi session`),menuOpen:oe!==null,activeOption:oe!==null&&Be[se]?`pi-command-${se}`:void 0,onChange:e=>{ne(e),De&&/^\/[^\s]*$/.test(e)?(M(`slash`),ce(0)):oe===`slash`&&M(null)},onPaste:e=>{let t=[...e.clipboardData.files];t.length&&(e.preventDefault(),Ge(t))},onKeyDown:e=>{if(!(e.nativeEvent.isComposing||e.keyCode===229)){if(oe!==null){if(e.key===`Escape`){e.preventDefault(),M(null);return}if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),ce(t=>(t+(e.key===`ArrowDown`?1:-1)+Be.length)%Math.max(Be.length,1));return}if((e.key===`Enter`||e.key===`Tab`)&&Be[se]){e.preventDefault(),Ve(Be[se]);return}}e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),Ke(Te&&(e.ctrlKey||e.metaKey)?`steer`:Te?`followUp`:void 0))}}}),(0,F.jsxs)(`div`,{className:$t.row,children:[(0,F.jsxs)(`div`,{className:$t.tools,children:[(0,F.jsx)(`button`,{className:$t.add,type:`button`,"aria-label":r(`添加指令`,`Add command`),title:r(`添加指令`,`Add command`),"aria-haspopup":`listbox`,"aria-expanded":oe!==null,disabled:!Ee,onMouseDown:e=>e.preventDefault(),onClick:()=>{M(oe===null?`button`:null),ce(0),ve.current?.focus()},children:(0,F.jsx)(ot,{size:16})}),b(`composer.controls`)]}),(0,F.jsxs)(`div`,{className:$t.trailing,children:[Ce?(0,F.jsx)(`button`,{className:`pi-model-setup-trigger`,type:`button`,onClick:g,children:r(`配置模型`,`Set up a model`)}):(0,F.jsx)(Ap,{openSignal:le,current:n?.model??null,models:m,disabled:!Se||!n?.idle,onSelect:_,thinkingLevel:n?.thinkingLevel??null,thinkingLevels:n?.thinkingLevels??[],onSelectThinkingLevel:v}),Te?(0,F.jsx)(vO,{hasDraft:O.trim().length>0||k.length>0,canSend:Pe,canStop:Re,pauseLabel:Fe?.label??r(`暂停执行`,`Pause`),pauseTitle:Fe?.title,pauseIcon:Ie?(0,F.jsx)(Ie,{size:16}):void 0,onStop:()=>{qe()}}):Fe?.kind===`invoke`||Fe?.kind===`resume`?(0,F.jsx)(`button`,{className:$t.primary,type:`button`,"aria-label":Fe.label,title:Fe.title,disabled:!Le,onClick:()=>{Je()},children:Ie?(0,F.jsx)(Ie,{size:16}):(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,"aria-hidden":`true`,children:(0,F.jsx)(`path`,{d:`M5 2.5 13 8l-8 5.5z`,fill:`currentColor`})})}):(0,F.jsx)(`button`,{className:$t.primary,type:`submit`,"aria-label":r(`发送消息`,`Send message`),disabled:!Pe,children:(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,"aria-hidden":`true`,children:(0,F.jsx)(`path`,{d:`M8.3125 0.980183C8.66767 1.0531 8.97902 1.20418 9.2627 1.43233C9.48724 1.61297 9.73029 1.85793 9.97949 2.10714L14.707 6.83468L13.293 8.24874L9 3.95577V15.0417H7V3.95577L2.70703 8.24874L1.29297 6.83468L6.02051 2.10714C6.26971 1.85793 6.51277 1.61297 6.7373 1.43233C6.97662 1.23986 7.28445 1.04402 7.6875 0.980183C7.8973 0.947006 8.1031 0.95516 8.3125 0.980183Z`,fill:`currentColor`})})})]})]}),Te&&O.trimStart().startsWith(`/`)&&(0,F.jsx)(`div`,{className:`pi-prompt-hint`,children:r(`运行中不执行斜杠指令,请等待当前回复结束`,`Wait for the current reply before running slash commands`)})]}),ee&&(0,F.jsx)(`div`,{className:`pi-error`,role:`alert`,children:ee})]})}function CO({rightbarControl:e,composerInteraction:t,session:n,streaming:i,connection:a,error:o,onDismissError:s,onSend:c,onLoadImage:l,onUpload:u,onDiscardAttachment:d,onStop:f,onResume:p,onCompact:m,onNewSession:h,commands:g,models:_,modelsStatus:v,onConfigureModels:y,onSetModel:b,onSetThinkingLevel:x,onUpdateQueuedPrompt:S,renderPluginSlot:C,renderToolView:w,plugins:T,onPluginAction:E}){let[D,O]=(0,P.useState)(`chat`),[k,ee]=(0,P.useState)(null),[te,ne]=(0,P.useState)(null),A=te&&n?.sessionId===te.sessionId&&n.messages.some(e=>e.role===`user`&&!te.knownIds.has(e.id)&&tO(e.blocks.filter(e=>e.kind===`text`).map(e=>e.text).join(`
61
+ `)).text===te.text);(0,P.useEffect)(()=>{te&&(A||n&&n.sessionId!==te.sessionId)&&ne(null)},[te,A,n?.sessionId]);let re=te&&!A&&n?.sessionId===te.sessionId?{id:te.id,role:`user`,timestamp:te.timestamp,blocks:[{kind:`text`,text:te.text},...te.files.filter(e=>/\.(?:png|jpe?g|webp|gif)$/iu.test(e.name)||/^image\/(?:png|jpeg|webp|gif)$/.test(e.type)).map(()=>({kind:`image`,text:``}))],localFiles:te.files}:null,ie=ff(n,i,a,re!==null),j=pf(df(n,i,a,re!==null),n?.sessionId),ae=T.flatMap(e=>e.definition.workbench?.toolViews?.flatMap(e=>e.tools)??[]),oe=sp(n?.sessionId,[...n?.messages??[],...re?[re]:[],...i?[i]:[]],ae),M=n===null||oe.messages.length===0&&ie===null,se=async(e,t,r,i)=>{if(!n)return;if(i){await c(e,t,i);return}let a=`pending-${ge()}`;ne({id:a,sessionId:n.sessionId,text:e,files:r,knownIds:new Set(n.messages.map(e=>e.id)),timestamp:new Date().toISOString()});try{await c(e,t)}catch(e){throw ne(e=>e?.id===a?null:e),e}},ce=(0,P.useRef)(null),{scroll:le,content:ue,composer:de,onScroll:fe,onWheel:pe,showLatest:me,returnToLatest:N}=yO(n?.sessionId,!M&&D===`chat`,re?.id),[he,_e]=(0,P.useState)(0);(0,P.useLayoutEffect)(()=>{let e=ce.current;if(!e)return;let t=()=>_e(e.getBoundingClientRect().width);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let ve=n?.cwd.split(/[\\/]/).filter(Boolean).at(-1)||r(`Pi 工作区`,`Pi workspace`),ye=oe.messages,be=dp(ye),xe=cp(ye);return(0,F.jsxs)(`div`,{ref:ce,className:Qt.root,"data-phase":M?`hero`:`active`,style:{"--piw-conversation-column-width":`${he}px`},children:[M&&(0,F.jsx)(`div`,{className:Qt.heroTools,children:e}),n&&!M&&(0,F.jsxs)(`header`,{className:Qt.header,children:[(0,F.jsxs)(`div`,{className:Qt.titleRow,children:[(0,F.jsx)(`div`,{className:Qt.titleCluster,children:(0,F.jsx)(`div`,{className:Qt.crumbs,children:(0,F.jsx)(`span`,{className:`${Qt.crumb} ${Qt.crumbCurrent}`,children:n.name||r(`新会话`,`New chat`)})})}),(0,F.jsxs)(`div`,{className:Qt.headerActions,children:[e,(0,F.jsx)($e,{state:a===`connected`?n.idle?`done`:`ongoing`:`error`}),(0,F.jsx)(`span`,{className:`pi-header-state`,children:a===`connected`?n.idle?r(`已连接`,`Connected`):r(`运行中`,`Running`):r(`已断开`,`Disconnected`)})]})]}),(0,F.jsxs)(`div`,{className:Qt.tabs,role:`tablist`,"aria-label":r(`会话视图`,`Session views`),children:[(0,F.jsx)(`button`,{className:`${Qt.tab} ${D===`chat`?Qt.tabActive:``}`,role:`tab`,"aria-selected":D===`chat`,type:`button`,onClick:()=>O(`chat`),children:r(`对话`,`Chat`)}),(0,F.jsx)(`button`,{className:`${Qt.tab} ${D===`trajectory`?Qt.tabActive:``}`,role:`tab`,"aria-selected":D===`trajectory`,type:`button`,onClick:()=>O(`trajectory`),children:r(`轨迹`,`Trajectory`)})]})]}),(0,F.jsx)(`div`,{className:Qt.body,children:(0,F.jsxs)(`div`,{ref:le,className:Qt.scrollBody,"data-conversation-scroll":``,onScroll:fe,onWheel:pe,children:[!M&&(0,F.jsx)(`div`,{ref:ue,className:Qt.viewArea,children:D===`chat`?(0,F.jsx)(`div`,{className:en.root,children:(0,F.jsx)(`div`,{className:en.scroll,children:(0,F.jsx)(`div`,{className:en.column,children:(0,F.jsxs)(F.Fragment,{children:[xe.map(e=>(0,F.jsx)(xO,{turn:e,results:be,model:n?.model??null,loadImage:l,cwd:n?.cwd,renderPluginSlot:C,renderToolView:w,viewTools:ae,artifactTools:T.flatMap(e=>e.definition.artifactTools??[]),running:e===xe.at(-1)&&!n?.idle||e.messages.some(e=>e.id===`stream`),superseded:e!==xe.at(-1),onInspect:e=>{ee(e),O(`trajectory`)}},up(e,ae))),ie&&(0,F.jsx)(uf,{state:ie,elapsedSeconds:j})]})})})}):(0,F.jsx)(Ep,{messages:ye,inspectCallId:k})}),(0,F.jsx)(`div`,{ref:de,className:Qt.composerSeat,"data-composer-seat":``,children:(0,F.jsxs)(`div`,{className:`${Qt.composerStack} ${M?Qt.composerHero:``}`,children:[M&&(0,F.jsx)(Zt,{t:e=>({"hero.headline":r(`有什么可以帮你?`,`How can I help?`),"hero.preview":`Pi`})[e]??e,renderSlot:(e,t,n)=>n?.fallback??null}),M&&(0,F.jsx)(`div`,{className:Qt.heroWorkspaceRow,children:(0,F.jsxs)(`span`,{className:Xt.workspace,children:[(0,F.jsx)(xt,{size:16}),(0,F.jsx)(`span`,{className:Xt.workspaceLabel,children:ve})]})}),t,(0,F.jsx)(SO,{suspended:t!=null,hero:M,session:n,connection:a,onSend:se,onUpdateQueuedPrompt:S,onUpload:u,onDiscardAttachment:d,onStop:f,onResume:p,onCompact:m,onNewSession:h,commands:g,models:_,modelsStatus:v,onConfigureModels:y,onSetModel:b,onSetThinkingLevel:x,renderPluginSlot:C,plugins:T,onPluginAction:E}),oe.error&&(0,F.jsxs)(`div`,{className:`pi-error`,role:`alert`,children:[oe.error,(0,F.jsx)(`button`,{onClick:oe.retry,children:`Retry view cleanup`})]}),o&&(0,F.jsxs)(`div`,{className:`pi-error pi-error-dismissible`,role:`alert`,children:[(0,F.jsx)(`span`,{children:o}),(0,F.jsx)(`button`,{type:`button`,className:`pi-error-dismiss`,"aria-label":r(`关闭错误`,`Dismiss error`),onClick:s,children:`×`})]})]})}),me&&(0,F.jsx)(`div`,{className:en.toBottomSlot,children:(0,F.jsx)(`button`,{className:en.toBottom,type:`button`,"aria-label":r(`回到最新`,`Back to latest`),title:r(`回到最新并继续跟随`,`Back to latest and resume following`),onClick:N,children:(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,"aria-hidden":`true`,children:(0,F.jsx)(`path`,{d:`M8 2v12m-5-5 5 5 5-5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})})})]})})]})}var wO={button:`_button_cfgyt_4`,md:`_md_cfgyt_24`,sm:`_sm_cfgyt_30`,primary:`_primary_cfgyt_38`,ghost:`_ghost_cfgyt_47`,outline:`_outline_cfgyt_56`,toolbar:`_toolbar_cfgyt_65`,icon:`_icon_cfgyt_73`};function TO({variant:e=`ghost`,size:t=`md`,icon:r,className:i,children:a,...o}){return(0,F.jsxs)(`button`,{type:`button`,className:n(wO.button,wO[e],wO[t],i),...o,children:[r!=null&&(0,F.jsx)(`span`,{className:wO.icon,children:r}),a]})}var EO={root:`_root_w1urq_2`,mask:`_mask_w1urq_14`,dialog:`_dialog_w1urq_22`,content:`_content_w1urq_37`,header:`_header_w1urq_45`,title:`_title_w1urq_53`,close:`_close_w1urq_61`,description:`_description_w1urq_80`,body:`_body_w1urq_89`,footer:`_footer_w1urq_97`};function DO({open:e,onClose:t,title:r,closeLabel:i,description:a,children:o,footer:s,className:c,contentClassName:l,headless:u=!1}){let d=(0,P.useRef)(null);return ze(d,e,t),e?(0,At.createPortal)((0,F.jsx)(Fe.Provider,{value:d,children:(0,F.jsxs)(`div`,{className:EO.root,role:`presentation`,children:[(0,F.jsx)(`div`,{className:EO.mask,"aria-hidden":`true`,onClick:t}),(0,F.jsx)(`div`,{ref:d,tabIndex:-1,className:n(EO.dialog,c),role:`dialog`,"aria-modal":`true`,"aria-label":r,children:u?o:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:n(EO.content,l),children:[(0,F.jsxs)(`div`,{className:EO.header,children:[(0,F.jsx)(`h2`,{className:EO.title,children:r}),(0,F.jsx)(`button`,{type:`button`,className:EO.close,"aria-label":i,onClick:t,children:(0,F.jsx)(ut,{size:14})})]}),a!==void 0&&a!==``&&(0,F.jsx)(`p`,{className:EO.description,children:a}),o!==void 0&&(0,F.jsx)(`div`,{className:EO.body,children:o})]}),s!==void 0&&(0,F.jsx)(`div`,{className:EO.footer,children:s})]})})]})}),document.body):null}var OO={group:`_group_7dgiw_4`,workspaceLine:`_workspaceLine_7dgiw_5`,workspaceButton:`_workspaceButton_7dgiw_7`,workspaceTitle:`_workspaceTitle_7dgiw_8`,folder:`_folder_7dgiw_9`,folderActive:`_folderActive_7dgiw_10`,unavailable:`_unavailable_7dgiw_11`,chevron:`_chevron_7dgiw_12`,chevronOpen:`_chevronOpen_7dgiw_13`,rowActions:`_rowActions_7dgiw_16`,rowAction:`_rowAction_7dgiw_16`,sessionButton:`_sessionButton_7dgiw_23`,sessionLine:`_sessionLine_7dgiw_24`,sessionTime:`_sessionTime_7dgiw_27`,untitled:`_untitled_7dgiw_31`,renameInput:`_renameInput_7dgiw_32`,error:`_error_7dgiw_38`,menu:`_menu_7dgiw_39`,menuItem:`_menuItem_7dgiw_40`,menuItemNeutral:`_menuItemNeutral_7dgiw_42`,menuHint:`_menuHint_7dgiw_44`};function kO({title:e,active:t,disabled:n,open:i,onOpenChange:a,onRemove:o}){return(0,F.jsx)(jO,{label:r(`${e} 的工作区操作`,`Workspace actions for ${e}`),title:r(`工作区操作`,`Workspace actions`),disabled:n,open:i,onOpenChange:a,items:[{label:r(`从列表移除工作区`,`Remove workspace from list`),icon:(0,F.jsx)(ht,{}),destructive:!0,disabled:t,onSelect:o}],hint:t?r(`请先切换到其他工作区再移除`,`Switch to another workspace before removing`):r(`不删除目录、文件或会话历史`,`Keeps directories, files and session history`)})}function AO({title:e,disabled:t,open:n,onOpenChange:i,onRename:a,onDelete:o}){return(0,F.jsx)(jO,{label:r(`${e} 的会话操作`,`Chat actions for ${e}`),title:r(`会话操作`,`Chat actions`),disabled:t,open:n,onOpenChange:i,items:[{label:r(`重命名`,`Rename`),icon:(0,F.jsx)(pt,{}),onSelect:a},{label:r(`删除会话`,`Delete chat`),icon:(0,F.jsx)(ht,{}),destructive:!0,onSelect:o}]})}function jO({label:e,title:t,disabled:n,open:r,onOpenChange:i,items:a,hint:o}){let s=(0,P.useRef)(null),c=(0,P.useRef)(null),[l,u]=(0,P.useState)({top:0,left:0}),d=(0,P.useRef)({onOpenChange:i});d.current={onOpenChange:i};let f=(e=!0)=>{i(!1),e&&s.current?.focus()};return(0,P.useLayoutEffect)(()=>{if(!r)return;let e=s.current.getBoundingClientRect(),t=c.current.getBoundingClientRect().height;u({top:Math.max(12,Math.min(e.bottom+4,window.innerHeight-t-12)),left:Math.max(12,Math.min(e.right-220,window.innerWidth-232))}),(c.current?.querySelector(`button:not(:disabled)`)??c.current)?.focus();let n=e=>{!c.current?.contains(e.target)&&!s.current?.contains(e.target)&&d.current.onOpenChange(!1)},i=()=>{d.current.onOpenChange(!1),s.current?.focus()};return document.addEventListener(`pointerdown`,n,!0),window.addEventListener(`resize`,i),window.addEventListener(`scroll`,i,!0),()=>{document.removeEventListener(`pointerdown`,n,!0),window.removeEventListener(`resize`,i),window.removeEventListener(`scroll`,i,!0)}},[r]),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{ref:s,type:`button`,className:OO.rowAction,disabled:n,"aria-label":e,title:t,"aria-haspopup":`menu`,"aria-expanded":r,onClick:()=>r?f():i(!0),onKeyDown:e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),i(!0))},children:(0,F.jsx)(at,{})}),r&&(0,At.createPortal)((0,F.jsxs)(Op,{ref:c,role:`menu`,tabIndex:-1,"aria-label":e,className:OO.menu,style:l,onKeyDown:e=>{if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),f();else if(e.key===`Tab`)f();else if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){e.preventDefault();let t=[...c.current?.querySelectorAll(`button:not(:disabled)`)??[]],n=t.indexOf(document.activeElement);t[e.key===`Home`?0:e.key===`End`?t.length-1:e.key===`ArrowDown`?(n+1)%t.length:(n-1+t.length)%t.length]?.focus()}},children:[a.map(e=>(0,F.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`${OO.menuItem} ${e.destructive?``:OO.menuItemNeutral}`,disabled:n||e.disabled,onClick:()=>{f(),e.onSelect()},children:[e.icon,e.label]},e.label)),o&&(0,F.jsx)(`p`,{className:OO.menuHint,children:o})]}),document.body)]})}function MO(e,t,n){let r=Date.parse(e);if(!Number.isFinite(r))return``;let i=Math.max(0,Math.floor((t-r)/6e4));if(i<1)return n===`zh`?`刚刚`:`now`;let[a,o,s]=[[525600,`年`,`yr`],[43200,`个月`,`mo`],[10080,`周`,`wk`],[1440,`天`,`d`],[60,`小时`,`h`],[1,`分钟`,`min`]].find(([e])=>i>=e);return`${Math.floor(i/a)}${n===`zh`?o:s}`}var NO={dialog:`_dialog_s0tgk_1`,editorScope:`_editorScope_s0tgk_21`,header:`_header_s0tgk_26`,title:`_title_s0tgk_35`,crumbBar:`_crumbBar_s0tgk_51`,crumbEditZone:`_crumbEditZone_s0tgk_65`,pathInput:`_pathInput_s0tgk_67`,millerRow:`_millerRow_s0tgk_78`,crumbTrail:`_crumbTrail_s0tgk_91`,crumbSeat:`_crumbSeat_s0tgk_101`,crumb:`_crumb_s0tgk_51`,crumbChevron:`_crumbChevron_s0tgk_128`,crumbEditGlyph:`_crumbEditGlyph_s0tgk_151`,content:`_content_s0tgk_187`,column:`_column_s0tgk_186`,divider:`_divider_s0tgk_216`,rowSeat:`_rowSeat_s0tgk_222`,row:`_row_s0tgk_222`,rowSelected:`_rowSelected_s0tgk_247`,rowIcon:`_rowIcon_s0tgk_252`,rowIconSelected:`_rowIconSelected_s0tgk_257`,rowName:`_rowName_s0tgk_262`,rowChevron:`_rowChevron_s0tgk_274`,status:`_status_s0tgk_279`,error:`_error_s0tgk_280`,loadingFloat:`_loadingFloat_s0tgk_192`,footerBar:`_footerBar_s0tgk_317`,showHiddenToggle:`_showHiddenToggle_s0tgk_333`,showHiddenToggleActive:`_showHiddenToggleActive_s0tgk_357`,footerGap:`_footerGap_s0tgk_361`,footerAction:`_footerAction_s0tgk_365`,createDialog:`_createDialog_s0tgk_370`,createBody:`_createBody_s0tgk_376`,createTitle:`_createTitle_s0tgk_383`,createIn:`_createIn_s0tgk_391`,createInput:`_createInput_s0tgk_398`,createActions:`_createActions_s0tgk_416`};function PO(e){if(typeof e==`object`&&e&&`rpcError`in e){let t=e.rpcError;if(typeof t==`object`&&t&&`message`in t&&typeof t.message==`string`)return t.message}return e instanceof Error?e.message:String(e)}var FO=300,IO=200,LO=250;function RO(e,t){let n=e.crumbs.findIndex(t=>t.path===e.home);if(n===-1)return e.crumbs;let r=e.crumbs.slice(n+1);return[{name:t,path:e.home,hidden:!1},...r]}function zO(e){return e.home.includes(`\\`)?`\\`:`/`}function BO(e){let t=zO(e);return e.path.endsWith(t)?e.path:`${e.path}${t}`}function VO(e,t){let n=zO(e)===`\\`?Math.max(t.lastIndexOf(`\\`),t.lastIndexOf(`/`)):t.lastIndexOf(`/`);return n===-1?null:t.slice(0,n+1)}function HO(e,t,n){let r=VO(e,t);return r===null?{directory:null,tail:null}:{directory:r,tail:r===BO(e)||n!==null&&n.directory===r&&n.landed===e.path?t.slice(r.length):null}}function UO(e,t,n,r){let i=r===null?``:r.toLowerCase(),a=e=>n||!e.hidden||i.startsWith(`.`),o=e=>a(e)&&e.name.toLowerCase().startsWith(i),s=i!==``&&e.some(o);return e.filter(e=>e.path===t?!0:s?o(e):n||!e.hidden)}function WO({entries:e,selectedPath:t,busy:r,onPick:i,showHidden:a,filterPrefix:o,pathEditing:s}){let c=UO(e,t,a,o);return(0,F.jsx)(`div`,{className:NO.column,role:`list`,children:c.map(e=>{let a=e.path===t;return(0,F.jsx)(`span`,{role:`listitem`,className:NO.rowSeat,children:(0,F.jsxs)(`button`,{type:`button`,"aria-current":a||void 0,className:n(NO.row,a&&NO.rowSelected),disabled:r,onMouseDown:s?e=>{e.preventDefault()}:void 0,onClick:()=>{i(e)},children:[a?(0,F.jsx)(xt,{size:16,className:NO.rowIconSelected}):(0,F.jsx)(St,{size:16,className:NO.rowIcon}),(0,F.jsx)(`span`,{className:NO.rowName,children:e.name}),(0,F.jsx)(lt,{size:12,className:NO.rowChevron})]})},e.path)})})}function GO({open:e,listDirectory:t,createDirectory:r,onOpen:i,onClose:a,busy:o,t:s}){let[c,l]=(0,P.useState)(null),[u,d]=(0,P.useState)(null),[f,p]=(0,P.useState)(null),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(0),[b,x]=(0,P.useState)(null),[S,C]=(0,P.useState)(null),[w,T]=(0,P.useState)(!1),[E,D]=(0,P.useState)(null),[O,k]=(0,P.useState)(!1),[ee,te]=(0,P.useState)(null),ne=(0,P.useRef)(0),A=(0,P.useRef)(null),re=(0,P.useRef)(0),ie=(0,P.useRef)(null),j=(0,P.useRef)(!1);(0,P.useEffect)(()=>()=>{ne.current+=1,re.current+=1,A.current?.abort()},[]);let ae={onCompositionStart:()=>{j.current=!0},onCompositionEnd:()=>{j.current=!1}},oe=(0,P.useCallback)(()=>(A.current?.abort(),A.current=null,++ne.current),[]),M=(0,P.useCallback)(()=>{_(!1),y(e=>e+1)},[]),se=(0,P.useCallback)(e=>{let n=oe(),r=new AbortController;return A.current=r,M(),{seq:n,scan:t(e,r.signal)}},[oe,M,t]),ce=(0,P.useCallback)(e=>{let n=new AbortController;return A.current=n,M(),t(e,n.signal)},[M,t]),le=(0,P.useRef)(!1),ue=(0,P.useRef)({parent:null,child:null});(0,P.useEffect)(()=>{ue.current={parent:c,child:f}},[c,f]);let de=(0,P.useRef)(null),fe=(0,P.useRef)(!1),pe=(0,P.useCallback)((e,t)=>{let{seq:n,scan:r}=se(e);h(!0),t.announce&&x(null);let i=()=>{h(!1),t.closeEditor?C(null):(x(null),fe.current=!0)};r.then(r=>{if(n!==ne.current)return;!t.closeEditor&&e!==void 0&&(de.current={directory:e,landed:r.path});let a=!1,o=()=>{a||n!==ne.current||(a=!0,l(r),d(null),p(null),i())};if(RO(r,``).length<2){o();return}let s=r.crumbs.at(-2);s===void 0?o():(ce(s.path).then(e=>{if(n!==ne.current)return;let t=zO(e),s=e=>t===`\\`?e.toLowerCase():e,c=e.entries.find(e=>s(e.path)===s(r.path));c===void 0?o():(a=!0,l(e),d(c),p(r),i())},()=>{o()}),t.closeEditor&&window.setTimeout(o,IO))},e=>{n===ne.current&&(h(!1),t.announce&&x(PO(e)))})},[se,ce]),me=(0,P.useCallback)(e=>{pe(e,{closeEditor:!0,announce:!0})},[pe]),N=(0,P.useRef)(!1),he=(0,P.useRef)(!1),ge=(0,P.useRef)(null),_e=(0,P.useRef)(null),ve=(0,P.useCallback)(e=>{let{seq:t,scan:n}=se(e.path);S!==null&&(N.current=!0),C(null),d(e),p(null),h(!0),x(null),n.then(e=>{t===ne.current&&(p(e),h(!1))},e=>{t===ne.current&&(h(!1),x(PO(e)),d(null),he.current=!0)})},[se,S]),ye=(0,P.useCallback)(e=>{pe(e,{closeEditor:!1,announce:!1})},[pe]),be=(0,P.useCallback)(()=>{oe(),h(!1),C(null),x(null),f===null&&d(null),c===null&&me()},[oe,f,c,me]),xe=(0,P.useCallback)(e=>{f!==null&&(l(f),ve(e))},[f,ve]);(0,P.useEffect)(()=>{re.current+=1,e?(l(null),d(null),p(null),k(!1),T(!1),me()):(oe(),h(!1),x(null),C(null),D(null),te(null),N.current=!1,he.current=!1)},[e,me,oe]);let Se=u?.path??c?.path??null,Ce=u?.name??(c===null?``:RO(c,s(`browser.home`)).at(-1)?.name??c.path),we=()=>{if(Se===null||E===null||O)return;let e=E;if(e.trim()===``)return;k(!0),te(null);let t=re.current;r(Se,e).then(n=>{if(t!==re.current)return;k(!1),D(null);let{seq:r,scan:i}=se(Se);h(!0),x(null),i.then(t=>{r===ne.current&&(l(t),h(!1),ve({name:e,path:n,hidden:!1}))},e=>{r===ne.current&&(h(!1),x(PO(e)))})},e=>{t===re.current&&(k(!1),te(PO(e)))})};(0,P.useEffect)(()=>{if(!m){_(!1);return}let e=window.setTimeout(()=>{_(!0)},FO);return()=>{window.clearTimeout(e)}},[m,v]),(0,P.useEffect)(()=>{if(S===null)return;let e=window.setTimeout(()=>{if(le.current)return;let e=ue.current.child??ue.current.parent;if(e===null)return;let{directory:t,tail:n}=HO(e,S,de.current);t!==null&&n===null&&ye(t)},LO);return()=>{window.clearTimeout(e)}},[S,ye]);let Te=f??c,Ee=Te===null||S===null?null:HO(Te,S,de.current).tail,De=Te===null?[]:RO(Te,s(`browser.home`)),Oe=De.at(-1)?.path;(0,P.useEffect)(()=>{let e=ie.current;e!==null&&(e.scrollLeft=e.scrollWidth)},[Oe]);let ke=(0,P.useRef)(null),Ae=f?.path;if((0,P.useEffect)(()=>{let e=ke.current;e!==null&&Ae!==void 0&&(e.scrollLeft=e.scrollWidth)},[Ae]),(0,P.useEffect)(()=>{if(fe.current&&(fe.current=!1,document.activeElement===document.body&&ge.current?.focus()),S===null){if(N.current){N.current=!1,he.current=!1;let e=ke.current;if(e===null)return;let t=e.querySelector(`button[aria-current="true"]`);if(t===null)return;t.focus()}else if(he.current){if(he.current=!1,document.activeElement!==document.body)return;let e=_e.current;if(e===null)return;e.focus()}}}),!e)return null;let je=u!==null,Me=o||E!==null,Ne=S!==null;return(0,F.jsxs)(DO,{open:e,onClose:()=>{E===null&&!o&&a()},title:s(`browser.title`),className:n(NO.dialog),headless:!0,children:[(0,F.jsxs)(`div`,{className:NO.editorScope,onKeyDown:e=>{e.key===`Escape`&&S!==null&&(e.stopPropagation(),he.current=document.activeElement===ge.current,be())},onBlur:e=>{if(S===null||!document.hasFocus())return;let t=e.currentTarget.closest(`[role="dialog"]`);t!==null&&(e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(he.current=!1,be()))},children:[(0,F.jsxs)(`div`,{className:NO.header,children:[(0,F.jsx)(`h2`,{className:NO.title,children:s(`browser.title`)}),(0,F.jsx)(`div`,{className:NO.crumbBar,children:S===null?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:NO.crumbTrail,role:`navigation`,ref:ie,children:De.map((e,t)=>(0,F.jsxs)(`span`,{className:NO.crumbSeat,children:[t>0&&(0,F.jsx)(lt,{size:12,className:NO.crumbChevron}),(0,F.jsx)(`button`,{type:`button`,className:NO.crumb,disabled:Me,onClick:()=>{me(e.path)},children:e.name})]},e.path))}),(0,F.jsx)(`button`,{type:`button`,className:NO.crumbEditZone,"aria-label":s(`browser.editPath`),title:s(`browser.editPath`),disabled:Me,ref:_e,onClick:()=>{if(oe(),h(!1),le.current=!1,c===null){C(``);return}let e=u?.path??c.path,t=zO(c);C(e.endsWith(t)?e:`${e}${t}`)},children:(0,F.jsx)(pt,{size:14,className:NO.crumbEditGlyph})})]}):(0,F.jsx)(`input`,{className:NO.pathInput,value:S,"aria-label":s(`browser.editPath`),autoFocus:!0,ref:ge,disabled:Me,onChange:e=>{oe(),h(!1),le.current=!1,C(e.target.value)},...ae,onKeyDown:e=>{e.key===`Enter`&&!j.current&&(e.preventDefault(),S.trim()!==``&&(he.current=!0,le.current=!0,me(S)))}})})]}),(0,F.jsxs)(`div`,{className:NO.content,children:[(0,F.jsxs)(`div`,{className:NO.millerRow,ref:ke,children:[c!==null&&(0,F.jsx)(WO,{entries:c.entries,selectedPath:u?.path??null,busy:Me,onPick:ve,showHidden:w,filterPrefix:f===null?Ee:null,pathEditing:Ne}),je&&(0,F.jsx)(`span`,{className:NO.divider}),je&&f!==null&&(0,F.jsx)(WO,{entries:f.entries,selectedPath:null,busy:Me,onPick:xe,showHidden:w,filterPrefix:Ee,pathEditing:Ne})]}),m&&g&&(0,F.jsx)(`div`,{className:n(NO.status,NO.loadingFloat),role:`status`,children:s(`browser.loading`)}),(c?.truncated===!0||f?.truncated===!0)&&(0,F.jsx)(`div`,{className:NO.status,role:`status`,children:s(`browser.truncated`)}),b!==null&&(0,F.jsx)(`div`,{className:NO.error,role:`alert`,children:b})]}),(0,F.jsxs)(`div`,{className:NO.footerBar,children:[(0,F.jsx)(TO,{variant:`outline`,icon:(0,F.jsx)(ot,{size:14}),disabled:c===null||m||Me||Ne,onClick:()=>{D(``),te(null)},children:s(`browser.newFolder`)}),(0,F.jsxs)(`button`,{type:`button`,className:n(NO.showHiddenToggle,w&&NO.showHiddenToggleActive),"aria-pressed":w,disabled:Me,onMouseDown:Ne?e=>{e.preventDefault()}:void 0,onClick:()=>{T(e=>!e)},children:[s(`browser.showHidden`),w&&(0,F.jsx)(st,{size:14})]}),(0,F.jsx)(`span`,{className:NO.footerGap}),(0,F.jsx)(TO,{variant:`outline`,className:n(NO.footerAction),disabled:Me,onClick:a,children:s(`browser.cancel`)}),(0,F.jsx)(TO,{variant:`primary`,className:n(NO.footerAction),disabled:Se===null||m||Me||Ne,onClick:()=>{Se!==null&&i(Se)},children:s(`browser.open`)})]})]}),(0,F.jsx)(DO,{open:E!==null,onClose:()=>{O||D(null)},title:s(`browser.newFolder`),className:n(NO.createDialog),headless:!0,children:(0,F.jsxs)(`div`,{className:NO.createBody,children:[(0,F.jsx)(`h3`,{className:NO.createTitle,children:s(`browser.newFolder`)}),(0,F.jsx)(`p`,{className:NO.createIn,children:s(`browser.createIn`,{name:Ce})}),(0,F.jsx)(`input`,{className:NO.createInput,value:E??``,"aria-label":s(`browser.folderName`),placeholder:s(`browser.untitledFolder`),autoFocus:!0,disabled:O,onChange:e=>{D(e.target.value)},...ae,onKeyDown:e=>{e.key===`Enter`&&!j.current&&(e.preventDefault(),we()),e.key===`Escape`&&(e.stopPropagation(),O||D(null))}}),ee!==null&&(0,F.jsx)(`div`,{className:NO.error,role:`alert`,children:ee}),(0,F.jsxs)(`div`,{className:NO.createActions,children:[(0,F.jsx)(TO,{variant:`outline`,disabled:O,onClick:()=>{D(null)},children:s(`browser.cancel`)}),(0,F.jsx)(TO,{variant:`primary`,disabled:O||E===null||E.trim()===``,onClick:we,children:s(`browser.create`)})]})]})})]})}var KO={root:`_root_nvze1_1`,rail:`_rail_nvze1_13`,iconButton:`_iconButton_nvze1_17`,searchButton:`_searchButton_nvze1_33`,clearButton:`_clearButton_nvze1_34`,sectionHeader:`_sectionHeader_nvze1_45`,sectionLabel:`_sectionLabel_nvze1_65`,sectionLabelHidden:`_sectionLabelHidden_nvze1_82`,searchSlot:`_searchSlot_nvze1_91`,searchSlotExpanded:`_searchSlotExpanded_nvze1_105`,headerActions:`_headerActions_nvze1_110`,headerActionsHidden:`_headerActionsHidden_nvze1_126`,search:`_search_nvze1_33`,searchExpanded:`_searchExpanded_nvze1_160`,searchInput:`_searchInput_nvze1_199`,listArea:`_listArea_nvze1_285`,treeBody:`_treeBody_nvze1_305`,fade:`_fade_nvze1_315`,wide:`_wide_nvze1_326`,"wide-in":`_wide-in_nvze1_1`,list:`_list_nvze1_285`,flatList:`_flatList_nvze1_356`,searchTree:`_searchTree_nvze1_357`,groupSection:`_groupSection_nvze1_358`,searchStatus:`_searchStatus_nvze1_362`,searchWarning:`_searchWarning_nvze1_363`,listTopDropIndicator:`_listTopDropIndicator_nvze1_383`,workspaceDropBefore:`_workspaceDropBefore_nvze1_384`,workspaceDropAfter:`_workspaceDropAfter_nvze1_385`,listTopDropActive:`_listTopDropActive_nvze1_419`,sessionOverflowButton:`_sessionOverflowButton_nvze1_431`,empty:`_empty_nvze1_453`,renameInput:`_renameInput_nvze1_460`,renameError:`_renameError_nvze1_479`,deleteAction:`_deleteAction_nvze1_486`,deleteStatus:`_deleteStatus_nvze1_490`},qO={projectRow:`_projectRow_mhb10_1`,sessionRow:`_sessionRow_mhb10_2`,selected:`_selected_mhb10_18`,searchResultRow:`_searchResultRow_mhb10_22`,searchResultHeading:`_searchResultHeading_mhb10_46`,searchResultTitle:`_searchResultTitle_mhb10_52`,searchResultMeta:`_searchResultMeta_mhb10_63`,searchResultWorkspace:`_searchResultWorkspace_mhb10_71`,searchResultSnippet:`_searchResultSnippet_mhb10_72`,rowActions:`_rowActions_mhb10_99`,"row-in":`_row-in_mhb10_1`,title:`_title_mhb10_112`,flatSessionRowWithoutStatus:`_flatSessionRowWithoutStatus_mhb10_116`,slot:`_slot_mhb10_124`,visuallyHidden:`_visuallyHidden_mhb10_134`,folderActive:`_folderActive_mhb10_143`,chevron:`_chevron_mhb10_149`,folder:`_folder_mhb10_143`,arrow:`_arrow_mhb10_154`,arrowOpen:`_arrowOpen_mhb10_158`,projectText:`_projectText_mhb10_162`,renameInput:`_renameInput_mhb10_179`,meta:`_meta_mhb10_195`,time:`_time_mhb10_204`,scheduleIndicator:`_scheduleIndicator_mhb10_211`,searchScheduleIndicator:`_searchScheduleIndicator_mhb10_222`,dot:`_dot_mhb10_227`,menuOpen:`_menuOpen_mhb10_242`,dropBefore:`_dropBefore_mhb10_261`,dropAfter:`_dropAfter_mhb10_262`,hoverContent:`_hoverContent_mhb10_302`,hoverTitle:`_hoverTitle_mhb10_308`,hoverPath:`_hoverPath_mhb10_315`,hoverTime:`_hoverTime_mhb10_322`,hoverStatus:`_hoverStatus_mhb10_328`,iconButton:`_iconButton_mhb10_337`},JO=(e,t)=>({"browser.title":r(`选择工作区目录`,`Select workspace directory`),"browser.home":r(`主目录`,`Home`),"browser.newFolder":r(`新建文件夹`,`New folder`),"browser.folderName":r(`文件夹名称`,`Folder name`),"browser.createIn":r(`在"{name}"中新建文件夹`,`Create folder in "{name}"`),"browser.untitledFolder":r(`未命名文件夹`,`Untitled folder`),"browser.create":r(`创建`,`Create`),"browser.cancel":r(`取消`,`Cancel`),"browser.open":r(`打开`,`Open`),"browser.editPath":r(`编辑路径`,`Edit path`),"browser.loading":r(`加载中…`,`Loading…`),"browser.truncated":r(`文件夹过多,仅显示开头部分。`,`Too many folders; only the first few are shown.`),"browser.showHidden":r(`显示隐藏文件`,`Show hidden files`)}[e]??e).replace(/\{(\w+)\}/g,(e,n)=>t?.[n]??``);function YO({wide:e,navigationBusy:t=!1,connected:n=!0,expandSidebar:i,session:a,workspaces:o,onAdd:s,directoryPickerKind:c,pickDirectory:u,listDirectory:d,createDirectory:f,onRemove:p,onSelectSession:m,onNewSession:h,onRenameSession:g,onDeleteSession:_}){let v=l(),[y,b]=(0,P.useState)(Date.now),[x,S]=(0,P.useState)(null),[C,w]=(0,P.useState)(null),[T,E]=(0,P.useState)(null),[D,O]=(0,P.useState)(``),[k,ee]=(0,P.useState)(null),te=(0,P.useRef)(null);(0,P.useEffect)(()=>{if(!T)return;let e=requestAnimationFrame(()=>{te.current?.focus(),te.current?.select()});return()=>cancelAnimationFrame(e)},[T]),(0,P.useEffect)(()=>{if(!e){S(null),w(null);return}b(Date.now());let t=window.setInterval(()=>b(Date.now()),6e4);return()=>window.clearInterval(t)},[e]);let[ne,A]=(0,P.useState)(!1),[re,ie]=(0,P.useState)(!1),j=re||t,ae=j||!n,oe=(0,P.useId)(),M=(0,P.useRef)(null),[se,ce]=(0,P.useState)(null),[le,ue]=(0,P.useState)(``),[de,fe]=(0,P.useState)(``),[pe,me]=(0,P.useState)(!1),[N,he]=(0,P.useState)(``);(0,P.useEffect)(()=>{he(``)},[a?.sessionId]);let[ge,_e]=(0,P.useState)(new Set);(0,P.useEffect)(()=>{o.activeId&&_e(e=>e.has(o.activeId)?e:new Set([...e,o.activeId]))},[o.activeId,a?.sessionId]),(0,P.useEffect)(()=>{M.current?.querySelector(`[aria-current="page"]`)?.scrollIntoView({block:`nearest`})},[e,a?.sessionId,ge]);let ve=(0,P.useRef)(null),ye=(0,P.useRef)(null),be=N.trim().toLocaleLowerCase(),xe=()=>{he(``),me(!1),ve.current?.focus()},Se=o.items.filter(e=>!be||e.title.toLocaleLowerCase().includes(be)||e.path.toLocaleLowerCase().includes(be)||o.sessions.some(t=>t.workspaceId===e.id&&t.name.toLocaleLowerCase().includes(be))),Ce=async e=>{if(!ae){ie(!0),ue(``);try{await e()}catch(e){ue(e instanceof Error?e.message:r(`操作失败`,`Operation failed`))}finally{ie(!1)}}},we=async e=>{ie(!0);try{await s(e,!1),A(!1)}catch(e){A(!1),fe(e instanceof Error?e.message:String(e))}finally{ie(!1)}},Te=async()=>{if(c!==null){if(e||i(),ue(``),c===`browse`)A(!0);else{ie(!0);try{let e=await u();e!==null&&await we(e)}catch(e){fe(e instanceof Error?e.message:String(e))}finally{ie(!1)}}}};return(0,F.jsxs)(`div`,{ref:M,"aria-busy":j,className:`${KO.root} ${e?``:KO.rail}`,children:[(0,F.jsxs)(`div`,{className:KO.sectionHeader,children:[e&&(0,F.jsx)(`span`,{className:`${KO.sectionLabel} ${KO.wide} ${pe?KO.sectionLabelHidden:``}`,children:r(`工作区`,`Workspaces`)}),e&&(0,F.jsx)(`div`,{className:`${KO.searchSlot} ${pe?KO.searchSlotExpanded:``}`,children:(0,F.jsxs)(`div`,{className:`${KO.search} ${pe?KO.searchExpanded:``}`,onClick:()=>{me(!0),ye.current?.focus()},children:[(0,F.jsx)(`button`,{ref:ve,type:`button`,className:KO.searchButton,"aria-label":r(`搜索工作区和会话`,`Search workspaces and sessions`),"aria-expanded":pe,onClick:()=>{me(!0),ye.current?.focus()},children:(0,F.jsx)(tt,{size:pe?11:14})}),(0,F.jsx)(`input`,{ref:ye,className:KO.searchInput,type:`search`,"aria-label":r(`按名称或工作区路径搜索`,`Search by name or workspace path`),placeholder:r(`按名称或工作区路径搜索`,`Search by name or workspace path`),maxLength:120,value:N,tabIndex:pe?0:-1,onChange:e=>he(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),xe())}}),pe&&(0,F.jsx)(`button`,{type:`button`,className:KO.clearButton,"aria-label":r(`关闭搜索`,`Close search`),onClick:e=>{e.stopPropagation(),xe()},children:(0,F.jsx)(dt,{})})]})}),(0,F.jsx)(`div`,{className:`${KO.headerActions} ${e&&pe?KO.headerActionsHidden:``}`,children:(0,F.jsx)(`button`,{type:`button`,className:KO.iconButton,"aria-label":r(`添加工作区`,`Add workspace`),title:r(`添加工作区`,`Add workspace`),disabled:ae||c===null,onClick:()=>{Te()},children:(0,F.jsx)(bt,{size:e?16:18})})})]}),e&&(0,F.jsx)(`div`,{className:KO.listArea,children:(0,F.jsx)(`div`,{className:KO.treeBody,children:(0,F.jsxs)(`div`,{className:KO.list,role:`list`,"aria-label":r(`工作区`,`Workspaces`),children:[Se.map(e=>{let t=e.id===o.activeId,n=e.available===!1,i=ge.has(e.id)||!!be;return(0,F.jsxs)(`div`,{className:OO.group,role:`listitem`,children:[(0,F.jsxs)(`div`,{className:OO.workspaceLine,"data-menu-open":x===e.id||void 0,children:[(0,F.jsxs)(`button`,{type:`button`,className:`${qO.projectRow} ${OO.workspaceButton}`,"aria-expanded":i,"aria-controls":`${oe}-${e.id}`,title:e.path,disabled:j,onContextMenu:t=>{ae||(t.preventDefault(),t.stopPropagation(),w(null),S(e.id))},onClick:()=>_e(t=>{let n=new Set(t);return n.has(e.id)?n.delete(e.id):n.add(e.id),n}),children:[(0,F.jsxs)(`span`,{className:qO.slot,"aria-hidden":`true`,children:[(0,F.jsx)(`span`,{"data-workspace-leading":`folder`,className:`${OO.folder} ${t?OO.folderActive:``}`,children:i?(0,F.jsx)(xt,{size:16}):(0,F.jsx)(St,{size:16})}),(0,F.jsx)(`span`,{"data-workspace-leading":`chevron`,className:`${OO.chevron} ${i?OO.chevronOpen:``}`,children:(0,F.jsx)(ct,{size:14})})]}),(0,F.jsx)(`span`,{className:`${qO.title} ${OO.workspaceTitle}`,children:e.title}),n&&(0,F.jsx)(`span`,{className:OO.unavailable,children:r(`不可用`,`Unavailable`)})]}),(0,F.jsxs)(`span`,{className:OO.rowActions,"data-workspace-actions":!0,children:[(0,F.jsx)(kO,{title:e.title,active:t,disabled:ae,open:x===e.id,onOpenChange:t=>S(t?e.id:null),onRemove:()=>{ue(``),ce({id:e.id,title:e.title})}}),(0,F.jsx)(`button`,{type:`button`,className:OO.rowAction,title:n?r(`目录不可用,请恢复目录或移除后重新添加`,`Directory unavailable; restore it or remove and add the workspace again`):r(`新建会话`,`New session`),"aria-label":r(`在 ${e.title} 新建会话`,`Create a session in ${e.title}`),disabled:ae||n,onClick:()=>{Ce(async()=>{await h(e.id),he(``),_e(t=>new Set([...t,e.id]))})},children:(0,F.jsx)(et,{size:16})})]})]}),(0,F.jsxs)(`div`,{id:`${oe}-${e.id}`,role:`group`,"aria-label":e.title,hidden:!i,children:[i&&o.sessions.filter(t=>t.workspaceId===e.id&&(!be||e.title.toLocaleLowerCase().includes(be)||e.path.toLocaleLowerCase().includes(be)||t.name.toLocaleLowerCase().includes(be))).map(i=>{let o=t&&a?.sessionId===i.id,s=a?.sessionId===i.id?!a.idle:i.idle===!1,c=i.name||r(`新会话`,`New chat`),l={workspaceId:e.id,id:i.id,path:i.path,name:i.name,running:s};return(0,F.jsxs)(`div`,{className:OO.sessionLine,"data-menu-open":C===i.id||void 0,children:[(0,F.jsxs)(`button`,{type:`button`,className:`${qO.sessionRow} ${OO.sessionButton} ${o?qO.selected:``}`,title:c,"aria-label":c,"aria-describedby":`${oe}-${i.id}-status`,"aria-current":o?`page`:void 0,disabled:ae||n,onContextMenu:e=>{ae||n||(e.preventDefault(),e.stopPropagation(),S(null),w(i.id))},onClick:()=>{Ce(()=>m(e.id,i.id,i.path))},children:[(0,F.jsx)(`span`,{className:qO.slot,children:s&&(0,F.jsx)($e,{state:`ongoing`})}),(0,F.jsx)(`span`,{className:`${qO.title} ${i.name?``:OO.untitled}`,children:c}),(0,F.jsx)(`time`,{className:OO.sessionTime,dateTime:i.modified,title:i.modified,children:MO(i.modified,y,v)}),(0,F.jsx)(`span`,{id:`${oe}-${i.id}-status`,className:qO.visuallyHidden,children:s?r(`运行中`,`Running`):r(`空闲`,`Idle`)})]}),(0,F.jsx)(`span`,{className:OO.rowActions,children:(0,F.jsx)(AO,{title:c,disabled:ae||n,open:C===i.id,onOpenChange:e=>w(e?i.id:null),onRename:()=>{ue(``),O(i.name),E(l)},onDelete:()=>{ue(``),ee(l)}})})]},i.id)}),i&&!be&&!o.sessions.some(t=>t.workspaceId===e.id)&&(0,F.jsx)(`p`,{className:KO.empty,children:r(`还没有会话,创建新会话开始`,`No sessions yet. Create a session to start.`)})]})]},e.id)}),Se.length===0&&(0,F.jsxs)(`p`,{className:KO.empty,role:`status`,children:[be?r(`没有找到匹配的工作区或会话`,`No matching workspaces or sessions`):r(`添加工作区,开始管理对话`,`Add a workspace to start organizing conversations`),be&&(0,F.jsx)(`button`,{type:`button`,className:KO.sessionOverflowButton,onClick:xe,children:r(`清除搜索`,`Clear search`)})]}),j&&(0,F.jsx)(`p`,{className:KO.searchStatus,role:`status`,children:r(`正在处理…`,`Working…`)}),le&&!ne&&(0,F.jsx)(`p`,{className:OO.error,role:`alert`,children:le})]})})}),(0,F.jsxs)(DO,{open:se!==null,onClose:()=>{j||ce(null)},title:r(`移除工作区?`,`Remove workspace?`),closeLabel:r(`关闭`,`Close`),footer:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(TO,{variant:`outline`,disabled:j,onClick:()=>ce(null),children:r(`取消`,`Cancel`)}),(0,F.jsx)(TO,{variant:`primary`,disabled:ae,onClick:()=>{se&&Ce(async()=>{await p(se.id),ce(null)})},children:r(`从列表移除`,`Remove from list`)})]}),children:[(0,F.jsx)(`p`,{children:se?.title}),(0,F.jsx)(`p`,{children:r(`仅从侧栏移除,不删除目录、文件或会话历史。`,`Only removes it from the sidebar. Directories, files and session history are not deleted.`)}),le&&(0,F.jsx)(`p`,{role:`alert`,children:le})]}),(0,F.jsxs)(DO,{open:T!==null,onClose:()=>{j||E(null)},title:r(`重命名会话`,`Rename chat`),closeLabel:r(`关闭`,`Close`),footer:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(TO,{variant:`outline`,disabled:j,onClick:()=>E(null),children:r(`取消`,`Cancel`)}),(0,F.jsx)(TO,{variant:`primary`,type:`submit`,form:`${oe}-rename`,disabled:ae,children:r(`保存`,`Save`)})]}),children:[(0,F.jsx)(`form`,{id:`${oe}-rename`,onSubmit:e=>{e.preventDefault(),T&&Ce(async()=>{await g(T.workspaceId,T.id,T.path,D),E(null)})},children:(0,F.jsx)(`input`,{className:OO.renameInput,"aria-label":r(`会话名称`,`Chat name`),placeholder:r(`留空则使用第一条消息`,`Leave empty to use the first message`),maxLength:120,ref:te,value:D,onChange:e=>O(e.target.value)})}),le&&(0,F.jsx)(`p`,{role:`alert`,children:le})]}),(0,F.jsxs)(DO,{open:k!==null,onClose:()=>{j||ee(null)},title:r(`删除会话?`,`Delete chat?`),closeLabel:r(`关闭`,`Close`),footer:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(TO,{variant:`outline`,disabled:j,onClick:()=>ee(null),children:r(`取消`,`Cancel`)}),(0,F.jsx)(TO,{variant:`primary`,disabled:ae||k?.running,onClick:()=>{k&&Ce(async()=>{await _(k.workspaceId,k.id,k.path),ee(null)})},children:r(`删除`,`Delete`)})]}),children:[(0,F.jsx)(`p`,{children:k?.name||r(`新会话`,`New chat`)}),(0,F.jsx)(`p`,{children:k?.running?r(`Pi 正在运行,请等待当前回复结束后再删除。`,`Pi is still working. Wait for the reply to finish before deleting.`):r(`会话会从列表中移除,文件移到 Pi 数据目录的 pi-web/trash 中,可手动恢复。项目文件不受影响。`,`The chat leaves the list and its file moves to pi-web/trash in the Pi data folder, where you can restore it by hand. Project files are not affected.`)}),le&&(0,F.jsx)(`p`,{role:`alert`,children:le})]}),(0,F.jsx)(GO,{open:ne,busy:j,listDirectory:d,createDirectory:f,onOpen:e=>{we(e)},onClose:()=>{j||A(!1)},t:JO}),(0,F.jsx)(DO,{open:!!de,onClose:()=>fe(``),title:r(`无法添加工作区`,`Could not add workspace`),closeLabel:r(`关闭`,`Close`),footer:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(TO,{variant:`outline`,onClick:()=>fe(``),children:r(`取消`,`Cancel`)}),(0,F.jsx)(TO,{variant:`primary`,onClick:()=>{fe(``),Te()},children:r(`重新选择`,`Choose again`)})]}),children:(0,F.jsx)(`div`,{role:`alert`,children:de})})]})}function XO(e){let t=e.trim();if(!t)return;let n=/^(\d+(?:\.\d+)?)([km])?$/i.exec(t);if(!n)return NaN;let r=n[2]?.toLowerCase(),i=r===`m`?1e6:r===`k`?1e3:1,a=Number(n[1])*i,o=Math.round(a);return Math.abs(a-o)<1e-6?o:a}function ZO(e){return e===void 0?``:!Number.isInteger(e)||e<=0?String(e):e%1e6==0?`${e/1e6}M`:e%1e3==0?`${e/1e3}K`:String(e)}function QO({model:e,position:t,onSave:n,onRemove:i,onCancel:a}){let[o,s]=(0,P.useState)(e.id),[c,l]=(0,P.useState)(e.name??``),[u,d]=(0,P.useState)(ZO(e.contextWindow)),[f,p]=(0,P.useState)(ZO(e.maxTokens)),[m,h]=(0,P.useState)(e.input?.length?e.input:[`text`]),[g,_]=(0,P.useState)(!e.id),[v,y]=(0,P.useState)(!1),[b,x]=(0,P.useState)(!1),[S,C]=(0,P.useState)(``),w=!e.id,T=!w&&(e.source===`custom`||e.overridden),E=async()=>{let e=XO(u),t=XO(f);if(!o.trim()||[e,t].some(e=>e!==void 0&&(!Number.isSafeInteger(e)||e<=0)))C(r(`请填写模型 ID,并使用正整数或 K/M 单位填写容量。`,`Enter a model ID and positive token counts, optionally with K/M suffixes.`));else{x(!0),C(``);try{await n({id:o.trim(),...c.trim()?{name:c.trim()}:{},...e===void 0?{}:{contextWindow:e},...t===void 0?{}:{maxTokens:t},input:m})}catch(e){C(e instanceof Error?e.message:r(`保存失败`,`Could not save`))}finally{x(!1)}}},D=async()=>{x(!0),C(``);try{await i()}catch(e){C(e instanceof Error?e.message:r(`操作失败`,`Action failed`)),y(!1)}finally{x(!1)}},O=e=>{h(t=>{let n=t.includes(e)?t.filter(t=>t!==e):[...t,e];return n.length?n:t})};return(0,F.jsxs)(`div`,{className:`pi-model-entry`,children:[(0,F.jsxs)(`div`,{className:`pi-model-row`,children:[(0,F.jsx)(`input`,{"aria-label":`${r(`模型 ID`,`Model ID`)} ${t}`,placeholder:r(`模型 ID`,`Model ID`),value:o,disabled:b||!w&&e.source===`builtin`,onFocus:()=>_(!0),onChange:e=>s(e.target.value)}),(0,F.jsx)(`input`,{"aria-label":`${r(`显示名称`,`Display name`)} ${t}`,placeholder:r(`显示名称`,`Display name`),value:c,disabled:b,onFocus:()=>_(!0),onChange:e=>l(e.target.value)}),(0,F.jsx)(`button`,{type:`button`,"aria-label":`${r(`模型参数`,`Model settings`)} ${t}`,"aria-expanded":g,onClick:()=>_(!g),children:g?`⌄`:`›`})]}),g&&(0,F.jsxs)(`div`,{className:`pi-model-details`,children:[(0,F.jsxs)(`label`,{children:[r(`上下文窗口`,`Context window`),(0,F.jsx)(`input`,{"aria-label":`${r(`上下文窗口`,`Context window`)} ${t}`,inputMode:`decimal`,placeholder:`128K`,value:u,disabled:b,onChange:e=>d(e.target.value)})]}),(0,F.jsxs)(`label`,{children:[r(`最大输出 token 数`,`Max output tokens`),(0,F.jsx)(`input`,{"aria-label":`${r(`最大输出 token 数`,`Max output tokens`)} ${t}`,inputMode:`decimal`,placeholder:`16K`,value:f,disabled:b,onChange:e=>p(e.target.value)})]}),(0,F.jsxs)(`fieldset`,{className:`pi-model-input-types`,children:[(0,F.jsx)(`legend`,{children:r(`输入类型`,`Input types`)}),(0,F.jsxs)(`label`,{children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:m.includes(`text`),disabled:b||m.length===1&&m.includes(`text`),onChange:()=>O(`text`)}),r(`文本`,`Text`)]}),(0,F.jsxs)(`label`,{children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:m.includes(`image`),disabled:b||m.length===1&&m.includes(`image`),onChange:()=>O(`image`)}),r(`图片`,`Image`)]})]}),(0,F.jsxs)(`div`,{className:`pi-model-actions`,children:[(0,F.jsx)(`button`,{type:`button`,disabled:b,onClick:()=>{E()},children:b?r(`保存中…`,`Saving…`):r(`保存模型`,`Save model`)}),w&&a&&(0,F.jsx)(`button`,{type:`button`,disabled:b,onClick:a,children:r(`取消`,`Cancel`)}),T&&(0,F.jsx)(`button`,{type:`button`,disabled:b,onClick:()=>y(!v),children:e.source===`custom`?r(`移除模型`,`Remove model`):r(`恢复默认`,`Restore default`)})]}),v&&(0,F.jsxs)(`div`,{className:`pi-model-confirm`,children:[(0,F.jsx)(`span`,{children:e.source===`custom`?r(`从配置中移除这个模型?`,`Remove this model from configuration?`):r(`撤销这个模型的自定义参数?`,`Discard this model’s custom settings?`)}),(0,F.jsx)(`button`,{type:`button`,disabled:b,onClick:()=>{D()},children:r(`确认`,`Confirm`)}),(0,F.jsx)(`button`,{type:`button`,disabled:b,onClick:()=>y(!1),children:r(`取消`,`Cancel`)})]}),S&&(0,F.jsx)(`p`,{className:`pi-settings-error`,role:`alert`,children:S})]})]})}function $O({providerId:e,getModels:t,updateModel:n}){let[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(``),[u,d]=(0,P.useState)(!1),f=async()=>{s(``);try{a(await t(e))}catch(e){throw s(e instanceof Error?e.message:r(`无法读取模型目录`,`Could not load model catalog`)),e}};(0,P.useEffect)(()=>{f().catch(()=>{})},[e]);let p=async t=>{await n(e,t),d(!1),await f().catch(()=>{})},m=i?.models.filter(e=>`${e.id} ${e.name??``}`.toLocaleLowerCase().includes(c.toLocaleLowerCase()))??[];return(0,F.jsxs)(`section`,{className:`pi-provider-models`,"aria-label":r(`模型目录`,`Model catalog`),children:[(0,F.jsxs)(`div`,{className:`pi-provider-models-head`,children:[(0,F.jsx)(`strong`,{children:r(`模型目录`,`Model catalog`)}),(0,F.jsxs)(`span`,{children:[i?.models.length??0,` `,r(`个模型`,`models`)]})]}),i?.baseUrl&&(0,F.jsxs)(`p`,{className:`pi-provider-models-endpoint`,title:i.baseUrl,children:[r(`API 地址`,`API URL`),`: `,i.baseUrl]}),o&&(0,F.jsxs)(`p`,{className:`pi-settings-error`,role:`alert`,children:[o,` `,i&&(0,F.jsx)(`button`,{type:`button`,onClick:()=>{f().catch(()=>{})},children:r(`重试读取`,`Retry`)})]}),i?(0,F.jsxs)(F.Fragment,{children:[i.models.length>5&&(0,F.jsx)(`input`,{className:`pi-model-search`,type:`search`,"aria-label":r(`搜索模型`,`Search models`),placeholder:r(`搜索模型`,`Search models`),value:c,onChange:e=>l(e.target.value)}),(0,F.jsx)(`div`,{className:`pi-model-list`,children:m.map((e,t)=>(0,F.jsx)(QO,{model:e,position:t+1,onSave:t=>p({action:`save`,originalId:e.id,model:t}),onRemove:()=>p({action:`remove`,id:e.id})},`${e.id}:${e.name}:${e.contextWindow}:${e.maxTokens}:${e.overridden}`))}),m.length===0&&!u&&(0,F.jsx)(`p`,{className:`pi-provider-models-empty`,children:r(`没有匹配的模型`,`No matching models`)}),u&&(0,F.jsx)(QO,{model:{id:``,source:`custom`,overridden:!1},position:i.models.length+1,onSave:e=>p({action:`save`,model:e}),onRemove:async()=>d(!1),onCancel:()=>d(!1)},`new`),!u&&(0,F.jsx)(`button`,{type:`button`,className:`pi-model-add`,onClick:()=>d(!0),children:r(`+ 添加模型`,`+ Add model`)})]}):o?(0,F.jsx)(`button`,{type:`button`,className:`pi-model-add`,onClick:()=>{f().catch(()=>{})},children:r(`重试读取`,`Retry`)}):(0,F.jsx)(`p`,{role:`status`,children:r(`正在读取模型…`,`Loading models…`)})]})}var ek={id:``,name:``,baseUrl:``,api:`openai-completions`,modelId:``};function tk(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`?t.href:null}catch{return null}}function nk(){let e=null;try{return e=window.open(`about:blank`,`_blank`),e&&(e.opener=null,e.document.title=r(`正在准备授权页面`,`Preparing sign-in`),e.document.body.textContent=r(`正在准备授权页面…`,`Preparing sign-in…`)),e}catch{return e?.close(),null}}function rk({provider:e,configured:t,busy:n,getProviderModels:i,updateProviderModel:a,onConnect:o}){let[s,c]=(0,P.useState)(``),[l,u]=(0,P.useState)(``),[d,f]=(0,P.useState)(``),[p,m]=(0,P.useState)(!0),[h,g]=(0,P.useState)(!1),[_,v]=(0,P.useState)(``);(0,P.useEffect)(()=>{let t=!0;return m(!0),i(e.id).then(e=>{t&&(u(e.baseUrl??``),f(e.baseUrl??``),m(!1))}).catch(e=>{t&&(m(!1),v(e instanceof Error?e.message:r(`无法读取 API 地址`,`Could not load API URL`)))}),()=>{t=!1}},[e.id]);let y=async()=>{let n=s.trim(),i=l.trim();if(n||t){if(i&&!tk(i))v(r(`请输入有效的 http 或 https 地址。`,`Enter a valid HTTP or HTTPS URL.`));else{g(!0),v(``);try{i!==d&&(await a(e.id,{action:`base_url`,baseUrl:i||null}),f(i)),n&&(c(``),await o(n))}catch(e){v(e instanceof Error?e.message:r(`保存失败`,`Could not save`))}finally{g(!1)}}}};return(0,F.jsxs)(`form`,{className:`pi-provider-key-form`,onSubmit:e=>{e.preventDefault(),y()},children:[(0,F.jsxs)(`label`,{children:[r(`API Key`,`API key`),(0,F.jsx)(`input`,{type:`password`,autoComplete:`off`,maxLength:16384,value:s,onChange:e=>c(e.target.value),placeholder:t?r(`已配置,输入新值可替换`,`Configured; enter a new key to replace`):r(`输入 API Key`,`Enter API key`)})]}),(0,F.jsxs)(`details`,{className:`pi-provider-advanced`,children:[(0,F.jsx)(`summary`,{children:r(`自定义设置`,`Custom settings`)}),(0,F.jsxs)(`label`,{children:[r(`API 地址(可选)`,`API URL (optional)`),(0,F.jsx)(`input`,{type:`url`,maxLength:2048,value:l,onChange:e=>u(e.target.value),placeholder:r(`使用提供方默认地址`,`Use provider default URL`)})]})]}),(0,F.jsx)(`button`,{type:`submit`,disabled:n||h||p||!s.trim()&&(l.trim()===d||!t),children:h?r(`保存中…`,`Saving…`):t?r(`保存`,`Save`):r(`连接`,`Connect`)}),_&&(0,F.jsx)(`p`,{className:`pi-settings-error`,role:`alert`,children:_})]})}function ik({setupMode:e=!1,onReturnToConversation:t,getProviders:n,getProviderModels:i,updateProviderModel:a,logoutProvider:o,addCustomProvider:s,startLogin:c,getLogin:l,getActiveLogin:u,respondLogin:d,cancelLogin:f,refreshModels:p}){let[m,h]=(0,P.useState)([]),[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(e?`builtin`:null),[b,x]=(0,P.useState)(``),[S,C]=(0,P.useState)(null),[w,T]=(0,P.useState)(null),[E,D]=(0,P.useState)(ek),[O,k]=(0,P.useState)(null),[ee,te]=(0,P.useState)(``),[ne,A]=(0,P.useState)(``),[re,ie]=(0,P.useState)(!1),j=(0,P.useRef)(null);(0,P.useEffect)(()=>{e&&y(e=>e??`builtin`)},[e]),(0,P.useEffect)(()=>{let e=!0;return u().then(t=>{e&&t&&k(e=>e??t)}).catch(()=>{}),()=>{e=!1,j.current?.popup?.close()}},[]);let ae=async()=>{h(await n()),_(!0)},oe=async e=>{let t=j.current,n=e.authorization??(e.event?.type===`auth_url`||e.event?.type===`device_code`?e.event:void 0);if(t?.id===e.id&&n){let e=tk(n.type===`auth_url`?n.url:n.verificationUri);if(e){try{t.popup&&!t.popup.closed?t.popup.location.replace(e):window.open(e,`_blank`,`noopener,noreferrer`)}catch{t.popup?.close()}j.current=null}}t?.id===e.id&&(e.status===`done`||e.status===`error`||e.status===`cancelled`)&&(t.popup?.close(),j.current=null),k(e),e.status===`done`&&(y(null),C(null),await Promise.all([ae(),p()]))};(0,P.useEffect)(()=>{ae().catch(e=>{_(!0),A(e instanceof Error?e.message:r(`无法读取模型提供方`,`Could not load model providers`))})},[]),(0,P.useEffect)(()=>{if(!O||O.status===`done`||O.status===`error`||O.status===`cancelled`)return;let e=!0,t=window.setInterval(()=>{l(O.id).then(async t=>{e&&await oe(t)}).catch(t=>{e&&A(t instanceof Error?t.message:r(`登录状态不可用`,`Login status is unavailable`))})},700);return()=>{e=!1,window.clearInterval(t)}},[O?.id,O?.status]);let M=re||O?.status===`running`||O?.status===`waiting`,se=m.find(e=>e.id===O?.providerId)?.name,ce=m.filter(e=>e.configured),le=m.filter(e=>!e.configured&&e.methods.length>0),ue=le.find(e=>e.id===b)??(e?le.find(e=>e.id===`openai-codex`)??le.find(e=>e.methods.includes(`oauth`)):void 0)??le.find(e=>e.id===`openai`)??le[0],de=async(e,t,n)=>{j.current=t===`oauth`?{id:null,popup:nk()}:null,ie(!0),A(``),te(``);try{let{id:r}=await c(e,t,n);j.current&&(j.current.id=r),await oe(await l(r))}catch(e){j.current?.popup?.close(),j.current=null,A(e instanceof Error?e.message:r(`无法开始登录`,`Could not start sign-in`)),O||u().then(e=>{e&&k(e)}).catch(()=>{})}finally{ie(!1)}},fe=async e=>{if(O){ie(!0),A(``);try{await d(O.id,e),te(``),await oe(await l(O.id))}catch(e){A(e instanceof Error?e.message:r(`提交失败`,`Submission failed`))}finally{ie(!1)}}},pe=async()=>{ie(!0),A(``);try{await s(E);let e=E.id;await ae(),x(e),y(`builtin`),D(ek)}catch(e){A(e instanceof Error?e.message:r(`无法添加自定义提供方`,`Could not add custom provider`))}finally{ie(!1)}},me=async e=>{ie(!0),A(``);try{await o(e),await ae(),T(null),C(null)}catch(e){A(e instanceof Error?e.message:r(`移除认证失败`,`Could not remove credentials`))}finally{ie(!1)}},N=O?.authorization??(O?.event?.type===`auth_url`||O?.event?.type===`device_code`?O.event:void 0),he=O?.status===`waiting`&&O.prompt&&O.prompt.type!==`select`&&(0,F.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),ee.trim()&&fe(ee.trim())},children:[(0,F.jsx)(`label`,{htmlFor:`pi-provider-answer`,children:O.prompt.message}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`input`,{id:`pi-provider-answer`,type:O.prompt.type===`secret`?`password`:`text`,autoComplete:`off`,placeholder:O.prompt.placeholder,value:ee,onChange:e=>te(e.target.value)}),(0,F.jsx)(`button`,{type:`submit`,disabled:re||!ee.trim(),children:r(`继续`,`Continue`)})]})]});return(0,F.jsxs)(`div`,{className:`pi-settings-content`,children:[(0,F.jsx)(`h2`,{children:e?r(`先连接一个模型`,`Connect a model to begin`):r(`模型`,`Models`)}),(0,F.jsx)(`p`,{className:`pi-settings-intro`,children:e?r(`当前没有可用模型。选择提供方完成认证,再在会话中选择模型;也可以添加自定义提供方。`,`No models are available yet. Sign in to a provider, then choose a model in the conversation. You can also add a custom provider.`):r(`已接入的提供方显示在这里。添加新的提供方后,即可在会话中选择其模型。`,`Connected providers appear here. Add a provider to use its models in a conversation.`)}),ne&&(0,F.jsx)(`p`,{className:`pi-settings-error`,role:`alert`,children:ne}),O&&(0,F.jsxs)(`section`,{className:`pi-provider-flow`,"aria-label":r(`模型登录`,`Model sign-in`),children:[(0,F.jsxs)(`div`,{className:`pi-provider-flow-head`,children:[(0,F.jsxs)(`strong`,{children:[r(`模型登录`,`Model sign-in`),se?` · ${se}`:``]}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{j.current?.id===O.id&&(j.current.popup?.close(),j.current=null),O.status===`running`||O.status===`waiting`?f(O.id).finally(()=>k(null)):k(null)},children:O.status===`running`||O.status===`waiting`?r(`取消`,`Cancel`):r(`关闭`,`Close`)})]}),O.status===`done`&&(0,F.jsxs)(`div`,{role:`status`,children:[(0,F.jsx)(`p`,{children:r(`已连接。现在可以在会话中选择该提供方的模型。`,`Connected. You can now select this provider’s models in a conversation.`)}),(0,F.jsx)(`button`,{type:`button`,onClick:t,children:r(`返回会话选择模型`,`Return to conversation and choose a model`)})]}),O.status===`error`&&(0,F.jsx)(`p`,{role:`alert`,children:O.error}),O.status===`running`&&!N&&(0,F.jsx)(`p`,{role:`status`,children:r(`正在等待提供方响应…`,`Waiting for the provider…`)}),O.event?.type===`info`&&(0,F.jsxs)(`p`,{children:[O.event.message,O.event.links?.map(e=>{let t=tk(e.url);return t&&(0,F.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,children:e.label??r(`打开链接`,`Open link`)},t)})]}),O.event?.type===`progress`&&N?.type!==`auth_url`&&(0,F.jsx)(`p`,{children:O.event.message}),N?.type===`auth_url`&&(0,F.jsxs)(`p`,{role:`status`,children:[r(`请在授权页面完成登录;若页面未自动打开,请点击右侧链接。完成后这里会自动更新。`,`Complete sign-in on the authorization page. If it did not open, use the link. This page will update automatically.`),` `,tk(N.url)&&(0,F.jsx)(`a`,{href:tk(N.url),target:`_blank`,rel:`noopener noreferrer`,children:r(`打开授权页面`,`Open authorization page`)})]}),N?.type===`device_code`&&(0,F.jsxs)(`p`,{children:[r(`在`,`On the`),` `,tk(N.verificationUri)&&(0,F.jsx)(`a`,{href:tk(N.verificationUri),target:`_blank`,rel:`noopener noreferrer`,children:r(`验证页面`,`verification page`)}),` `,r(`输入代码`,`enter code`),` `,(0,F.jsx)(`code`,{children:N.userCode})]}),O.status===`waiting`&&O.prompt?.type===`select`&&(0,F.jsxs)(`div`,{className:`pi-provider-options`,children:[(0,F.jsx)(`p`,{children:O.prompt.message}),O.prompt.options.map(e=>(0,F.jsxs)(`button`,{type:`button`,disabled:re,onClick:()=>{fe(e.id)},children:[e.label,e.description&&(0,F.jsx)(`small`,{children:e.description})]},e.id))]}),he&&O.prompt?.type===`manual_code`&&N?.type===`auth_url`?(0,F.jsxs)(`details`,{className:`pi-provider-manual-login`,children:[(0,F.jsx)(`summary`,{children:r(`无法自动完成?手动输入授权码`,`Can't finish automatically? Enter an authorization code`)}),he]}):he]}),(0,F.jsxs)(`section`,{className:`pi-provider-list`,"aria-label":r(`已接入的模型提供方`,`Connected model providers`),children:[ce.map(e=>(0,F.jsxs)(`div`,{className:`pi-provider-card`,children:[(0,F.jsxs)(`div`,{className:`pi-provider-card-head`,children:[(0,F.jsxs)(`span`,{className:`pi-provider-name`,children:[e.name,(0,F.jsx)(`span`,{className:`pi-provider-dot`,role:`img`,"aria-label":r(`已配置认证`,`Authentication configured`)}),(0,F.jsx)(`small`,{children:r(`已配置`,`Configured`)})]}),(0,F.jsx)(`button`,{type:`button`,disabled:M,"aria-label":`${r(`编辑`,`Edit`)} ${e.name}`,"aria-expanded":S===e.id,onClick:()=>{y(null),C(S===e.id?null:e.id)},children:r(`编辑`,`Edit`)})]}),S===e.id&&(0,F.jsxs)(`div`,{className:`pi-provider-editor`,children:[e.methods.includes(`api_key`)&&(0,F.jsx)(rk,{provider:e,configured:!0,busy:!!M,getProviderModels:i,updateProviderModel:a,onConnect:t=>de(e.id,`api_key`,t)},e.id),e.methods.includes(`oauth`)&&(0,F.jsx)(`div`,{className:`pi-provider-methods`,children:(0,F.jsx)(`button`,{type:`button`,disabled:!!M,onClick:()=>{de(e.id,`oauth`)},children:r(`网页登录`,`Browser sign-in`)})}),(0,F.jsx)($O,{providerId:e.id,getModels:i,updateModel:a}),e.storedCredential&&(0,F.jsx)(`div`,{className:`pi-provider-credential-action`,children:(0,F.jsx)(`button`,{type:`button`,disabled:M,onClick:()=>T(e.id),children:r(`移除认证`,`Remove credentials`)})}),!e.storedCredential&&(0,F.jsx)(`p`,{className:`pi-provider-auth-source`,children:r(`当前认证来自环境变量、模型配置或其他运行时来源,请在对应位置移除。`,`Authentication comes from an environment variable, model configuration, or another runtime source. Remove it at its source.`)}),w===e.id&&(0,F.jsxs)(`div`,{className:`pi-model-confirm`,role:`group`,"aria-label":r(`确认移除认证`,`Confirm credential removal`),children:[(0,F.jsx)(`span`,{children:r(`移除本机保存的认证后,该模型可能无法继续使用。`,`Removing stored credentials may make this provider unavailable.`)}),(0,F.jsx)(`button`,{type:`button`,disabled:re,onClick:()=>{me(e.id)},children:r(`确认移除`,`Remove`)}),(0,F.jsx)(`button`,{type:`button`,disabled:re,onClick:()=>T(null),children:r(`取消`,`Cancel`)})]})]})]},e.id)),g&&ce.length===0&&(0,F.jsx)(`p`,{className:`pi-provider-empty`,children:r(`尚未接入提供方`,`No providers connected yet`)}),!g&&(0,F.jsx)(`p`,{role:`status`,children:r(`正在读取模型提供方…`,`Loading model providers…`)})]}),v===`builtin`&&(0,F.jsxs)(`section`,{className:`pi-provider-add-card`,"aria-label":r(`添加提供方`,`Add provider`),children:[(0,F.jsxs)(`div`,{className:`pi-provider-flow-head`,children:[(0,F.jsx)(`strong`,{children:r(`添加提供方`,`Add provider`)}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>y(null),children:r(`关闭`,`Close`)})]}),ue?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`label`,{htmlFor:`pi-provider-select`,children:r(`提供方`,`Provider`)}),(0,F.jsx)(`select`,{id:`pi-provider-select`,value:ue.id,onChange:e=>x(e.target.value),children:le.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.name},e.id))}),ue.methods.includes(`api_key`)&&(0,F.jsx)(rk,{provider:ue,configured:!1,busy:!!M,getProviderModels:i,updateProviderModel:a,onConnect:e=>de(ue.id,`api_key`,e)},ue.id),ue.methods.includes(`oauth`)&&(0,F.jsx)(`div`,{className:`pi-provider-methods`,children:(0,F.jsx)(`button`,{type:`button`,disabled:!!M,onClick:()=>{de(ue.id,`oauth`)},children:r(`网页登录`,`Browser sign-in`)})}),(0,F.jsx)(`p`,{children:r(`认证完成后,可在提供方的“编辑”中调整模型目录。`,`After sign-in, open the provider’s Edit panel to adjust its model catalog.`)})]}):(0,F.jsx)(`p`,{children:r(`没有可添加的提供方。`,`No providers can be added.`)})]}),v===`custom`&&(0,F.jsxs)(`section`,{className:`pi-provider-add-card`,"aria-label":r(`添加自定义提供方`,`Add custom provider`),children:[(0,F.jsxs)(`div`,{className:`pi-provider-flow-head`,children:[(0,F.jsx)(`strong`,{children:r(`添加自定义提供方`,`Add custom provider`)}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>y(null),children:r(`关闭`,`Close`)})]}),(0,F.jsx)(`p`,{children:r(`适用于兼容 Pi 已支持协议的模型服务。保存后再添加 API Key;密钥不会写入 models.json。`,`For model services compatible with Pi’s supported protocols. Add an API key after saving; it will not be written to models.json.`)}),(0,F.jsxs)(`form`,{className:`pi-provider-custom-form`,onSubmit:e=>{e.preventDefault(),pe()},children:[(0,F.jsxs)(`label`,{children:[r(`名称`,`Name`),(0,F.jsx)(`input`,{required:!0,maxLength:100,value:E.name,onChange:e=>D({...E,name:e.target.value}),placeholder:r(`我的模型服务`,`My model service`)})]}),(0,F.jsxs)(`label`,{children:[r(`提供方 ID`,`Provider ID`),(0,F.jsx)(`input`,{required:!0,maxLength:64,value:E.id,onChange:e=>D({...E,id:e.target.value}),placeholder:`my-provider`})]}),(0,F.jsxs)(`label`,{children:[r(`接口地址`,`API URL`),(0,F.jsx)(`input`,{required:!0,type:`url`,maxLength:2048,value:E.baseUrl,onChange:e=>D({...E,baseUrl:e.target.value}),placeholder:`https://api.example.com/v1`})]}),(0,F.jsxs)(`label`,{children:[r(`接口协议`,`API protocol`),(0,F.jsxs)(`select`,{value:E.api,onChange:e=>D({...E,api:e.target.value}),children:[(0,F.jsx)(`option`,{value:`openai-completions`,children:`OpenAI Chat Completions`}),(0,F.jsx)(`option`,{value:`openai-responses`,children:`OpenAI Responses`}),(0,F.jsx)(`option`,{value:`anthropic-messages`,children:`Anthropic Messages`})]})]}),(0,F.jsxs)(`label`,{children:[r(`模型 ID`,`Model ID`),(0,F.jsx)(`input`,{required:!0,maxLength:200,value:E.modelId,onChange:e=>D({...E,modelId:e.target.value}),placeholder:`model-name`})]}),(0,F.jsx)(`button`,{type:`submit`,disabled:re,children:r(`保存并继续`,`Save and continue`)})]})]}),!v&&(0,F.jsxs)(`div`,{className:`pi-provider-add-actions`,children:[(0,F.jsx)(`button`,{type:`button`,disabled:!g||le.length===0||M,onClick:()=>{C(null),y(`builtin`),x(``)},children:r(`+ 添加提供方`,`+ Add provider`)}),(0,F.jsx)(`button`,{type:`button`,disabled:M,onClick:()=>{C(null),y(`custom`)},children:r(`+ 添加自定义提供方`,`+ Add custom provider`)})]})]})}var ak=`pi-web-theme`,ok=new Set,sk=window.matchMedia(`(prefers-color-scheme: dark)`),ck=lk();function lk(){try{let e=localStorage.getItem(ak);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}function uk(){document.body.toggleAttribute(`data-ds-dark-theme`,ck===`dark`||ck===`system`&&sk.matches)}function dk(){uk(),sk.addEventListener(`change`,uk),window.addEventListener(`storage`,e=>{e.key===ak&&(ck=lk(),uk(),ok.forEach(e=>e()))})}function fk(e){ck=e;try{localStorage.setItem(ak,e)}catch{}uk(),ok.forEach(e=>e())}function pk(){return(0,P.useSyncExternalStore)(e=>(ok.add(e),()=>{ok.delete(e)}),()=>ck)}var mk={group:`_group_8jvbt_4`,title:`_title_8jvbt_12`,cubeRow:`_cubeRow_8jvbt_19`,themeCube:`_themeCube_8jvbt_29`,selected:`_selected_8jvbt_48`};function hk(){let e=pk(),t=l(),r=[{id:`light`,label:t===`zh`?`浅色`:`Light`,Icon:Ct},{id:`dark`,label:t===`zh`?`深色`:`Dark`,Icon:wt},{id:`system`,label:t===`zh`?`跟随系统`:`System`,Icon:Tt}];return(0,F.jsxs)(`div`,{className:mk.group,children:[(0,F.jsx)(`div`,{className:mk.title,children:t===`zh`?`外观`:`Appearance`}),(0,F.jsx)(`div`,{className:mk.cubeRow,children:r.map(({id:t,label:r,Icon:i})=>(0,F.jsxs)(`button`,{type:`button`,className:n(mk.themeCube,e===t&&mk.selected),"aria-pressed":e===t,onClick:()=>fk(t),children:[(0,F.jsx)(i,{}),r]},t))})]})}var gk={selectorWrap:`_selectorWrap_5eqgx_1`,selector:`_selector_5eqgx_1`,value:`_value_5eqgx_23`,option:`_option_5eqgx_24`,chevron:`_chevron_5eqgx_25`,menu:`_menu_5eqgx_27`};function _k({label:e,menuLabel:t,value:n,options:r,disabled:i,onChange:a}){let[o,s]=(0,P.useState)(!1),c=(0,P.useId)(),l=(0,P.useRef)(null),u=(0,P.useRef)(null),d=(0,P.useRef)(null);return(0,P.useEffect)(()=>{i&&s(!1)},[i]),(0,P.useEffect)(()=>{if(!o)return;d.current?.focus();let e=e=>{l.current?.contains(e.target)||s(!1)},t=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopImmediatePropagation(),s(!1),u.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[o]),(0,F.jsxs)(`div`,{className:gk.selectorWrap,ref:l,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||s(!1)},children:[(0,F.jsxs)(`button`,{ref:u,type:`button`,className:gk.selector,"aria-label":e,"aria-haspopup":`menu`,"aria-expanded":o,"aria-controls":o?c:void 0,disabled:i,onClick:()=>s(e=>!e),children:[(0,F.jsx)(`span`,{className:gk.value,children:r.find(e=>e.id===n)?.label}),(0,F.jsx)(`svg`,{className:gk.chevron,width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:(0,F.jsx)(`path`,{d:`m3.5 5.25 3.5 3.5 3.5-3.5`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),o&&(0,F.jsx)(`div`,{id:c,className:gk.menu,role:`menu`,"aria-label":t,onKeyDown:e=>{if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;e.preventDefault();let t=Array.from(e.currentTarget.querySelectorAll(`[role="menuitemradio"]`)),n=t.indexOf(document.activeElement);t[e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowDown`?1:t.length-1))%t.length]?.focus()},children:r.map(e=>(0,F.jsxs)(`button`,{ref:e.id===n?d:void 0,type:`button`,role:`menuitemradio`,"aria-checked":e.id===n,className:gk.option,onClick:()=>{s(!1),u.current?.focus(),e.id!==n&&a(e.id)},children:[(0,F.jsx)(`span`,{children:e.label}),e.id===n&&(0,F.jsx)(`svg`,{className:gk.chevron,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:(0,F.jsx)(`path`,{d:`m3 8 3.2 3.2L13 4.5`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`})})]},e.id))})]})}var vk={row:`_row_1rrpk_1`,title:`_title_1rrpk_9`},yk=[{id:`zh`,label:`中文`},{id:`en`,label:`English`}];function bk(){let e=l(),t=e===`zh`?`语言`:`Language`;return(0,F.jsxs)(`div`,{className:vk.row,children:[(0,F.jsx)(`div`,{className:vk.title,children:t}),(0,F.jsx)(_k,{label:t,menuLabel:e===`zh`?`选择语言`:`Choose language`,value:e,options:yk,onChange:i})]})}function xk(e,t,n){return e instanceof m&&e.status===404?t===`zh`?`后台服务仍在运行旧版。请重启 pi-webapp 后重新打开页面,再检查更新。`:`The background service is still running an older version. Restart pi-webapp, reopen this page, then check again.`:e instanceof Error&&e.message?e.message:n===`check`?t===`zh`?`检查更新失败`:`Could not check for updates`:t===`zh`?`升级失败`:`Update failed`}function Sk({getUpdate:e,getRunningVersion:t,setUpdateChannel:n,cancelUpdate:r,update:i}){let a=l(),[o,s]=(0,P.useState)(null),[c,u]=(0,P.useState)(!0),[d,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(null),[v,y]=(0,P.useState)(!1),[b,x]=(0,P.useState)(``),S=(0,P.useRef)(!1),C=(0,P.useRef)(!1),w=(0,P.useRef)(0),T=(0,P.useRef)(!0);(0,P.useEffect)(()=>(T.current=!0,()=>{T.current=!1}),[]);let E=async()=>{let t=++w.current;u(!0),x(``);try{let n=await e();T.current&&t===w.current&&s(n)}catch(e){T.current&&t===w.current&&(s(null),x(xk(e,a,`check`)))}finally{T.current&&t===w.current&&u(!1)}};return(0,P.useEffect)(()=>{E();let e=()=>{E()};return window.addEventListener(`pi-update-channel`,e),()=>{window.removeEventListener(`pi-update-channel`,e)}},[]),(0,P.useEffect)(()=>{if(!g)return;let e=!1,n=new AbortController,r,i=setTimeout(()=>{e=!0,n.abort(),clearTimeout(r),_(null),y(!0),x(f(a,`新版未能及时就绪,后台可能已回退到旧版。请刷新页面检查当前版本;若无法连接,请重新打开应用。`,`The new version was not ready in time; the backend may have rolled back. Refresh to check the running version, or reopen the app if disconnected.`)),_e(Error(`Updated service did not become ready within 60 seconds`),{stage:`update_restart`,code:`update_restart_timeout`,route:`/api/update/version`,timeoutMs:6e4})},6e4),o=async()=>{try{let r=await t(n.signal);if(e)return;if(r.current===g){clearTimeout(i),location.reload();return}}catch{}e||(r=setTimeout(()=>{o()},1200))};return r=setTimeout(()=>{o()},1200),()=>{e=!0,n.abort(),clearTimeout(r),clearTimeout(i)}},[g]),{status:o,checking:c,installing:d,cancelling:m,targetVersion:g,restartTimedOut:v,error:b,check:E,install:async()=>{if(S.current||c||!o?.available||!o.canRestart||g||v||o.downgrade&&!window.confirm(f(a,`将从 ${o.current} 切换至稳定版 ${o.latest}。部分新功能可能不可用;请先备份重要数据。是否继续?`,`Switch from ${o.current} to stable ${o.latest}? Some new features may be unavailable. Back up important data before continuing.`)))return;S.current=!0,p(!0),x(``);let t=o.channel&&o.latest?{channel:o.channel,version:o.latest,...o.downgrade?{allowDowngrade:!0}:{}}:void 0;try{let e;try{e=await i(t)}catch(n){if(n?.reason!==`update_confirm_required`)throw n;if(!window.confirm(f(a,`${n.message}。\n\n仍然升级?`,`${n.message}.\n\nUpdate anyway?`)))return;e=await i({...t,force:!0})}T.current&&_(e.version)}catch(t){T.current&&x(xk(t,a,`install`));try{let t=await e();T.current&&s(t)}catch{}}finally{S.current=!1,T.current&&p(!1)}},changeChannel:async e=>{if(!(!n||c||d||g)){++w.current,u(!0),x(``);try{await n(e),window.dispatchEvent(new Event(`pi-update-channel`))}catch(e){T.current&&(u(!1),x(xk(e,a,`check`)))}}},cancel:async()=>{if(!(!r||C.current||g)){C.current=!0,h(!0),x(``);try{await r(),y(!1),await E()}catch(e){T.current&&x(xk(e,a,`install`))}finally{C.current=!1,T.current&&h(!1)}}}}}var Ck=(0,P.createContext)(null);function wk({actions:e,children:t}){let n=Sk(e);return(0,F.jsx)(Ck.Provider,{value:n,children:t})}function Tk(){return(0,P.useContext)(Ck)}function Ek(e){let t=/(?:^| )PiDesktop\/(\d+\.\d+\.\d+(?:-[\w.-]+)?) PiDesktopBuild\/(\d+)(?: |$)/.exec(e);return!t||t[1].length>80||!Number.isSafeInteger(Number(t[2]))?null:{version:t[1],build:Number(t[2]),handoff:Number(t[2])>=14}}var Dk={group:`_group_15ggg_1`,row:`_row_15ggg_8`,details:`_details_15ggg_15`,preference:`_preference_15ggg_17`,title:`_title_15ggg_25`,summary:`_summary_15ggg_31`,note:`_note_15ggg_31`,error:`_error_15ggg_31`,actions:`_actions_15ggg_41`};function Ok(e){let t=Tk();return t?(0,F.jsx)(Ak,{...e,controller:t}):(0,F.jsx)(kk,{...e})}function kk(e){let t=Sk(e);return(0,F.jsx)(Ak,{...e,controller:t})}function Ak(e){let t=l(),n=(e,n)=>f(t,e,n),{status:r,checking:i,installing:a,cancelling:o,targetVersion:s,restartTimedOut:c,error:u,check:d,install:p,changeChannel:m,cancel:h}=e.controller,g=Ek(navigator.userAgent),_=r?`${n(`当前版本`,`Current version`)} ${r.current}${r.latest?` · ${n(`目标版本`,`Target version`)} ${r.latest}`:``}`:i?n(`正在读取版本…`,`Reading version…`):n(`暂时无法读取版本`,`Version unavailable`);return(0,F.jsxs)(`section`,{className:Dk.group,"aria-label":n(`应用更新`,`App updates`),children:[r?.channel&&e.setUpdateChannel&&(0,F.jsxs)(`div`,{className:Dk.preference,children:[(0,F.jsx)(`div`,{className:Dk.title,children:n(`更新偏好`,`Update preference`)}),(0,F.jsx)(_k,{label:n(`更新偏好`,`Update preference`),menuLabel:n(`选择更新偏好`,`Choose update preference`),value:r.channel,disabled:i||a||!!s||c,onChange:e=>{m(e)},options:[{id:`stable`,label:n(`稳定版(推荐)`,`Stable (recommended)`)},{id:`alpha`,label:n(`体验版(包含 alpha)`,`Preview (including alpha)`)}]})]}),r?.channel===`alpha`&&(0,F.jsx)(`p`,{className:Dk.note,children:n(`体验版包含尚在验证的新功能,可能不稳定。`,`Preview releases include features still under testing and may be unstable.`)}),(0,F.jsxs)(`div`,{className:Dk.row,children:[(0,F.jsxs)(`div`,{className:Dk.details,children:[(0,F.jsx)(`div`,{className:Dk.title,children:n(`应用更新`,`App updates`)}),(0,F.jsx)(`p`,{className:Dk.summary,children:_}),g&&(0,F.jsxs)(`p`,{className:Dk.summary,children:[n(`当前桌面窗口`,`Current desktop window`),` `,g.version,` · build `,g.build]}),r?.launcher&&(0,F.jsxs)(`p`,{className:Dk.summary,children:[n(`后台启动器`,`Backend launcher`),` `,r.launcher.version,` · `,n(`体验版持久化`,`Preview persistence`),` `,r.launcher.releaseChannels?n(`支持`,`supported`):n(`不支持`,`unsupported`)]}),r?.desktopShell&&(0,F.jsxs)(`p`,{className:Dk.summary,children:[n(`后台启动时的桌面外壳`,`Desktop shell at backend startup`),` `,r.desktopShell.version,` · build `,r.desktopShell.build]})]}),(0,F.jsxs)(`div`,{className:Dk.actions,children:[r?.available&&r.canRestart&&!s&&!c&&(0,F.jsx)(TO,{variant:`primary`,disabled:a||i,onClick:()=>{p()},children:a?n(`正在安装…`,`Installing…`):r.downgrade?n(`切换到稳定版并重启`,`Switch to stable and restart`):n(`升级并重启`,`Update and restart`)}),(r?.recovery?.canCancel||a)&&e.cancelUpdate&&!s&&(0,F.jsx)(TO,{variant:`outline`,disabled:o,onClick:()=>{h()},children:o?n(`正在取消…`,`Cancelling…`):a?n(`取消下载`,`Cancel download`):n(`取消未完成的升级`,`Cancel unfinished update`)}),(0,F.jsx)(TO,{variant:`outline`,disabled:i||a||!!s,onClick:()=>{d()},children:i?n(`检查中…`,`Checking…`):n(`检查更新`,`Check for updates`)})]})]}),r?.launcherHandoff?.required&&(0,F.jsxs)(`div`,{className:Dk.note,children:[(0,F.jsx)(`p`,{children:n(`安装新版桌面不会自动接管仍在运行的共享后台。需要先安全交接启动器,再使用体验版在线升级。交接会等待聊天空闲、终端关闭和真实图稿保存确认,并保留原本地地址。`,`Installing a desktop update does not take over a running shared backend. Safely hand off the launcher before preview updates. Handoff requires idle chats, closed terminals and real drawing save confirmations, and preserves the local address.`)}),g?.handoff?(0,F.jsx)(`a`,{href:`pi-desktop://launcher-handoff`,target:`_blank`,rel:`noreferrer`,children:n(`安全切换到当前桌面启动器…`,`Safely switch to this desktop launcher…`)}):(0,F.jsxs)(`p`,{children:[n(`安全交接入口从桌面 build 14 开始提供。build 12 已支持体验版,但缺少旧共享后台交接功能;无需重复安装 build 12。`,`The safe handoff action is available from desktop build 14. Build 12 supports preview releases but lacks shared-backend handoff; reinstalling build 12 will not help.`),` `,(0,F.jsx)(`a`,{href:`https://github.com/chengzhiyi/pi-webapp/releases`,target:`_blank`,rel:`noreferrer`,children:n(`下载支持安全交接的桌面版本`,`Get a desktop release with safe handoff`)})]}),!r.launcherHandoff.supported&&(0,F.jsx)(`p`,{children:n(`当前后台还缺少安全交接协议:请先选择稳定版并升级业务包,再从桌面菜单重试交接。`,`This backend lacks the safe handoff protocol: first update its business package on Stable, then retry from the desktop menu.`)})]}),r?.desktopShell&&(0,F.jsx)(`p`,{className:Dk.note,children:n(`共享后台可能由旧版桌面启动。当前窗口的桌面版本请查看菜单「pi → 关于 pi」。业务包升级不会替换桌面应用。`,`A shared backend may have been started by an older desktop. For this window’s desktop version, see pi → About pi. Updating the business package does not replace the desktop app.`)}),r?.latest&&!r.available&&!i&&(0,F.jsx)(`p`,{className:Dk.note,role:`status`,children:n(`已是最新版本`,`Up to date`)}),r?.reason&&(0,F.jsx)(`p`,{className:Dk.note,children:r.reason}),r?.requiresDesktopUpgrade&&(0,F.jsxs)(`p`,{className:Dk.note,children:[(0,F.jsx)(`a`,{href:`https://github.com/chengzhiyi/pi-webapp/releases`,target:`_blank`,rel:`noreferrer`,children:n(`下载新版桌面应用`,`Download desktop update`)}),n(`。安装支持更新通道的桌面版本后,可在此选择体验版并在线升级。`,`. Install a desktop release with update-channel support, then return here to select preview and update online.`)]}),s&&(0,F.jsx)(`p`,{className:Dk.note,role:`status`,children:n(`正在重启并等待新版连接…`,`Restarting and waiting for the new version…`)}),u&&(0,F.jsx)(`p`,{className:Dk.error,role:`alert`,children:u}),u?.includes(`Missing view flush acknowledgement`)&&(0,F.jsx)(`p`,{className:Dk.note,children:n(`插件视图尚未确认保存。请保存并关闭绘图或编辑器;若视图已失联,请先在插件恢复记录中处理未确认的编辑,再重试升级。`,`A plugin view has not confirmed its save. Save and close drawings or editors; if a view disconnected, review its unconfirmed edits in plugin recovery before retrying.`)})]})}var jk={triggerRow:`_triggerRow_f00qz_1`,railRow:`_railRow_f00qz_10`,trigger:`_trigger_f00qz_1`,rail:`_rail_f00qz_10`,triggerLabel:`_triggerLabel_f00qz_54`,overlay:`_overlay_f00qz_61`,mask:`_mask_f00qz_70`,panel:`_panel_f00qz_83`,nav:`_nav_f00qz_105`,navTitle:`_navTitle_f00qz_116`,navList:`_navList_f00qz_125`,navCell:`_navCell_f00qz_133`,active:`_active_f00qz_156`,navIcon:`_navIcon_f00qz_160`,navLabel:`_navLabel_f00qz_164`,content:`_content_f00qz_173`,header:`_header_f00qz_181`,actions:`_actions_f00qz_192`,close:`_close_f00qz_202`,options:`_options_f00qz_82`,hiddenLabel:`_hiddenLabel_f00qz_229`};function Mk(e){return e===`general`?(0,F.jsx)(rt,{className:jk.navIcon,size:16}):e===`models`?(0,F.jsx)(Et,{className:jk.navIcon,size:16}):e===`packages`?(0,F.jsx)(kt,{className:jk.navIcon,size:16}):e===`plugins`||e===`extensions`?(0,F.jsx)(yt,{className:jk.navIcon,size:16}):(0,F.jsx)(Ot,{className:jk.navIcon,size:16})}function Nk({title:e,sections:t,activeId:n,onSelect:r,onClose:i,children:a}){let o=l(),s=(0,P.useId)(),c=(0,P.useRef)(null);return(0,P.useEffect)(()=>{c.current?.focus();let e=e=>{e.key===`Escape`&&!e.defaultPrevented&&!(e.target instanceof Element&&e.target.closest(`[role="menu"]`))&&i()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]),(0,F.jsxs)(`div`,{className:jk.overlay,role:`presentation`,children:[(0,F.jsx)(`div`,{className:jk.mask,"aria-hidden":`true`,onClick:i}),(0,F.jsxs)(`div`,{className:jk.panel,role:`dialog`,"aria-modal":`true`,"aria-labelledby":s,children:[(0,F.jsxs)(`nav`,{className:jk.nav,"aria-label":o===`zh`?`Pi 设置分类`:`Pi settings sections`,children:[(0,F.jsx)(`div`,{className:jk.navTitle,id:s,children:e}),(0,F.jsx)(`div`,{className:jk.navList,children:t.map(e=>(0,F.jsxs)(`button`,{type:`button`,className:`${jk.navCell} ${n===e.id?jk.active:``}`,"aria-current":n===e.id?`true`:void 0,onClick:()=>r(e.id),children:[Mk(e.id),(0,F.jsx)(`span`,{className:jk.navLabel,children:e.label})]},e.id))})]}),(0,F.jsxs)(`div`,{className:jk.content,children:[(0,F.jsxs)(`header`,{className:jk.header,children:[(0,F.jsx)(`div`,{className:jk.actions}),(0,F.jsx)(`button`,{ref:c,className:jk.close,type:`button`,onClick:i,"aria-label":o===`zh`?`关闭 Pi 设置`:`Close Pi settings`,children:(0,F.jsx)(ut,{size:14})})]}),(0,F.jsx)(`div`,{className:jk.options,children:a})]})]})]})}function Pk(e){return/^(?:npm:|git:|https?:\/\/|ssh:\/\/|git@)/i.test(e.trim())}function Fk(e){let t=l(),n=(e,n)=>f(t,e,n),r=[{kind:`packages`,title:n(`包与扩展`,`Packages & extensions`),hint:n(`包可以包含扩展和技能;本地扩展也可以单独加载。`,`Packages can contain extensions and skills; local extensions can also be loaded separately.`),placeholder:n(`npm 包名、Git 地址或本地目录`,`npm package, Git URL, or local directory`)},{kind:`skills`,title:n(`技能`,`Skills`),hint:n(`Pi 已发现和加载的技能。`,`Skills discovered and loaded by Pi.`),placeholder:n(`SKILL.md 文件或目录路径`,`SKILL.md file or directory path`)}],i=[{id:`general`,label:n(`通用设置`,`General`)},{id:`models`,label:n(`模型`,`Models`)},...r.map(({kind:e,title:t})=>({id:e,label:e===`packages`?n(`包与扩展`,`Packages`):t}))],{onBack:a,getConfig:o,updateConfig:s}=e,[c,u]=(0,P.useState)(null),[d,p]=(0,P.useState)({packages:``,extensions:``,skills:``}),[m,h]=(0,P.useState)(e.setupMode?`models`:`general`),[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(!0),[b,x]=(0,P.useState)(``);(0,P.useEffect)(()=>{e.setupMode&&h(`models`)},[e.setupMode]),(0,P.useEffect)(()=>{let e=!0;return o().then(t=>{e&&u(t)}).catch(t=>{e&&x(t instanceof Error?t.message:n(`无法读取 Pi 设置`,`Could not load Pi settings`))}).finally(()=>{e&&y(!1)}),()=>{e=!1}},[]);let S=async()=>{y(!0),x(``);try{u(await o())}catch(e){x(e instanceof Error?e.message:n(`无法读取 Pi 设置`,`Could not load Pi settings`))}finally{y(!1)}},C=async(e,t,r)=>{_(!0),x(``);try{u(await s(e,`global`,t,r)),t===`add`&&p(t=>({...t,[e]:``}))}catch(e){x(e instanceof Error?e.message:n(`保存失败`,`Save failed`))}finally{_(!1)}},w=r.find(({kind:e})=>e===m),T=w?c?.global[w.kind]??[]:[],E=w?c?.installed?.[w.kind]??[]:[],D=w?d[w.kind].trim():``,O=w?.kind!==`packages`&&Pk(D),k=new Set(c?.installed.packages.map(e=>e.source)??[]),ee=c?.installed.extensions.filter(e=>!k.has(e.source))??[],te=c?.global.packages.filter(e=>!k.has(e))??[],ne=d.extensions.trim(),A=Pk(ne),re=e=>{p(t=>({...t,packages:e})),h(`packages`),x(``)};return(0,F.jsxs)(Nk,{title:n(`Pi 设置`,`Pi Settings`),sections:i,activeId:m,onSelect:e=>{h(e),x(``)},onClose:a,children:[m===`general`&&(0,F.jsxs)(`div`,{className:`pi-settings-content`,children:[(0,F.jsx)(`h2`,{children:n(`通用设置`,`General`)}),(0,F.jsx)(`p`,{className:`pi-settings-intro`,children:n(`调整网页的显示方式。`,`Choose how the web interface appears.`)}),(0,F.jsxs)(`div`,{className:`pi-settings-general`,children:[(0,F.jsx)(bk,{}),(0,F.jsx)(hk,{}),(0,F.jsx)(Ok,{getUpdate:e.getUpdate,getRunningVersion:e.getRunningVersion,setUpdateChannel:e.setUpdateChannel,cancelUpdate:e.cancelUpdate,update:e.update})]})]}),m===`models`&&(0,F.jsx)(ik,{setupMode:e.setupMode,onReturnToConversation:a,getProviders:e.getProviders,getProviderModels:e.getProviderModels,updateProviderModel:e.updateProviderModel,logoutProvider:e.logoutProvider,addCustomProvider:e.addCustomProvider,startLogin:e.startProviderLogin,getLogin:e.getProviderLogin,getActiveLogin:e.getActiveProviderLogin,respondLogin:e.respondProviderLogin,cancelLogin:e.cancelProviderLogin,refreshModels:e.refreshModels}),w&&(0,F.jsxs)(`div`,{className:`pi-settings-content`,children:[(0,F.jsx)(`h2`,{children:w.title}),(0,F.jsxs)(`p`,{className:`pi-settings-intro`,children:[w.hint,` `,n(`添加或移除后会重新加载 Pi 资源。`,`Pi resources reload after you add or remove one.`)]}),b&&(0,F.jsx)(`p`,{className:`pi-settings-error`,role:`alert`,children:b}),c?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`section`,{className:`pi-settings-section`,"aria-label":`${n(`已发现`,`Discovered `)}${w.title}`,children:[(0,F.jsxs)(`h3`,{children:[w.kind===`packages`?n(`已安装的包`,`Installed packages`):n(`已发现的技能`,`Discovered skills`),` `,(0,F.jsx)(`span`,{children:E.length})]}),(0,F.jsx)(`ul`,{children:E.length?E.map(e=>{let t=w.kind===`packages`?c.installed.extensions.filter(t=>t.source===e.source):[];return(0,F.jsxs)(`li`,{className:`pi-resource-item`,children:[(0,F.jsxs)(`div`,{className:`pi-resource-main`,children:[(0,F.jsx)(`strong`,{title:e.name,children:e.name}),(0,F.jsx)(`small`,{title:e.path||e.source,children:e.path||e.source}),t.length>0&&(0,F.jsxs)(`div`,{className:`pi-package-contents`,children:[(0,F.jsx)(`span`,{children:n(`包含扩展`,`Includes extensions`)}),t.map(e=>(0,F.jsx)(`span`,{title:e.path,children:e.name},e.path))]})]}),(0,F.jsxs)(`div`,{className:`pi-resource-actions`,children:[(0,F.jsxs)(`span`,{className:`pi-resource-meta`,children:[e.enabled?n(`已启用`,`Enabled`):n(`已停用`,`Disabled`),` · `,e.scope===`project`?n(`项目`,`Project`):e.scope===`user`?n(`用户`,`User`):n(`临时`,`Temporary`)]}),w.kind===`packages`&&c.global.packages.includes(e.source)&&(0,F.jsx)(`button`,{type:`button`,disabled:g,onClick:()=>{C(`packages`,`remove`,e.source)},children:n(`移除`,`Remove`)})]})]},`${e.path}:${e.source}`)}):(0,F.jsxs)(`li`,{className:`pi-settings-empty`,children:[n(`未发现`,`No `),w.title]})})]}),w.kind===`packages`&&(0,F.jsxs)(`section`,{className:`pi-settings-section`,"aria-label":n(`独立扩展`,`Standalone extensions`),children:[(0,F.jsxs)(`h3`,{children:[n(`独立扩展`,`Standalone extensions`),` `,(0,F.jsx)(`span`,{children:ee.length})]}),(0,F.jsx)(`ul`,{children:ee.length?ee.map(e=>(0,F.jsxs)(`li`,{className:`pi-resource-item`,children:[(0,F.jsxs)(`div`,{className:`pi-resource-main`,children:[(0,F.jsx)(`strong`,{title:e.name,children:e.name}),(0,F.jsx)(`small`,{title:e.path,children:e.path})]}),(0,F.jsxs)(`span`,{className:`pi-resource-meta`,children:[e.enabled?n(`已启用`,`Enabled`):n(`已停用`,`Disabled`),` · `,e.scope===`project`?n(`项目`,`Project`):e.scope===`user`?n(`用户`,`User`):n(`临时`,`Temporary`)]})]},e.path)):(0,F.jsx)(`li`,{className:`pi-settings-empty`,children:n(`未发现独立扩展`,`No standalone extensions found`)})})]}),(0,F.jsxs)(`section`,{className:`pi-settings-section`,"aria-label":`${n(`手动配置`,`Configure `)}${w.title}`,children:[(0,F.jsx)(`h3`,{children:w.kind===`packages`?n(`添加包`,`Add package`):n(`手动配置技能`,`Configure skills manually`)}),(w.kind===`packages`?te:T).length>0&&(0,F.jsx)(`ul`,{children:(w.kind===`packages`?te:T).map(e=>(0,F.jsxs)(`li`,{className:`pi-config-item`,children:[(0,F.jsxs)(`div`,{className:`pi-resource-main`,children:[(0,F.jsx)(`code`,{title:e,children:e}),w.kind===`packages`&&(0,F.jsx)(`small`,{children:n(`已配置,但未发现安装目录`,`Configured, but installation directory was not found`)}),w.kind!==`packages`&&Pk(e)&&(0,F.jsx)(`small`,{className:`pi-config-warning`,children:n(`未加载:包来源请在“包与扩展”中添加。`,`Not loaded: add package sources under Packages & extensions.`)})]}),(0,F.jsxs)(`div`,{className:`pi-resource-actions`,children:[w.kind!==`packages`&&Pk(e)&&(0,F.jsx)(`button`,{type:`button`,disabled:g,onClick:()=>re(e),children:n(`转到包`,`Go to packages`)}),(0,F.jsx)(`button`,{type:`button`,disabled:g,"aria-label":`${n(`移除`,`Remove`)} ${e}`,onClick:()=>{C(w.kind,`remove`,e)},children:n(`移除`,`Remove`)})]})]},e))}),(0,F.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),D&&!O&&C(w.kind,`add`,D)},children:[(0,F.jsx)(`input`,{"aria-label":`${n(`添加`,`Add `)}${w.title}`,"aria-invalid":O||void 0,"aria-describedby":O?`pi-config-source-help`:void 0,placeholder:w.placeholder,value:d[w.kind],onChange:e=>p(t=>({...t,[w.kind]:e.target.value}))}),(0,F.jsx)(`button`,{type:`submit`,disabled:g||!D||O,children:n(`添加`,`Add`)})]}),O&&(0,F.jsxs)(`p`,{id:`pi-config-source-help`,className:`pi-config-hint`,children:[n(`这是包来源,请在「包」中添加。`,`This is a package source. Add it under Packages.`),(0,F.jsx)(`button`,{type:`button`,onClick:()=>re(D),children:n(`转到包`,`Go to packages`)})]})]}),w.kind===`packages`&&(0,F.jsxs)(`section`,{className:`pi-settings-section`,"aria-label":n(`手动配置扩展路径`,`Configure extension paths manually`),children:[(0,F.jsx)(`h3`,{children:n(`扩展路径`,`Extension paths`)}),c.global.extensions.length>0&&(0,F.jsx)(`ul`,{children:c.global.extensions.map(e=>(0,F.jsxs)(`li`,{className:`pi-config-item`,children:[(0,F.jsxs)(`div`,{className:`pi-resource-main`,children:[(0,F.jsx)(`code`,{title:e,children:e}),Pk(e)&&(0,F.jsx)(`small`,{className:`pi-config-warning`,children:n(`未加载:包来源不能作为扩展路径,请在上方添加包。`,`Not loaded: package sources cannot be extension paths. Add the package above.`)})]}),(0,F.jsxs)(`div`,{className:`pi-resource-actions`,children:[Pk(e)&&(0,F.jsx)(`button`,{type:`button`,disabled:g,onClick:()=>re(e),children:n(`填入包`,`Use as package`)}),(0,F.jsx)(`button`,{type:`button`,disabled:g,onClick:()=>{C(`extensions`,`remove`,e)},children:n(`移除`,`Remove`)})]})]},e))}),(0,F.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),ne&&!A&&C(`extensions`,`add`,ne)},children:[(0,F.jsx)(`input`,{"aria-label":n(`添加扩展路径`,`Add extension path`),"aria-invalid":A||void 0,"aria-describedby":A?`pi-extension-source-help`:void 0,placeholder:n(`扩展文件或目录路径`,`Extension file or directory path`),value:d.extensions,onChange:e=>p(t=>({...t,extensions:e.target.value}))}),(0,F.jsx)(`button`,{type:`submit`,disabled:g||!ne||A,children:n(`添加扩展`,`Add extension`)})]}),A&&(0,F.jsxs)(`p`,{id:`pi-extension-source-help`,className:`pi-config-hint`,children:[n(`这是包来源,请使用上方的“添加包”输入框。`,`This is a package source. Use the Add package field above.`),(0,F.jsx)(`button`,{type:`button`,onClick:()=>re(ne),children:n(`填入包`,`Use as package`)})]})]})]}):v?(0,F.jsx)(`p`,{role:`status`,children:n(`正在读取设置…`,`Loading settings…`)}):(0,F.jsx)(`button`,{className:`pi-settings-retry`,type:`button`,onClick:()=>{S()},children:n(`重试读取设置`,`Retry loading settings`)})]},w.kind)]})}function Ik({size:e=24}){return(0,F.jsxs)(`svg`,{"aria-hidden":`true`,width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,style:{display:`block`,flexShrink:0},children:[(0,F.jsx)(`path`,{d:`m14.5 4.5 5 5M4 20l5.3-1.3L20 8a2.8 2.8 0 0 0-4-4L5.3 14.7 4 20Z`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`m5.5 14.5 4 4M8 15l8-8`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`})]})}var Lk={page:`_page_1bt34_2`,pageHead:`_pageHead_1bt34_4`,breadcrumb:`_breadcrumb_1bt34_7`,refresh:`_refresh_1bt34_8`,back:`_back_1bt34_8`,danger:`_danger_1bt34_8`,scope:`_scope_1bt34_12`,error:`_error_1bt34_13`,notice:`_notice_1bt34_13`,search:`_search_1bt34_16`,group:`_group_1bt34_17`,cards:`_cards_1bt34_20`,card:`_card_1bt34_20`,artwork:`_artwork_1bt34_23`,cardMain:`_cardMain_1bt34_24`,cardOpen:`_cardOpen_1bt34_25`,dot:`_dot_1bt34_31`,cardEnd:`_cardEnd_1bt34_33`,switch:`_switch_1bt34_34`,thumb:`_thumb_1bt34_36`,detail:`_detail_1bt34_40`,detailHead:`_detailHead_1bt34_41`},Rk={pluginId:`@chengzhiyi/pi-excalidraw`,name:`Excalidraw`,official:!0,icon:`drawing`,installed:!1,enabled:!1,phase:`not-installed`};async function zk(e,t,n){let r=ve(),{response:i}=await s(`/api/hosted-plugins${e}`,{method:t===void 0?`GET`:`POST`,credentials:`same-origin`,signal:n,headers:{...r?{Authorization:`Bearer ${r}`}:{},...t===void 0?{}:{"Content-Type":`application/json`}},body:t===void 0?void 0:JSON.stringify(t)}),a=await i.json();if(!i.ok)throw Object.assign(Error(a.error?.message??a.error??`Hosted plugin request failed (${i.status})`),{status:i.status,code:a.error?.code??a.errorCode,reason:a.error?.reason??a.reason});return a}var Bk={catalog:e=>zk(``,void 0,e),manage:e=>zk(`/manage`,e),action:e=>zk(`/action`,e),decide:(e,t)=>zk(`/approvals`,{id:e,decision:t}),secret:(e,t,n)=>zk(`/secrets`,{pluginId:e,name:t,value:n}),signIn:e=>zk(`/secrets`,e),pendingViews:e=>zk(`/views`,{operation:`list-pending`,pluginId:e}),view:(e,t)=>zk(`/views`,e,t)},Vk={section:`_section_1qkpy_1`,attention:`_attention_1qkpy_5`,notice:`_notice_1qkpy_6`,error:`_error_1qkpy_7`,actions:`_actions_1qkpy_8`,configuration:`_configuration_1qkpy_13`,rowActions:`_rowActions_1qkpy_14`};function Hk({pluginId:e,t}){let[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(0);(0,P.useEffect)(()=>{let t=!0;return Bk.pendingViews(e).then(e=>{t&&r(e.views)}).catch(e=>{t&&s(String(e))}),()=>{t=!1}},[e,u]);let f=async e=>{l(!0),s(``);try{await Bk.view({pluginId:e.pluginId,sessionId:e.sessionId,generation:e.generation,mountId:e.mountId,viewToken:e.viewToken,operation:`discard`,confirmation:`discard-unconfirmed-edits`}),a(null),d(e=>e+1)}catch(e){s(String(e))}finally{l(!1)}};return!n?.length&&!o?null:(0,F.jsxs)(`div`,{className:Vk.error,"data-pending-views":!0,children:[(0,F.jsx)(`p`,{children:t(`宿主仍持有以下视图。若原窗口已关闭,可丢弃该视图后重试;仍打开的窗口请先保存并关闭。丢弃不会保存内容,无法找回的修改可能永久丢失。`,`The host still holds these views. If the original window is closed, discard the view and retry; save and close windows that are still open first. Discarding does not save content; unrecovered edits may be permanently lost.`)}),n?.map(e=>(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`code`,{children:[e.kind,` · `,e.mountId,` · `,t(`会话`,`session`),` `,e.sessionId,e.dirty||e.busy?` · ${t(`有未确认修改`,`unconfirmed edits`)}`:``]}),` `,i===e.viewToken?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:c,onClick:()=>void f(e),children:t(`确认丢弃`,`Confirm discard`)}),` `,(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:c,onClick:()=>a(null),children:t(`取消`,`Cancel`)})]}):(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:c,onClick:()=>a(e.viewToken),children:t(`丢弃此视图`,`Discard this view`)})]},e.viewToken)),o&&(0,F.jsx)(`p`,{role:`alert`,children:o})]})}function Uk({size:e=24}){return(0,F.jsx)(`svg`,{"aria-hidden":`true`,width:e,height:e,viewBox:`0 0 16 16`,fill:`currentColor`,style:{display:`block`,flexShrink:0},children:(0,F.jsx)(`path`,{d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.6 7.6 0 0 1 4 0c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z`})})}function Wk({card:e,size:t=24}){let n=e.icon??(e.pluginId===Rk.pluginId?Rk.icon:void 0);return(0,F.jsx)(n===`drawing`?Ik:n===`github`?Uk:fe,{size:t})}function Gk(e,t,n){let r=(e,n)=>t===`zh`?e:n;return e===`uninstall`?{title:r(`卸载 ${n}?`,`Uninstall ${n}?`),description:r(`保存成功后将关闭相关视图并卸载插件。工作区文件和插件数据会保留,可重新安装后继续使用;保存失败时不会卸载。`,`After saving successfully, related views close and the plugin is uninstalled. Workspace files and plugin data are retained for reinstallation. A failed save stops uninstallation.`),confirm:r(`卸载`,`Uninstall`)}:e===`disable`?{title:r(`停用 ${n}?`,`Disable ${n}?`),description:r(`保存成功后将关闭相关视图并停用插件。插件仍保持安装,工作区文件和插件数据会保留;保存失败时不会停用。`,`After saving successfully, related views close and the plugin is disabled. It remains installed, with workspace files and plugin data retained. A failed save stops disabling.`),confirm:r(`停用`,`Disable`)}:{title:r(`立即更新 ${n} 并重新打开?`,`Update ${n} and reopen now?`),description:r(`全部视图保存成功后将更新插件并重新打开视图,撤销/重做历史会清空。工作区文件和插件数据会保留;保存失败时不会更新。`,`After all views save successfully, update the plugin and reopen its views. Undo/redo history will be cleared. Workspace files and plugin data are retained. A failed save stops the update.`),confirm:r(`更新并重新打开`,`Update and reopen`)}}function Kk({card:e,t,onCatalog:n,disabled:r}){let[i,a]=(0,P.useState)({}),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(null),[u,d]=(0,P.useState)(!1),f=(0,P.useRef)(!0);if((0,P.useEffect)(()=>(f.current=!0,()=>{f.current=!1}),[]),(0,P.useEffect)(()=>{if(!c)return;let e=!1;return(async()=>{for(;!e&&f.current;){if(await new Promise(e=>setTimeout(e,3e3)),e||!f.current)return;try{let e=await Bk.signIn({auth:`poll`,deviceId:c.deviceId});if(e.status===`granted`&&e.catalog){n(e.catalog),l(null),s(t(`已授权。`,`Authorized.`));return}if(e.status===`denied`||e.status===`expired`){l(null),s(e.status===`denied`?t(`授权已被拒绝。`,`Authorization was denied.`):t(`授权已过期,请重试。`,`Authorization expired. Try again.`));return}}catch(e){l(null),s(e instanceof Error?e.message:String(e));return}}})(),()=>{e=!0}},[c]),!e.secrets?.length)return null;let p=async(r,i)=>{s(``);try{n(await Bk.secret(e.pluginId,r,i)),a(e=>({...e,[r]:``})),s(i===null?t(`已移除。`,`Removed.`):t(`已保存。`,`Saved.`))}catch(e){s(e instanceof Error?e.message:String(e))}},m=async t=>{s(``);try{let n=await Bk.signIn({auth:`start`,pluginId:e.pluginId,name:t});d(!1),l({name:t,deviceId:n.deviceId,userCode:n.userCode,verificationUri:n.verificationUri})}catch(e){s(e instanceof Error?e.message:String(e))}},h=async e=>{d(await ef(e))},g=e=>{window.open(e.verificationUri,`_blank`,`noopener,noreferrer`),h(e.userCode)},_=()=>{c&&Bk.signIn({auth:`cancel`,deviceId:c.deviceId}).catch(()=>{}),l(null)};return(0,F.jsxs)(`section`,{className:Vk.configuration,children:[(0,F.jsx)(`h2`,{children:t(`GitHub 授权`,`GitHub authorization`)}),(0,F.jsx)(`p`,{className:Lk.scope,children:t(`令牌只保存在本机,由主程序代为发起请求;插件进程和页面永远读不到它。`,`The token is stored on this machine and used by the host on the plugin's behalf; plugin code and pages can never read it.`)}),e.secrets.map(e=>(0,F.jsxs)(`div`,{className:Vk.configuration,children:[(0,F.jsxs)(`div`,{className:Vk.actions,children:[(0,F.jsx)(`span`,{role:`status`,children:e.configured?t(`已授权`,`Authorized`):t(`未授权`,`Not authorized`)}),e.signIn===`browser`&&(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:r||!!c,onClick:()=>void m(e.name),children:e.configured?t(`重新授权`,`Re-authorize`):t(`在浏览器中授权 GitHub`,`Authorize with GitHub`)}),e.signIn===`token-page`&&e.createUrl&&(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:r,onClick:()=>window.open(e.createUrl,`_blank`,`noopener,noreferrer`),children:t(`打开 GitHub 创建令牌`,`Open GitHub to create a token`)}),e.configured&&(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:r,onClick:()=>void p(e.name,null),children:t(`移除`,`Remove`)})]}),c?.name===e.name&&(0,F.jsxs)(`div`,{className:Lk.scope,role:`status`,children:[(0,F.jsxs)(`ol`,{style:{margin:0,paddingLeft:20,display:`grid`,gap:10},children:[(0,F.jsxs)(`li`,{children:[t(`复制下面的验证码`,`Copy this code`),(0,F.jsxs)(`div`,{className:Vk.actions,style:{marginTop:6},children:[(0,F.jsx)(`code`,{style:{fontSize:28,letterSpacing:4,fontWeight:600,padding:`6px 14px`,border:`1px solid currentColor`,borderRadius:8,userSelect:`all`},children:c.userCode}),(0,F.jsx)(TO,{variant:`outline`,size:`sm`,onClick:()=>void h(c.userCode),children:u?t(`已复制`,`Copied`):t(`复制`,`Copy`)})]})]}),(0,F.jsxs)(`li`,{children:[t(`打开 GitHub 授权页,粘贴验证码并点击 Authorize`,`Open GitHub, paste the code and click Authorize`),(0,F.jsx)(`div`,{className:Vk.actions,style:{marginTop:6},children:(0,F.jsx)(TO,{size:`sm`,onClick:()=>g(c),children:t(`复制验证码并打开 GitHub`,`Copy code and open GitHub`)})})]})]}),(0,F.jsxs)(`div`,{className:Vk.actions,style:{marginTop:10},children:[(0,F.jsx)(`span`,{children:t(`等待授权中… 完成后这里会自动更新。`,`Waiting for authorization… this updates automatically.`)}),(0,F.jsx)(TO,{variant:`outline`,size:`sm`,onClick:_,children:t(`取消`,`Cancel`)})]})]}),(0,F.jsxs)(`details`,{open:e.signIn===`token-page`&&!e.configured,children:[(0,F.jsx)(`summary`,{children:e.signIn===`token-page`?t(`创建后在此粘贴令牌(仅限目标仓库的 fine-grained token,Issues、Pull requests、Contents 读写)`,`Paste the token here after creating it (fine-grained, limited to the target repository, Issues / Pull requests / Contents read-write)`):t(`改用手动粘贴令牌`,`Paste a token instead`)}),(0,F.jsxs)(`div`,{className:Vk.actions,children:[(0,F.jsx)(`input`,{type:`password`,autoComplete:`off`,"aria-label":e.name,value:i[e.name]??``,onChange:t=>a(n=>({...n,[e.name]:t.target.value}))}),(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:r||!(i[e.name]??``).trim(),onClick:()=>void p(e.name,(i[e.name]??``).trim()),children:t(`保存`,`Save`)})]})]})]},e.name)),o&&(0,F.jsx)(`p`,{role:`status`,className:Lk.scope,children:o})]})}function qk(e,t,n){let r={metadata_not_found:n(`官方插件暂未发布,暂不可安装。稍后可重新检查。`,`The official package is not currently published. Check again later.`),tarball_not_found:n(`发行文件暂不可用。请重新检查或稍后重试。`,`The release file is unavailable. Check again or retry later.`),no_compatible_version:n(`暂无适用于此软件版本的插件。稍后可重新检查。`,`No compatible release for this app version. Check again later.`),registry_unreachable:n(`暂时无法访问下载服务。请检查网络后重试。`,`Cannot reach the download service. Check your network and retry.`),download_cancelled:n(`下载已取消。`,`Download cancelled.`),view_barrier:n(`尚未完成所有视图的保存确认,操作已停止。请先处理本页的刷新前视图记录,并检查仍打开的编辑器,然后重试。`,`Save confirmation is still pending for some views, so the operation stopped. Review previous-view records on this page and any open editors, then retry.`),runtime_owned:n(`插件运行时被其他宿主或遗留锁占用,当前无法打开或卸载。请停止所有宿主并校验备份后,按恢复说明处理;重新安装不会清除此锁。`,`Another host or a retained ownership lock blocks this runtime, including opening and uninstalling. Stop all hosts, verify a backup and follow recovery instructions; reinstalling does not clear the lock.`)}[e.code??``]??n(`操作未完成。请查看诊断信息后重试。`,`Operation did not finish. Review diagnostics and retry.`);return(t&&[`metadata_not_found`,`tarball_not_found`,`no_compatible_version`,`registry_unreachable`,`download_cancelled`].includes(e.code??``)?n(`更新未完成,当前插件及数据已保留。`,`Update did not finish; current plugin and data retained. `):``)+r}function Jk({locale:e,generation:t=0,reload:n=0,query:r=``,selectedId:i,visible:a=!0,disabled:o=!1,onSelect:s,onBusyChange:c,onMatchCountChange:l}){let u=(t,n)=>e===`zh`?t:n,[d,f]=(0,P.useState)({plugins:[Rk],offline:!0}),[p,m]=(0,P.useState)(!1),[h,g]=(0,P.useState)(!0),[_,v]=(0,P.useState)(!1),y=(0,P.useRef)(!1),b=(0,P.useRef)(0),x=(0,P.useRef)(new Set);(0,P.useEffect)(()=>{for(let e of d.plugins)e.installed&&x.current.add(e.pluginId)},[d]);let[S,C]=(0,P.useState)(null),[w,T]=(0,P.useState)(null),[E,D]=(0,P.useState)(null),[O,k]=(0,P.useState)(``),[ee,te]=(0,P.useState)(0),[ne,A]=(0,P.useState)(null),re=ne?Gk(ne.operation,e,ne.card.name):null,ie=e=>({message:e instanceof Error?e.message:String(e),code:e?.code});(0,P.useEffect)(()=>{if(y.current)return;let e=++b.current,t=new AbortController;return g(!0),D(null),Bk.catalog(t.signal).then(t=>{e===b.current&&(f(t),m(!0),T(null))}).catch(n=>{!t.signal.aborted&&e===b.current&&(T(ie(n)),f(e=>({...e,offline:!0})))}).finally(()=>{e===b.current&&g(!1)}),()=>{t.abort()}},[t,n,ee]);let j=async(e,t,n=!1)=>{if(y.current||o||h)return;y.current=!0,++b.current,A(null);let r=[`install`,`update`,`check`].includes(t)?crypto.randomUUID():void 0;C(r?{pluginId:e.pluginId,id:r}:null),v(!0),c(!0),D(null),k(``);try{let i=await Bk.manage({pluginId:e.pluginId,operation:t,...r?{downloadId:r}:{},...n?{reopenEditors:!0}:{}});f(i),m(!0),T(null),k(i.plugins.some(e=>e.pendingVersion)?u(`更新已准备好,关闭编辑器后生效。`,`Update ready. Close editors to apply.`):u(`操作完成。`,`Done.`)),window.dispatchEvent(new Event(`pi:hosted-catalog-changed`))}catch(t){D({id:e.pluginId,problem:ie(t)});try{f(await Bk.catalog()),m(!0),window.dispatchEvent(new Event(`pi:hosted-catalog-changed`))}catch{}}finally{y.current=!1,v(!1),c(!1),C(null)}},ae=(e,t)=>{t===`disable`||t===`uninstall`?A({card:e,operation:t}):j(e,t)},oe=d.plugins.some(e=>e.pluginId===Rk.pluginId)?d.plugins:[...d.plugins,Rk],M=oe.find(e=>e.pluginId===i),se=oe.filter(e=>`${e.name} ${e.pluginId} ${le(e)}`.toLowerCase().includes(r.trim().toLowerCase()));(0,P.useEffect)(()=>{l(se.length)},[se.length,l]);let ce=_||h||o||!p||!!d.offline;function le(t){return t.contribution?.entry.description[e]??t.description?.[e]??(t.pluginId===Rk.pluginId?u(`绘制、编辑手绘图表,并将图稿保存到工作区。`,`Draw and edit hand-drawn diagrams, and save them to your workspace.`):u(`按需下载安装的官方插件。`,`An official plugin available on demand.`))}let ue=e=>`${e.name}${e.official?u(`(官方)`,` (Official)`):``}`,de=e=>E?.id===e.pluginId?E.problem:e.error?{code:e.errorCode,message:e.error}:e.updateDiagnostic?.status===`failed`?e.updateDiagnostic:null,fe=e=>p?`${e.installed?u(`已安装`,`Installed`):u(`未安装`,`Not installed`)} · ${e.enabled?u(`已启用`,`Enabled`):u(`未启用`,`Disabled`)}${e.version?` ${e.version}`:``}${e.enabled&&e.phase!==`active`?u(` · 运行时不可用`,` · Runtime unavailable`):``}`:u(`安装状态未知 · 启用状态未知`,`Installation unknown · Enablement unknown`),pe=e=>(0,F.jsx)(`button`,{type:`button`,role:`switch`,className:Lk.switch,"aria-label":u(`启用 ${e.name}`,`Enable ${e.name}`),"aria-checked":p&&e.enabled,disabled:ce||!e.installed,title:p?e.installed?void 0:u(`请先下载插件`,`Download the plugin first`):u(`请先读取插件状态`,`Read plugin status first`),onClick:()=>ae(e,e.enabled?`disable`:`enable`),children:(0,F.jsx)(`span`,{className:Lk.thumb})}),me=e=>{let t=de(e),n=!e.installed&&!!t&&[`metadata_not_found`,`tarball_not_found`,`no_compatible_version`].includes(t.code??``);return(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:ce||n,onClick:()=>ae(e,e.pendingVersion?`retry`:e.installed?`update`:`install`),children:e.pendingVersion?u(`应用待更新版本`,`Apply pending update`):e.installed?u(`更新`,`Update`):n?u(`暂不可下载`,`Unavailable`):e.hasRetainedData||x.current.has(e.pluginId)?u(`重新安装`,`Reinstall`):u(`下载`,`Download`)})};return(0,P.useEffect)(()=>{if(!E||M)return;let e=oe.find(e=>e.pluginId===E.id);Rt({key:`hosted-operation-${E.id}`,message:`${e?`${ue(e)}:`:``}${qk(E.problem,!!e?.installed,u)}`,detail:[E.problem.code,E.problem.message].filter(Boolean).join(`: `),detailLabel:u(`诊断信息`,`Diagnostics`)})},[E]),(0,F.jsxs)(`section`,{className:Vk.section,"data-hosted-management":!0,"aria-busy":_||h,style:a?void 0:{display:`none`},children:[!M&&(0,F.jsxs)(`h2`,{children:[u(`官方插件`,`Official plugins`),` `,(0,F.jsx)(`span`,{children:se.length})]}),w&&(0,F.jsxs)(`div`,{role:`alert`,className:Vk.error,children:[u(`无法读取插件状态,请重试。`,`Cannot read plugin status. Please retry.`),(0,F.jsxs)(`details`,{children:[(0,F.jsx)(`summary`,{children:u(`诊断信息`,`Diagnostics`)}),w.message]}),(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:_||h||o,onClick:()=>te(e=>e+1),children:u(`重试`,`Retry`)})]}),d.dev&&(0,F.jsxs)(`div`,{"data-hosted-dev":!0,children:[d.dev.notices.map((e,t)=>(0,F.jsxs)(`div`,{className:e.level===`info`?Vk.notice:Vk.error,role:e.level===`error`?`alert`:`status`,children:[(0,F.jsxs)(`strong`,{children:[u(`开发模式`,`Dev mode`),e.pluginId?` · ${e.pluginId}`:``]}),`: `,e.message]},t)),d.dev.sources.map(e=>(0,F.jsxs)(`p`,{className:Vk.notice,role:`status`,"data-hosted-dev-source":e.pluginId,children:[u(`开发目录`,`Dev directory`),` · `,(0,F.jsx)(`code`,{children:e.root}),` · `,e.state,e.version?` ${e.version}`:``,e.message?` — ${e.message}`:``]},e.pluginId))]}),O&&(0,F.jsx)(`p`,{className:Vk.notice,role:`status`,children:O}),S&&(0,F.jsx)(TO,{variant:`outline`,onClick:()=>{Bk.manage({pluginId:S.pluginId,operation:`cancel-download`,downloadId:S.id}).then(()=>k(u(`已请求取消,已完成的安装不会回滚。`,`Cancellation requested; committed installations are not rolled back.`))).catch(e=>D({id:S.pluginId,problem:ie(e)}))},children:u(`取消下载(不回滚已提交安装)`,`Cancel download (no rollback after commit)`)}),M?(0,F.jsxs)(`div`,{className:Lk.detail,"data-hosted-detail":M.pluginId,children:[(0,F.jsxs)(`div`,{className:Lk.detailHead,children:[(0,F.jsx)(`span`,{className:Lk.artwork,"aria-hidden":`true`,children:(0,F.jsx)(Wk,{card:M,size:30})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:ue(M)}),(0,F.jsx)(`p`,{children:le(M)})]}),pe(M)]}),(0,F.jsxs)(`dl`,{children:[(0,F.jsx)(`dt`,{children:u(`插件标识`,`Plugin ID`)}),(0,F.jsx)(`dd`,{children:(0,F.jsx)(`code`,{children:M.pluginId})}),(0,F.jsx)(`dt`,{children:u(`来源`,`Source`)}),(0,F.jsx)(`dd`,{children:u(`按需下载的官方插件`,`Official on-demand package`)}),(0,F.jsx)(`dt`,{children:u(`状态`,`Status`)}),(0,F.jsx)(`dd`,{children:fe(M)}),M.availableVersion&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`dt`,{children:u(`可用版本`,`Available release`)}),(0,F.jsx)(`dd`,{children:M.availableVersion})]}),M.pendingVersion&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`dt`,{children:u(`待更新版本`,`Pending release`)}),(0,F.jsx)(`dd`,{children:M.pendingVersion})]})]}),((e,t)=>{let n=de(e),r=e.updateDiagnostic;return n?(0,F.jsxs)(`div`,{className:Vk.error,role:`alert`,children:[qk(n,e.installed,u),(0,F.jsxs)(`details`,{children:[(0,F.jsx)(`summary`,{children:u(`诊断信息`,`Diagnostics`)}),(0,F.jsx)(`code`,{children:n.code}),(0,F.jsx)(`p`,{children:n.message}),r&&(0,F.jsxs)(`p`,{children:[r.checkedAt,` · `,r.hostVersion]}),/lock|owned/i.test(n.message)&&(0,F.jsx)(`p`,{children:u(`停止所有程序并备份后,按 docs/hosted-update-recovery.md 恢复。此页面不会清锁。`,`Stop all hosts and back up data before following docs/hosted-update-recovery.md. This page never clears locks.`)})]}),n.code===`view_barrier`&&(0,F.jsx)(Hk,{pluginId:e.pluginId,t:u})]}):null})(M,!0),(0,F.jsx)(Kk,{card:M,t:u,disabled:ce,onCatalog:e=>{f(e),window.dispatchEvent(new Event(`pi:hosted-catalog-changed`))}}),(0,F.jsxs)(`section`,{className:Vk.configuration,children:[(0,F.jsx)(`h2`,{children:u(`配置与更新`,`Configuration & updates`)}),(0,F.jsx)(`p`,{className:Lk.scope,children:M.icon===`drawing`||M.pluginId===Rk.pluginId?u(`无需额外配置。启用后,可从工作区侧栏打开,也可查看对话中的图稿。图稿保存在工作区,停用或卸载不会删除文件和插件数据。`,`No additional configuration is required. Once enabled, open it from the workspace sidebar or view diagrams in conversations. Disabling or uninstalling retains workspace files and plugin data.`):u(`启用后从工作区侧栏打开。停用或卸载不会删除插件数据。`,`Once enabled, open it from the workspace sidebar. Disabling or uninstalling retains plugin data.`)}),(0,F.jsx)(`p`,{className:Lk.scope,children:u(`兼容的插件可独立更新;软件升级仅在协议不兼容时协调插件版本。`,`Compatible plugins update independently. App upgrades coordinate plugins only when their protocol is incompatible.`)}),(0,F.jsx)(`p`,{className:Lk.scope,children:u(`停用或卸载前会先保存并关闭相关视图;保存失败时不会继续。`,`Disabling or uninstalling first saves and closes related views; a failed save stops the operation.`)}),M.pendingVersion&&(0,F.jsxs)(`p`,{className:Lk.scope,role:`status`,children:[u(`关闭编辑器后更新至:`,`Close editors to update to: `),M.pendingVersion]}),!de(M)&&M.updateDiagnostic?.status===`up-to-date`&&!M.pendingVersion&&(0,F.jsx)(`p`,{className:Lk.scope,children:u(`兼容版本检查已完成。`,`Compatible release check complete.`)}),(0,F.jsxs)(`div`,{className:Vk.actions,children:[me(M),(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:ce,onClick:()=>ae(M,`check`),children:u(`检查更新`,`Check updates`)}),M.installed&&(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:ce,onClick:()=>ae(M,`uninstall`),children:u(`卸载`,`Uninstall`)}),M.pendingVersion&&(0,F.jsx)(TO,{variant:`outline`,size:`sm`,disabled:ce,onClick:()=>A({card:M,operation:`update`,reopen:!0}),children:u(`立即更新并重新打开`,`Update and reopen now`)})]})]})]}):(0,F.jsx)(`ul`,{className:Lk.cards,children:se.map(e=>(0,F.jsxs)(`li`,{className:Lk.card,"data-hosted-card":e.pluginId,children:[(0,F.jsx)(`span`,{className:Lk.artwork,"aria-hidden":`true`,children:(0,F.jsx)(Wk,{card:e,size:30})}),(0,F.jsxs)(`div`,{className:Lk.cardMain,children:[(0,F.jsx)(`button`,{className:Lk.cardOpen,type:`button`,onClick:()=>s({id:e.pluginId,name:e.name}),children:ue(e)}),(0,F.jsx)(`p`,{children:le(e)}),(0,F.jsxs)(`small`,{children:[(0,F.jsx)(`span`,{className:Lk.dot,"data-enabled":p&&e.enabled}),_?u(`正在应用…`,`Applying…`):fe(e),!_&&de(e)&&(0,F.jsx)(`span`,{className:Vk.attention,children:u(` · 需要处理`,` · Needs attention`)})]}),e.pendingVersion?(0,F.jsxs)(`small`,{children:[u(`关闭编辑器后更新至:`,`Close editors to update to: `),e.pendingVersion]}):e.availableVersion&&e.availableVersion!==e.version&&(0,F.jsxs)(`small`,{children:[u(`可用版本:`,`Available release: `),e.availableVersion]})]}),(0,F.jsxs)(`div`,{className:`${Lk.cardEnd} ${Vk.rowActions}`,children:[me(e),pe(e),(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`›`})]})]},e.pluginId))}),(0,F.jsx)(DO,{open:ne!==null,onClose:()=>A(null),title:re?.title??``,closeLabel:u(`关闭`,`Close`),description:re?.description,footer:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(TO,{variant:`outline`,onClick:()=>A(null),children:u(`取消`,`Cancel`)}),(0,F.jsx)(TO,{variant:`primary`,disabled:ce,onClick:()=>{ne&&j(ne.card,ne.operation,ne.reopen)},children:re?.confirm})]})})]})}function Yk({getPluginManagement:e,togglePlugin:t,generation:n=0,recovery:r}){let i=l(),a=(e,t)=>f(i,e,t),o=e=>typeof e==`string`?e:e[i],[s,c]=(0,P.useState)(null),[u,p]=(0,P.useState)(null),[m,h]=(0,P.useState)(null),[g,v]=(0,P.useState)(!1),[y,b]=(0,P.useState)(1),[x,S]=(0,P.useState)(0),[C,w]=(0,P.useState)(``),[T,E]=(0,P.useState)(null),[D,O]=(0,P.useState)(!0),[k,ee]=(0,P.useState)(``),[te,ne]=(0,P.useState)(``),[A,re]=(0,P.useState)(null),ie=(0,P.useRef)(!1),j=(0,P.useRef)(!1),ae=(0,P.useRef)(n),oe=(0,P.useRef)(!0),M=async(t=!0)=>{if(ie.current)j.current=!0;else{ie.current=!0,O(!0),t&&(ee(``),S(e=>e+1));try{let t=await e();oe.current&&c(t)}catch(e){oe.current&&ee(e instanceof Error?e.message:a(`无法读取插件`,`Could not load plugins`))}finally{ie.current=!1,oe.current&&O(!1),j.current&&oe.current&&(j.current=!1,M(!1))}}};(0,P.useEffect)(()=>(oe.current=!0,M(),()=>{oe.current=!1}),[]),(0,P.useEffect)(()=>{ae.current!==n&&(ae.current=n,M(!1))},[n]);let se=async e=>{if(s&&!ie.current){ie.current=!0,E(e.id),ee(``),ne(``),re(null);try{let n=await t({id:e.id,enabled:!e.enabled,expected:s.revision});oe.current&&(c(n),ne(a(`插件配置已保存并生效`,`Plugin settings saved and applied`)))}catch(e){oe.current&&ee((e instanceof Error?e.message:a(`保存失败`,`Could not save`))+a(`。请刷新确认状态;操作不会自动重试。`,`. Refresh to verify the state; this operation is not retried automatically.`))}finally{ie.current=!1,oe.current&&E(null),j.current&&oe.current&&(j.current=!1,M(!1))}}},le=e=>{e.id===d.terminal&&e.enabled?re(e):se(e)},ue=e=>(0,F.jsx)(`button`,{type:`button`,role:`switch`,className:Lk.switch,"aria-label":a(`启用 ${o(e.name)}`,`Enable ${o(e.name)}`),"aria-checked":e.enabled,disabled:D||T!==null||g||!e.managed,title:e.managed?void 0:a(`请在包与扩展中管理 Pi 运行时`,`Manage the Pi runtime under Packages & extensions`),onClick:()=>le(e),children:(0,F.jsx)(`span`,{className:Lk.thumb})}),de=e=>e.id===d.git?(0,F.jsx)(ce,{size:30}):e.id===d.terminal?(0,F.jsx)(`span`,{children:`›_`}):e.id===d.files?(0,F.jsx)(_,{kind:`folder`,size:30}):e.id===d.diagrams?(0,F.jsx)(Ik,{size:30}):(0,F.jsx)(`span`,{children:`◇`}),fe=s?.items.find(e=>e.id===u),pe=s?.items.filter(e=>`${o(e.name)} ${o(e.description)} ${e.id}`.toLowerCase().includes(C.trim().toLowerCase()))??[];return(0,F.jsxs)(`section`,{className:Lk.page,"data-plugin-panel":!0,"aria-busy":D||T!==null,children:[(0,F.jsxs)(`header`,{className:Lk.pageHead,children:[(0,F.jsxs)(`div`,{children:[(fe||m)&&(0,F.jsx)(`div`,{className:Lk.breadcrumb,children:(0,F.jsx)(`button`,{type:`button`,onClick:()=>{p(null),h(null)},children:a(`‹ 插件`,`‹ Plugins`)})}),(0,F.jsx)(`h1`,{children:fe?o(fe.name):m?.name??a(`插件`,`Plugins`)}),(0,F.jsx)(`p`,{children:a(`管理此服务的可选能力,按需启用。`,`Manage optional capabilities on this service.`)})]}),(0,F.jsx)(`button`,{type:`button`,className:Lk.refresh,disabled:D||T!==null||g,onClick:()=>void M(),"aria-label":a(`刷新插件`,`Refresh plugins`),children:D?`…`:`↻`})]}),(0,F.jsx)(`p`,{className:Lk.scope,children:a(`全局设置 · 影响此服务的所有工作区和聊天;所有聊天空闲后才可修改。`,`Global settings · Applies to every workspace and chat on this service. Changes require all chats to be idle.`)}),r,k&&(0,F.jsx)(`p`,{className:Lk.error,role:`alert`,children:k}),te&&(0,F.jsx)(`p`,{className:Lk.notice,role:`status`,children:te}),D&&!s&&(0,F.jsx)(`p`,{role:`status`,children:a(`正在读取插件…`,`Loading plugins…`)}),!s&&!D&&(0,F.jsx)(`button`,{type:`button`,className:Lk.back,onClick:()=>void M(),children:a(`重试`,`Retry`)}),fe?(0,F.jsxs)(`div`,{className:Lk.detail,children:[(0,F.jsxs)(`div`,{className:Lk.detailHead,children:[(0,F.jsx)(`span`,{className:Lk.artwork,"aria-hidden":`true`,children:de(fe)}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{children:o(fe.name)}),(0,F.jsx)(`p`,{children:o(fe.description)})]}),ue(fe)]}),(0,F.jsxs)(`dl`,{children:[(0,F.jsx)(`dt`,{children:a(`插件标识`,`Plugin ID`)}),(0,F.jsx)(`dd`,{children:(0,F.jsx)(`code`,{children:fe.id})}),(0,F.jsx)(`dt`,{children:a(`来源`,`Source`)}),(0,F.jsx)(`dd`,{children:fe.kind===`builtin`?a(`随应用内置`,`Bundled with the application`):a(`Pi 软件包`,`Pi package`)}),(0,F.jsx)(`dt`,{children:a(`状态`,`Status`)}),(0,F.jsx)(`dd`,{children:fe.enabled?a(`已启用`,`Enabled`):a(`已停用`,`Disabled`)}),fe.version&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`dt`,{children:a(`契约版本`,`Contract version`)}),(0,F.jsx)(`dd`,{children:fe.version})]})]}),(0,F.jsx)(`p`,{className:Lk.scope,children:fe.managed?a(`停用会移除入口、关闭相关标签并阻止该插件的后端请求。不会删除工作区文件或聊天记录。`,`Disabling removes entries, closes related tabs and blocks backend requests. Workspace files and chat history are not deleted.`):a(`此插件的 Pi 运行时由软件包管理。当前协议未提供独立、安全卸载该运行时的能力,因此这里仅展示状态,不提供假开关。`,`The Pi package owns this runtime. Its protocol does not expose independent safe teardown, so this page shows its status without a misleading toggle.`)}),fe.id===d.git&&(0,F.jsx)(`p`,{className:Lk.scope,children:a(`关闭 Git 面板不禁止 Agent 或其他终端执行系统 git。`,`Disabling the Git panel does not prevent an agent or another terminal from running system git.`)})]}):s&&!m&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`input`,{type:`search`,className:Lk.search,value:C,onChange:e=>w(e.target.value),placeholder:a(`搜索插件`,`Search plugins`),"aria-label":a(`搜索插件`,`Search plugins`)}),[`builtin`,`external`].map(e=>{let t=pe.filter(t=>t.kind===e);return t.length?(0,F.jsxs)(`section`,{className:Lk.group,children:[(0,F.jsxs)(`h2`,{children:[e===`builtin`?a(`内置能力`,`Built-in capabilities`):a(`已安装的 Web 插件`,`Installed Web plugins`),` `,(0,F.jsx)(`span`,{children:t.length})]}),(0,F.jsx)(`ul`,{className:Lk.cards,children:t.map(e=>(0,F.jsxs)(`li`,{className:Lk.card,"data-plugin-package":e.id,children:[(0,F.jsx)(`span`,{className:Lk.artwork,"aria-hidden":`true`,children:de(e)}),(0,F.jsxs)(`div`,{className:Lk.cardMain,children:[(0,F.jsx)(`button`,{className:Lk.cardOpen,type:`button`,onClick:()=>p(e.id),children:o(e.name)}),(0,F.jsx)(`p`,{children:o(e.description)}),(0,F.jsxs)(`small`,{children:[(0,F.jsx)(`span`,{className:Lk.dot,"data-enabled":e.enabled}),T===e.id?a(`正在应用…`,`Applying…`):e.enabled?a(`已启用`,`Enabled`):a(`已停用`,`Disabled`)]})]}),(0,F.jsxs)(`div`,{className:Lk.cardEnd,children:[ue(e),(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`›`})]})]},e.id))})]},e):null}),!pe.length&&!y&&(0,F.jsx)(`p`,{className:Lk.scope,children:a(`没有匹配的插件`,`No matching plugins`)})]}),(0,F.jsx)(Jk,{locale:i,generation:n,reload:x,query:C,selectedId:m?.id??null,visible:!fe,disabled:D||T!==null,onSelect:h,onBusyChange:v,onMatchCountChange:b}),(0,F.jsx)(DO,{open:A!==null,onClose:()=>re(null),title:a(`停用终端?`,`Disable Terminal?`),closeLabel:a(`关闭`,`Close`),description:a(`这会结束此服务所有聊天中的终端进程。未保存的 shell 工作可能丢失。`,`This ends terminal processes in every chat on this service. Unsaved shell work may be lost.`),footer:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{className:Lk.back,type:`button`,onClick:()=>re(null),children:a(`取消`,`Cancel`)}),(0,F.jsx)(`button`,{className:Lk.danger,type:`button`,onClick:()=>{A&&se(A)},children:a(`停用并结束终端`,`Disable and stop terminals`)})]})})]})}var Xk={root:`_root_1ikfi_1`,trigger:`_trigger_1ikfi_2`,glyph:`_glyph_1ikfi_4`,dot:`_dot_1ikfi_5`,srOnly:`_srOnly_1ikfi_6`};function Zk(e){let t=Tk();return t?(0,F.jsx)($k,{...e,controller:t}):(0,F.jsx)(Qk,{...e})}function Qk(e){let t=Sk(e);return(0,F.jsx)($k,{...e,controller:t})}function $k({wide:e,hideError:t,controller:n}){let r=l(),i=(e,t)=>f(r,e,t),{status:a,checking:o,installing:s,targetVersion:c,restartTimedOut:u,error:d,install:p}=n;if(Bt(`app-update`,t?null:d&&i(`升级未完成,当前版本和数据已保留。可稍后重试。`,`Update did not finish; the current version and data are retained. You can retry.`),d??void 0,i(`诊断信息`,`Diagnostics`)),!a?.available||!a.canRestart)return null;let m=s?i(`正在升级…`,`Updating…`):c?i(`正在重启…`,`Restarting…`):a.downgrade?i(`切换到稳定版`,`Switch to stable`):i(`下载升级`,`Download updates`),h=a.downgrade?i(`按更新偏好切换到稳定版,需要确认后重启`,`Switch to stable based on your preference; confirmation and restart required`):i(`下载并升级到新版本,服务将短暂重启`,`Download and update to the new version; the service will briefly restart`);return(0,F.jsxs)(`div`,{className:Xk.root,children:[(0,F.jsx)(`div`,{className:`pi-settings-trigger-row ${e?``:`pi-settings-trigger-rail`}`,children:(0,F.jsx)(Xe,{label:h,children:(0,F.jsxs)(`button`,{className:`pi-settings-sidebar ${Xk.trigger}`,"data-wide":e,type:`button`,"aria-label":m,disabled:o||s||!!c||u,onClick:()=>{p()},children:[(0,F.jsxs)(`span`,{className:Xk.glyph,children:[(0,F.jsx)(_t,{size:e?16:18}),(0,F.jsx)(`span`,{className:Xk.dot})]}),e&&(0,F.jsx)(`span`,{children:m})]})})}),(s||c)&&(0,F.jsx)(`span`,{className:Xk.srOnly,role:`status`,children:m})]})}var eA=e=>typeof e==`object`&&!!e&&!Array.isArray(e),tA=e=>typeof e==`string`,nA=e=>typeof e==`boolean`,rA=e=>typeof e==`number`&&Number.isFinite(e),iA=e=>t=>t===null||e(t),aA=e=>t=>Array.isArray(t)&&t.every(e),oA=(e,t,n)=>e[t]===void 0||n(e[t]),sA=(e,t)=>t.every(t=>tA(e[t])),cA=(e,t)=>t.every(t=>oA(e,t,tA));function lA(e){return eA(e)&&sA(e,[`id`,`timestamp`])&&[`user`,`assistant`,`tool`,`notice`].includes(e.role)&&aA(e=>eA(e)&&[`text`,`thinking`,`image`,`toolCall`].includes(e.kind)&&tA(e.text)&&cA(e,[`toolName`,`toolCallId`]))(e.blocks)&&cA(e,[`toolName`,`toolCallId`,`model`,`error`])&&oA(e,`isError`,nA)&&oA(e,`usage`,e=>eA(e)&&[`input`,`output`,`cacheRead`,`cacheWrite`,`totalTokens`,`cost`].every(t=>rA(e[t]))&&oA(e,`reasoning`,rA))}function uA(e){return eA(e)&&e.schemaVersion===1&&sA(e,[`sessionId`,`cwd`,`name`])&&iA(tA)(e.model)&&iA(tA)(e.thinkingLevel)&&aA(tA)(e.thinkingLevels)&&nA(e.idle)&&oA(e,`paused`,nA)&&oA(e,`hasPendingPrompts`,nA)&&oA(e,`promptQueue`,e=>eA(e)&&aA(tA)(e.steering)&&aA(tA)(e.followUp))&&oA(e,`queuedPrompts`,aA(e=>eA(e)&&sA(e,[`id`,`text`])&&Number.isSafeInteger(e.revision)&&e.revision>0&&[`queued`,`sending`].includes(e.status)&&oA(e,`error`,tA)&&aA(e=>eA(e)&&tA(e.name)&&nA(e.image))(e.attachments)))&&iA(e=>eA(e)&&iA(rA)(e.tokens)&&rA(e.contextWindow)&&iA(rA)(e.percent))(e.contextUsage)&&aA(lA)(e.messages)&&aA(e=>eA(e)&&sA(e,[`id`,`pluginId`,`kind`,`timestamp`])&&oA(e,`afterMessageId`,tA))(e.pluginEntries)&&oA(e,`interactions`,aA(e=>eA(e)&&sA(e,[`requestId`,`sessionId`,`pluginId`,`kind`])))&&oA(e,`streaming`,iA(lA))}function dA(e){return eA(e)&&iA(tA)(e.activeId)&&aA(e=>eA(e)&&sA(e,[`id`,`path`,`title`])&&oA(e,`available`,nA))(e.items)&&aA(e=>eA(e)&&sA(e,[`id`,`workspaceId`,`name`,`modified`])&&iA(tA)(e.path)&&oA(e,`idle`,nA))(e.sessions)}function fA(e){return eA(e)&&e.type===`error`&&tA(e.message)&&cA(e,[`errorCode`,`errorId`,`requestId`,`operationId`])&&oA(e,`errorReported`,nA)}function pA(e){if(!eA(e)||!tA(e.type))throw Error(`Invalid stream event`);switch(e.type){case`snapshot`:if(eA(e.session)&&e.session.schemaVersion!==1)throw Error(`Unsupported session schema`);if(uA(e.session))return{type:`snapshot`,session:e.session};throw Error(`Invalid session snapshot`);case`stream`:if(e.message===null||lA(e.message))return{type:`stream`,message:e.message};break;case`workspaces`:if(dA(e.value))return{type:`workspaces`,value:e.value};break;case`shutdown`:if(oA(e,`reconnect`,nA))return{type:`shutdown`,...e.reconnect===void 0?{}:{reconnect:e.reconnect}};break;case`plugins_changed`:return{type:`plugins_changed`};case`hosted_plugins_changed`:return{type:`hosted_plugins_changed`};case`plugin_state`:if(Array.isArray(e.disabled)&&e.disabled.every(e=>typeof e==`string`&&e.length<=200))return{type:`plugin_state`,disabled:e.disabled};break;case`error`:if(fA(e))return e;break;default:throw Error(`Unsupported stream event`)}throw Error(`Invalid stream event`)}var mA=ve();async function hA(e,n,r){return t(await s(e,{method:`POST`,headers:{Authorization:`Bearer ${mA}`,"Content-Type":`application/json`},body:JSON.stringify(n),signal:r}))}async function gA(e){return t(await s(e,{headers:{Authorization:`Bearer ${mA}`}}))}function _A(){let e=l(),[n,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(null),[c,u]=(0,P.useState)(mA?`connecting`:`missing-token`),[d,f]=(0,P.useState)(``),[p,m]=(0,P.useState)([]),[h,g]=(0,P.useState)(`loading`),[_,v]=(0,P.useState)([]),[y,b]=(0,P.useState)({items:[],activeId:null,sessions:[]}),[x,S]=(0,P.useState)(null),[C,w]=(0,P.useState)([]),[T,E]=(0,P.useState)(0);return(0,P.useEffect)(()=>{if(!mA)return;let e=new AbortController,n,a=!0,c=!1;return(async()=>{for(;a;){let l,d,p=`stream_connect`;try{u(`connecting`);let n=await s(`/api/events`,{headers:{Authorization:`Bearer ${mA}`},cache:`no-store`,signal:e.signal}),{response:m}=n;if(d=n.correlation,m.ok||await t(n),!m.body)throw Error(m.status===401?r(`访问令牌无效,请在 Pi 中重新输入 /web。`,`Invalid access token. Run /web again in Pi.`):r(`连接 Pi 失败`,`Could not connect to Pi`));u(`connected`),he({connection:`connected`}),ye(`stream_connected`,{...d}),f(``),l=m.body.getReader();let h=new TextDecoder,g=``;for(;a;){p=`stream_read`;let{done:e,value:t}=await l.read();if(e)break;p=`stream_event`,g+=h.decode(t,{stream:!0});let n=g.indexOf(`
62
+ `);for(;n!==-1;){let e=g.slice(0,n);if(g=g.slice(n+1),e){let t;try{t=pA(JSON.parse(e))}catch(e){let t=e instanceof SyntaxError?Error(`Invalid event JSON`):e;throw _e(t,{...d,stage:`ndjson_parse`}),t}if(t.type===`shutdown`){if(l.cancel().catch(()=>{}),t.reconnect===!0)throw new DOMException(`Pi web service is restarting`,`AbortError`);a=!1,u(`disconnected`),he({connection:`disconnected`}),ye(`bridge_shutdown`),f(r(`Pi 网页服务已关闭,请在 Pi 中重新输入 /web。`,`The Pi web service stopped. Run /web again in Pi.`));return}if(t.type===`snapshot`&&(i(t.session),he({sessionId:t.session.sessionId,idle:t.session.idle,model:t.session.model,thinkingLevel:t.session.thinkingLevel,messageCount:t.session.messages?.length??0}),(t.session.idle||`streaming`in t.session)&&o(t.session.streaming??null)),t.type===`stream`){let e=t.message!==null;e&&f(``),e!==c&&ye(e?`stream_start`:`stream_end`),c=e,o(t.message)}t.type===`workspaces`&&b(t.value),t.type===`error`&&(f(t.message),!t.errorId&&!t.errorReported&&t.errorCode!==`validation_error`&&_e(Error(`Agent response failed`),{stage:`agent`,code:`agent_failed`,requestId:t.requestId,operationId:t.operationId}),ye(`agent_error`,{errorId:t.errorId,requestId:t.requestId,operationId:t.operationId})),t.type===`plugins_changed`&&window.location.reload(),t.type===`hosted_plugins_changed`&&E(e=>e+1),t.type===`plugin_state`&&(w(t.disabled),E(e=>e+1))}n=g.indexOf(`
63
+ `)}}throw p=`stream_end`,Error(r(`Pi 网页连接已关闭`,`The Pi web connection has closed`))}catch(e){if(l?.cancel().catch(()=>{}),!a)return;he({connection:`disconnected`});let t={...d,route:`/api/events`,stage:p,connection:`disconnected`};_e(e,t),ye(`stream_disconnected`,t),u(`disconnected`),g(`loading`),f(e instanceof Error?e.message:r(`连接 Pi 失败`,`Could not connect to Pi`)),await new Promise(e=>{n=setTimeout(e,1500)})}}})(),()=>{a=!1,e.abort(),n&&clearTimeout(n)}},[]),(0,P.useEffect)(()=>{mA||f(r(`请在 Pi 终端输入 /web,打开显示的完整地址。`,`Enter /web in the Pi terminal and open the full address shown.`))},[e]),(0,P.useEffect)(()=>{if(c!==`connected`)return;let e=!0;return g(`loading`),gA(`/api/plugin-management`).then(t=>{e&&w(t.items.filter(e=>!e.enabled).map(e=>e.id))}).catch(()=>{}),gA(`/api/models`).then(t=>{e&&(m(t),g(`ready`))}).catch(t=>{e&&(g(`error`),f(t instanceof Error?t.message:r(`无法获取模型列表`,`Could not load the model list`)))}),gA(`/api/commands`).then(t=>{e&&v(t)}).catch(()=>{e&&v([])}),()=>{e=!1}},[c,n?.sessionId]),(0,P.useEffect)(()=>{if(c!==`connected`)return;let e=!0;return gA(`/api/workspaces`).then(t=>{e&&b(t)}).catch(()=>{}),gA(`/api/directory/capability`).then(t=>{e&&S(t.kind)}).catch(()=>{e&&S(`browse`)}),()=>{e=!1}},[c]),{session:n,streaming:a,connection:c,error:d,models:p,modelsStatus:h,commands:_,workspaces:y,directoryPickerKind:x,async resolvePluginInteraction(e,t,r){if(!n)throw Error(`No active session`);await hA(`/api/plugin-interaction`,{sessionId:n.sessionId,pluginId:e,requestId:t,value:r})},plugins:()=>gA(`/api/plugins`),async invokePluginAction(e,t,i){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));return(await hA(`/api/plugin-action`,{sessionId:n.sessionId,pluginId:e,action:t,input:i})).value},async pickDirectory(){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));return(await hA(`/api/directory/pick`,{sessionId:n.sessionId})).path},async listDirectory(e,t){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));return hA(`/api/directory/list`,{sessionId:n.sessionId,...e===void 0?{}:{path:e}},t)},async createDirectory(e,t){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));return(await hA(`/api/directory/create`,{sessionId:n.sessionId,path:e,name:t})).path},disabledPlugins:C,pluginGeneration:T,getPluginManagement:()=>gA(`/api/plugin-management`),async togglePlugin(e){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));return hA(`/api/plugin-management`,{sessionId:n.sessionId,...e})},clearError:()=>f(``),async upload(e,i){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));let a=`/api/attachment?sessionId=${encodeURIComponent(n.sessionId)}&name=${encodeURIComponent(e.name)}`,o=await s(a,{method:`POST`,headers:{Authorization:`Bearer ${mA}`,"Content-Type":e.type||`application/octet-stream`},body:e,signal:i});if(o.response.status===404)throw Error(r(`当前 Pi 桥接服务仍是旧版。请在 Pi 中输入 /reload,再输入 /web 并打开新地址,然后重试上传。`,`The Pi bridge is outdated. Run /reload, then /web in Pi, open the new address, and retry the upload.`));return await t(o)},async discardAttachment(e){n&&c===`connected`&&await hA(`/api/attachment/remove`,{sessionId:n.sessionId,id:e})},async updateQueuedPrompt(e,t,i){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/prompt-queue`,{sessionId:n.sessionId,id:e,revision:t,action:i})},async send(e,t=[],i){if(n&&c===`connected`){f(``);try{await hA(`/api/message`,{sessionId:n.sessionId,text:e,attachments:t,delivery:i})}catch(e){throw f(e instanceof Error?e.message:r(`发送失败`,`Send failed`)),e}}},async loadMessageImage(e,i){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));let a=`/api/image?sessionId=${encodeURIComponent(n.sessionId)}&messageId=${encodeURIComponent(e)}&index=${i}`,o=await s(a,{headers:{Authorization:`Bearer ${mA}`}});o.response.ok||await t(o);try{return await o.response.blob()}catch(e){throw _e(e,{...o.correlation,stage:`image_read`}),e}},async stop(){if(n&&c===`connected`)try{await hA(`/api/abort`,{sessionId:n.sessionId}),f(``)}catch(e){throw f(e instanceof Error?e.message:r(`停止失败`,`Could not stop`)),e}},async resume(){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));f(``);try{await hA(`/api/resume`,{sessionId:n.sessionId})}catch(e){throw f(e instanceof Error?e.message:r(`继续失败`,`Could not continue`)),e}},async compact(){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));try{await hA(`/api/compact`,{sessionId:n.sessionId}),f(``)}catch(e){throw f(e instanceof Error?e.message:r(`压缩失败`,`Compaction failed`)),e}},async newSession(){if(n&&c===`connected`)try{await hA(`/api/new-session`,{sessionId:n.sessionId})}catch(e){throw f(e instanceof Error?e.message:r(`无法创建新会话`,`Could not create a new session`)),e}},async addWorkspace(e,t){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/workspace/add`,{sessionId:n.sessionId,path:e,create:t})},async selectWorkspace(e){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/workspace/select`,{sessionId:n.sessionId,id:e})},async newSessionInWorkspace(e){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/workspace/new-session`,{sessionId:n.sessionId,id:e})},async removeWorkspace(e){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/workspace/remove`,{sessionId:n.sessionId,id:e})},async selectSession(e,t,i){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/session/select`,{sessionId:n.sessionId,workspaceId:e,id:t,path:i??``})},async renameSession(e,t,i,a){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/session/rename`,{sessionId:n.sessionId,workspaceId:e,id:t,path:i??``,name:a})},async deleteSession(e,t,i){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/session/delete`,{sessionId:n.sessionId,workspaceId:e,id:t,path:i??``})},async setModel(e,t){if(n&&c===`connected`)try{await hA(`/api/model`,{sessionId:n.sessionId,provider:e,id:t}),f(``)}catch(e){throw f(e instanceof Error?e.message:r(`切换模型失败`,`Could not change model`)),e}},async setThinkingLevel(e){if(n&&c===`connected`)try{await hA(`/api/thinking-level`,{sessionId:n.sessionId,level:e}),f(``)}catch(e){throw f(e instanceof Error?e.message:r(`切换推理强度失败`,`Could not change reasoning effort`)),e}},async getConfig(){return gA(`/api/config`)},async getUpdate(){return gA(`/api/update`)},async getRunningVersion(e){return t(await s(`/api/update/version`,{headers:{Authorization:`Bearer ${mA}`},signal:e},{expectedNetworkFailure:!0}))},async setUpdateChannel(e){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));return hA(`/api/update/channel`,{sessionId:n.sessionId,channel:e})},async cancelUpdate(){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/update/cancel`,{sessionId:n.sessionId})},async update(e){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));return hA(`/api/update`,{sessionId:n.sessionId,...e})},async getProviders(){return gA(`/api/providers`)},async getProviderModels(e){return gA(`/api/provider/models?providerId=${encodeURIComponent(e)}`)},async updateProviderModel(e,t){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/provider/models`,{sessionId:n.sessionId,providerId:e,change:t});try{m(await gA(`/api/models`)),g(`ready`)}catch{f(r(`模型已保存,但会话模型列表暂时无法刷新。`,`Model saved, but the conversation model list could not refresh.`))}},async logoutProvider(e){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/provider/logout`,{sessionId:n.sessionId,providerId:e});try{m(await gA(`/api/models`)),g(`ready`)}catch{f(r(`认证已移除,但会话模型列表暂时无法刷新。`,`Credentials removed, but the conversation model list could not refresh.`))}},async addCustomProvider(e){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/provider/custom`,{sessionId:n.sessionId,provider:e})},async startProviderLogin(e,t,i){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));return hA(`/api/provider/login`,{sessionId:n.sessionId,providerId:e,method:t,...i===void 0?{}:{initialSecret:i}})},async getProviderLogin(e){return gA(`/api/provider/login?id=${encodeURIComponent(e)}`)},async getActiveProviderLogin(){return(await gA(`/api/provider/login/active`)).active},async respondProviderLogin(e,t){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));await hA(`/api/provider/login/respond`,{sessionId:n.sessionId,id:e,value:t})},async cancelProviderLogin(e){n&&c===`connected`&&await hA(`/api/provider/login/cancel`,{sessionId:n.sessionId,id:e})},async refreshModels(){m(await gA(`/api/models`)),g(`ready`)},async updateConfig(e,t,i,a){if(!n||c!==`connected`)throw Error(r(`Pi 会话不可用`,`Pi session is unavailable`));return hA(`/api/config`,{sessionId:n.sessionId,kind:e,scope:t,action:i,value:a})}}}var vA=2;function yA(e,t,n){let r=e.position?.start.offset;return r===void 0?-(n+1):t+r}function bA(e,t){for(let n=t;n<e.length;n+=1){let t=e[n];if(t===`
64
+ `)return n+1;if(t===`\r`)return e[n+1]===`
65
+ `?n+2:n+1}}function xA(e){let t=0,n=0;for(let r=0;r<e.length;r+=1){let i=e[r];i===`
66
+ `?(t=n,n=r+1):i!==`\r`||r+1>=e.length||(e[r+1]===`
67
+ `&&(r+=1),t=n,n=r+1)}return t}function SA(e){return e.endsWith(`\r
68
+ `)?`\r
69
+ `:e.endsWith(`\r`)?`\r`:`
70
+ `}function CA(e,t,n){let r=0;for(;r<=e.length;){let i=r;for(;i<e.length&&e[i]!==`
71
+ `&&e[i]!==`\r`;)i+=1;let a=e.slice(r,i),o=0;for(;o<3&&a[o]===` `;)o+=1;let s=o;for(;a[s]===t;)s+=1;if(s-o>=n&&/^[ \t]*$/.test(a.slice(s)))return!0;if(i===e.length)return!1;r=e[i]===`\r`&&e[i+1]===`
72
+ `?i+2:i+1}return!1}function wA(e,t,n){let r=e.line,i=e.column,a=n;for(let e of t)e===`
73
+ `?(a||(r+=1),i=1,a=!1):e===`\r`?(r+=1,i=1,a=!0):(i+=1,a=!1);return{line:r,column:i,offset:e.offset+t.length}}var TA=class{parse;prevText=``;tailStart=0;frozen=[];generation=0;cached=null;openFence=null;constructor(e){this.parse=e}fenceValue(e,t){let n=this.parse(`${e.syntheticPrefix}${t}`);if(n.children.length!==1)return;let r=n.children[0];return r.type===`code`?r.value:void 0}openFenceState(e,t,n,r){let i=n.length-1,a=n[i];if(a?.node.type!==`code`)return null;let o=a.node,s=o.position?.start.offset,c=o.position?.end;if(s===void 0||c?.offset===void 0||t+c.offset!==e.length)return null;let l=e.slice(t),u=l.lastIndexOf(`
74
+ `,s-1),d=l.lastIndexOf(`\r`,s-1),f=Math.max(u,d)+1,p=bA(l,s);if(p===void 0||p===l.length&&l.endsWith(`\r`))return null;let m=l.slice(f,p).replace(/[\r\n]+$/,``),h=/^( {0,3})(`{3,}|~{3,})/.exec(m);if(h===null)return null;let g=h[1],_=h[2];if(f+g.length!==s)return null;let v=_[0],y=t+p,b=e.slice(y);if(CA(b,v,_.length))return null;let x=`${g}${_}\n`,S=xA(b),C=S===0?``:this.fenceValue({syntheticPrefix:x},b.slice(0,S));if(C===void 0)return null;let w=y+S,T=b.slice(0,S),E=S===0?``:`${C}${SA(T)}`,D=this.fenceValue({syntheticPrefix:x},e.slice(w));return D===void 0||`${E}${D}`!==o.value?null:{marker:v,markerLength:_.length,syntheticPrefix:x,codeIndex:i,frozen:r,tail:n,pendingStart:w,valuePrefix:E,end:{line:c.line,column:c.column,offset:c.offset},endedWithCarriageReturn:e.endsWith(`\r`)}}updateOpenFence(e,t,n){let r=t.slice(e.pendingStart);if(CA(r,e.marker,e.markerLength))return;let i=this.fenceValue(e,r);if(i===void 0)return;let a=xA(r),o=a===0?``:this.fenceValue(e,r.slice(0,a));if(o===void 0)return;let s=e.tail[e.codeIndex].node,c=wA(e.end,t.slice(n.length),e.endedWithCarriageReturn),l={...s,value:`${e.valuePrefix}${i}`,position:{start:s.position.start,end:c}},u=e.tail.map((t,n)=>n===e.codeIndex?{...t,node:l}:t),d={frozen:e.frozen,tail:u,generation:this.generation};return this.openFence={...e,tail:u,pendingStart:e.pendingStart+a,valuePrefix:a===0?e.valuePrefix:`${e.valuePrefix}${o}${SA(r.slice(0,a))}`,end:c,endedWithCarriageReturn:t.endsWith(`\r`)},d}update(e){if(this.cached!==null&&e===this.prevText)return this.cached;e.startsWith(this.prevText)||(this.prevText=``,this.tailStart=0,this.frozen=[],this.openFence=null,this.generation+=1);let t=this.prevText;if(t!==``&&this.openFence!==null){let n=this.updateOpenFence(this.openFence,e,t);if(n!==void 0)return this.prevText=e,this.cached=n,n;this.openFence=null}this.prevText=e;let n=this.tailStart,r=this.parse(e.slice(n)).children,i=Math.max(0,r.length-vA);if(i>0){let e=r[i-1]?.position?.end.offset;if(e===void 0)i=0;else{for(let e of r.slice(0,i))this.frozen.push({node:e,key:yA(e,n,this.frozen.length)});this.tailStart=n+e}}let a=r.slice(i).map((e,t)=>({node:e,key:yA(e,n,t)}));return this.cached={frozen:[...this.frozen],tail:a,generation:this.generation},this.openFence=this.openFenceState(e,n,a,this.cached.frozen),this.cached}};Object.freeze({angular:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F8ECEF" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#DD0031" d="M16.712 17.711H7.288l-1.204 2.916L12 24l5.916-3.373-1.204-2.916ZM14.692 0l7.832 16.855.814-12.856L14.692 0ZM9.308 0 .662 3.999l.814 12.856L9.308 0Zm-.405 13.93h6.198L12 6.396 8.903 13.93Z"/></g>`,c:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#EEF4F8" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#659AD2" d="M16.5921 9.1962s-.354-3.298-3.627-3.39c-3.2741-.09-4.9552 2.474-4.9552 6.14 0 3.6651 1.858 6.5972 5.0451 6.5972 3.184 0 3.5381-3.665 3.5381-3.665l6.1041.365s.36 3.31-2.196 5.836c-2.552 2.5241-5.6901 2.9371-7.8762 2.9201-2.19-.017-5.2261.034-8.1602-2.97-2.938-3.0101-3.436-5.9302-3.436-8.8002 0-2.8701.556-6.6702 4.047-9.5502C7.444.72 9.849 0 12.254 0c10.0422 0 10.7172 9.2602 10.7172 9.2602z"/></g>`,clojure:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F1F7EC" stroke="#DCEAD2" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><g fill="none"><path d="M64 0C28.712 0 0 28.6 0 63.751c0 35.155 28.712 63.753 64 63.753s64-28.598 64-63.753C128 28.6 99.288 0 64 0" fill="#FFF"/><path d="M61.659 64.898a265.825 265.825 0 00-1.867 4.12c-2.322 5.241-4.894 11.62-5.834 15.706-.337 1.455-.546 3.258-.542 5.258 0 .79.043 1.622.11 2.469a30.74 30.74 0 0010.533 1.87 30.796 30.796 0 009.642-1.566 18.09 18.09 0 01-2.011-2.12c-4.11-5.221-6.403-12.872-10.031-25.737M46.485 38.96c-7.85 5.51-12.986 14.6-13.005 24.9.019 10.145 5.001 19.116 12.653 24.65 1.877-7.789 6.582-14.92 13.637-29.214a114.691 114.691 0 00-1.43-3.72c-1.955-4.884-4.776-10.556-7.294-13.124-1.283-1.342-2.84-2.502-4.561-3.492" fill="#91DC47"/><path d="M90.697 98.798c-4.05-.506-7.392-1.116-10.317-2.144a36.708 36.708 0 01-16.32 3.807c-20.293 0-36.742-16.383-36.745-36.602 0-10.97 4.852-20.805 12.528-27.512-2.053-.495-4.194-.783-6.38-.779-10.782.101-22.162 6.044-26.9 22.095-.443 2.337-.337 4.103-.337 6.197 0 31.818 25.895 57.613 57.835 57.613 19.561 0 36.841-9.682 47.305-24.489-5.66 1.405-11.103 2.077-15.763 2.091-1.747 0-3.387-.093-4.906-.277" fill="#63B132"/><path d="M79.829 87.634c.357.176 1.167.464 2.293.783 7.579-5.542 12.504-14.469 12.523-24.558h-.003c-.028-16.82-13.693-30.43-30.582-30.462a30.765 30.765 0 00-9.602 1.554c6.21 7.05 9.196 17.127 12.084 28.148l.005.013c.005.009.924 3.06 2.501 7.11 1.566 4.042 3.797 9.048 6.23 12.696 1.597 2.444 3.354 4.2 4.551 4.716" fill="#90B4FE"/><path d="M17.057 30.311c5.463-3.408 11.04-4.637 15.908-4.593 6.722.02 12.008 2.096 14.544 3.516.612.352 1.194.73 1.764 1.12a36.714 36.714 0 0114.786-3.096c20.295.003 36.747 16.386 36.75 36.601-.003 10.192-4.188 19.408-10.934 26.044a45.3 45.3 0 005.225.29c6.406.004 13.329-1.404 18.52-5.753 3.384-2.84 6.22-6.998 7.792-13.233.307-2.408.484-4.856.484-7.347 0-31.817-25.892-57.614-57.835-57.614-19.372 0-36.508 9.5-47.004 24.065z" fill="#5881D8"/></g></svg>`,cmake:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F2F5F7" stroke="#D9E1E7" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#064F8C" d="M62.8.4L.3 123.8l68.1-57.9z"/><path fill="#249847" d="M123.8 127.7l-84-33.9L0 127.7z"/><path fill="#BE2128" d="M128 126.6L65.6 2.5l9.2 102.6z"/><path fill="#CDCDCE" d="M71.9 104l-3.1-34.9L42 92z"/></svg>`,cpp:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#E8F2F8" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#00599C" d="M22.394 6c-.167-.29-.398-.543-.652-.69L12.926.22c-.509-.294-1.34-.294-1.848 0L2.26 5.31c-.508.293-.923 1.013-.923 1.6v10.18c0 .294.104.62.271.91.167.29.398.543.652.69l8.816 5.09c.508.293 1.34.293 1.848 0l8.816-5.09c.254-.147.485-.4.652-.69.167-.29.27-.616.27-.91V6.91c.003-.294-.1-.62-.268-.91zM12 19.11c-3.92 0-7.109-3.19-7.109-7.11 0-3.92 3.19-7.11 7.11-7.11a7.133 7.133 0 016.156 3.553l-3.076 1.78a3.567 3.567 0 00-3.08-1.78A3.56 3.56 0 008.444 12 3.56 3.56 0 0012 15.555a3.57 3.57 0 003.08-1.778l3.078 1.78A7.135 7.135 0 0112 19.11zm7.11-6.715h-.79v.79h-.79v-.79h-.79v-.79h.79v-.79h.79v.79h.79zm2.962 0h-.79v.79h-.79v-.79h-.79v-.79h.79v-.79h.79v.79h.79z"/></g>`,csharp:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F3EEF7" stroke="#E2D7EA" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#9B4F96" d="M115.4 30.7L67.1 2.9c-.8-.5-1.9-.7-3.1-.7-1.2 0-2.3.3-3.1.7l-48 27.9c-1.7 1-2.9 3.5-2.9 5.4v55.7c0 1.1.2 2.4 1 3.5l106.8-62c-.6-1.2-1.5-2.1-2.4-2.7z"/><path fill="#68217A" d="M10.7 95.3c.5.8 1.2 1.5 1.9 1.9l48.2 27.9c.8.5 1.9.7 3.1.7 1.2 0 2.3-.3 3.1-.7l48-27.9c1.7-1 2.9-3.5 2.9-5.4V36.1c0-.9-.1-1.9-.6-2.8l-106.6 62z"/><path fill="#fff" d="M85.3 76.1C81.1 83.5 73.1 88.5 64 88.5c-13.5 0-24.5-11-24.5-24.5s11-24.5 24.5-24.5c9.1 0 17.1 5 21.3 12.5l13-7.5c-6.8-11.9-19.6-20-34.3-20-21.8 0-39.5 17.7-39.5 39.5s17.7 39.5 39.5 39.5c14.6 0 27.4-8 34.2-19.8l-12.9-7.6zM97 66.2l.9-4.3h-4.2v-4.7h5.1L100 51h4.9l-1.2 6.1h3.8l1.2-6.1h4.8l-1.2 6.1h2.4v4.7h-3.3l-.9 4.3h4.2v4.7h-5.1l-1.2 6h-4.9l1.2-6h-3.8l-1.2 6h-4.8l1.2-6h-2.4v-4.7H97zm4.8 0h3.8l.9-4.3h-3.8l-.9 4.3z"/></svg>`,css:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#1572B6"/><text x="10" y="12.8" text-anchor="middle" font-family="Arial,sans-serif" font-size="6.2" font-weight="900" fill="#fff">CSS</text>`,dart:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#ECF7FA" stroke="#D5EAF0" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#00c4b3" d="M35.2 34.9l-8.3-8.3v59.7l.1 2.8c0 1.3.2 2.8.7 4.3l65.6 23.1 16.3-7.2-74.4-74.4z"/><path d="M27.7 93.4zm81.9 15.9l-16.3 7.2-65.4-23.1c1.3 4.8 4 10.1 7 13.2l21.3 21.2 47.6.1 5.8-18.6z" fill="#22d3c5"/><path fill="#0075c9" d="M1.7 65.1C-.4 67.3.7 72 4 75.5l14.7 14.8 9.2 3.3c-.3-1.5-.7-3-.7-4.3l-.1-2.8-.2-59.8m82.7 82.6l7.2-16.4-23-65.6c-1.5-.3-3-.6-4.3-.7l-2.9-.1-59.6.1"/><path d="M93.6 27.3c.2 0 .2 0 0 0 .2 0 .2 0 0 0zm16 82l17.7-5.8V54.8l-20.4-20.5c-3-3-8.3-5.8-13.2-7l23.1 65.6" fill="#00a8e1"/><path fill="#00c4b3" d="M90.5 18.2L75.7 3.5c-3.4-3.4-8-4.4-10.4-2.3L26.9 26.6h59.5l2.9.1c1.3 0 2.8.2 4.3.7l-3.1-9.2z"/></svg>`,docker:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#E8F4FC" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#2496ED" d="M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"/></g>`,elixir:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F3EEF6" stroke="#E3D9E8" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><linearGradient id="__DSH_CODE_ICON_INSTANCE__elixir-original-a" gradientUnits="userSpaceOnUse" x1="835.592" y1="-36.546" x2="821.211" y2="553.414" gradientTransform="matrix(.1297 0 0 .2 -46.03 17.198)"><stop offset="0" stop-color="#d9d8dc"/><stop offset="1" stop-color="#fff" stop-opacity=".385"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSH_CODE_ICON_INSTANCE__elixir-original-a)" d="M64.4.5C36.7 13.9 1.9 83.4 30.9 113.9c26.8 33.5 85.4 1.3 68.4-40.5-21.5-36-35-37.9-34.9-72.9z"/><linearGradient id="__DSH_CODE_ICON_INSTANCE__elixir-original-b" gradientUnits="userSpaceOnUse" x1="942.357" y1="-40.593" x2="824.692" y2="472.243" gradientTransform="matrix(.1142 0 0 .2271 -47.053 17.229)"><stop offset="0" stop-color="#8d67af" stop-opacity=".672"/><stop offset="1" stop-color="#9f8daf"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSH_CODE_ICON_INSTANCE__elixir-original-b)" d="M64.4.2C36.8 13.6 1.9 82.9 31 113.5c10.7 12.4 28 16.5 37.7 9.1 26.4-18.8 7.4-53.1 10.4-78.5C68.1 33.9 64.2 11.3 64.4.2z"/><linearGradient id="__DSH_CODE_ICON_INSTANCE__elixir-original-c" gradientUnits="userSpaceOnUse" x1="924.646" y1="120.513" x2="924.646" y2="505.851" gradientTransform="matrix(.1227 0 0 .2115 -46.493 17.206)"><stop offset="0" stop-color="#26053d" stop-opacity=".762"/><stop offset="1" stop-color="#b7b4b4" stop-opacity=".278"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSH_CODE_ICON_INSTANCE__elixir-original-c)" d="M56.7 4.3c-22.3 15.9-28.2 75-24.1 94.2 8.2 48.1 75.2 28.3 69.6-16.5-6-29.2-48.8-39.2-45.5-77.7z"/><linearGradient id="__DSH_CODE_ICON_INSTANCE__elixir-original-d" gradientUnits="userSpaceOnUse" x1="428.034" y1="198.448" x2="607.325" y2="559.255" gradientTransform="matrix(.1848 0 0 .1404 -42.394 17.138)"><stop offset="0" stop-color="#91739f" stop-opacity=".46"/><stop offset="1" stop-color="#32054f" stop-opacity=".54"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSH_CODE_ICON_INSTANCE__elixir-original-d)" d="M78.8 49.8c10.4 13.4 12.7 22.6 6.8 27.9-27.7 19.4-61.3 7.4-54-37.3C22.1 63 4.5 96.8 43.3 101.6c20.8 3.6 54 2 58.9-16.1-.2-15.9-10.8-22.9-23.4-35.7z"/><linearGradient id="__DSH_CODE_ICON_INSTANCE__elixir-original-e" gradientUnits="userSpaceOnUse" x1="907.895" y1="540.636" x2="590.242" y2="201.281" gradientTransform="matrix(.1418 0 0 .1829 -45.23 17.18)"><stop offset="0" stop-color="#463d49" stop-opacity=".331"/><stop offset="1" stop-color="#340a50" stop-opacity=".821"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSH_CODE_ICON_INSTANCE__elixir-original-e)" d="M38.1 36.4c-2.9 21.2 35.1 77.9 58.3 71-17.7 35.6-56.9-21.2-64-41.7 1.5-11 2.2-16.4 5.7-29.3z"/><linearGradient id="__DSH_CODE_ICON_INSTANCE__elixir-original-f" gradientUnits="userSpaceOnUse" x1="1102.297" y1="100.542" x2="1008.071" y2="431.648" gradientTransform="matrix(.106 0 0 .2448 -47.595 17.242)"><stop offset="0" stop-color="#715383" stop-opacity=".145"/><stop offset="1" stop-color="#f4f4f4" stop-opacity=".234"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSH_CODE_ICON_INSTANCE__elixir-original-f)" d="M60.4 49.7c.8 7.9 3.9 20.5 0 28.8S38.7 102 43.6 115.3c11.4 24.8 37.1-4.4 36.9-19 1.1-11.8-6.6-38.7-1.8-52.5L76.5 41l-13.6-4c-2.2 3.2-3 7.5-2.5 12.7z"/><linearGradient id="__DSH_CODE_ICON_INSTANCE__elixir-original-g" gradientUnits="userSpaceOnUse" x1="1354.664" y1="140.06" x2="1059.233" y2="84.466" gradientTransform="matrix(.09173 0 0 .2828 -48.536 17.28)"><stop offset="0" stop-color="#a5a1a8" stop-opacity=".356"/><stop offset="1" stop-color="#370c50" stop-opacity=".582"/></linearGradient><path fill-rule="evenodd" clip-rule="evenodd" fill="url(#__DSH_CODE_ICON_INSTANCE__elixir-original-g)" d="M65.3 10.8C36 27.4 48 53.4 49.3 81.6l19.1-55.4c-1.4-5.7-2.3-9.5-3.1-15.4z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#330A4C" fill-opacity=".316" d="M68.3 26.1c-14.8 11.7-14.1 31.3-18.6 54 8.1-21.3 4.1-38.2 18.6-54z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" d="M45.8 119.7c8 1.1 12.1 2.2 12.5 3 .3 4.2-11.1 1.2-12.5-3z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#EDEDED" fill-opacity=".603" d="M49.8 10.8c-6.9 7.7-14.4 21.8-18.2 29.7-1 6.5-.5 15.7.6 23.5.9-18.2 7.5-39.2 17.6-53.2z"/></svg>`,env:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#ECD53F"/><text x="10" y="12.9" text-anchor="middle" font-family="Arial,sans-serif" font-size="5.7" font-weight="900" fill="#24292F">.ENV</text>`,erlang:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#FAEDF1" stroke="#EED6DE" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path d="M20.7 103.9C11 93.5 5.2 79.2 5.3 62.1 5.2 47 10 34 18.2 24.1H1v79.7l19.7.1zm90.4 0c4.2-4.5 8-9.8 11.4-15.9l-19-9.5c-6.7 10.8-16.4 20.8-29.9 20.9-19.6-.1-27.3-16.9-27.3-38.5h73.3c.1-2.4.1-3.6 0-4.7.5-12.9-2.9-23.7-9.1-32.1H127v79.7l-15.9.1zM47.5 42.4c.8-9.8 8.5-16.3 17.6-16.4 9.1 0 15.7 6.6 15.9 16.4H47.5z" fill="#A90533"/></svg>`,flutter:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#EEF7FD" stroke="#D7EAF6" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><g fill="#3FB6D3"><path d="M12.3 64.2L76.3 0h39.4L32.1 83.6zM76.3 128h39.4L81.6 93.9l34.1-34.8H76.3L42.2 93.5z"/></g><path fill="#27AACD" d="M81.6 93.9l-20-20-19.4 19.6 19.4 19.6z"/><path fill="#19599A" d="M115.7 128L81.6 93.9l-20 19.2L76.3 128z"/><linearGradient id="__DSH_CODE_ICON_INSTANCE__flutter-original-a" gradientUnits="userSpaceOnUse" x1="59.365" y1="116.36" x2="86.825" y2="99.399"><stop offset="0" stop-color="#1b4e94"/><stop offset=".63" stop-color="#1a5497"/><stop offset="1" stop-color="#195a9b"/></linearGradient><path fill="url(#__DSH_CODE_ICON_INSTANCE__flutter-original-a)" d="M61.6 113.1l30.8-8.4-10.8-10.8z"/></svg>`,git:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#FFF0EC" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#F05032" d="M13.09 23.549a1.54 1.54 0 0 1-2.18 0L.451 13.089a1.54 1.54 0 0 1 0-2.179l7.191-7.19 2.733 2.733a1.85 1.85 0 0 0 .964 2.326v6.66a1.849 1.849 0 1 0 1.54 0V8.957l2.508 2.508a1.85 1.85 0 1 0 1.09-1.09l-2.634-2.634a1.85 1.85 0 0 0-2.378-2.377L8.73 2.63 10.91.451a1.54 1.54 0 0 1 2.179 0l10.459 10.46a1.54 1.54 0 0 1 0 2.179z"/></g>`,go:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#E7F9FC" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#00ADD8" d="M1.811 10.231c-.047 0-.058-.023-.035-.059l.246-.315c.023-.035.081-.058.128-.058h4.172c.046 0 .058.035.035.07l-.199.303c-.023.036-.082.07-.117.07zM.047 11.306c-.047 0-.059-.023-.035-.058l.245-.316c.023-.035.082-.058.129-.058h5.328c.047 0 .07.035.058.07l-.093.28c-.012.047-.058.07-.105.07zm2.828 1.075c-.047 0-.059-.035-.035-.07l.163-.292c.023-.035.07-.07.117-.07h2.337c.047 0 .07.035.07.082l-.023.28c0 .047-.047.082-.082.082zm12.129-2.36c-.736.187-1.239.327-1.963.514-.176.046-.187.058-.34-.117-.174-.199-.303-.327-.548-.444-.737-.362-1.45-.257-2.115.175-.795.514-1.204 1.274-1.192 2.22.011.935.654 1.706 1.577 1.835.795.105 1.46-.175 1.987-.77.105-.13.198-.27.315-.434H10.47c-.245 0-.304-.152-.222-.35.152-.362.432-.97.596-1.274a.315.315 0 01.292-.187h4.253c-.023.316-.023.631-.07.947a4.983 4.983 0 01-.958 2.29c-.841 1.11-1.94 1.8-3.33 1.986-1.145.152-2.209-.07-3.143-.77-.865-.655-1.356-1.52-1.484-2.595-.152-1.274.222-2.419.993-3.424.83-1.086 1.928-1.776 3.272-2.02 1.098-.2 2.15-.07 3.096.571.62.41 1.063.97 1.356 1.648.07.105.023.164-.117.2m3.868 6.461c-1.064-.024-2.034-.328-2.852-1.029a3.665 3.665 0 01-1.262-2.255c-.21-1.32.152-2.489.947-3.529.853-1.122 1.881-1.706 3.272-1.95 1.192-.21 2.314-.095 3.33.595.923.63 1.496 1.484 1.648 2.605.198 1.578-.257 2.863-1.344 3.962-.771.783-1.718 1.273-2.805 1.495-.315.06-.63.07-.934.106zm2.78-4.72c-.011-.153-.011-.27-.034-.387-.21-1.157-1.274-1.81-2.384-1.554-1.087.245-1.788.935-2.045 2.033-.21.912.234 1.835 1.075 2.21.643.28 1.285.244 1.905-.07.923-.48 1.425-1.228 1.484-2.233z"/></g>`,graphql:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#FCEAF6" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#E10098" d="M12.002 0a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.54 4.931a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm0 9.862a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm-8.54 4.931a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.276zm-8.542-4.93a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.277zm0-9.863a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.542-3.378L2.953 6.777v10.448l9.049 5.224 9.047-5.224V6.777zm0 1.601 7.66 13.27H4.34zm-1.387.371L3.97 15.037V7.363zm2.774 0 6.646 3.838v7.674zM5.355 17.44h13.293l-6.646 3.836z"/></g>`,haskell:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F3F0F7" stroke="#E1D9EA" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#463B63" d="M0 110.2L30.1 65 0 19.9h22.6L52.7 65l-30.1 45.1H0z"/><path fill="#5E5187" d="M30.1 110.2L60.2 65 30.1 19.9h22.6l60.2 90.3H90.4L71.5 81.9l-18.8 28.2H30.1z"/><path fill="#904F8C" d="M102.9 83.8l-10-15.1H128v15.1h-25.1zM87.8 61.3l-10-15.1H128v15.1H87.8z"/></svg>`,ini:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#6E7781"/><text x="10" y="13.2" text-anchor="middle" font-family="Arial,sans-serif" font-size="7.2" font-weight="800" fill="#fff">INI</text>`,java:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F4F7FA" stroke="#D9E2E8" stroke-width=".5"/><svg x="2.5" y="2.5" width="15" height="15" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#0074BD" d="M47.617 98.12s-4.767 2.774 3.397 3.71c9.892 1.13 14.947.968 25.845-1.092 0 0 2.871 1.795 6.873 3.351-24.439 10.47-55.308-.607-36.115-5.969zm-2.988-13.665s-5.348 3.959 2.823 4.805c10.567 1.091 18.91 1.18 33.354-1.6 0 0 1.993 2.025 5.132 3.131-29.542 8.64-62.446.68-41.309-6.336z"/><path fill="#EA2D2E" d="M69.802 61.271c6.025 6.935-1.58 13.17-1.58 13.17s15.289-7.891 8.269-17.777c-6.559-9.215-11.587-13.792 15.635-29.58 0 .001-42.731 10.67-22.324 34.187z"/><path fill="#0074BD" d="M102.123 108.229s3.529 2.91-3.888 5.159c-14.102 4.272-58.706 5.56-71.094.171-4.451-1.938 3.899-4.625 6.526-5.192 2.739-.593 4.303-.485 4.303-.485-4.953-3.487-32.013 6.85-13.743 9.815 49.821 8.076 90.817-3.637 77.896-9.468zM49.912 70.294s-22.686 5.389-8.033 7.348c6.188.828 18.518.638 30.011-.326 9.39-.789 18.813-2.474 18.813-2.474s-3.308 1.419-5.704 3.053c-23.042 6.061-67.544 3.238-54.731-2.958 10.832-5.239 19.644-4.643 19.644-4.643zm40.697 22.747c23.421-12.167 12.591-23.86 5.032-22.285-1.848.385-2.677.72-2.677.72s.688-1.079 2-1.543c14.953-5.255 26.451 15.503-4.823 23.725 0-.002.359-.327.468-.617z"/><path fill="#EA2D2E" d="M76.491 1.587S89.459 14.563 64.188 34.51c-20.266 16.006-4.621 25.13-.007 35.559-11.831-10.673-20.509-20.07-14.688-28.815C58.041 28.42 81.722 22.195 76.491 1.587z"/><path fill="#0074BD" d="M52.214 126.021c22.476 1.437 57-.8 57.817-11.436 0 0-1.571 4.032-18.577 7.231-19.186 3.612-42.854 3.191-56.887.874 0 .001 2.875 2.381 17.647 3.331z"/></svg>`,javascript:`<defs><clipPath id="__DSH_CODE_ICON_INSTANCE__a"><rect x="1" y="1" width="18" height="18" rx="4"/></clipPath></defs><g clip-path="url(#__DSH_CODE_ICON_INSTANCE__a)"><svg x="1" y="1" width="18" height="18" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#F0DB4F" d="M1.408 1.408h125.184v125.185H1.408z"/><path fill="#323330" d="M116.347 96.736c-.917-5.711-4.641-10.508-15.672-14.981-3.832-1.761-8.104-3.022-9.377-5.926-.452-1.69-.512-2.642-.226-3.665.821-3.32 4.784-4.355 7.925-3.403 2.023.678 3.938 2.237 5.093 4.724 5.402-3.498 5.391-3.475 9.163-5.879-1.381-2.141-2.118-3.129-3.022-4.045-3.249-3.629-7.676-5.498-14.756-5.355l-3.688.477c-3.534.893-6.902 2.748-8.877 5.235-5.926 6.724-4.236 18.492 2.975 23.335 7.104 5.332 17.54 6.545 18.873 11.531 1.297 6.104-4.486 8.08-10.234 7.378-4.236-.881-6.592-3.034-9.139-6.949-4.688 2.713-4.688 2.713-9.508 5.485 1.143 2.499 2.344 3.63 4.26 5.795 9.068 9.198 31.76 8.746 35.83-5.176.165-.478 1.261-3.666.38-8.581zM69.462 58.943H57.753l-.048 30.272c0 6.438.333 12.34-.714 14.149-1.713 3.558-6.152 3.117-8.175 2.427-2.059-1.012-3.106-2.451-4.319-4.485-.333-.584-.583-1.036-.667-1.071l-9.52 5.83c1.583 3.249 3.915 6.069 6.902 7.901 4.462 2.678 10.459 3.499 16.731 2.059 4.082-1.189 7.604-3.652 9.448-7.401 2.666-4.915 2.094-10.864 2.07-17.444.06-10.735.001-21.468.001-32.237z"/></svg></g>`,json:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F4F4F4" stroke="#DDDDDD" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><linearGradient id="__DSH_CODE_ICON_INSTANCE__a" x1="-670.564" x2="-583.105" y1="-280.831" y2="-368.306" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#__DSH_CODE_ICON_INSTANCE__a)" fill-rule="evenodd" d="M63.895 94.303c27.433 37.398 54.281-10.438 54.241-39.205-.046-34.012-34.518-53.021-54.263-53.021C32.182 2.077 2 28.269 2 64.105 2 103.937 36.596 126 63.873 126c-6.172-.889-26.742-5.296-27.019-52.674-.186-32.044 10.453-44.846 26.974-39.214.37.137 18.223 7.18 18.223 30.187 0 22.908-18.156 30.004-18.156 30.004z" clip-rule="evenodd"/><linearGradient id="__DSH_CODE_ICON_INSTANCE__b" x1="-579.148" x2="-666.607" y1="-364.34" y2="-276.873" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#__DSH_CODE_ICON_INSTANCE__b)" fill-rule="evenodd" d="M63.863 34.086C45.736 27.838 23.53 42.778 23.53 72.703 23.53 121.565 59.739 126 64.128 126 95.818 126 126 99.808 126 63.972 126 24.14 91.404 2.077 64.127 2.077c7.555-1.046 40.719 8.176 40.719 53.504 0 29.559-24.764 45.651-40.87 38.776-.37-.137-18.223-7.18-18.223-30.187 0-22.91 18.11-30.085 18.11-30.084z" clip-rule="evenodd"/></svg>`,kotlin:`<defs><linearGradient id="__DSH_CODE_ICON_INSTANCE__k" x1="1" y1="19" x2="19" y2="1"><stop stop-color="#0095D5"/><stop offset=".5" stop-color="#7F52FF"/><stop offset="1" stop-color="#F88909"/></linearGradient></defs><rect x="1" y="1" width="18" height="18" rx="4" fill="url(#__DSH_CODE_ICON_INSTANCE__k)"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#FFFFFF" d="M24 24H0V0h24L12 12Z"/></g>`,lua:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#ECECF7" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#000080" d="M.38 10.377l-.272-.037c-.048.344-.082.695-.101 1.041l.275.016c.018-.34.051-.682.098-1.02zM4.136 3.289l-.184-.205c-.258.232-.509.48-.746.734l.202.188c.231-.248.476-.49.728-.717zM5.769 2.059l-.146-.235c-.296.186-.586.385-.863.594l.166.219c.27-.203.554-.399.843-.578zM1.824 18.369c.185.297.384.586.593.863l.22-.164c-.205-.271-.399-.555-.58-.844l-.233.145zM1.127 16.402l-.255.104c.129.318.274.635.431.943l.005.01.245-.125-.005-.01c-.153-.301-.295-.611-.421-.922zM.298 9.309l.269.063c.076-.332.168-.664.272-.986l-.261-.087c-.108.332-.202.672-.28 1.01zM.274 12.42l-.275.01c.012.348.04.699.083 1.043l.273-.033c-.042-.336-.069-.68-.081-1.02zM.256 14.506c.073.34.162.682.264 1.014l.263-.08c-.1-.326-.187-.658-.258-.99l-.269.056zM11.573.275L11.563 0c-.348.012-.699.039-1.044.082l.034.273c.338-.041.68-.068 1.02-.08zM23.221 8.566c.1.326.186.66.256.992l.27-.059c-.072-.34-.16-.682-.262-1.014l-.264.081zM17.621 1.389c-.309-.164-.627-.314-.947-.449l-.107.252c.314.133.625.281.926.439l.128-.242zM15.693.572c-.332-.105-.67-.199-1.01-.277l-.063.268c.332.076.664.168.988.273l.085-.264zM6.674 1.545c.298-.15.606-.291.916-.418L7.486.873c-.317.127-.632.272-.937.428l-.015.008.125.244.015-.008zM23.727 11.588l.275-.01a11.797 11.797 0 0 0-.082-1.045l-.273.033c.041.338.068.682.08 1.022zM13.654.105c-.346-.047-.696-.08-1.043-.098l-.014.273c.339.018.683.051 1.019.098l.038-.273zM9.544.527l-.058-.27c-.34.072-.681.16-1.014.264l.081.262c.325-.099.659-.185.991-.256zM1.921 5.469l.231.15c.185-.285.384-.566.592-.834l-.217-.17c-.213.276-.417.563-.606.854zM.943 7.318l.253.107c.132-.313.28-.625.439-.924l-.243-.128c-.163.307-.314.625-.449.945zM18.223 21.943l.145.234c.295-.186.586-.385.863-.594l-.164-.219c-.272.204-.557.4-.844.579zM21.248 19.219l.217.17c.215-.273.418-.561.607-.854l-.23-.148c-.186.285-.385.564-.594.832zM19.855 20.715l.184.203c.258-.23.51-.479.746-.732l-.201-.188c-.23.248-.477.488-.729.717zM22.359 17.504l.244.129c.162-.307.314-.625.449-.945l-.254-.107a11.27 11.27 0 0 1-.439.923zM23.617 13.629l.273.039c.049-.346.082-.695.102-1.043l-.275-.014c-.018.338-.051.682-.1 1.018zM23.156 15.621l.264.086c.107-.332.201-.67.279-1.01l-.268-.063c-.077.333-.169.665-.275.987zM22.453 6.672c.154.303.297.617.424.932l.256-.104c-.131-.322-.277-.643-.436-.953l-.244.125zM8.296 23.418c.331.107.67.201 1.009.279l.062-.268c-.331-.076-.663-.168-.986-.273l-.085.262zM10.335 23.889c.345.049.696.082 1.043.102l.014-.275c-.339-.018-.682-.051-1.019-.098l-.038.271zM17.326 22.449c-.303.154-.613.297-.926.424l.104.256c.318-.131.639-.275.947-.434l.004-.002-.123-.246-.006.002zM4.613 21.467c.274.213.562.418.854.605l.149-.23c-.285-.184-.565-.385-.833-.592l-.17.217zM12.417 23.725l.009.275c.348-.014.699-.041 1.045-.084l-.035-.271c-.336.041-.68.068-1.019.08zM6.37 22.604c.307.162.625.314.946.449l.107-.254c-.313-.133-.624-.279-.924-.439l-.129.244zM3.083 20.041c.233.258.48.51.734.746l.188-.201c-.249-.23-.49-.477-.717-.729l-.205.184zM14.445 23.475l.059.27c.34-.074.68-.162 1.014-.266l-.082-.262c-.325.099-.659.185-.991.258zM21.18.129A2.689 2.689 0 1 0 21.18 5.507 2.689 2.689 0 1 0 21.18.129zM15.324 15.447c0 .471.314.66.852.66.67 0 1.297-.396 1.297-1.016v-.645c-.23.107-.379.141-1.107.24-.735.109-1.042.306-1.042.761zM12 2.818c-5.07 0-9.18 4.109-9.18 9.18 0 5.068 4.11 9.18 9.18 9.18 5.07 0 9.18-4.111 9.18-9.18 0-5.07-4.11-9.18-9.18-9.18zm-2.487 13.77H5.771v-6.023h.769v5.346h2.974v.677zm4.13 0h-.619v-.67c-.405.57-.811.793-1.446.793-.843 0-1.38-.463-1.38-1.182v-3.271h.686v3c0 .52.347.85.893.85.719 0 1.181-.578 1.181-1.461v-2.389h.686v4.33zm-.53-8.393c0-1.484 1.205-2.689 2.689-2.689s2.688 1.205 2.688 2.689-1.203 2.688-2.688 2.688-2.689-1.203-2.689-2.688zm5.567 7.856v.52c-.223.059-.33.074-.471.074-.34 0-.637-.238-.711-.57-.381.406-.918.637-1.471.637-.877 0-1.422-.463-1.422-1.248 0-.527.256-.916.76-1.123.266-.107.414-.141 1.389-.264.545-.066.719-.191.719-.48v-.182c0-.412-.348-.645-.967-.645-.645 0-.957.24-1.016.77h-.693c.041-1 .686-1.404 1.734-1.404 1.066 0 1.627.412 1.627 1.182v2.412c0 .215.133.338.373.338.041-.002.074-.002.149-.017z"/></g>`,makefile:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#427819"/><path fill="#fff" d="m5 4.5 2.3 2.3 2.3-2.3L11 5.9 8.7 8.2l2.4 2.4L9.7 12l-2.4-2.4L5 11.9 3.6 10.5l2.3-2.3-2.3-2.3zm7 6.5h4v1.5h-4zm0 2.8h4v1.5h-4z"/>`,node:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#EDF7EA" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#539E43" d="M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"/></g>`,"objective-c":`<rect x="1" y="1" width="18" height="18" rx="4" fill="#438EFF"/><text x="10" y="13.2" text-anchor="middle" font-family="Arial,sans-serif" font-size="7.2" font-weight="800" fill="#fff">OC</text>`,perl:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#EAF2F7" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#0073A1" d="M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0m.157 1.103a10.91 10.91 0 0 1 9.214 5.404c-1.962.152-3.156 1.698-5.132 3.553-2.81 2.637-4.562.582-5.288-.898-.447-1.004-.847-2.117-1.544-2.769A.4.4 0 0 1 9.3 6.02l.08-.37a.083.083 0 0 0-.074-.1c-.33-.022-.601.093-.84.368a2.5 2.5 0 0 0-.375-.064c-.863-.093-1.036.345-1.873.345H5.81c-.758 0-1.391.361-1.7.892-.248.424-.257.884.15.93-.126.445.292.62 1.224.192 0 0 .733.421 1.749.421.549 0 .712.087.914.967.486 2.138 2.404 5.655 6.282 5.655l.118.166c.659.934.86 2.113.48 3.184-.307.867-.697 1.531-.697 1.531q.01.178.01.349c0 .81-.175 1.553-.387 2.23a10.91 10.91 0 0 1-11.989-6.342A10.91 10.91 0 0 1 7.608 2.01a10.9 10.9 0 0 1 4.55-.907M7.524 6.47c.288 0 .575.231.477.272a.4.4 0 0 1-.1.02.38.38 0 0 1-.375.327.384.384 0 0 1-.378-.326.4.4 0 0 1-.101-.02c-.098-.042.19-.273.477-.273m10.193 10.49q.05 0 .101.007.326.054.694.096.135.01.269.026a13.4 13.4 0 0 0 2.846-.007 10.9 10.9 0 0 1-2.007 2.705c-.11-.23-.547-1.19-.573-2.196q-.156-.01-.313-.026-.13-.014-.256-.022a18 18 0 0 1-.735-.102h-.003c-.032 0-.06.01-.074.035l-.003.012q-.081.265-.182.544c.428 1.084.652 2.078.652 2.078.14.22.258.432.363.64a11 11 0 0 1-2.168 1.264 11 11 0 0 1-1.205.426 13.3 13.3 0 0 1 1.055-2.531s.678-1.445 1.027-2.564v-.004a.55.55 0 0 1 .512-.38"/></g>`,php:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F0EFF8" stroke="#DDDCEB" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#777BB4" d="M7.01 10.207h-.944l-.515 2.648h.838c.556 0 .97-.105 1.242-.314.272-.21.455-.559.55-1.049.092-.47.05-.802-.124-.995-.175-.193-.523-.29-1.047-.29zM12 5.688C5.373 5.688 0 8.514 0 12s5.373 6.313 12 6.313S24 15.486 24 12c0-3.486-5.373-6.312-12-6.312zm-3.26 7.451c-.261.25-.575.438-.917.551-.336.108-.765.164-1.285.164H5.357l-.327 1.681H3.652l1.23-6.326h2.65c.797 0 1.378.209 1.744.628.366.418.476 1.002.33 1.752a2.836 2.836 0 0 1-.305.847c-.143.255-.33.49-.561.703zm4.024.715l.543-2.799c.063-.318.039-.536-.068-.651-.107-.116-.336-.174-.687-.174H11.46l-.704 3.625H9.388l1.23-6.327h1.367l-.327 1.682h1.218c.767 0 1.295.134 1.586.401s.378.7.263 1.299l-.572 2.944h-1.389zm7.597-2.265a2.782 2.782 0 0 1-.305.847c-.143.255-.33.49-.561.703a2.44 2.44 0 0 1-.917.551c-.336.108-.765.164-1.286.164h-1.18l-.327 1.682h-1.378l1.23-6.326h2.649c.797 0 1.378.209 1.744.628.366.417.477 1.001.331 1.751zM17.766 10.207h-.943l-.516 2.648h.838c.557 0 .971-.105 1.242-.314.272-.21.455-.559.551-1.049.092-.47.049-.802-.125-.995s-.524-.29-1.047-.29z"/></g>`,powershell:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#2671BE"/><path fill="#fff" fill-opacity=".16" d="M5.5 4h11l-3.5 12H2z"/><path d="m6.5 6.5 3 3-4.2 3.2m4 1h4" fill="none" stroke="#fff" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>`,protobuf:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#4285F4"/><path fill="none" stroke="#fff" stroke-width="1.2" stroke-linejoin="round" d="m10 3.5 6 3.3v6.4l-6 3.3-6-3.3V6.8z"/><path fill="#fff" d="M6.5 6.5h4.4c2.3 0 3.6 1.2 3.6 3.1s-1.3 3.1-3.6 3.1H9v2H6.5zM9 8.4v2.4h1.6c.8 0 1.2-.4 1.2-1.2s-.4-1.2-1.2-1.2z"/>`,python:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F2F4F7" stroke="#D5DBE5" stroke-width=".5"/><g transform="matrix(.126 0 0 .126 2.30 2.24)"><path fill="#3776AB" d="M 60.510156,6.3979729 C 55.926503,6.4192712 51.549217,6.8101906 47.697656,7.4917229 C 36.35144,9.4962267 34.291407,13.691825 34.291406,21.429223 L 34.291406,31.647973 L 61.103906,31.647973 L 61.103906,35.054223 L 34.291406,35.054223 L 24.228906,35.054223 C 16.436447,35.054223 9.6131468,39.73794 7.4789058,48.647973 C 5.0170858,58.860939 4.9078907,65.233996 7.4789058,75.897973 C 9.3848341,83.835825 13.936449,89.491721 21.728906,89.491723 L 30.947656,89.491723 L 30.947656,77.241723 C 30.947656,68.391821 38.6048,60.585475 47.697656,60.585473 L 74.478906,60.585473 C 81.933857,60.585473 87.885159,54.447309 87.885156,46.960473 L 87.885156,21.429223 C 87.885156,14.162884 81.755176,8.7044455 74.478906,7.4917229 C 69.872919,6.7249976 65.093809,6.3766746 60.510156,6.3979729 z M 46.010156,14.616723 C 48.779703,14.616723 51.041406,16.915369 51.041406,19.741723 C 51.041404,22.558059 48.779703,24.835473 46.010156,24.835473 C 43.23068,24.835472 40.978906,22.558058 40.978906,19.741723 C 40.978905,16.91537 43.23068,14.616723 46.010156,14.616723 z "/><path fill="#FFD43B" d="M 91.228906,35.054223 L 91.228906,46.960473 C 91.228906,56.191228 83.403011,63.960472 74.478906,63.960473 L 47.697656,63.960473 C 40.361823,63.960473 34.291407,70.238956 34.291406,77.585473 L 34.291406,103.11672 C 34.291406,110.38306 40.609994,114.65704 47.697656,116.74172 C 56.184987,119.23733 64.323893,119.68835 74.478906,116.74172 C 81.229061,114.78733 87.885159,110.85411 87.885156,103.11672 L 87.885156,92.897973 L 61.103906,92.897973 L 61.103906,89.491723 L 87.885156,89.491723 L 101.29141,89.491723 C 109.08387,89.491723 111.98766,84.056315 114.69765,75.897973 C 117.49698,67.499087 117.37787,59.422197 114.69765,48.647973 C 112.77187,40.890532 109.09378,35.054223 101.29141,35.054223 L 91.228906,35.054223 z M 76.166406,99.710473 C 78.945884,99.710476 81.197656,101.98789 81.197656,104.80422 C 81.197654,107.63057 78.945881,109.92922 76.166406,109.92922 C 73.396856,109.92922 71.135156,107.63057 71.135156,104.80422 C 71.135158,101.98789 73.396853,99.710473 76.166406,99.710473 z "/></g>`,r:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#EEF2F6" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#276DC3" d="M12 2.746c-6.627 0-12 3.599-12 8.037 0 3.897 4.144 7.144 9.64 7.88V16.26c-2.924-.915-4.925-2.755-4.925-4.877 0-3.035 4.084-5.494 9.12-5.494 5.038 0 8.757 1.683 8.757 5.494 0 1.976-.999 3.379-2.662 4.272.09.066.174.128.258.216.169.149.25.363.372.544 2.128-1.45 3.44-3.437 3.44-5.631 0-4.44-5.373-8.038-12-8.038zm-2.111 4.99v13.516l4.093-.002-.002-5.291h1.1c.225 0 .321.066.549.25.272.22.715.982.715.982l2.164 4.063 4.627-.002-2.864-4.826s-.086-.193-.265-.383a2.22 2.22 0 00-.582-.416c-.422-.214-1.149-.434-1.149-.434s3.578-.264 3.578-3.826c0-3.562-3.744-3.63-3.744-3.63zm4.127 2.93l2.478.002s1.149-.062 1.149 1.127c0 1.165-1.149 1.17-1.149 1.17h-2.478zm1.754 6.119c-.494.049-1.012.079-1.54.088v1.807a16.622 16.622 0 002.37-.473l-.471-.891s-.108-.183-.248-.394c-.039-.054-.08-.098-.111-.137z"/></g>`,react:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#20232A"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#61DAFB" d="M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"/></g>`,ruby:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#FCEDEC" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#CC342D" d="M20.156.083c3.033.525 3.893 2.598 3.829 4.77L24 4.822 22.635 22.71 4.89 23.926h.016C3.433 23.864.15 23.729 0 19.139l1.645-3 2.819 6.586.503 1.172 2.805-9.144-.03.007.016-.03 9.255 2.956-1.396-5.431-.99-3.9 8.82-.569-.615-.51L16.5 2.114 20.159.073l-.003.01zM0 19.089zM5.13 5.073c3.561-3.533 8.157-5.621 9.922-3.84 1.762 1.777-.105 6.105-3.673 9.636-3.563 3.532-8.103 5.734-9.864 3.957-1.766-1.777.045-6.217 3.612-9.75l.003-.003z"/></g>`,rust:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F3E6DD" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#2B2B2B" d="M23.8346 11.7033l-1.0073-.6236a13.7268 13.7268 0 00-.0283-.2936l.8656-.8069a.3483.3483 0 00-.1154-.578l-1.1066-.414a8.4958 8.4958 0 00-.087-.2856l.6904-.9587a.3462.3462 0 00-.2257-.5446l-1.1663-.1894a9.3574 9.3574 0 00-.1407-.2622l.49-1.0761a.3437.3437 0 00-.0274-.3361.3486.3486 0 00-.3006-.154l-1.1845.0416a6.7444 6.7444 0 00-.1873-.2268l.2723-1.153a.3472.3472 0 00-.417-.4172l-1.1532.2724a14.0183 14.0183 0 00-.2278-.1873l.0415-1.1845a.3442.3442 0 00-.49-.328l-1.076.491c-.0872-.0476-.1742-.0952-.2623-.1407l-.1903-1.1673A.3483.3483 0 0016.256.955l-.9597.6905a8.4867 8.4867 0 00-.2855-.086l-.414-1.1066a.3483.3483 0 00-.5781-.1154l-.8069.8666a9.2936 9.2936 0 00-.2936-.0284L12.2946.1683a.3462.3462 0 00-.5892 0l-.6236 1.0073a13.7383 13.7383 0 00-.2936.0284L9.9803.3374a.3462.3462 0 00-.578.1154l-.4141 1.1065c-.0962.0274-.1903.0567-.2855.086L7.744.955a.3483.3483 0 00-.5447.2258L7.009 2.348a9.3574 9.3574 0 00-.2622.1407l-1.0762-.491a.3462.3462 0 00-.49.328l.0416 1.1845a7.9826 7.9826 0 00-.2278.1873L3.8413 3.425a.3472.3472 0 00-.4171.4171l.2713 1.1531c-.0628.075-.1255.1509-.1863.2268l-1.1845-.0415a.3462.3462 0 00-.328.49l.491 1.0761a9.167 9.167 0 00-.1407.2622l-1.1662.1894a.3483.3483 0 00-.2258.5446l.6904.9587a13.303 13.303 0 00-.087.2855l-1.1065.414a.3483.3483 0 00-.1155.5781l.8656.807a9.2936 9.2936 0 00-.0283.2935l-1.0073.6236a.3442.3442 0 000 .5892l1.0073.6236c.008.0982.0182.1964.0283.2936l-.8656.8079a.3462.3462 0 00.1155.578l1.1065.4141c.0273.0962.0567.1914.087.2855l-.6904.9587a.3452.3452 0 00.2268.5447l1.1662.1893c.0456.088.0922.1751.1408.2622l-.491 1.0762a.3462.3462 0 00.328.49l1.1834-.0415c.0618.0769.1235.1528.1873.2277l-.2713 1.1541a.3462.3462 0 00.4171.4161l1.153-.2713c.075.0638.151.1255.2279.1863l-.0415 1.1845a.3442.3442 0 00.49.327l1.0761-.49c.087.0486.1741.0951.2622.1407l.1903 1.1662a.3483.3483 0 00.5447.2268l.9587-.6904a9.299 9.299 0 00.2855.087l.414 1.1066a.3452.3452 0 00.5781.1154l.8079-.8656c.0972.0111.1954.0203.2936.0294l.6236 1.0073a.3472.3472 0 00.5892 0l.6236-1.0073c.0982-.0091.1964-.0183.2936-.0294l.8069.8656a.3483.3483 0 00.578-.1154l.4141-1.1066a8.4626 8.4626 0 00.2855-.087l.9587.6904a.3452.3452 0 00.5447-.2268l.1903-1.1662c.088-.0456.1751-.0931.2622-.1407l1.0762.49a.3472.3472 0 00.49-.327l-.0415-1.1845a6.7267 6.7267 0 00.2267-.1863l1.1531.2713a.3472.3472 0 00.4171-.416l-.2713-1.1542c.0628-.0749.1255-.1508.1863-.2278l1.1845.0415a.3442.3442 0 00.328-.49l-.49-1.076c.0475-.0872.0951-.1742.1407-.2623l1.1662-.1893a.3483.3483 0 00.2258-.5447l-.6904-.9587.087-.2855 1.1066-.414a.3462.3462 0 00.1154-.5781l-.8656-.8079c.0101-.0972.0202-.1954.0283-.2936l1.0073-.6236a.3442.3442 0 000-.5892zm-6.7413 8.3551a.7138.7138 0 01.2986-1.396.714.714 0 11-.2997 1.396zm-.3422-2.3142a.649.649 0 00-.7715.5l-.3573 1.6685c-1.1035.501-2.3285.7795-3.6193.7795a8.7368 8.7368 0 01-3.6951-.814l-.3574-1.6684a.648.648 0 00-.7714-.499l-1.473.3158a8.7216 8.7216 0 01-.7613-.898h7.1676c.081 0 .1356-.0141.1356-.088v-2.536c0-.074-.0536-.0881-.1356-.0881h-2.0966v-1.6077h2.2677c.2065 0 1.1065.0587 1.394 1.2088.0901.3533.2875 1.5044.4232 1.8729.1346.413.6833 1.2381 1.2685 1.2381h3.5716a.7492.7492 0 00.1296-.0131 8.7874 8.7874 0 01-.8119.9526zM6.8369 20.024a.714.714 0 11-.2997-1.396.714.714 0 01.2997 1.396zM4.1177 8.9972a.7137.7137 0 11-1.304.5791.7137.7137 0 011.304-.579zm-.8352 1.9813l1.5347-.6824a.65.65 0 00.33-.8585l-.3158-.7147h1.2432v5.6025H3.5669a8.7753 8.7753 0 01-.2834-3.348zm6.7343-.5437V8.7836h2.9601c.153 0 1.0792.1772 1.0792.8697 0 .575-.7107.7815-1.2948.7815zm10.7574 1.4862c0 .2187-.008.4363-.0243.651h-.9c-.09 0-.1265.0586-.1265.1477v.413c0 .973-.5487 1.1846-1.0296 1.2382-.4576.0517-.9648-.1913-1.0275-.4717-.2704-1.5186-.7198-1.8436-1.4305-2.4034.8817-.5599 1.799-1.386 1.799-2.4915 0-1.1936-.819-1.9458-1.3769-2.3153-.7825-.5163-1.6491-.6195-1.883-.6195H5.4682a8.7651 8.7651 0 014.907-2.7699l1.0974 1.151a.648.648 0 00.9182.0213l1.227-1.1743a8.7753 8.7753 0 016.0044 4.2762l-.8403 1.8982a.652.652 0 00.33.8585l1.6178.7188c.0283.2875.0425.577.0425.8717zm-9.3006-9.5993a.7128.7128 0 11.984 1.0316.7137.7137 0 01-.984-1.0316zm8.3389 6.71a.7107.7107 0 01.9395-.3625.7137.7137 0 11-.9405.3635z"/></g>`,scala:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#FCECEB" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#DC322F" d="M4.589 24c4.537 0 13.81-1.516 14.821-3v-5.729c-.957 1.408-10.284 2.912-14.821 2.912V24zM4.589 16.365c4.537 0 13.81-1.516 14.821-3V7.636c-.957 1.408-10.284 2.912-14.821 2.912v5.817zM4.589 8.729c4.537 0 13.81-1.516 14.821-3V0C18.453 1.408 9.126 2.912 4.589 2.912v5.817z"/></g>`,shell:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#303642"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#7EE787" d="M21.038,4.9l-7.577-4.498C13.009,0.134,12.505,0,12,0c-0.505,0-1.009,0.134-1.462,0.403L2.961,4.9 C2.057,5.437,1.5,6.429,1.5,7.503v8.995c0,1.073,0.557,2.066,1.462,2.603l7.577,4.497C10.991,23.866,11.495,24,12,24 c0.505,0,1.009-0.134,1.461-0.402l7.577-4.497c0.904-0.537,1.462-1.529,1.462-2.603V7.503C22.5,6.429,21.943,5.437,21.038,4.9z M15.17,18.946l0.013,0.646c0.001,0.078-0.05,0.167-0.111,0.198l-0.383,0.22c-0.061,0.031-0.111-0.007-0.112-0.085L14.57,19.29 c-0.328,0.136-0.66,0.169-0.872,0.084c-0.04-0.016-0.057-0.075-0.041-0.142l0.139-0.584c0.011-0.046,0.036-0.092,0.069-0.121 c0.012-0.011,0.024-0.02,0.036-0.026c0.022-0.011,0.043-0.014,0.062-0.006c0.229,0.077,0.521,0.041,0.802-0.101 c0.357-0.181,0.596-0.545,0.592-0.907c-0.003-0.328-0.181-0.465-0.613-0.468c-0.55,0.001-1.064-0.107-1.072-0.917 c-0.007-0.667,0.34-1.361,0.889-1.8l-0.007-0.652c-0.001-0.08,0.048-0.168,0.111-0.2l0.37-0.236 c0.061-0.031,0.111,0.007,0.112,0.087l0.006,0.653c0.273-0.109,0.511-0.138,0.726-0.088c0.047,0.012,0.067,0.076,0.048,0.151 l-0.144,0.578c-0.011,0.044-0.036,0.088-0.065,0.116c-0.012,0.012-0.025,0.021-0.038,0.028c-0.019,0.01-0.038,0.013-0.057,0.009 c-0.098-0.022-0.332-0.073-0.699,0.113c-0.385,0.195-0.52,0.53-0.517,0.778c0.003,0.297,0.155,0.387,0.681,0.396 c0.7,0.012,1.003,0.318,1.01,1.023C16.105,17.747,15.736,18.491,15.17,18.946z M19.143,17.859c0,0.06-0.008,0.116-0.058,0.145 l-1.916,1.164c-0.05,0.029-0.09,0.004-0.09-0.056v-0.494c0-0.06,0.037-0.093,0.087-0.122l1.887-1.129 c0.05-0.029,0.09-0.004,0.09,0.056V17.859z M20.459,6.797l-7.168,4.427c-0.894,0.523-1.553,1.109-1.553,2.187v8.833 c0,0.645,0.26,1.063,0.66,1.184c-0.131,0.023-0.264,0.039-0.398,0.039c-0.42,0-0.833-0.114-1.197-0.33L3.226,18.64 c-0.741-0.44-1.201-1.261-1.201-2.142V7.503c0-0.881,0.46-1.702,1.201-2.142l7.577-4.498c0.363-0.216,0.777-0.33,1.197-0.33 c0.419,0,0.833,0.114,1.197,0.33l7.577,4.498c0.624,0.371,1.046,1.013,1.164,1.732C21.686,6.557,21.12,6.411,20.459,6.797z"/></g>`,solidity:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F0F0F0" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#363636" d="M4.409 6.608L7.981.255l3.572 6.353H4.409zM8.411 0l3.569 6.348L15.552 0H8.411zm4.036 17.392l3.572 6.354 3.575-6.354h-7.147zm-.608-10.284h-7.43l3.715 6.605 3.715-6.605zm.428-.25h7.428L15.982.255l-3.715 6.603zM15.589 24l-3.569-6.349L8.448 24h7.141zm-3.856-6.858H4.306l3.712 6.603 3.715-6.603zm.428-.25h7.433l-3.718-6.605-3.715 6.605z"/></g>`,sql:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#336791"/><ellipse cx="10" cy="5.5" rx="5.8" ry="2.1" fill="#fff"/><path fill="#fff" fill-opacity=".88" d="M4.2 5.5v8.9c0 1.2 2.6 2.1 5.8 2.1s5.8-.9 5.8-2.1V5.5c0 1.2-2.6 2.1-5.8 2.1s-5.8-.9-5.8-2.1z"/><path d="M4.2 9.2c0 1.2 2.6 2.1 5.8 2.1s5.8-.9 5.8-2.1M4.2 12.9c0 1.2 2.6 2.1 5.8 2.1s5.8-.9 5.8-2.1" fill="none" stroke="#336791" stroke-opacity=".7" stroke-width=".7"/>`,svelte:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#FFF0EB" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#FF3E00" d="M10.354 21.125a4.44 4.44 0 0 1-4.765-1.767 4.109 4.109 0 0 1-.703-3.107 3.898 3.898 0 0 1 .134-.522l.105-.321.287.21a7.21 7.21 0 0 0 2.186 1.092l.208.063-.02.208a1.253 1.253 0 0 0 .226.83 1.337 1.337 0 0 0 1.435.533 1.231 1.231 0 0 0 .343-.15l5.59-3.562a1.164 1.164 0 0 0 .524-.778 1.242 1.242 0 0 0-.211-.937 1.338 1.338 0 0 0-1.435-.533 1.23 1.23 0 0 0-.343.15l-2.133 1.36a4.078 4.078 0 0 1-1.135.499 4.44 4.44 0 0 1-4.765-1.766 4.108 4.108 0 0 1-.702-3.108 3.855 3.855 0 0 1 1.742-2.582l5.589-3.563a4.072 4.072 0 0 1 1.135-.499 4.44 4.44 0 0 1 4.765 1.767 4.109 4.109 0 0 1 .703 3.107 3.943 3.943 0 0 1-.134.522l-.105.321-.286-.21a7.204 7.204 0 0 0-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 0 0-.226-.831 1.337 1.337 0 0 0-1.435-.532 1.231 1.231 0 0 0-.343.15L8.62 9.368a1.162 1.162 0 0 0-.524.778 1.24 1.24 0 0 0 .211.937 1.338 1.338 0 0 0 1.435.533 1.235 1.235 0 0 0 .344-.151l2.132-1.36a4.067 4.067 0 0 1 1.135-.498 4.44 4.44 0 0 1 4.765 1.766 4.108 4.108 0 0 1 .702 3.108 3.857 3.857 0 0 1-1.742 2.583l-5.589 3.562a4.072 4.072 0 0 1-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 0 0-2.896 4.295 6.753 6.753 0 0 0 .666 4.336 6.43 6.43 0 0 0-.96 2.396 6.833 6.833 0 0 0 1.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 0 0 2.896-4.295 6.756 6.756 0 0 0-.665-4.336 6.429 6.429 0 0 0 .958-2.396 6.831 6.831 0 0 0-1.167-5.168Z"/></g>`,swift:`<defs><clipPath id="__DSH_CODE_ICON_INSTANCE__a"><rect x="1" y="1" width="18" height="18" rx="4"/></clipPath></defs><g clip-path="url(#__DSH_CODE_ICON_INSTANCE__a)"><svg x="1" y="1" width="18" height="18" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#f05138" d="M126.33 34.06a39.32 39.32 0 00-.79-7.83 28.78 28.78 0 00-2.65-7.58 28.84 28.84 0 00-4.76-6.32 23.42 23.42 0 00-6.62-4.55 27.27 27.27 0 00-7.68-2.53c-2.65-.51-5.56-.51-8.21-.76H30.25a45.46 45.46 0 00-6.09.51 21.82 21.82 0 00-5.82 1.52c-.53.25-1.32.51-1.85.76a33.82 33.82 0 00-5 3.28c-.53.51-1.06.76-1.59 1.26a22.41 22.41 0 00-4.76 6.32 23.61 23.61 0 00-2.65 7.58 78.5 78.5 0 00-.79 7.83v60.39a39.32 39.32 0 00.79 7.83 28.78 28.78 0 002.65 7.58 28.84 28.84 0 004.76 6.32 23.42 23.42 0 006.62 4.55 27.27 27.27 0 007.68 2.53c2.65.51 5.56.51 8.21.76h63.22a45.08 45.08 0 008.21-.76 27.27 27.27 0 007.68-2.53 30.13 30.13 0 006.62-4.55 22.41 22.41 0 004.76-6.32 23.61 23.61 0 002.65-7.58 78.49 78.49 0 00.79-7.83V34.06z"/><path fill="#fefefe" d="M85 96.5c-11.11 6.13-26.38 6.76-41.75.47A64.53 64.53 0 0113.84 73a50 50 0 0010.85 6.32c15.87 7.1 31.73 6.61 42.9 0-15.9-11.66-29.4-26.82-39.46-39.2a43.47 43.47 0 01-5.29-6.82c12.16 10.61 31.5 24 38.38 27.79a271.77 271.77 0 01-27-32.34 266.8 266.8 0 0044.47 34.87c.71.38 1.26.7 1.7 1a32.7 32.7 0 001.21-3.51c3.71-12.89-.53-27.54-9.79-39.67C93.25 33.81 106 57.05 100.66 76.51c-.14.53-.29 1-.45 1.55l.19.22c10.59 12.63 7.68 26 6.35 23.5C101 91 90.37 94.33 85 96.5z"/></svg></g>`,toml:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#F6EEEA" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#9C4121" d="M.014 0h5.34v2.652H2.888v18.681h2.468V24H.015V0Zm17.622 5.049v2.78h-4.274v12.935h-3.008V7.83H6.059V5.05h11.577ZM23.986 24h-5.34v-2.652h2.467V2.667h-2.468V0h5.34v24Z"/></g>`,typescript:`<defs><clipPath id="__DSH_CODE_ICON_INSTANCE__a"><rect x="1" y="1" width="18" height="18" rx="4"/></clipPath></defs><g clip-path="url(#__DSH_CODE_ICON_INSTANCE__a)"><svg x="1" y="1" width="18" height="18" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#fff" d="M22.67 47h99.67v73.67H22.67z"/><path data-name="original" fill="#007acc" d="M1.5 63.91v62.5h125v-125H1.5zm100.73-5a15.56 15.56 0 017.82 4.5 20.58 20.58 0 013 4c0 .16-5.4 3.81-8.69 5.85-.12.08-.6-.44-1.13-1.23a7.09 7.09 0 00-5.87-3.53c-3.79-.26-6.23 1.73-6.21 5a4.58 4.58 0 00.54 2.34c.83 1.73 2.38 2.76 7.24 4.86 8.95 3.85 12.78 6.39 15.16 10 2.66 4 3.25 10.46 1.45 15.24-2 5.2-6.9 8.73-13.83 9.9a38.32 38.32 0 01-9.52-.1 23 23 0 01-12.72-6.63c-1.15-1.27-3.39-4.58-3.25-4.82a9.34 9.34 0 011.15-.73L82 101l3.59-2.08.75 1.11a16.78 16.78 0 004.74 4.54c4 2.1 9.46 1.81 12.16-.62a5.43 5.43 0 00.69-6.92c-1-1.39-3-2.56-8.59-5-6.45-2.78-9.23-4.5-11.77-7.24a16.48 16.48 0 01-3.43-6.25 25 25 0 01-.22-8c1.33-6.23 6-10.58 12.82-11.87a31.66 31.66 0 019.49.26zm-29.34 5.24v5.12H56.66v46.23H45.15V69.26H28.88v-5a49.19 49.19 0 01.12-5.17C29.08 59 39 59 51 59h21.83z"/></svg></g>`,vue:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#ECF8F3" stroke="#D5EAE0" stroke-width=".5"/><path fill="#41B883" d="M3.5 5h3.2l3.3 5.7L13.3 5h3.2L10 16z"/><path fill="#35495E" d="M6.7 5H9l1 1.8L11 5h2.3L10 10.7z"/>`,wasm:`<defs><clipPath id="__DSH_CODE_ICON_INSTANCE__a"><rect x="1" y="1" width="18" height="18" rx="4"/></clipPath></defs><g clip-path="url(#__DSH_CODE_ICON_INSTANCE__a)"><svg x="1" y="1" width="18" height="18" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet"><path fill="#654ff0" d="M.223.222v127.555h127.555V.222H78.594c.014.227.036.455.036.686 0 8.08-6.55 14.626-14.63 14.626-8.078 0-14.625-6.546-14.625-14.626 0-.231.022-.459.031-.686zm29.595 68.746h8.445l5.782 30.738h.107l6.968-30.738h7.908l6.265 31.119h.106l6.597-31.119h8.284l-10.765 45.156H61.12l-6.213-30.738H54.8l-6.7 30.738h-8.557zm59.994 0h13.334l13.284 45.156h-8.77l-2.879-10.051H89.59l-2.212 10.05h-8.5ZM94.895 80.1l-3.684 16.57h11.473L98.448 80.1Z"/></svg></g>`,xml:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#EAF3FA" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#005FAD" d="M4.345 7.053c-.495.02-.44.725-.536 1.081-.157.583-.3 1.325-.347 1.926-.046.585-.008 1.127.066 1.719.058.46.191.767.07.89-.108.11-3.216 2.962-3.466 3.123-.26.169-.08.584.069.817.157.246.23.373.557.33.306-.042.405-.409.583-.606.228-.252 2.421-2.401 2.616-2.401.077.544.367 1.064.67 1.513.15.222.314.439.505.629.175.175.4.317.587.45.44.024.795-.301.35-.67-.17-.14-.735-.971-.927-1.43-.18-.43-.574-1.076-.146-1.428 1.494-1.23 3.72-2.262 4.247-2.313-.257 1.024-1.356 3.048-1.757 4.012-.14.333-.231.732-.185 1.094.055.434.383.774.587.806.417-.023.7-.387.946-.645.343-.357.634-.685.974-1.043.339-.356.672-.731.971-1.07.184-.207.674-.713.963-.713-.11.693-.716 1.552-.839 2.254-.125.716.531 1.596 1.217.956.623-.58 1.255-1.129 1.867-1.72.217-.208.175.037.224.242.05.208.176.91.275 1.1.18.346.496.592.897.598.362.006.727-.161.982-.414.19-.187.513-.699.154-.832-.23-.086-.217-.176-.495-.129-.172.029-.362.074-.507.179-.367-.003-.381-.89-.324-1.161.068-.327.207-.659.185-.998-.026-.418-.478-.69-.582-.72-.156-.076-.253.023-.458.212-.173.161-.363.332-.535.495-.34.322-.768.813-.942.813.305-.705.708-2.652-.643-2.48-.563.071-.95.377-1.394.71-.29.28-.683.641-.936.87-.236.216-.371.404-.496.404.132-.747 1.685-3.167.885-3.853-.158-.136-.313-.325-.515-.349a4.637 4.637 0 0 0-.833.19c-.565.18-2.78 1.28-4.19 2.289-.131.094-.214-.085-.231-.29-.087-1.058.199-2.19.496-3.188.208-.696-.557-1.225-.659-1.249zm18.177.874c-.166.364-.2.894-.248 1.319a24.307 24.307 0 0 0-1.246-.115c.238.296.691.588 1.056.724-.048.366-.434.67-.599 1.021.458-.127.676-.47.989-.821.362.22.791.627 1.26.636-.177-.376-.334-.695-.658-.966.269-.175.717-.362.924-.633-.345-.074-.718-.093-1.052-.015-.258-.284-.3-.772-.426-1.15zm-2.92.079c-.23.02-.613.49-.832.773-.807 1.039-1.542 3.15-1.661 3.542-.363 1.195-.502 2.672.28 3.722.456.612 1.258.66 2.041.434.405-.116.812-.406.95-.723.114-.263.174-.753-.404-.38-.224.145-.634.304-1.37.291-.247-.004-.651-.357-.76-.722-.192-.595-.11-1.393-.11-1.393.167-1.028.642-2.146 1.061-3.076.163-.36.658-1.259.842-1.546 0 0 .239-.373.131-.77-.031-.116-.091-.16-.168-.152zm3.072 2.976c-.12.264-.144.648-.18.956-.274-.031-.63-.066-.904-.083.172.215.501.426.766.525-.034.265-.314.486-.434.741.332-.092.49-.34.717-.596.263.16.575.456.914.462-.127-.273-.242-.504-.477-.701.195-.127.52-.262.67-.46a1.77 1.77 0 0 0-.763-.01c-.187-.206-.217-.56-.309-.834zm-1.123 2.422c-.083.183-.1.449-.125.662a12.6 12.6 0 0 0-.624-.058c.119.148.346.295.53.363-.025.184-.219.336-.301.513.23-.064.339-.236.496-.413.181.11.397.316.632.32-.088-.19-.168-.349-.33-.485.135-.087.36-.181.463-.317a1.22 1.22 0 0 0-.527-.008c-.13-.142-.151-.387-.214-.576z"/></g>`,yaml:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#FCEEEF" stroke="#F0D8DB" stroke-width=".5"/><svg x="2.75" y="2.75" width="14.5" height="14.5" viewBox="0 0 128 128" preserveAspectRatio="xMidYMid meet">
75
+ <polygon transform="matrix(.24805 0 0 .24805 .5 5.6287)" points="87.702 137.67 0 0 63.25 0 119.02 88.646 175.24 0 235.79 0 143.98 137.67 143.98 224.95 87.702 224.95"/>
76
+ <path d="m82.428 49.149h-25.266l-5.1388 12.408h-11.188l23.659-55.798h11.444l22.699 55.798h-11.956l-4.2525-12.408zm-4.197-11.14-7.7455-20.476-8.6412 20.476z" fill="#cb171e"/>
77
+ <polygon transform="matrix(.24805 0 0 .24805 .5 5.6287)" points="87.701 250.18 87.701 470.65 135 470.65 135 318.57 184.51 420.79 221.74 420.79 272.94 314.98 272.94 470.6 318.32 470.6 318.32 250.18 256.36 250.18 201.38 349.88 149.02 250.18"/>
78
+ <polygon transform="matrix(.24805 0 0 .24805 .5 5.6287)" points="512 422.74 512 422.74 395.64 422.74 395.64 250.12 347.44 250.12 347.44 469.65 512 469.65"/>
79
+ </svg>`,zig:`<rect x="1" y="1" width="18" height="18" rx="4" fill="#FFF4DF" stroke="#DDE2E8" stroke-width=".5"/><g transform="translate(3 3) scale(.5833333333)"><path fill="#E18A00" d="m23.53 1.02-7.686 3.45h-7.06l-2.98 3.452h7.173L.47 22.98l7.681-3.607h7.065v-.002l2.978-3.45-7.148-.001 12.482-14.9zM0 4.47v14.901h1.883l2.98-3.45H3.451v-8h.942l2.824-3.45H0zm22.117 0-2.98 3.608h1.412v7.844h-.942l-2.98 3.45H24V4.47h-1.883z"/></g>`});var EA=new Set(`angular.c.clojure.cmake.cpp.csharp.css.dart.docker.elixir.env.erlang.flutter.git.go.graphql.haskell.ini.java.javascript.json.kotlin.lua.makefile.node.objective-c.perl.php.powershell.protobuf.python.r.react.ruby.rust.scala.shell.solidity.sql.svelte.swift.toml.typescript.vue.wasm.xml.yaml.zig`.split(`.`)),DA={".bash_profile":`shell`,".bashrc":`shell`,".env":`env`,".gitattributes":`git`,".gitconfig":`git`,".gitignore":`git`,".gitmodules":`git`,".mailmap":`git`,".profile":`shell`,".zprofile":`shell`,".zshrc":`shell`,bsdmakefile:`makefile`,"cmakelists.txt":`cmake`,commit_editmsg:`git`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,gemfile:`ruby`,gnumakefile:`makefile`,guardfile:`ruby`,makefile:`makefile`,"npm-shrinkwrap.json":`node`,"package-lock.json":`node`,"package.json":`node`,podfile:`ruby`,rakefile:`ruby`},OA=[[`dockerfile.`,`docker`],[`.env.`,`env`]],kA=[[`.component.ts`,`angular`],[`.component.html`,`angular`],[`.directive.ts`,`angular`],[`.service.ts`,`angular`],[`.module.ts`,`angular`],[`.pipe.ts`,`angular`],[`.guard.ts`,`angular`],[`.interceptor.ts`,`angular`],[`.dockerfile`,`docker`]],AA={bash:`shell`,c:`c`,"c++":`cpp`,cc:`cpp`,cfg:`ini`,cjs:`javascript`,clj:`clojure`,cljc:`clojure`,cljs:`clojure`,cmake:`cmake`,cpp:`cpp`,cs:`csharp`,csh:`shell`,css:`css`,csx:`csharp`,cts:`typescript`,cxx:`cpp`,dart:`dart`,dtd:`xml`,edn:`clojure`,env:`env`,erl:`erlang`,es6:`javascript`,escript:`erlang`,ex:`elixir`,exs:`elixir`,fish:`shell`,gemspec:`ruby`,go:`go`,gql:`graphql`,graphql:`graphql`,h:`c`,"h++":`cpp`,hh:`cpp`,hpp:`cpp`,hrl:`erlang`,hs:`haskell`,hxx:`cpp`,ini:`ini`,ipp:`cpp`,java:`java`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsx:`react`,ksh:`shell`,kt:`kotlin`,kts:`kotlin`,lhs:`haskell`,lua:`lua`,m:`objective-c`,mak:`makefile`,mjs:`javascript`,mk:`makefile`,mm:`objective-c`,mts:`typescript`,node:`node`,pch:`objective-c`,php:`php`,php3:`php`,php4:`php`,php5:`php`,phps:`php`,phtml:`php`,pl:`perl`,plist:`xml`,pm:`perl`,pod:`perl`,proto:`protobuf`,ps1:`powershell`,psd1:`powershell`,psm1:`powershell`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,r:`r`,rake:`ruby`,rb:`ruby`,rmd:`r`,rs:`rust`,sc:`scala`,scala:`scala`,sh:`shell`,sol:`solidity`,sql:`sql`,svelte:`svelte`,swift:`swift`,t:`perl`,tcsh:`shell`,toml:`toml`,tpp:`cpp`,ts:`typescript`,tsx:`react`,vue:`vue`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,xml:`xml`,xsd:`xml`,xsl:`xml`,xslt:`xml`,yaml:`yaml`,yml:`yaml`,zig:`zig`,zsh:`shell`},jA=new Set(`ts.tsx.js.jsx.mjs.cjs.cts.mts.css.scss.sass.less.html.htm.vue.svelte.astro.json.jsonc.json5.yaml.yml.toml.xml.ini.env.sh.bash.zsh.fish.ps1.bat.cmd.py.pyi.rb.rs.go.java.kt.kts.c.cc.cpp.cxx.h.hh.hpp.cs.php.swift.sql.proto.graphql.gql.lua.r.pl.scala.clj.cljs.ex.exs.erl.hs.dart`.split(`.`));function MA(e){return e.slice(Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`))+1)}function NA(e){return EA.has(e)}function PA(e){return jA.has(e.toLowerCase())}function FA(e,t,n){let r=DA[e];if(r!==void 0)return r;for(let[t,n]of OA)if(e.startsWith(t))return n;for(let[t,n]of kA)if(e.endsWith(t))return n;return t===`dart`&&n!==void 0&&(Object.entries(n.files).find(([e])=>MA(e).toLowerCase()===`pubspec.yaml`)?.[1])?.includes(`flutter:`)===!0?`flutter`:AA[t]??null}var IA={scss:`code`,sass:`code`,less:`code`,vue:`code`,svelte:`code`,astro:`code`,bat:`code`,cmd:`code`,csv:`excel`,tsv:`excel`,html:`html`,htm:`html`,png:`image`,jpg:`image`,jpeg:`image`,gif:`image`,svg:`image`,webp:`image`,avif:`image`,bmp:`image`,ico:`image`,tif:`image`,tiff:`image`,heic:`image`,heif:`image`,md:`markdown`,mdx:`markdown`,markdown:`markdown`,pdf:`pdf`,ppt:`ppt`,pptx:`ppt`,key:`ppt`,mp4:`video`,mov:`video`,m4v:`video`,webm:`video`,mkv:`video`,avi:`video`,mpg:`video`,mpeg:`video`,doc:`word`,docx:`word`,rtf:`word`,odt:`word`,pages:`word`,xls:`excel`,xlsx:`excel`,xlsm:`excel`,xlsb:`excel`,xlt:`excel`,xltx:`excel`,xltm:`excel`,ods:`excel`,ots:`excel`,fods:`excel`,numbers:`excel`},LA={changelog:`markdown`,contributing:`markdown`,readme:`markdown`};function RA(e){return e.slice(Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`))+1)}function zA(e){let t=RA(e),n=t.lastIndexOf(`.`);return n<0?``:t.slice(n+1)}function BA(e,t){let n=RA(e).toLowerCase(),r=zA(n).toLowerCase();return FA(n,r,t)??LA[n]??IA[r]??`other`}function VA(e,t){let n=e=>{if(e.type===`paragraph`&&e.children.length===1){let[n]=e.children;if(n.type===`text`&&n.position!==void 0&&t.slice(n.position.start.offset,n.position.end.offset)===n.value){let t=/^!\[([^\]\n]*)\]\(((?:\/(?!\/)|\.{1,2}\/|[a-z]:[\\/])[^\n<>()[\]"']+\.[a-z\d]+)\)$/iu.exec(n.value);t!==null&&t[2].includes(` `)&&BA(t[2])===`image`&&(e.children=[{type:`image`,alt:t[1],url:t[2],position:n.position}])}}else if(`children`in e)for(let t of e.children)n(t)};return n(e),e}function HA(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}var UA={tokenize:GA,concrete:!0,name:`mathFlow`},WA={tokenize:KA,partial:!0};function GA(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),ui(e,l,`whitespace`)(t))}function l(t){return t===null||ri(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||ri(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(WA,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?ui(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):ri(t)?e.attempt(WA,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||ri(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return ui(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),ui(e,c,`whitespace`)(t))}function c(r){return r===null||ri(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function KA(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function qA(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:JA,previous:YA,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):ri(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||ri(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function JA(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function YA(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function XA(e){return{flow:{36:UA},text:{36:qA(e)}}}var ZA={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},QA={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:`CDATA[`,characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:`content`,contentTypeDocument:`document`,contentTypeFlow:`flow`,contentTypeString:`string`,contentTypeText:`text`,hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},$A={data:`data`,whitespace:`whitespace`,lineEnding:`lineEnding`,lineEndingBlank:`lineEndingBlank`,linePrefix:`linePrefix`,lineSuffix:`lineSuffix`,atxHeading:`atxHeading`,atxHeadingSequence:`atxHeadingSequence`,atxHeadingText:`atxHeadingText`,autolink:`autolink`,autolinkEmail:`autolinkEmail`,autolinkMarker:`autolinkMarker`,autolinkProtocol:`autolinkProtocol`,characterEscape:`characterEscape`,characterEscapeValue:`characterEscapeValue`,characterReference:`characterReference`,characterReferenceMarker:`characterReferenceMarker`,characterReferenceMarkerNumeric:`characterReferenceMarkerNumeric`,characterReferenceMarkerHexadecimal:`characterReferenceMarkerHexadecimal`,characterReferenceValue:`characterReferenceValue`,codeFenced:`codeFenced`,codeFencedFence:`codeFencedFence`,codeFencedFenceSequence:`codeFencedFenceSequence`,codeFencedFenceInfo:`codeFencedFenceInfo`,codeFencedFenceMeta:`codeFencedFenceMeta`,codeFlowValue:`codeFlowValue`,codeIndented:`codeIndented`,codeText:`codeText`,codeTextData:`codeTextData`,codeTextPadding:`codeTextPadding`,codeTextSequence:`codeTextSequence`,content:`content`,definition:`definition`,definitionDestination:`definitionDestination`,definitionDestinationLiteral:`definitionDestinationLiteral`,definitionDestinationLiteralMarker:`definitionDestinationLiteralMarker`,definitionDestinationRaw:`definitionDestinationRaw`,definitionDestinationString:`definitionDestinationString`,definitionLabel:`definitionLabel`,definitionLabelMarker:`definitionLabelMarker`,definitionLabelString:`definitionLabelString`,definitionMarker:`definitionMarker`,definitionTitle:`definitionTitle`,definitionTitleMarker:`definitionTitleMarker`,definitionTitleString:`definitionTitleString`,emphasis:`emphasis`,emphasisSequence:`emphasisSequence`,emphasisText:`emphasisText`,escapeMarker:`escapeMarker`,hardBreakEscape:`hardBreakEscape`,hardBreakTrailing:`hardBreakTrailing`,htmlFlow:`htmlFlow`,htmlFlowData:`htmlFlowData`,htmlText:`htmlText`,htmlTextData:`htmlTextData`,image:`image`,label:`label`,labelText:`labelText`,labelLink:`labelLink`,labelImage:`labelImage`,labelMarker:`labelMarker`,labelImageMarker:`labelImageMarker`,labelEnd:`labelEnd`,link:`link`,paragraph:`paragraph`,reference:`reference`,referenceMarker:`referenceMarker`,referenceString:`referenceString`,resource:`resource`,resourceDestination:`resourceDestination`,resourceDestinationLiteral:`resourceDestinationLiteral`,resourceDestinationLiteralMarker:`resourceDestinationLiteralMarker`,resourceDestinationRaw:`resourceDestinationRaw`,resourceDestinationString:`resourceDestinationString`,resourceMarker:`resourceMarker`,resourceTitle:`resourceTitle`,resourceTitleMarker:`resourceTitleMarker`,resourceTitleString:`resourceTitleString`,setextHeading:`setextHeading`,setextHeadingText:`setextHeadingText`,setextHeadingLine:`setextHeadingLine`,setextHeadingLineSequence:`setextHeadingLineSequence`,strong:`strong`,strongSequence:`strongSequence`,strongText:`strongText`,thematicBreak:`thematicBreak`,thematicBreakSequence:`thematicBreakSequence`,blockQuote:`blockQuote`,blockQuotePrefix:`blockQuotePrefix`,blockQuoteMarker:`blockQuoteMarker`,blockQuotePrefixWhitespace:`blockQuotePrefixWhitespace`,listOrdered:`listOrdered`,listUnordered:`listUnordered`,listItemIndent:`listItemIndent`,listItemMarker:`listItemMarker`,listItemPrefix:`listItemPrefix`,listItemPrefixWhitespace:`listItemPrefixWhitespace`,listItemValue:`listItemValue`,chunkDocument:`chunkDocument`,chunkContent:`chunkContent`,chunkFlow:`chunkFlow`,chunkText:`chunkText`,chunkString:`chunkString`},ej=RegExp(`\\p{Script_Extensions=Han}|\\p{Script_Extensions=Hiragana}|\\p{Script_Extensions=Katakana}|\\p{Script_Extensions=Hangul}|\\p{Script_Extensions=Bopomofo}`,`u`);function tj(e){return e!==null&&e>=0&&ej.test(String.fromCodePoint(e))}var nj={name:`cjkFriendlyAttention`,resolveAll:bi.resolveAll,tokenize:function(e,t,n){let r=this.parser.constructs.attentionMarkers.null;if(r===void 0)throw Error(`micromark CommonMark attention markers are unavailable`);let i=r,a=this.previous,o=vi(a),s=ZA.eof;return c;function c(t){return t===ZA.asterisk?(s=t,e.enter(`attentionSequence`),l(t)):n(t)}function l(n){if(n===s)return e.consume(n),l;let r=e.exit(`attentionSequence`),c=vi(n),u=!c||c===QA.characterGroupPunctuation&&!!o||i.includes(n),d=!o||o===QA.characterGroupPunctuation&&!!c||i.includes(a),f=r.end.offset-r.start.offset>=2&&oi(a)&&tj(n),p=d||f;return r._open=u,r._close=p,t(n)}}},rj={text:{[ZA.asterisk]:nj}};function ij(){return rj}var aj=function(e){if(e!==ZA.backslash)return!0;let t=this.events.at(-1);return t!==void 0&&t[1].type===$A.characterEscape},oj=function(e,t,n){return r;function r(t){return t===ZA.backslash?(e.enter(`mathText`),e.enter(`mathTextSequence`),e.consume(t),i):n(t)}function i(t){return t===ZA.leftParenthesis?(e.consume(t),e.exit(`mathTextSequence`),a):n(t)}function a(t){return t===ZA.eof?n(t):t===ZA.backslash?e.attempt({partial:!0,tokenize:d},u,o)(t):ri(t)?(e.enter($A.lineEnding),e.consume(t),e.exit($A.lineEnding),a):s(t)}function o(t){return e.check({partial:!0,tokenize:f},n,s)(t)}function s(t){return e.enter(`mathTextData`),e.consume(t),t===ZA.backslash?c:l}function c(t){return t===ZA.backslash?(e.consume(t),l):l(t)}function l(t){return t===ZA.eof||t===ZA.backslash||ri(t)?(e.exit(`mathTextData`),a(t)):(e.consume(t),l)}function u(n){return e.exit(`mathText`),t(n)}function d(e,t,n){return r;function r(t){return t===ZA.backslash?(e.enter(`mathTextSequence`),e.consume(t),i):n(t)}function i(r){return r===ZA.rightParenthesis?(e.consume(r),e.exit(`mathTextSequence`),t):n(r)}}function f(e,t,n){return r;function r(t){return t===ZA.backslash?(e.enter($A.chunkString),e.consume(t),i):n(t)}function i(r){return r===ZA.leftParenthesis?(e.consume(r),e.exit($A.chunkString),t):n(r)}}};function sj(e,t,n,r){return{concrete:!0,name:e===ZA.dollarSign?`sameLineDollarMathFlow`:`backslashMathFlow`,tokenize:function(i,a,o){let s=this,c=!1,l=s.events.at(-1),u=l?.[1].type===$A.linePrefix?l[2].sliceSerialize(l[1],!0).length:0;return d;function d(t){return t===e?(i.enter(`mathFlow`),i.enter(`mathFlowFence`),i.enter(`mathFlowFenceSequence`),i.consume(t),f):o(t)}function f(n){return n===t?(i.consume(n),i.exit(`mathFlowFenceSequence`),i.exit(`mathFlowFence`),e===ZA.dollarSign?p:m):o(n)}function p(e){return e===ZA.dollarSign?o(e):m(e)}function m(t){return t===ZA.eof?o(t):t===e&&(e!==ZA.dollarSign||!c)?i.attempt({partial:!0,tokenize:S},x,h)(t):ri(t)?r?i.attempt(cj,g,o)(t):o(t):_(t)}function h(t){return e===ZA.backslash?i.check({partial:!0,tokenize:C},o,v)(t):v(t)}function g(e){return i.attempt({partial:!0,tokenize:S},x,u?ui(i,m,$A.linePrefix,u+1):m)(e)}function _(e){return i.enter(`mathFlowValue`),c=e===ZA.backslash,i.consume(e),b}function v(e){return i.enter(`mathFlowValue`),c=!1,i.consume(e),y}function y(t){return t===e?(i.consume(t),b):b(t)}function b(t){return t===ZA.eof||t===e||ri(t)?(i.exit(`mathFlowValue`),m(t)):(c=t===ZA.backslash&&!c,i.consume(t),b)}function x(e){return i.exit(`mathFlow`),a(e)}function S(t,r,i){return ui(t,a,$A.linePrefix,QA.tabSize);function a(n){return n===e?(t.enter(`mathFlowFence`),t.enter(`mathFlowFenceSequence`),t.consume(n),o):i(n)}function o(e){return e===n?(t.consume(e),t.exit(`mathFlowFenceSequence`),ui(t,s,$A.whitespace)):i(e)}function s(e){return e!==ZA.eof&&!ri(e)?i(e):(t.exit(`mathFlowFence`),r(e))}}function C(n,r,i){return a;function a(t){return t===e?(n.enter($A.chunkString),n.consume(t),o):i(t)}function o(e){return e===t?(n.consume(e),n.exit($A.chunkString),r):i(e)}}}}}var cj={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(r){return r===ZA.eof?t(r):ri(r)?(e.enter($A.lineEnding),e.consume(r),e.exit($A.lineEnding),a):n(r)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},lj={name:`backslashMathText`,previous:aj,tokenize:oj},uj=sj(ZA.backslash,ZA.leftSquareBracket,ZA.rightSquareBracket,!0),dj=sj(ZA.dollarSign,ZA.dollarSign,ZA.dollarSign,!1),fj={flow:{[ZA.backslash]:uj,[ZA.dollarSign]:dj},text:{[ZA.backslash]:lj}};function pj(){return fj}function mj(e){return VA(Mo(e,{extensions:[qd(),ij()],mdastExtensions:[Qu()]}),e)}function hj(e){return VA(Mo(e,{extensions:[qd(),ij(),pj(),XA()],mdastExtensions:[Qu(),HA()]}),e)}var gj=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function _j(e){return vj(e)}function vj(e){return Array.isArray(e)?yj(e):e instanceof RegExp?e:typeof e==`object`?bj(e):e}function yj(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=vj(e[n]);return t}function bj(e){let t={};for(let n in e)t[n]=vj(e[n]);return t}function xj(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Sj(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Sj(e.substring(0,e.length-1)):e.substr(~t+1)}var Cj=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,wj=class{static hasCaptures(e){return e!==null&&(Cj.lastIndex=0,Cj.test(e))}static replaceCaptures(e,t,n){return e.replace(Cj,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Tj(e,t){return e<t?-1:+(e>t)}function Ej(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Tj(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Dj(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Oj(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var kj=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Aj=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Fj(e),t)}static createFromParsedTheme(e,t){return Rj(e,t)}_cachedMatchRoot=new kj(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Mj(e.parent,t.parentScopes));return n?new Pj(n.fontStyle,n.foreground,n.background):null}},jj=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Mj(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Nj(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Nj(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Pj=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Fj(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Dj(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Dj(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Ij(l,u,e,o,s,c)}}return n}var Ij=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Lj=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Lj||{});function Rj(e,t){e.sort((e,t)=>{let n=Tj(e.scope,t.scope);return n!==0||(n=Ej(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new zj(t),o=new Pj(n,a.getId(r),a.getId(i)),s=new Hj(new Vj(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Aj(a,o,s)}var zj=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Bj=Object.freeze([]),Vj=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Bj,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Hj=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Vj.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null)this._mainRule.acceptOverwrite(e,n,r,i);else{for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Ej(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Vj(e,t,n,r,i))}}},Uj=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Gj(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Wj(e){return e}function Gj(e){return e}function Kj(e,t){let n=[],r=Jj(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(qj(i)){let e=[];do e.push(i),i=r.next();while(qj(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function qj(e){return!!e&&!!e.match(/[\w\.:]+/)}function Jj(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Yj(e){typeof e.dispose==`function`&&e.dispose()}var Xj=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Zj=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Qj=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},$j=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Xj(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Qj;for(let n of e)eM(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Xj){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function eM(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Xj?nM({baseGrammar:a,selfGrammar:i},r):tM(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Xj(e))}function tM(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];rM([r],t,n)}}function nM(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&rM(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&rM(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function rM(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?xj({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&rM(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=lM(i);switch(a.kind){case 0:nM({...t,selfGrammar:t.baseGrammar},n);break;case 1:nM(t,n);break;case 2:tM(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?tM(a.ruleName,i,n):nM(i,n)}else a.kind===4?n.add(new Zj(a.scopeName,a.ruleName)):n.add(new Xj(a.scopeName))}}}var iM=class{kind=0},aM=class{kind=1},oM=class{constructor(e){this.ruleName=e}kind=2},sM=class{constructor(e){this.scopeName=e}kind=3},cM=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function lM(e){if(e===`$base`)return new iM;if(e===`$self`)return new aM;let t=e.indexOf(`#`);return t===-1?new sM(e):t===0?new oM(e.substring(1)):new cM(e.substring(0,t),e.substring(t+1))}var uM=/\\(\d+)/,dM=/\\(\d+)/g,fM=-1,pM=-2;function mM(e){return e}function hM(e){return e}var gM=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=wj.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=wj.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Sj(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:wj.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:wj.replaceCaptures(this._contentName,e,t)}},_M=class extends gM{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},vM=class extends gM{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new CM(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new wM,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},yM=class extends gM{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new wM,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},bM=class extends gM{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new CM(i,this.id),this.beginCaptures=a,this._end=new CM(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new wM;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},xM=class extends gM{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new CM(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new CM(o,pM),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new wM;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new wM,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},SM=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new _M(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new vM(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=xj({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new yM(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new xM(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new bM(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=lM(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof yM||e instanceof bM||e instanceof xM)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},CM=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&uM.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return dM.lastIndex=0,this.source.replace(dM,(e,t)=>Oj(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},wM=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new TM(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new TM(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},TM=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
80
+ `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},EM=class{constructor(e,t){this.languageId=e,this.tokenType=t}},DM=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new EM(e,8),this._embeddedLanguagesMatcher=new OM(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new EM(0,0);_getBasicScopeAttributes=new kj(e=>new EM(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},OM=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Oj(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var kM=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function AM(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=jM(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new kM(i,!0);f()}return new kM(i,!1);function f(){let o=MM(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===fM){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),LM(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof bM){let r=o;LM(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof xM){let r=o;LM(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(LM(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function jM(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof xM&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=IM(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==pM){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),LM(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function MM(e,t,n,r,i,a){let o=NM(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=PM(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function NM(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=FM(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function PM(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=FM(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function FM(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function IM(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function LM(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));AM(e,p,n&&d.start===0,d.start,f,i,!1,0),Yj(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new RM(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var RM=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function zM(e,t,n,r,i,a,o,s){return new UM(e,t,n,r,i,a,o,s)}function BM(e,t,n,r,i){let a=Kj(t,VM),o=SM.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function VM(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(HM(t[r],e))return n=r+1,!0;return!1})}function HM(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var UM=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new DM(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=WM(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Kj(e,VM);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)BM(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&BM(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(mM(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[hM(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=WM(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=SM.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===KM.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Uj.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?GM.createRootAndLookUpScopeName(a,r,this):GM.createRoot(`unknown`,r),t=new KM(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
81
+ `;let a=this.createOnigString(e),o=a.content.length,s=new JM(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=AM(this,a,i,0,t,s,!0,r);return Yj(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function WM(e,t){return e=_j(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var GM=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=jj.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new jj(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new jj(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Uj.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},KM=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?GM.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:hM(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=GM.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,mM(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,GM.fromExtension(r,n.contentNameScopesList))}},qM=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Kj(e,VM).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Kj(e,VM).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},JM=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Uj.set(n,0,Wj(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Uj.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},YM=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,zM(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},XM=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new YM(Aj.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Aj.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new qM(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new $j(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},ZM=KM.NULL;function QM(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function $M(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function eN(e){return Array.isArray(e)?e:[e]}async function tN(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function nN(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function rN(e){return e===`ansi`||nN(e)}function iN(e){return e===`none`}function aN(e){return iN(e)}var oN=/(\r?\n)/g;function sN(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(oN),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var cN={light:`#333333`,dark:`#bbbbbb`},lN={light:`#fffffe`,dark:`#1e1e1e`},uN=`__shiki_resolved`;function dN(e){if(e?.[uN])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?cN.light:cN.dark,n||=t.type===`light`?lN.light:lN.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,uN,{enumerable:!1,writable:!1,value:!0}),t}async function fN(e){return[...new Set((await Promise.all(e.filter(e=>!rN(e)).map(async e=>await tN(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function pN(e){return(await Promise.all(e.map(async e=>aN(e)?null:dN(await tN(e))))).filter(e=>!!e)}function mN(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new gj(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var hN=class extends XM{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=dN(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Aj.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=mN(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new gj(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},gN=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},_N=0;function vN(e){_N+=1,e.warnings!==!1&&_N>=10&&_N%10==0&&console.warn(`[Shiki] ${_N} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new gj("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(dN),i=new hN(new gN(e.engine,n),r,n,e.langAlias),a;function o(t){return mN(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new gj(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new gj(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await fN(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await pN(e))}function g(){if(t)throw new gj(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--_N)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}var yN=new WeakMap;function bN(e,t){yN.set(e,t)}function xN(e){return yN.get(e)}var SN=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(eN(n).map(e=>[e,ZM])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return CN(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function CN(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function wN(e,t){if(!(e instanceof SN))throw new gj(`Invalid grammar state`);return e.getInternalStack(t)}var TN=/,/,EN=/ /;function DN(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(nN(e.resolveLangAlias(n.lang||`text`))||iN(r))return sN(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new gj(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new gj(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return kN(t,o,i,a,n)}function ON(...e){if(e.length===2)return xN(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(nN(i)||iN(a))throw new gj(`Plain language does not have grammar state`);if(i===`ansi`)throw new gj(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new SN(AN(n,c,o,s,r).stateStack,c.name,o.name)}function kN(e,t,n,r,i){let a=AN(e,t,n,r,i),o=new SN(a.stateStack,t.name,n.name);return bN(a.tokens,o),a.tokens}function AN(e,t,n,r,i){let a=QM(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=sN(e),u=i.grammarState?wN(i.grammarState,n.name)??ZM:i.grammarContextCode==null?ZM:AN(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=$M(r[Uj.getForeground(s)],a),u=Uj.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Uj.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(TN).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(EN))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?jN(t.scopes):MN(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function jN(e){return e.map(e=>({scopeName:e}))}function MN(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:FN(e,i,t.slice(0,r))}}return n}function NN(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function PN(e,t,n){if(!NN(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)NN(e[r],n[i])&&--r,--i;return r===-1}function FN(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(PN(e,t,n)){r.push(a);break}return r}function IN(e,t,n,r=DN){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:xN(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=LN(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new SN(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&bN(s,c),s}function LN(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var RN=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],zN=/["&'<>`]/g,BN=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,VN=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,HN=/[|\\{}()[\]^$+*?.]/g,UN=new WeakMap;function WN(e,t){return e=e.replace(t.subset?GN(t.subset):zN,r),t.subset||t.escapeOnly?e:e.replace(BN,n).replace(VN,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function GN(e){let t=UN.get(e);return t||(t=KN(e),UN.set(e,t)),t}function KN(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(HN,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var qN=/[\dA-Fa-f]/;function JN(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!qN.test(String.fromCharCode(t))?r:r+`;`}var YN=/\d/;function XN(e,t,n){let r=`&#`+String(e);return n&&t&&!YN.test(String.fromCharCode(t))?r:r+`;`}var ZN=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),QN={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},$N=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],eP={}.hasOwnProperty,tP={},nP;for(nP in QN)eP.call(QN,nP)&&(tP[QN[nP]]=nP);var rP=/[^\dA-Za-z]/;function iP(e,t,n,r){let i=String.fromCharCode(e);if(eP.call(tP,i)){let e=tP[i],a=`&`+e;return n&&ZN.includes(e)&&!$N.includes(e)&&(!r||t&&t!==61&&rP.test(String.fromCharCode(t)))?a:a+`;`}return``}function aP(e,t,n){let r=JN(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=iP(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=XN(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function oP(e,t){return WN(e,Object.assign({format:aP},t))}var sP=/^>|^->|<!--|-->|--!>|<!-$/g,cP=[`>`],lP=[`<`,`>`];function uP(e,t,n,r){return r.settings.bogusComments?`<?`+oP(e.value,Object.assign({},r.settings.characterReferences,{subset:cP}))+`>`:`<!--`+e.value.replace(sP,i)+`-->`;function i(e){return oP(e,Object.assign({},r.settings.characterReferences,{subset:lP}))}}function dP(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var fP=hP(1),pP=hP(-1),mP=[];function hP(e){return t;function t(t,n,r){let i=t?t.children:mP,a=(n||0)+e,o=i[a];if(!r)for(;o&&ln(o);)a+=e,o=i[a];return o}}var gP={}.hasOwnProperty;function _P(e){return t;function t(t,n,r){return gP.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var vP=_P({body:xP,caption:yP,colgroup:yP,dd:TP,dt:wP,head:yP,html:bP,li:CP,optgroup:DP,option:OP,p:SP,rp:EP,rt:EP,tbody:AP,td:NP,tfoot:jP,th:NP,thead:kP,tr:MP});function yP(e,t,n){let r=fP(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&ln(r.value.charAt(0)))}function bP(e,t,n){let r=fP(n,t);return!r||r.type!==`comment`}function xP(e,t,n){let r=fP(n,t);return!r||r.type!==`comment`}function SP(e,t,n){let r=fP(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function CP(e,t,n){let r=fP(n,t);return!r||r.type===`element`&&r.tagName===`li`}function wP(e,t,n){let r=fP(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function TP(e,t,n){let r=fP(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function EP(e,t,n){let r=fP(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function DP(e,t,n){let r=fP(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function OP(e,t,n){let r=fP(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function kP(e,t,n){let r=fP(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function AP(e,t,n){let r=fP(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function jP(e,t,n){return!fP(n,t)}function MP(e,t,n){let r=fP(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function NP(e,t,n){let r=fP(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var PP=_P({body:LP,colgroup:RP,head:IP,html:FP,tbody:zP});function FP(e){let t=fP(e,-1);return!t||t.type!==`comment`}function IP(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function LP(e){let t=fP(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&ln(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function RP(e,t,n){let r=pP(n,t),i=fP(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&vP(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function zP(e,t,n){let r=pP(n,t),i=fP(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&vP(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var BP={name:[[`
82
+ \f\r &/=>`.split(``),`
83
+ \f\r "&'/=>\``.split(``)],[`\0
84
+ \f\r "&'/<=>`.split(``),`\0
85
+ \f\r "&'/<=>\``.split(``)]],unquoted:[[`
86
+ \f\r &>`.split(``),`\0
87
+ \f\r "&'<=>\``.split(``)],[`\0
88
+ \f\r "&'<=>\``.split(``),`\0
89
+ \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function VP(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Wn);let l=HP(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),!l&&a&&PP(e,t,n)||(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),o||a&&vP(e,t,n)||s.push(`</`+e.tagName+`>`),s.join(``)}function HP(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=UP(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function UP(e,t,n){let r=Bn(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=oP(r.attribute,Object.assign({},e.settings.characterReferences,{subset:BP.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?nn:Gn)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=oP(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:BP.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Jc(n,o)>Jc(n,e.alternative)&&(o=e.alternative),s=o+oP(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?BP.single:BP.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var WP=[`<`,`&`];function GP(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:oP(e.value,Object.assign({},r.settings.characterReferences,{subset:WP}))}function KP(e,t,n,r){return r.settings.allowDangerousHtml?e.value:GP(e,t,n,r)}function qP(e,t,n,r){return r.all(e)}var JP=Hl(`type`,{invalid:YP,unknown:XP,handlers:{comment:uP,doctype:dP,element:VP,raw:KP,root:qP,text:GP}});function YP(e){throw Error("Expected node, not `"+e+"`")}function XP(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var ZP={},QP={},$P=[];function eF(e,t){let n=t||ZP,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:tF,all:nF,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||RN,characterReferences:n.characterReferences||QP,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Wn:Un,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function tF(e,t,n){return JP(e,t,n,this)}function nF(e){let t=[],n=e&&e.children||$P,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var rF=/\s+/g;function iF(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(rF)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(rF);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function aF(e){let t=sN(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}var oF=[`color`,`background-color`];function sF(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function cF(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function lF(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=cF(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return sF(e,a)})):e}function uF(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>dF(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&oF.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new gj('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function dF(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Lj.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Lj.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Lj.Underline&&n.push(`underline`),e.fontStyle&Lj.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function fF(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function pF(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=aF(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new gj(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new gj(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new gj(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));mF(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return lF(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new gj(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=hF(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new gj(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new gj(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&iF(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function mF(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new gj(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new gj(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function hF(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(hF).join(``):``}var gF=[pF()];function _F(e){let t=vF(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...gF]}function vF(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var yF=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],bF={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function xF(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function SF(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function CF(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)bF[r]&&t.push({type:`setDecoration`,value:bF[r]});else if(r<=29){let e=bF[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:yF[r-30]}});else if(r===38){let n=SF(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:yF[r-40]}});else if(r===48){let n=SF(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:yF[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:yF[r-100+8]}})}}return t}function wF(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=xF(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=CF(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var TF={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function EF(e=TF){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<yF.length;e++)r.push(t(yF[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var DF=/#([0-9a-f]{3,8})/i,OF=/var\((--[\w-]+-ansi-[\w-]+)\)/,kF={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function AF(e,t,n){let r=QM(e,n),i=sN(t),a=EF(Object.fromEntries(yF.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||kF[t]]}))),o=wF();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=$M(i,r),o=$M(o,r),n.decorations.has(`dim`)&&(i=jF(i));let s=Lj.None;return n.decorations.has(`bold`)&&(s|=Lj.Bold),n.decorations.has(`italic`)&&(s|=Lj.Italic),n.decorations.has(`underline`)&&(s|=Lj.Underline),n.decorations.has(`strikethrough`)&&(s|=Lj.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function jF(e){let t=e.match(DF);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(OF);return n?`var(${n[1]}-dim)`:e}function MF(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!nN(r)&&!iN(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return AF(r,t,n)}return DN(e,t,n)}function NF(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new gj("`themes` option must not be empty");let p=IN(e,t,n,MF);if(c=xN(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new gj(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>uF(e,h,u,l,d))),c&&bN(a,c);let g=f.map(e=>QM(e.theme,n));i=PF(f,m,g,u,l,`fg`,d),r=PF(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=QM(n.theme,n);a=MF(e,t,n);let l=e.getTheme(n.theme);r=$M(l.bg,s),i=$M(l.fg,s),o=l.name,c=xN(a)}else throw new gj("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function PF(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=$M(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new gj('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${$M(t[r][a],n[r])||`inherit`}, ${$M(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var FF=/^\s+$/,IF=/^(\s*)(.*?)(\s*)$/;function LF(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>LF(e,t,n),codeToTokens:(t,n)=>NF(e,t,n)}){let i=t;for(let e of _F(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=NF(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=zF(a):d===`never`&&(a=BF(a)),f&&(a=VF(a));let p={...r,get source(){return i}};for(let e of _F(n))a=e.tokens?.call(p,a)||a;return RF(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function RF(e,t,n,r=xN(e)){let i=_F(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:iF,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
90
+ `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=fF(a.htmlStyle||dF(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&bN(m,r),m}function zF(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Lj.Underline||i.fontStyle&Lj.Strikethrough));o&&FF.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function BF(e){return e.map(e=>e.flatMap(e=>{if(FF.test(e.content))return e;let t=e.content.match(IF);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function VF(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=fF(e.htmlStyle||dF(e)),i=fF(n.htmlStyle||dF(n)),a=e.fontStyle&&(e.fontStyle&Lj.Underline||e.fontStyle&Lj.Strikethrough),o=n.fontStyle&&(n.fontStyle&Lj.Underline||n.fontStyle&Lj.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var HF=eF;function UF(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>LF(e,t,n),codeToTokens:(t,n)=>NF(e,t,n)},i=HF(LF(e,t,n,r));for(let e of _F(n))i=e.postprocess?.call(r,i,n)||i;return i}function WF(e){let t=vN(e);return{getLastGrammarState:(...e)=>ON(t,...e),codeToTokensBase:(e,n)=>MF(t,e,n),codeToTokensWithThemes:(e,n)=>IN(t,e,n),codeToTokens:(e,n)=>NF(t,e,n),codeToHast:(e,n)=>LF(t,e,n),codeToHtml:(e,n)=>UF(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function GF(e={}){let{name:t=`css-variables`,variablePrefix:n=`--shiki-`,fontStyle:r=!0}=e,i=t=>e.variableDefaults?.[t]?`var(${n}${t}, ${e.variableDefaults[t]})`:`var(${n}${t})`,a={name:t,type:`dark`,colors:{"editor.foreground":i(`foreground`),"editor.background":i(`background`),"terminal.ansiBlack":i(`ansi-black`),"terminal.ansiRed":i(`ansi-red`),"terminal.ansiGreen":i(`ansi-green`),"terminal.ansiYellow":i(`ansi-yellow`),"terminal.ansiBlue":i(`ansi-blue`),"terminal.ansiMagenta":i(`ansi-magenta`),"terminal.ansiCyan":i(`ansi-cyan`),"terminal.ansiWhite":i(`ansi-white`),"terminal.ansiBrightBlack":i(`ansi-bright-black`),"terminal.ansiBrightRed":i(`ansi-bright-red`),"terminal.ansiBrightGreen":i(`ansi-bright-green`),"terminal.ansiBrightYellow":i(`ansi-bright-yellow`),"terminal.ansiBrightBlue":i(`ansi-bright-blue`),"terminal.ansiBrightMagenta":i(`ansi-bright-magenta`),"terminal.ansiBrightCyan":i(`ansi-bright-cyan`),"terminal.ansiBrightWhite":i(`ansi-bright-white`)},tokenColors:[{scope:[`keyword.operator.accessor`,`meta.group.braces.round.function.arguments`,`meta.template.expression`,`markup.fenced_code meta.embedded.block`],settings:{foreground:i(`foreground`)}},{scope:`emphasis`,settings:{fontStyle:`italic`}},{scope:[`strong`,`markup.heading.markdown`,`markup.bold.markdown`],settings:{fontStyle:`bold`}},{scope:[`markup.italic.markdown`],settings:{fontStyle:`italic`}},{scope:`meta.link.inline.markdown`,settings:{fontStyle:`underline`,foreground:i(`token-link`)}},{scope:[`string`,`markup.fenced_code`,`markup.inline`],settings:{foreground:i(`token-string`)}},{scope:[`comment`,`string.quoted.docstring.multi`],settings:{foreground:i(`token-comment`)}},{scope:[`constant.numeric`,`constant.language`,`constant.other.placeholder`,`constant.character.format.placeholder`,`variable.language.this`,`variable.other.object`,`variable.other.class`,`variable.other.constant`,`meta.property-name`,`meta.property-value`,`support`],settings:{foreground:i(`token-constant`)}},{scope:[`keyword`,`storage.modifier`,`storage.type`,`storage.control.clojure`,`entity.name.function.clojure`,`entity.name.tag.yaml`,`support.function.node`,`support.type.property-name.json`,`punctuation.separator.key-value`,`punctuation.definition.template-expression`],settings:{foreground:i(`token-keyword`)}},{scope:`variable.parameter.function`,settings:{foreground:i(`token-parameter`)}},{scope:[`support.function`,`entity.name.type`,`entity.other.inherited-class`,`meta.function-call`,`meta.instance.constructor`,`entity.other.attribute-name`,`entity.name.function`,`constant.keyword.clojure`],settings:{foreground:i(`token-function`)}},{scope:[`entity.name.tag`,`string.quoted`,`string.regexp`,`string.interpolated`,`string.template`,`string.unquoted.plain.out.yaml`,`keyword.other.template`],settings:{foreground:i(`token-string-expression`)}},{scope:[`punctuation.definition.arguments`,`punctuation.definition.dict`,`punctuation.separator`,`meta.function-call.arguments`],settings:{foreground:i(`token-punctuation`)}},{scope:[`markup.underline.link`,`punctuation.definition.metadata.markdown`],settings:{foreground:i(`token-link`)}},{scope:[`beginning.punctuation.definition.list.markdown`],settings:{foreground:i(`token-string`)}},{scope:[`punctuation.definition.string.begin.markdown`,`punctuation.definition.string.end.markdown`,`string.other.link.title.markdown`,`string.other.link.description.markdown`],settings:{foreground:i(`token-keyword`)}},{scope:[`markup.inserted`,`meta.diff.header.to-file`,`punctuation.definition.inserted`],settings:{foreground:i(`token-inserted`)}},{scope:[`markup.deleted`,`meta.diff.header.from-file`,`punctuation.definition.deleted`],settings:{foreground:i(`token-deleted`)}},{scope:[`markup.changed`,`punctuation.definition.changed`],settings:{foreground:i(`token-changed`)}}]};return r||(a.tokenColors=a.tokenColors?.map(e=>(e.settings?.fontStyle&&delete e.settings.fontStyle,e))),a}var KF=4294967295;function qF(e){return!e.sticky&&!e.rawOptions?.strategy}function JF(e,t){return{index:e,captureIndices:t.map(e=>e==null?{start:KF,end:KF,length:0}:{start:e[0],end:e[1],length:e[1]-e[0]})}}var YF=class{patterns;options;regexps;lastSearches;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}}),this.lastSearches=this.regexps.map(e=>e&&qF(e)?{strId:0,searchedFrom:0,matchIndex:-1,indices:null}:null)}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=typeof e==`string`?0:e.id||0,a=-1,o=0,s=null;for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{let c=i?this.lastSearches[e]:null,l,u;if(c&&c.strId===i&&c.searchedFrom<=t&&(c.matchIndex===-1||c.matchIndex>=t))l=c.matchIndex,u=c.indices;else{n.lastIndex=t;let e=n.exec(r);l=e?e.index:-1,u=e?e.indices:null,c&&(c.strId=i,c.searchedFrom=t,c.matchIndex=l,c.indices=u)}if(l===-1)continue;if(l===t)return JF(e,u);(a===-1||l<o)&&(a=e,o=l,s=u)}catch(e){if(this.options.forgiving)continue;throw e}}return a===-1?null:JF(a,s)}},XF=0;function ZF(e){return{content:e,id:++XF}}function QF(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function $F(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var eI=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),tI=String.raw;function nI(e,t){if(e==null)throw Error(t??`Value expected`);return e}var rI=tI`\[\^?`,iI=`c.? | C(?:-.?)?|${tI`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${tI`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${tI`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${tI`o\{[^\}]*\}?`}|${tI`\d{1,3}`}`,aI=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,oI=new RegExp(tI`
91
+ \\ (?:
92
+ ${iI}
93
+ | [gk]<[^>]*>?
94
+ | [gk]'[^']*'?
95
+ | .
96
+ )
97
+ | \( (?:
98
+ \? (?:
99
+ [:=!>({]
100
+ | <[=!]
101
+ | <[^>]*>
102
+ | '[^']*'
103
+ | ~\|?
104
+ | #(?:[^)\\]|\\.?)*
105
+ | [^:)]*[:)]
106
+ )?
107
+ | \*[^\)]*\)?
108
+ )?
109
+ | (?:${aI.source})+
110
+ | ${rI}
111
+ | .
112
+ `.replace(/\s+/g,``),`gsu`),sI=new RegExp(tI`
113
+ \\ (?:
114
+ ${iI}
115
+ | .
116
+ )
117
+ | \[:(?:\^?\p{Alpha}+|\^):\]
118
+ | ${rI}
119
+ | &&
120
+ | .
121
+ `.replace(/\s+/g,``),`gsu`);function cI(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=RI(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(oI.lastIndex=0;s=oI.exec(e);){let t=lI(a,e,s[0],oI.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(oI.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?BI(e,u):e).flat(),flags:r}}function lI(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=uI(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:mI(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:OI(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:hI(n)}}if(a===`K`)return{token:SI(`keep`,n)};if(a===`N`||a===`R`)return{token:xI(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:xI(`any`,n)};if(a===`X`)return{token:xI(`text_segment`,n)};let e=fI(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:NI(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:MI(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:TI(`group`,n)};if(n===`(?>`)return{token:TI(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:TI(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:TI(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:TI(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:wI(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
122
+ `,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:xI(`dot`,n)}:n===`^`||n===`$`?{token:mI(e.singleline?{"^":tI`\A`,$:tI`\Z`}[n]:n,n)}:n===`|`?{token:pI(n)}:aI.test(n)?{tokens:VI(n)}:{token:gI(QF(n),n)}}function uI(e,t,n){let r=[bI(t[1]===`^`,t)],i=1,a;for(sI.lastIndex=n;a=sI.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(bI(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(gI(93,e));else if(i--,r.push(_I(e)),!i)break}else{let t=dI(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:sI.lastIndex||e.length}}function dI(e){if(e[0]===`\\`)return fI(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!eI.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return xI(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?vI(e):e===`&&`?yI(e):gI(QF(e),e)}function fI(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return jI(e);if(`dDhHsSwW`.includes(n))return FI(e);if(e.startsWith(tI`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return II(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return gI(QF(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return gI(zI(e),e);if(AI.has(n))return gI(AI.get(n),e);if(/\d/.test(n))return CI(t,e);if(e===`\\`)throw Error(tI`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return gI(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function pI(e){return{type:`Alternator`,raw:e}}function mI(e,t){return{type:`Assertion`,kind:e,raw:t}}function hI(e){return{type:`Backreference`,raw:e}}function gI(e,t){return{type:`Character`,value:e,raw:t}}function _I(e){return{type:`CharacterClassClose`,raw:e}}function vI(e){return{type:`CharacterClassHyphen`,raw:e}}function yI(e){return{type:`CharacterClassIntersector`,raw:e}}function bI(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function xI(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function SI(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:nI(n.flags),raw:t}}function CI(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function wI(e){return{type:`GroupClose`,raw:e}}function TI(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function EI(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function DI(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function OI(e){return{type:`Subroutine`,raw:e}}var kI=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),AI=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function jI(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return gI(QF(t.toUpperCase())-64,e)}function MI(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=LI(n),o=LI(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),SI(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,TI(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function NI(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=kI.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return EI(l,r??null,i?.split(`,`)??null,e)}function PI(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return DI(t,n,r,e)}function FI(e){let t=e[1].toLowerCase();return xI({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function II(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return xI(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function LI(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function RI(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3}else t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function zI(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function BI(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[hI(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(tI`Octal encoded byte above 177 unsupported "${n}"`)}else r=QF(t);a.push(gI(r,(e===0?`\\`:``)+t))}return a}function VI(e){let t=[],n=new RegExp(aI,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(PI(e.slice(0,-1)));continue}}}t.push(PI(e))}return t}function HI(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function UI(e){return WI.has(e.type)}var WI=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function GI(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=cI(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return tL();case`Assertion`:return KI(n);case`Backreference`:return qI(n,a);case`Character`:return aL(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return JI(n,a,t);case`CharacterClassOpen`:return YI(n,a,t);case`CharacterSet`:return XI(n,a);case`Directive`:return lL(n.kind,{flags:n.flags});case`GroupOpen`:return ZI(n,a,t);case`NamedCallout`:return pL(n.kind,n.tag,n.arguments);case`Quantifier`:return QI(n,a);case`Subroutine`:return $I(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=gL(uL(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(tI`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(tI`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function KI({kind:e}){return nL(nI({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===tI`\B`||e===tI`\Y`})}function qI({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i){if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`)}return t.hasNumberedRef=!0,rL(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return rL(r)}return i(+r)}function JI(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),sL(o,e);throw Error(`Invalid character class range`)}return aL(QF(`-`))}function YI({negate:e},t,n){let{tokens:r,walk:i}=t,a=[oL()],o=r[t.nextIndex],s=DL(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(oL()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=DL(r[t.nextIndex],o)}let c=oL({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function XI({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=EL(n);if(eI.has(r)&&!o?.has(r))e=`posix`,n=r;else return vL(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?mL(n,{negate:t}):cL(e,{negate:t})}function ZI(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=yL(e),l=c.type===`AbsenceFunction`,u=CL(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&$F(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=OL(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(tL()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(SL(t)||t.type===`CapturingGroup`)throw Error(e)}else if(SL(t)||CL(t)&&t.negate)throw Error(e)}}f=OL(r[t.nextIndex])}return t.nextIndex++,c}function QI({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!UI(a))throw Error(`Quantifier requires a repeatable token`);let o=hL(e,t,n,a);return i.body.pop(),o}function $I({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=_L(i);return r.push(o),o}function eL(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:bL(t?.body)}}function tL(e){return{type:`Alternative`,body:xL(e?.body)}}function nL(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function rL(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function iL(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!wL(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:bL(t?.body)}}function aL(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function oL(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:xL(e?.body)}}function sL(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function cL(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function lL(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:nI(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function uL(e){return{type:`Flags`,...e}}function dL(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:bL(e?.body)}}function fL(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:bL(e?.body)}}function pL(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function mL(e,t){let n=!!t?.negate;if(!eI.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function hL(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function gL(e,t){return{type:`Regex`,body:bL(t?.body),flags:e}}function _L(e){return{type:`Subroutine`,ref:e}}function vL(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(EL(e));if(!r){if(n.normalizeUnknownPropertyNames)r=TL(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(tI`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function yL({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return eL(`repeater`);case`atomic`:return dL({atomic:!0});case`capturing`:return iL(i,{name:n});case`group`:return dL({flags:e});case`lookahead`:case`lookbehind`:return fL({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function bL(e){if(e===void 0)e=[tL()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function xL(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function SL(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function CL(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function wL(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function TL(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function EL(e){return e.replace(/[- _]+/g,``).toLowerCase()}function DL(e,t){let n=t;return nI(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function OL(e){return nI(e,`Unclosed group`)}function kL(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){AL(c).splice(Math.max(0,jL(s)+l),1),l--,u=!0},removeAllNextSiblings(){return AL(c).splice(jL(s)+1)},removeAllPrevSiblings(){let e=jL(s)+l;return l-=e,AL(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,jL(s)+l)]=e:nI(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(AL(c).splice(Math.max(0,jL(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,jL(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function AL(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function jL(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var ML=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function NL(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function PL(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var FL=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function IL(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;!i&&(!r||r===FL.DEFAULT==!o)?n instanceof Function?s+=n(t,{context:o?FL.CHAR_CLASS:FL.DEFAULT,negated:a[a.length-1]}):s+=n:(e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e)}return s}function LL(e,t,n,r){IL(e,t,n,r)}function RL(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===FL.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function zL(e,t,n){return!!RL(e,t,0,n)}function BL(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var VL=new RegExp(String.raw`(?<noncapturingStart>${ML})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function HL(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(VL.lastIndex=Number.isNaN(c)?0:c+7;f=VL.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),NL(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=IL(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},FL.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var UL=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,WL=new RegExp(String.raw`
123
+ \\(?: \d+
124
+ | c[A-Za-z]
125
+ | [gk]<[^>]+>
126
+ | [pPu]\{[^\}]+\}
127
+ | u[A-Fa-f\d]{4}
128
+ | x[A-Fa-f\d]{2}
129
+ )
130
+ | \((?: \? (?: [:=!>]
131
+ | <(?:[=!]|[^>]+>)
132
+ | [A-Za-z\-]+:
133
+ | \(DEFINE\)
134
+ ))?
135
+ | (?<qBase>${UL})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
136
+ | \\?.
137
+ `.replace(/\s+/g,``),`gsu`);function GL(e){if(!RegExp(`${UL}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(WL.lastIndex=0;o=WL.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a){if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=PL(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}WL.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null)}i=s}return{pattern:e}}var KL=String.raw,qL=KL`\(\?R=(?<rDepth>[^\)]+)\)|${KL`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,JL=KL`\(\?<(?![=!])(?<captureName>[^>]+)>`,YL=KL`${JL}|(?<unnamed>\()(?!\?)`,XL=new RegExp(KL`${JL}|${qL}|\(\?|\\?.`,`gsu`),ZL=`Cannot use multiple overlapping recursions`;function QL(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(qL,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&zL(e,KL`\(\?\(DEFINE\)`,FL.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=zL(e,KL`\\[1-9]`,FL.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(XL.lastIndex=0;f=XL.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else{if(m){if($L(m),l)throw Error(ZL);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(XL.lastIndex);if(zL(s,qL,FL.DEFAULT))throw Error(ZL);let c=m-1;e=eR(t,s,c,!1,n,a,d),i=rR(i,t,c,a.length,0,d);break}if(h){$L(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(ZL);break}if(!u)throw Error(KL`Recursive \g cannot be used outside the referenced group "${r===`external`?h:KL`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=BL(e,p);if(o&&zL(m,KL`${JL}|\((?!\?)`,FL.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=eR(_,v,b,!0,n,a,d);i=rR(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,XL.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),XL.lastIndex),s.set(p,XL.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),XL.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function $L(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function eR(e,t,n,r,i,a,o){let s=new Set;r&&LL(e+t,JL,({groups:{captureName:e}})=>{s.add(e)},FL.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${tR(`(?:${e}`,`forward`,...c)}(?:)${tR(`${t})`,`backward`,...c)}${t}`}function tR(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=IL(e,KL`${YL}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),nR(i,n),s?e:`(?<${t}${l}>`}return KL`\k<${c}${l}>`},FL.DEFAULT)}return c}function nR(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function rR(e,t,n,r,i,a){if(e.size&&r){let o=0;LL(t,YL,()=>o++,FL.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var iR=String.fromCodePoint,aR=String.raw,oR={},sR=globalThis.RegExp;oR.flagGroups=(()=>{try{new sR(`(?i:)`)}catch{return!1}return!0})(),oR.unicodeSets=(()=>{try{new sR(`[[]]`,`v`)}catch{return!1}return!0})(),oR.bugFlagVLiteralHyphenIsRange=oR.unicodeSets?(()=>{try{new sR(aR`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,oR.bugNestedClassIgnoresNegation=oR.unicodeSets&&new sR(`[[^a]]`,`v`).test(`a`);function cR(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function lR(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function uR(e,t){return fR[e]>=fR[t]}function dR(e,t){if(e==null)throw Error(t??`Value expected`);return e}var fR={ES2025:2025,ES2024:2024,ES2018:2018},pR={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function mR(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!pR[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=oR.flagGroups?`ES2025`:oR.unicodeSets?`ES2024`:`ES2018`),t}var hR=`[ -\r ]`,gR=new Set([iR(304),iR(305)]),_R=aR`[\p{L}\p{M}\p{N}\p{Pc}]`;function vR(e){if(gR.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=SR.get(n),a=bR.get(n),o=xR.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var yR=new Map(`C Other
138
+ Cc Control cntrl
139
+ Cf Format
140
+ Cn Unassigned
141
+ Co Private_Use
142
+ Cs Surrogate
143
+ L Letter
144
+ LC Cased_Letter
145
+ Ll Lowercase_Letter
146
+ Lm Modifier_Letter
147
+ Lo Other_Letter
148
+ Lt Titlecase_Letter
149
+ Lu Uppercase_Letter
150
+ M Mark Combining_Mark
151
+ Mc Spacing_Mark
152
+ Me Enclosing_Mark
153
+ Mn Nonspacing_Mark
154
+ N Number
155
+ Nd Decimal_Number digit
156
+ Nl Letter_Number
157
+ No Other_Number
158
+ P Punctuation punct
159
+ Pc Connector_Punctuation
160
+ Pd Dash_Punctuation
161
+ Pe Close_Punctuation
162
+ Pf Final_Punctuation
163
+ Pi Initial_Punctuation
164
+ Po Other_Punctuation
165
+ Ps Open_Punctuation
166
+ S Symbol
167
+ Sc Currency_Symbol
168
+ Sk Modifier_Symbol
169
+ Sm Math_Symbol
170
+ So Other_Symbol
171
+ Z Separator
172
+ Zl Line_Separator
173
+ Zp Paragraph_Separator
174
+ Zs Space_Separator
175
+ ASCII
176
+ ASCII_Hex_Digit AHex
177
+ Alphabetic Alpha
178
+ Any
179
+ Assigned
180
+ Bidi_Control Bidi_C
181
+ Bidi_Mirrored Bidi_M
182
+ Case_Ignorable CI
183
+ Cased
184
+ Changes_When_Casefolded CWCF
185
+ Changes_When_Casemapped CWCM
186
+ Changes_When_Lowercased CWL
187
+ Changes_When_NFKC_Casefolded CWKCF
188
+ Changes_When_Titlecased CWT
189
+ Changes_When_Uppercased CWU
190
+ Dash
191
+ Default_Ignorable_Code_Point DI
192
+ Deprecated Dep
193
+ Diacritic Dia
194
+ Emoji
195
+ Emoji_Component EComp
196
+ Emoji_Modifier EMod
197
+ Emoji_Modifier_Base EBase
198
+ Emoji_Presentation EPres
199
+ Extended_Pictographic ExtPict
200
+ Extender Ext
201
+ Grapheme_Base Gr_Base
202
+ Grapheme_Extend Gr_Ext
203
+ Hex_Digit Hex
204
+ IDS_Binary_Operator IDSB
205
+ IDS_Trinary_Operator IDST
206
+ ID_Continue IDC
207
+ ID_Start IDS
208
+ Ideographic Ideo
209
+ Join_Control Join_C
210
+ Logical_Order_Exception LOE
211
+ Lowercase Lower
212
+ Math
213
+ Noncharacter_Code_Point NChar
214
+ Pattern_Syntax Pat_Syn
215
+ Pattern_White_Space Pat_WS
216
+ Quotation_Mark QMark
217
+ Radical
218
+ Regional_Indicator RI
219
+ Sentence_Terminal STerm
220
+ Soft_Dotted SD
221
+ Terminal_Punctuation Term
222
+ Unified_Ideograph UIdeo
223
+ Uppercase Upper
224
+ Variation_Selector VS
225
+ White_Space space
226
+ XID_Continue XIDC
227
+ XID_Start XIDS`.split(/\s/).map(e=>[EL(e),e])),bR=new Map([[`s`,iR(383)],[iR(383),`s`]]),xR=new Map([[iR(223),iR(7838)],[iR(107),iR(8490)],[iR(229),iR(8491)],[iR(969),iR(8486)]]),SR=new Map([TR(453),TR(456),TR(459),TR(498),...ER(8072,8079),...ER(8088,8095),...ER(8104,8111),TR(8124),TR(8140),TR(8188)]),CR=new Map([[`alnum`,aR`[\p{Alpha}\p{Nd}]`],[`alpha`,aR`\p{Alpha}`],[`ascii`,aR`\p{ASCII}`],[`blank`,aR`[\p{Zs}\t]`],[`cntrl`,aR`\p{Cc}`],[`digit`,aR`\p{Nd}`],[`graph`,aR`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,aR`\p{Lower}`],[`print`,aR`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,aR`[\p{P}\p{S}]`],[`space`,aR`\p{space}`],[`upper`,aR`\p{Upper}`],[`word`,aR`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,aR`\p{AHex}`]]);function wR(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function TR(e){let t=iR(e);return[t.toLowerCase(),t]}function ER(e,t){return wR(e,t).map(e=>TR(e))}var DR=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function OR(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};MR(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:uR(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};kL(e,kR,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return kL(e,AR,a),kL(e,jR,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var kR={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=dL();e.body[0].body.push(fL({negate:!0,body:r}),vL(`Any`));let i=dL();i.body[0].body.push(hL(`greedy`,0,1/0,e)),n(ZR(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];lR(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=zR(t.get(e));if(n){let t=dL({flags:n});t.body[0].body=e.body,e.body=[ZR(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(ZR(fL({body:[tL({body:[nL(`string_end`)]}),tL({body:[aL(10)]})]}),t));else if(c===`line_start`)o(ZR(JR(aR`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`){if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&GR(e))o(ZR(fL({negate:!0}),t));else if(d)throw Error(aR`Uses "\G" in a way that requires a subclass`);else o(XR(nL(`string_start`),t)),s.strategy=`clip_search`}}else if(c!==`string_end`&&c!==`string_start`){if(c===`string_end_newline`)o(ZR(JR(aR`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${_R})(?!${_R})|(?<!${_R})(?=${_R}))`,n=`(?:(?<=${_R})(?=${_R})|(?<!${_R})(?!${_R}))`;o(ZR(JR(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)}},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!qR(n)&&(n=RR(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!qR(r)&&(r=RR(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(ZR(oL({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`))n(XR(cL(`digit`,{negate:l}),t));else if(o&&(c===`space`||u===`space`))n(ZR(YR(JR(hR),l),t));else if(s&&(c===`word`||u===`word`))n(XR(cL(`word`,{negate:l}),t));else if(c===`any`)n(XR(vL(`Any`),t));else if(c===`digit`)n(XR(vL(`Nd`,{negate:l}),t));else if(c!==`dot`){if(c===`text_segment`){if(r===`strict`)throw Error(aR`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=aR`\p{RI}{2}|${e}(?:\u200D${e})*`;n(ZR(JR(aR`(?>\r\n|${i?aR`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(XR(vL(`AHex`,{negate:l}),t));else if(c===`newline`)n(ZR(JR(l?`[^
228
+ ]`:`(?>\r
229
+ ?|[
230
+ \v\f…\u2028\u2029])`),t));else if(c===`posix`){if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${iR(e.codePointAt(0)-1)}${iR(e.codePointAt(2)+1)}-\u{10FFFF}`),n(ZR(JR(`[${e}]`),t))}else n(ZR(YR(JR(CR.get(u)),l),t))}else if(c===`property`)yR.has(EL(u))||(e.key=`sc`);else if(c===`space`)n(XR(vL(`space`,{negate:l}),t));else if(c===`word`)n(ZR(YR(JR(_R),l),t));else throw Error(`Unexpected character set kind "${c}"`)}},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`){if(!c.enable&&!c.disable)r();else{let e=dL({flags:c});e.body[0].body=o(),i(ZR(e,t),{traverse:!0})}}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&HI(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(aR`Uses "\K" in a way that's unsupported`);let o=fL({behind:!0});o.body[0].body=a(),i(ZR(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(ZR(fL({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=dL();t.body[0].body.push(e.body),e.body=ZR(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=HR(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(aR`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!qR(n)&&(n=RR(n,t),e.ref=n)}},AR={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=XR(IR(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&lR(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=lR(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=cR(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&(n.type!==`CapturingGroup`||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?IR(0):FR(o,r.groupOriginByCopy,null),l=c;if(!s){let e=zR(LR(o,e=>e.type===`Group`&&!!e.flags)),t=e?cR(r.globalFlags,e):r.globalFlags;NR(t,r.currentFlags)||(l=dL({flags:BR(t)}),l.body[0].body.push(c))}n(ZR(l,t),{traverse:!s})}},jR={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>PR(t,e));i.length?i.length>1?n(ZR(dL({atomic:!0,body:i.reverse().map(e=>tL({body:[rL(e.number)]}))}),t)):e.ref=i[0].number:n(ZR(fL({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=iL();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&e.ref!==0&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function MR(e){kL(e,{"*"({node:e,parent:t}){e.parent=t}})}function NR(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function PR(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=VR(n.parent);for(let r of t){if(r===n)break;if(r===e||UR(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function FR(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=FR(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function IR(e){let t=_L(e);return t.isRecursive=!0,t}function LR(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function RR(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function zR(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function BR({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),e&&t||(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function VR(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function HR(e){let t=e.find(e=>e.kind===`search_start`||KR(e,{negate:!1})||!WR(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=HR(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function UR(e,t){let n=VR(e)??[];for(let e of n)if(e===t||UR(e,t))return!0;return!1}function WR({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function GR(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function KR(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&HI(e.body[0],{type:`Assertion`,kind:`search_start`})}function qR(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function JR(e,t){let n=GI(e,{...t,unicodePropertyMap:yR}).body;return n.length>1||n[0].body.length>1?dL({body:n}):n[0].body[0]}function YR(e,t){return e.negate=t,e}function XR(e,t){return e.parent=t,e}function ZR(e,t){return MR(e),e.parent=t,e}function QR(e,t){let n=mR(t),r=uR(n.target,`ES2024`),i=uR(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];kL(e,$R,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!(!e.flags.ignoreCase&&!o||s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,dR(ez[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&lR(f._captureTransfers,e.transferTo,[]).push(t)}),f}var $R={"*":{enter({node:e},t){if(fz(e)){let n=t.getCurrentModI();t.pushModI(e.flags?cR({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){fz(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){oz(iR(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),sz(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&DR.has(e.value)&&t.setHasCasedChar()}},ez={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?aR`\B`:aR`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=iR(e),r=cz(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&oz(n)){let e=vR(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);oR.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(mz)&&(o=[aL(45),...o.filter(e=>!mz(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||oR.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=dL(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=tL({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(oR.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=cz(n,i),o=cz(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&lz(sz(e)).forEach(e=>{s.add(Array.isArray(e)?`${cz(e[0],i)}-${cz(e[1],i)}`:cz(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:aR`[^\n]`;if(e===`digit`)return t?aR`\D`:aR`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&DR.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?aR`\P`:aR`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?aR`\W`:aR`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=cR(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${uz(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+dz(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:aR`\g<${t}&R=${r}>`}},tz=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),nz=new Set([`-`,`\\`,`]`,`^`,`[`]),rz=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),iz=new Map([[9,aR`\t`],[10,aR`\n`],[11,aR`\v`],[12,aR`\f`],[13,aR`\r`],[8232,aR`\u2028`],[8233,aR`\u2029`],[65279,aR`\uFEFF`]]),az=/^\p{Cased}$/u;function oz(e){return az.test(e)}function sz(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=iR(e);if(!oz(t))continue;let o=vR(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function cz(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(iz.has(e))return iz.get(e);if(e<32||e>126&&e<160||e>262143||t&&pz(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?rz:nz:tz,a=iR(e);return(i.has(a)?`\\`:``)+a}function lz(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function uz(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function dz({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function fz({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function pz(e){return e>47&&e<58}function mz({type:e,value:t}){return e===`Character`&&t===45}var hz=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=_z(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(gz(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=vz(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function gz(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function _z(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)lR(n,t,{}).transferTo=e;return n}function vz(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function yz(e,t){let n=bz(e,t);return n.options?new hz(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function bz(e,t){let n=mR(t),r=OR(GI(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:yR}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=QR(r,n),a=QL(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=HL(GL(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}function xz(e,t){return yz(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Sz(e={}){let t={target:`auto`,cache:new Map,...e};return t.regexConstructor||=e=>xz(e,{target:t.target}),{createScanner(e){return new YF(e,t)},createString:ZF}}var Cz=[be,xe,Se],wz=new Map([[`python`,()=>N(()=>import(`./python-_UfA4Rpn.js`),[])],[`ruby`,()=>N(()=>import(`./ruby-CGfRnGY4.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]))],[`go`,()=>N(()=>import(`./go-C-nC3Pcm.js`),[])],[`rust`,()=>N(()=>import(`./rust-DKuud5dV.js`),[])],[`java`,()=>N(()=>import(`./java-C0tX6Zjj.js`).then(e=>e.n),__vite__mapDeps([7,2,3]))],[`c`,()=>N(()=>import(`./c-D2xwndn2.js`).then(e=>e.n),__vite__mapDeps([12,2,3]))],[`cpp`,()=>N(()=>import(`./cpp-M92QQ27h.js`),__vite__mapDeps([11,12,2,3]))],[`csharp`,()=>N(()=>import(`./csharp-arQIGxh5.js`),[])],[`kotlin`,()=>N(()=>import(`./kotlin-aMb8GiDI.js`),[])],[`swift`,()=>N(()=>import(`./swift-1BrB7fPp.js`),[])],[`php`,()=>N(()=>import(`./php-B4BGKN5F.js`),__vite__mapDeps([16,1,2,3,4,5,6,7,8,17]))],[`yaml`,()=>N(()=>import(`./yaml-BOAQTz6b.js`),[])],[`toml`,()=>N(()=>import(`./toml-DnGEDMQq.js`),[])],[`ini`,()=>N(()=>import(`./ini-DAPINsRw.js`),[])],[`markdown`,()=>N(()=>import(`./markdown-BR5vuK2p.js`),[])],[`mdx`,()=>N(()=>import(`./mdx-BC8ZpVNR.js`),[])],[`html`,()=>N(()=>import(`./html-Dkdzkf5m.js`).then(e=>e.n),__vite__mapDeps([1,2,3,4,5]))],[`css`,()=>N(()=>import(`./css-COynAVCS.js`).then(e=>e.n),__vite__mapDeps([5,2,3]))],[`scss`,()=>N(()=>import(`./scss-DOxJ7xu_.js`),__vite__mapDeps([18,5,2,3]))],[`less`,()=>N(()=>import(`./less-C2IS6ABU.js`),[])],[`sql`,()=>N(()=>import(`./sql-BJwLzEN3.js`).then(e=>e.n),__vite__mapDeps([8,2,3]))],[`xml`,()=>N(()=>import(`./xml-Dg-qt816.js`).then(e=>e.n),__vite__mapDeps([6,2,3,7]))],[`lua`,()=>N(()=>import(`./lua-2gStHmQ-.js`).then(e=>e.n),__vite__mapDeps([14,2,3,12]))],[`bat`,()=>N(()=>import(`./bat-JZl-Sbcx.js`),[])],[`powershell`,()=>N(()=>import(`./powershell-DIeWdV2m.js`),[])],[`fish`,()=>N(()=>import(`./fish-guO53JpW.js`),[])],[`dotenv`,()=>N(()=>import(`./dotenv-CdzsO68t.js`),[])],[`log`,()=>N(()=>import(`./log-GKQXLMhJ.js`),[])],[`csv`,()=>N(()=>import(`./csv-Dfuv-U7u.js`),[])],[`diff`,()=>N(()=>import(`./diff-DQlPRImi.js`),[])],[`http`,()=>N(()=>import(`./http-iVoGgZyc.js`),__vite__mapDeps([19,13,17,6,2,3,7,9,4,10]))],[`rst`,()=>N(()=>import(`./rst-DEFIrwXa.js`),__vite__mapDeps([20,21,1,2,3,4,5,11,12,22,13,15,23,0,6,7,8,9,10,14]))],[`latex`,()=>N(()=>import(`./latex--YAwAQ5f.js`),__vite__mapDeps([24,25,2,3]))],[`bibtex`,()=>N(()=>import(`./bibtex-BaNpQaDO.js`),[])],[`asciidoc`,()=>N(()=>import(`./asciidoc-fIjFDxFo.js`),[])],[`r`,()=>N(()=>import(`./r-vFiqf_wZ.js`).then(e=>e.n),__vite__mapDeps([25,2,3]))],[`julia`,()=>N(()=>import(`./julia-CTkez5_b.js`),__vite__mapDeps([26,11,12,2,3,22,4,25,8]))],[`dart`,()=>N(()=>import(`./dart-Q1IWwEZX.js`),[])],[`scala`,()=>N(()=>import(`./scala-Budrm83b.js`),[])],[`clojure`,()=>N(()=>import(`./clojure-CWpPQG5x.js`),[])],[`erlang`,()=>N(()=>import(`./erlang-9UB0pWNm.js`),__vite__mapDeps([27,28]))],[`elixir`,()=>N(()=>import(`./elixir-DIe8-kxb.js`),__vite__mapDeps([29,1,2,3,4,5]))],[`haskell`,()=>N(()=>import(`./haskell-DrRSUTaY.js`),[])],[`fsharp`,()=>N(()=>import(`./fsharp-CkcEwvkw.js`),__vite__mapDeps([30,28]))],[`vb`,()=>N(()=>import(`./vb-B-92SU4g.js`),[])],[`perl`,()=>N(()=>import(`./perl-C6cfY4X6.js`),__vite__mapDeps([31,1,2,3,4,5,6,7,8]))],[`verilog`,()=>N(()=>import(`./verilog-DAYahq79.js`),[])],[`system-verilog`,()=>N(()=>import(`./system-verilog-DFdH8QvH.js`),[])],[`graphql`,()=>N(()=>import(`./graphql-BUOosdAq.js`).then(e=>e.n),__vite__mapDeps([9,2,3,4,10]))],[`proto`,()=>N(()=>import(`./proto-n2oP_Fv6.js`),[])],[`hcl`,()=>N(()=>import(`./hcl-BjaCZWzu.js`),[])],[`nix`,()=>N(()=>import(`./nix-DI-FDV4-.js`),[])],[`vue`,()=>N(()=>import(`./vue-b-L2NQfY.js`),__vite__mapDeps([32,5,2,3,4,10,17,1,21]))],[`svelte`,()=>N(()=>import(`./svelte-Cnhqc3fy.js`),__vite__mapDeps([33,4,10,5,2,3]))],[`make`,()=>N(()=>import(`./make-BU3Nopib.js`),[])],[`cmake`,()=>N(()=>import(`./cmake-Cf85PuIk.js`),[])],[`groovy`,()=>N(()=>import(`./groovy-BYlvK_67.js`),[])]]),Tz=new Map([[`typescript`,`typescript`],[`ts`,`typescript`],[`tsx`,`typescript`],[`javascript`,`typescript`],[`js`,`typescript`],[`jsx`,`typescript`],[`shellscript`,`shellscript`],[`bash`,`shellscript`],[`sh`,`shellscript`],[`shell`,`shellscript`],[`zsh`,`shellscript`],[`json`,`json`],[`jsonc`,`json`],[`py`,`python`],[`python`,`python`],[`rb`,`ruby`],[`ruby`,`ruby`],[`go`,`go`],[`rs`,`rust`],[`rust`,`rust`],[`java`,`java`],[`c`,`c`],[`cpp`,`cpp`],[`cs`,`csharp`],[`csharp`,`csharp`],[`kotlin`,`kotlin`],[`swift`,`swift`],[`php`,`php`],[`yaml`,`yaml`],[`yml`,`yaml`],[`toml`,`toml`],[`ini`,`ini`],[`md`,`markdown`],[`markdown`,`markdown`],[`mdx`,`mdx`],[`html`,`html`],[`css`,`css`],[`scss`,`scss`],[`less`,`less`],[`sql`,`sql`],[`xml`,`xml`],[`lua`,`lua`],[`bat`,`bat`],[`batch`,`bat`],[`powershell`,`powershell`],[`ps1`,`powershell`],[`ps`,`powershell`],[`fish`,`fish`],[`properties`,`ini`],[`dotenv`,`dotenv`],[`env`,`dotenv`],[`log`,`log`],[`csv`,`csv`],[`diff`,`diff`],[`patch`,`diff`],[`http`,`http`],[`rst`,`rst`],[`latex`,`latex`],[`tex`,`latex`],[`bibtex`,`bibtex`],[`bib`,`bibtex`],[`asciidoc`,`asciidoc`],[`adoc`,`asciidoc`],[`r`,`r`],[`julia`,`julia`],[`jl`,`julia`],[`dart`,`dart`],[`scala`,`scala`],[`clojure`,`clojure`],[`clj`,`clojure`],[`erlang`,`erlang`],[`erl`,`erlang`],[`elixir`,`elixir`],[`ex`,`elixir`],[`exs`,`elixir`],[`haskell`,`haskell`],[`hs`,`haskell`],[`fsharp`,`fsharp`],[`fs`,`fsharp`],[`fsi`,`fsharp`],[`fsx`,`fsharp`],[`vb`,`vb`],[`vbnet`,`vb`],[`perl`,`perl`],[`pl`,`perl`],[`pm`,`perl`],[`verilog`,`verilog`],[`v`,`verilog`],[`system-verilog`,`system-verilog`],[`systemverilog`,`system-verilog`],[`sv`,`system-verilog`],[`svh`,`system-verilog`],[`graphql`,`graphql`],[`gql`,`graphql`],[`proto`,`proto`],[`protobuf`,`proto`],[`hcl`,`hcl`],[`tf`,`hcl`],[`tfvars`,`hcl`],[`nix`,`nix`],[`vue`,`vue`],[`svelte`,`svelte`],[`make`,`make`],[`makefile`,`make`],[`mk`,`make`],[`cmake`,`cmake`],[`groovy`,`groovy`],[`gradle`,`groovy`]]);function Ez(e){return e===void 0?void 0:Tz.get(e.toLowerCase())}function Dz(e){return Ez(e)!==void 0}var Oz=GF({name:`css-variables`,variablePrefix:`--shiki-`,fontStyle:!0}),kz=Sz({forgiving:!0,regexConstructor:e=>xz(e,{lazyCompileLength:1/0})}),Az,jz=[{lang:`typescript`,code:`const answer: number = 42`},{lang:`shellscript`,code:`printf '%s\\n' "$HOME"`},{lang:`json`,code:`{"ready":true}`}];function Mz(){let e=WF({themes:[Oz],langs:Cz,engine:kz});for(let t of jz)e.codeToTokens(t.code,{lang:t.lang,theme:`css-variables`,tokenizeTimeLimit:0});return e}function Nz(){return Az??=Mz(),Az}var Pz=new Set,Fz=new Set,Iz=0;function Lz(e){return Fz.add(e),()=>{Fz.delete(e)}}function Rz(){return Iz}function zz(e){let t=wz.get(e);return t===void 0||Nz().getLoadedLanguages().includes(e)?!0:(Pz.has(e)||(Pz.add(e),t().then(e=>{Nz().loadLanguageSync(e.default),Iz+=1;for(let e of Fz)e()})),!1)}setTimeout(()=>{Nz()},0).unref?.();var Bz=[[4,`underline`],[8,`line-through`]];function Vz(e){let t={color:e.color},n=e.fontStyle??0;n&1&&(t.fontStyle=`italic`),n&2&&(t.fontWeight=`bold`);let r=Bz.filter(([e])=>(n&e)!==0);return r.length>0&&(t.textDecoration=r.map(([,e])=>e).join(` `)),t}function Hz(e){let t=[],n=``;for(let[r,i]of e.entries())/^\s+$/.test(i.content)&&r+1<e.length?n+=i.content:(t.push({text:n+i.content,style:Vz(i)}),n=``);return t}var Uz=class{resolved;prefix=``;spans=[];state;lastCode;lastLang;lastResult;generation=0;lastFrame;reset(e){this.resolved=e,this.prefix=``,this.spans=[],this.state=void 0,this.generation+=1,this.lastFrame=void 0}tokenize(e,t){return Nz().codeToTokensBase(t,{lang:e,theme:`css-variables`,...this.state===void 0?{}:{grammarState:this.state}})}updateFrame(e,t){if(e===this.lastCode&&t===this.lastLang&&this.lastFrame!==void 0)return this.lastFrame;this.lastCode=e,this.lastLang=t,this.lastResult=void 0;let n=Ez(t);if(n===void 0||!zz(n)){this.reset(void 0);return}n===this.resolved&&e.startsWith(this.prefix)||this.reset(n);let r=this.spans.length,i=e.slice(this.prefix.length),a=i.lastIndexOf(`
231
+ `);if(a>=0){let t=i[a-1]===`\r`?a-1:a,r=this.tokenize(n,i.slice(0,t));for(let e of r)this.spans.push(Hz(e));this.state=Nz().getLastGrammarState(r),this.prefix=e.slice(0,this.prefix.length+a+1)}return this.lastFrame={generation:this.generation,appended:this.spans.slice(r),tail:this.tokenize(n,i.slice(a+1)).map(Hz)},this.lastFrame}update(e,t){if(e===this.lastCode&&t===this.lastLang&&this.lastResult!==void 0)return this.lastResult;let n=this.updateFrame(e,t);if(n!==void 0)return this.lastResult=[...this.spans,...n.tail],this.lastResult}},Wz={card:`_card_1pq26_1`,header:`_header_1pq26_10`,heading:`_heading_1pq26_23`,language:`_language_1pq26_30`,title:`_title_1pq26_36`,actions:`_actions_1pq26_43`,status:`_status_1pq26_50`,action:`_action_1pq26_43`,body:`_body_1pq26_79`};function Gz({lang:e,title:t,status:n,labels:r,copyLabel:i,copiedLabel:a,copied:o,wrapped:s,onCopy:c,onWrap:l}){let u=s?r.unwrapLabel:r.wrapLabel,d=o?a:i;return(0,F.jsxs)(`div`,{className:Wz.header,"data-code-block-banner":!0,children:[(0,F.jsxs)(`div`,{className:Wz.heading,children:[(0,F.jsx)(`span`,{className:Wz.language,children:Dz(e)?e:r.codeLabel}),t!==void 0&&(0,F.jsx)(`span`,{className:Wz.title,title:t,children:t})]}),(0,F.jsxs)(`div`,{className:Wz.actions,children:[n!==void 0&&(0,F.jsx)(`span`,{className:Wz.status,children:n}),l!==void 0&&(0,F.jsx)(mO,{label:u,side:`top`,portal:!0,children:(0,F.jsx)(`button`,{type:`button`,className:Wz.action,"aria-label":r.wrapLabel,"aria-pressed":s,onClick:l,children:s?(0,F.jsx)(ne,{size:14}):(0,F.jsx)(b,{size:14})})}),c!==void 0&&(0,F.jsx)(mO,{label:d,side:`top`,portal:!0,children:(0,F.jsx)(`button`,{type:`button`,className:Wz.action,"aria-label":d,onClick:c,children:o?(0,F.jsx)(A,{size:14}):(0,F.jsx)(de,{size:14})})})]})]})}var Kz=()=>{},qz=new class{observer;activators=new Map;observe(e,t){return typeof IntersectionObserver>`u`?(t(),Kz):(this.observer??=new IntersectionObserver(e=>{for(let t of e){if(!t.isIntersecting)continue;let e=this.activators.get(t.target);e!==void 0&&(this.activators.delete(t.target),this.observer?.unobserve(t.target),e())}this.releaseEmptyObserver()}),this.activators.set(e,t),this.observer.observe(e),()=>{this.activators.delete(e),this.observer?.unobserve(e),this.releaseEmptyObserver()})}releaseEmptyObserver(){this.activators.size>0||(this.observer?.disconnect(),this.observer=void 0)}};function Jz(e,t){let n=Dz(t),[r,i]=(0,P.useState)(!1),a=(0,P.useCallback)(()=>{i(!0)},[]);return(0,P.useEffect)(()=>{if(r||!n)return;let t=e.current;if(t!==null)return qz.observe(t,a)},[a,r,n,e]),r&&n}var Yz={block:`_block_7gxqk_4`,bannerWrap:`_bannerWrap_7gxqk_24`,banner:`_banner_7gxqk_24`,infostring:`_infostring_7gxqk_45`,action:`_action_7gxqk_56`,copyButton:`_copyButton_7gxqk_62`,content:`_content_7gxqk_74`,shiki:`_shiki_7gxqk_93`,plain:`_plain_7gxqk_103`,card:`_card_7gxqk_107`,numbered:`_numbered_7gxqk_122`},Xz={className:`shiki css-variables`,style:{backgroundColor:`var(--shiki-background)`,color:`var(--shiki-foreground)`},tabIndex:0},Zz=32;function Qz(e,t){return(0,F.jsxs)(P.Fragment,{children:[t>0&&`
232
+ `,(0,F.jsx)(`span`,{className:`line`,children:e.map((e,t)=>(0,F.jsx)(`span`,{style:e.style,children:e.text},t))})]},t)}function $z({code:e,lang:t,streaming:r,className:i,contentRef:a,lineNumbers:o=!1,showHeader:s=!0,copyLabel:c,copiedLabel:l,toolbarLabels:u,wrap:d}){let f=e.endsWith(`
233
+ `)?e.slice(0,-1):e,p=o?f.split(`
234
+ `):void 0,m=(0,P.useRef)(null),h=Jz(m,t),g=(0,P.useSyncExternalStore)(Lz,Rz,Rz),_=(0,P.useRef)(null),v=(0,P.useRef)(null),y=(0,P.useRef)(!1),b=(0,P.useMemo)(()=>{if(!h){_.current=null,v.current=null,y.current=!1;return}if(r!==!0){let e=v.current;if(e!==null&&e.code===f&&e.lang===t)return y.current=!0,e.body;_.current=null,v.current=null,y.current=!0;return}y.current&&=(_.current=null,v.current=null,!1),_.current??=new Uz;let e=_.current.updateFrame(f,t);if(e===void 0){v.current=null;return}let n=v.current;if(n?.frame===e&&n.code===f&&n.lang===t)return n.body;let i=n?.generation===e.generation,a=i?[...n.groups]:[],o=i?[...n.pending]:[],s=i?n.nextLine:0;for(let t of e.appended){if(o.push(Qz(t,s)),s+=1,o.length!==Zz)continue;let e=s-o.length;a.push((0,F.jsx)(P.Fragment,{children:o},e)),o=[]}let c=e.tail.map((e,t)=>Qz(e,s+t)),l=(0,F.jsx)(P.Fragment,{children:[...o,...c]},s-o.length),u=(0,F.jsx)(`pre`,{...Xz,children:(0,F.jsxs)(`code`,{children:[a,l]})});return v.current={code:f,lang:t,generation:e.generation,frame:e,groups:a,pending:o,nextLine:s,body:u},u},[r,h,f,t,g]),x=(0,P.useMemo)(()=>{if(!h||r===!0||b!==void 0)return;let e=new Uz().updateFrame(f,t);if(e!==void 0)return(0,F.jsx)(`pre`,{...Xz,children:(0,F.jsx)(`code`,{children:[...e.appended,...e.tail].map(Qz)})})},[r,h,b,f,t,g]),[S,C]=(0,P.useState)(!1),[w,T]=(0,P.useState)(!0),E=d??w,D=(0,P.useCallback)(()=>{S||ef(m.current?.querySelector(`pre`)?.textContent??f).then(e=>{e&&(C(!0),window.setTimeout(()=>{C(!1)},1e3))})},[S,f]),O=b===void 0?x===void 0?(0,F.jsx)(`pre`,{className:Yz.plain,children:(0,F.jsx)(`code`,{children:p===void 0?f:p.map((e,t)=>(0,F.jsxs)(P.Fragment,{children:[t>0&&`
235
+ `,(0,F.jsx)(`span`,{className:`line`,children:e})]},t))})}):x:b;return(0,F.jsxs)(`div`,{ref:m,className:n(Yz.block,`md-code-block`,o&&Yz.numbered,u!==void 0&&Yz.card,i),"data-line-numbers":o||void 0,"data-code-wrap":u===void 0?void 0:E,style:p===void 0?void 0:{"--dsl-code-block-line-number-width":`${Math.max(2,String(p.length).length)}ch`},children:[s&&(0,F.jsx)(`div`,{className:Yz.bannerWrap,children:u===void 0?(0,F.jsxs)(`div`,{className:Yz.banner,"data-code-block-banner":!0,children:[(0,F.jsx)(`div`,{className:Yz.infostring,children:t??``}),(0,F.jsx)(`div`,{className:Yz.action,children:(0,F.jsx)(`button`,{type:`button`,className:Yz.copyButton,onClick:D,children:S?l:c})})]}):(0,F.jsx)(Gz,{lang:t,labels:u,copyLabel:c,copiedLabel:l,copied:S,wrapped:E,onCopy:D,onWrap:d===void 0?()=>{T(e=>!e)}:void 0})}),(0,F.jsx)(`div`,{ref:a,className:Yz.content,"data-code-block-content":!0,children:O})]})}var V=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},eB=/([A-Z])/g,tB=e=>e.replace(eB,`-$1`).toLowerCase(),nB={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},rB=/[&><"']/g,iB=e=>String(e).replace(rB,e=>nB[e]),aB=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?aB(e.body[0]):e:e.type===`font`?aB(e.body):e,oB=new Set([`mathord`,`textord`,`atom`]),sB=e=>oB.has(aB(e).type),cB=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},lB={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function uB(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function dB(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:uB(Array.isArray(e.type)?e.type[0]:e.type)}function fB(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?dB(r):a?a(i):i}var pB=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(lB)){var n=lB[t];n&&fB(this,t,e,n)}}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=cB(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},mB=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return CB[wB[this.id]]}sub(){return CB[TB[this.id]]}fracNum(){return CB[EB[this.id]]}fracDen(){return CB[DB[this.id]]}cramp(){return CB[OB[this.id]]}text(){return CB[kB[this.id]]}isTight(){return this.size>=2}},hB=0,gB=1,_B=2,vB=3,yB=4,bB=5,xB=6,SB=7,CB=[new mB(hB,0,!1),new mB(gB,0,!0),new mB(_B,1,!1),new mB(vB,1,!0),new mB(yB,2,!1),new mB(bB,2,!0),new mB(xB,3,!1),new mB(SB,3,!0)],wB=[yB,bB,yB,bB,xB,SB,xB,SB],TB=[bB,bB,bB,bB,SB,SB,SB,SB],EB=[_B,vB,yB,bB,xB,SB,xB,SB],DB=[vB,vB,bB,bB,SB,SB,SB,SB],OB=[gB,gB,vB,vB,bB,bB,SB,SB],kB=[hB,gB,_B,vB,_B,vB,_B,vB],AB={DISPLAY:CB[hB],TEXT:CB[_B],SCRIPT:CB[yB],SCRIPTSCRIPT:CB[xB]},jB=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function MB(e){for(var t=0;t<jB.length;t++)for(var n=jB[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var NB=[];jB.forEach(e=>e.blocks.forEach(e=>NB.push(...e)));function PB(e){for(var t=0;t<NB.length;t+=2)if(e>=NB[t]&&e<=NB[t+1])return!0;return!1}var FB=e=>e+` `+e,IB=80,LB=function(e,t){return`M95,`+(622+e+t)+`
236
+ c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
237
+ c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
238
+ c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
239
+ s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
240
+ c69,-144,104.5,-217.7,106.5,-221
241
+ l`+e/2.075+` -`+e+`
242
+ c5.3,-9.3,12,-14,20,-14
243
+ H400000v`+(40+e)+`H845.2724
244
+ s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
245
+ c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
246
+ M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},RB=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
247
+ c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
248
+ c340,-704.7,510.7,-1060.3,512,-1067
249
+ l`+e/2.084+` -`+e+`
250
+ c4.7,-7.3,11,-11,19,-11
251
+ H40000v`+(40+e)+`H1012.3
252
+ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
253
+ c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
254
+ s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
255
+ c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
256
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},zB=function(e,t){return`M983 `+(10+e+t)+`
257
+ l`+e/3.13+` -`+e+`
258
+ c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
259
+ H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
260
+ s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
261
+ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
262
+ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
263
+ c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
264
+ c53.7,-170.3,84.5,-266.8,92.5,-289.5z
265
+ M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},BB=function(e,t){return`M424,`+(2398+e+t)+`
266
+ c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
267
+ c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
268
+ s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
269
+ s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
270
+ l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
271
+ v`+(40+e)+`H1014.6
272
+ s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
273
+ c-2,6,-10,9,-24,9
274
+ c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
275
+ h400000v`+(40+e)+`h-400000z`},VB=function(e,t){return`M473,`+(2713+e+t)+`
276
+ c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
277
+ c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
278
+ s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
279
+ c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
280
+ c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
281
+ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
282
+ 606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},HB=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},UB=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
283
+ H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
284
+ h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
285
+ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
286
+ 219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},WB=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=LB(t,IB);break;case`sqrtSize1`:r=RB(t,IB);break;case`sqrtSize2`:r=zB(t,IB);break;case`sqrtSize3`:r=BB(t,IB);break;case`sqrtSize4`:r=VB(t,IB);break;case`sqrtTall`:r=UB(t,IB,n)}return r},GB=function(e,t){switch(e){case`⎜`:return FB(`M291 0 H417 V`+t+` H291z`);case`∣`:return FB(`M145 0 H188 V`+t+` H145z`);case`∥`:return FB(`M145 0 H188 V`+t+` H145z`)+FB(`M367 0 H410 V`+t+` H367z`);case`⎟`:return FB(`M457 0 H583 V`+t+` H457z`);case`⎢`:return FB(`M319 0 H403 V`+t+` H319z`);case`⎥`:return FB(`M263 0 H347 V`+t+` H263z`);case`⎪`:return FB(`M384 0 H504 V`+t+` H384z`);case`⏐`:return FB(`M312 0 H355 V`+t+` H312z`);case`‖`:return FB(`M257 0 H300 V`+t+` H257z`)+FB(`M478 0 H521 V`+t+` H478z`);default:return``}},KB={doubleleftarrow:`M262 157
287
+ l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
288
+ 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
289
+ 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
290
+ c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
291
+ 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
292
+ -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
293
+ -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
294
+ m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
295
+ -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
296
+ 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
297
+ -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
298
+ -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
299
+ -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
300
+ c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
301
+ -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
302
+ 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
303
+ -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
304
+ c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
305
+ 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
306
+ 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
307
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
308
+ -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
309
+ 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
310
+ 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
311
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
312
+ -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
313
+ H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
314
+ 435 0h399565z`,leftgroupunder:`M400000 262
315
+ H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
316
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
317
+ -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
318
+ -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
319
+ -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
320
+ 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
321
+ -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
322
+ -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
323
+ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
324
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
325
+ 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
326
+ -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
327
+ 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
328
+ -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
329
+ v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
330
+ -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
331
+ -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
332
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:FB(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:FB(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:FB(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:FB(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
333
+ -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
334
+ c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
335
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:FB(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
336
+ c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
337
+ -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
338
+ 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
339
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
340
+ c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
341
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
342
+ 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
343
+ -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
344
+ -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
345
+ m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
346
+ 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
347
+ -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
348
+ m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
349
+ c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
350
+ -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
351
+ m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
352
+ 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
353
+ -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
354
+ m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
355
+ c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
356
+ -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
357
+ 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
358
+ 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
359
+ -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
360
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
361
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
362
+ -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
363
+ s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
364
+ c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
365
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
366
+ -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
367
+ 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
368
+ 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
369
+ -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
370
+ -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
371
+ 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
372
+ -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
373
+ 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
374
+ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
375
+ 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
376
+ -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
377
+ -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
378
+ 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
379
+ 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
380
+ -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
381
+ m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
382
+ 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
383
+ -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
384
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:FB(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:FB(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:FB(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
385
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
386
+ -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
387
+ -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
388
+ 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
389
+ -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
390
+ -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
391
+ -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
392
+ 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
393
+ c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
394
+ 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
395
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
396
+ -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
397
+ 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
398
+ -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
399
+ 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
400
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
401
+ -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
402
+ -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
403
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
404
+ c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
405
+ 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
406
+ -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
407
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
408
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
409
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
410
+ -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
411
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
412
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
413
+ -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
414
+ 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
415
+ 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
416
+ -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
417
+ -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
418
+ H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
419
+ c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
420
+ c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
421
+ -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
422
+ -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
423
+ -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
424
+ -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
425
+ -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
426
+ -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
427
+ -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
428
+ c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
429
+ c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
430
+ s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
431
+ 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
432
+ s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
433
+ c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
434
+ M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
435
+ -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
436
+ 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
437
+ -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
438
+ -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
439
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
440
+ 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
441
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
442
+ c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
443
+ c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
444
+ c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
445
+ M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
446
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
447
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
448
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
449
+ M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
450
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
451
+ 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
452
+ -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
453
+ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
454
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
455
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
456
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
457
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},qB=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
458
+ H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
459
+ M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
460
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
461
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
462
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
463
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
464
+ M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
465
+ c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
466
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
467
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
468
+ MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
469
+ M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
470
+ M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
471
+ c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
472
+ -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
473
+ 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
474
+ c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
475
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
476
+ l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
477
+ -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
478
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
479
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
480
+ c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
481
+ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
482
+ c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
483
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
484
+ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
485
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function JB(e){return`toText`in e}var YB=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(JB(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},XB={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},ZB={ex:!0,em:!0,mu:!0},QB=function(e){return typeof e!=`string`&&(e=e.unit),e in XB||e in ZB||e===`ex`},$B=function(e,t){var n;if(e.unit in XB)n=XB[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new V(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},H=function(e){return+e.toFixed(4)+`em`},eV=function(e){return e.filter(e=>e).join(` `)},tV=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=tB(n)+`:`+r+`;`)}return t},nV=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},rV=function(e){var t=document.createElement(e);t.className=eV(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},iV=/[\s"'>/=\x00-\x1f]/,aV=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+iB(eV(this.classes))+`"`);var n=tV(this.style);n&&(t+=` style="`+iB(n)+`"`);for(var r of Object.keys(this.attributes)){if(iV.test(r))throw new V(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+iB(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},oV=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,nV.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return rV.call(this,`span`)}toMarkup(){return aV.call(this,`span`)}},sV=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,nV.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return rV.call(this,`a`)}toMarkup(){return aV.call(this,`a`)}},cV=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+iB(this.src)+`"`+(` alt="`+iB(this.alt)+`"`),t=tV(this.style);return t&&(e+=` style="`+iB(t)+`"`),e+=`'/>`,e}},lV={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},uV=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=MB(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=lV[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=H(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=eV(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=iB(eV(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+H(this.italic)+`;`),n+=tV(this.style),n&&(e=!0,t+=` style="`+iB(n)+`"`);var r=iB(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},dV=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+iB(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},fV=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,KB[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+iB(this.alternate)+`"/>`:`<path d="`+iB(KB[this.pathName])+`"/>`}},pV=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+iB(this.attributes[t])+`"`;return e+=`/>`,e}};function mV(e){if(e instanceof uV)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function hV(e){if(e instanceof oV)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var gV=e=>e instanceof oV||e instanceof sV||e instanceof YB,_V={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},vV={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},yV={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function bV(e,t){_V[e]=t}function xV(e,t,n){if(!_V[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=_V[t][r];if(!i&&e[0]in yV&&(r=yV[e[0]].charCodeAt(0),i=_V[t][r]),!i&&n===`text`&&PB(r)&&(i=_V[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var SV={};function CV(e){var t=e>=5?0:e>=3?1:2;if(!SV[t]){var n=SV[t]={cssEmPerMu:vV.quad[t]/18};for(var r of Object.keys(vV))n[r]=vV[r][t]}return SV[t]}var wV={math:{},text:{}};function U(e,t,n,r,i,a){wV[e][i]={font:t,group:n,replace:r},a&&r&&(wV[e][r]=wV[e][i])}var W=`math`,G=`text`,K=`main`,q=`ams`,TV=`accent-token`,EV=`bin`,DV=`close`,OV=`inner`,kV=`mathord`,AV=`op-token`,jV=`open`,MV=`punct`,J=`rel`,NV=`spacing`,Y=`textord`;U(W,K,J,`≡`,`\\equiv`,!0),U(W,K,J,`≺`,`\\prec`,!0),U(W,K,J,`≻`,`\\succ`,!0),U(W,K,J,`∼`,`\\sim`,!0),U(W,K,J,`⊥`,`\\perp`),U(W,K,J,`⪯`,`\\preceq`,!0),U(W,K,J,`⪰`,`\\succeq`,!0),U(W,K,J,`≃`,`\\simeq`,!0),U(W,K,J,`∣`,`\\mid`,!0),U(W,K,J,`≪`,`\\ll`,!0),U(W,K,J,`≫`,`\\gg`,!0),U(W,K,J,`≍`,`\\asymp`,!0),U(W,K,J,`∥`,`\\parallel`),U(W,K,J,`⋈`,`\\bowtie`,!0),U(W,K,J,`⌣`,`\\smile`,!0),U(W,K,J,`⊑`,`\\sqsubseteq`,!0),U(W,K,J,`⊒`,`\\sqsupseteq`,!0),U(W,K,J,`≐`,`\\doteq`,!0),U(W,K,J,`⌢`,`\\frown`,!0),U(W,K,J,`∋`,`\\ni`,!0),U(W,K,J,`∝`,`\\propto`,!0),U(W,K,J,`⊢`,`\\vdash`,!0),U(W,K,J,`⊣`,`\\dashv`,!0),U(W,K,J,`∋`,`\\owns`),U(W,K,MV,`.`,`\\ldotp`),U(W,K,MV,`⋅`,`\\cdotp`),U(W,K,MV,`⋅`,`·`),U(G,K,Y,`⋅`,`·`),U(W,K,Y,`#`,`\\#`),U(G,K,Y,`#`,`\\#`),U(W,K,Y,`&`,`\\&`),U(G,K,Y,`&`,`\\&`),U(W,K,Y,`ℵ`,`\\aleph`,!0),U(W,K,Y,`∀`,`\\forall`,!0),U(W,K,Y,`ℏ`,`\\hbar`,!0),U(W,K,Y,`∃`,`\\exists`,!0),U(W,K,Y,`∇`,`\\nabla`,!0),U(W,K,Y,`♭`,`\\flat`,!0),U(W,K,Y,`ℓ`,`\\ell`,!0),U(W,K,Y,`♮`,`\\natural`,!0),U(W,K,Y,`♣`,`\\clubsuit`,!0),U(W,K,Y,`℘`,`\\wp`,!0),U(W,K,Y,`♯`,`\\sharp`,!0),U(W,K,Y,`♢`,`\\diamondsuit`,!0),U(W,K,Y,`ℜ`,`\\Re`,!0),U(W,K,Y,`♡`,`\\heartsuit`,!0),U(W,K,Y,`ℑ`,`\\Im`,!0),U(W,K,Y,`♠`,`\\spadesuit`,!0),U(W,K,Y,`§`,`\\S`,!0),U(G,K,Y,`§`,`\\S`),U(W,K,Y,`¶`,`\\P`,!0),U(G,K,Y,`¶`,`\\P`),U(W,K,Y,`†`,`\\dag`),U(G,K,Y,`†`,`\\dag`),U(G,K,Y,`†`,`\\textdagger`),U(W,K,Y,`‡`,`\\ddag`),U(G,K,Y,`‡`,`\\ddag`),U(G,K,Y,`‡`,`\\textdaggerdbl`),U(W,K,DV,`⎱`,`\\rmoustache`,!0),U(W,K,jV,`⎰`,`\\lmoustache`,!0),U(W,K,DV,`⟯`,`\\rgroup`,!0),U(W,K,jV,`⟮`,`\\lgroup`,!0),U(W,K,EV,`∓`,`\\mp`,!0),U(W,K,EV,`⊖`,`\\ominus`,!0),U(W,K,EV,`⊎`,`\\uplus`,!0),U(W,K,EV,`⊓`,`\\sqcap`,!0),U(W,K,EV,`∗`,`\\ast`),U(W,K,EV,`⊔`,`\\sqcup`,!0),U(W,K,EV,`◯`,`\\bigcirc`,!0),U(W,K,EV,`∙`,`\\bullet`,!0),U(W,K,EV,`‡`,`\\ddagger`),U(W,K,EV,`≀`,`\\wr`,!0),U(W,K,EV,`⨿`,`\\amalg`),U(W,K,EV,`&`,`\\And`),U(W,K,J,`⟵`,`\\longleftarrow`,!0),U(W,K,J,`⇐`,`\\Leftarrow`,!0),U(W,K,J,`⟸`,`\\Longleftarrow`,!0),U(W,K,J,`⟶`,`\\longrightarrow`,!0),U(W,K,J,`⇒`,`\\Rightarrow`,!0),U(W,K,J,`⟹`,`\\Longrightarrow`,!0),U(W,K,J,`↔`,`\\leftrightarrow`,!0),U(W,K,J,`⟷`,`\\longleftrightarrow`,!0),U(W,K,J,`⇔`,`\\Leftrightarrow`,!0),U(W,K,J,`⟺`,`\\Longleftrightarrow`,!0),U(W,K,J,`↦`,`\\mapsto`,!0),U(W,K,J,`⟼`,`\\longmapsto`,!0),U(W,K,J,`↗`,`\\nearrow`,!0),U(W,K,J,`↩`,`\\hookleftarrow`,!0),U(W,K,J,`↪`,`\\hookrightarrow`,!0),U(W,K,J,`↘`,`\\searrow`,!0),U(W,K,J,`↼`,`\\leftharpoonup`,!0),U(W,K,J,`⇀`,`\\rightharpoonup`,!0),U(W,K,J,`↙`,`\\swarrow`,!0),U(W,K,J,`↽`,`\\leftharpoondown`,!0),U(W,K,J,`⇁`,`\\rightharpoondown`,!0),U(W,K,J,`↖`,`\\nwarrow`,!0),U(W,K,J,`⇌`,`\\rightleftharpoons`,!0),U(W,q,J,`≮`,`\\nless`,!0),U(W,q,J,``,`\\@nleqslant`),U(W,q,J,``,`\\@nleqq`),U(W,q,J,`⪇`,`\\lneq`,!0),U(W,q,J,`≨`,`\\lneqq`,!0),U(W,q,J,``,`\\@lvertneqq`),U(W,q,J,`⋦`,`\\lnsim`,!0),U(W,q,J,`⪉`,`\\lnapprox`,!0),U(W,q,J,`⊀`,`\\nprec`,!0),U(W,q,J,`⋠`,`\\npreceq`,!0),U(W,q,J,`⋨`,`\\precnsim`,!0),U(W,q,J,`⪹`,`\\precnapprox`,!0),U(W,q,J,`≁`,`\\nsim`,!0),U(W,q,J,``,`\\@nshortmid`),U(W,q,J,`∤`,`\\nmid`,!0),U(W,q,J,`⊬`,`\\nvdash`,!0),U(W,q,J,`⊭`,`\\nvDash`,!0),U(W,q,J,`⋪`,`\\ntriangleleft`),U(W,q,J,`⋬`,`\\ntrianglelefteq`,!0),U(W,q,J,`⊊`,`\\subsetneq`,!0),U(W,q,J,``,`\\@varsubsetneq`),U(W,q,J,`⫋`,`\\subsetneqq`,!0),U(W,q,J,``,`\\@varsubsetneqq`),U(W,q,J,`≯`,`\\ngtr`,!0),U(W,q,J,``,`\\@ngeqslant`),U(W,q,J,``,`\\@ngeqq`),U(W,q,J,`⪈`,`\\gneq`,!0),U(W,q,J,`≩`,`\\gneqq`,!0),U(W,q,J,``,`\\@gvertneqq`),U(W,q,J,`⋧`,`\\gnsim`,!0),U(W,q,J,`⪊`,`\\gnapprox`,!0),U(W,q,J,`⊁`,`\\nsucc`,!0),U(W,q,J,`⋡`,`\\nsucceq`,!0),U(W,q,J,`⋩`,`\\succnsim`,!0),U(W,q,J,`⪺`,`\\succnapprox`,!0),U(W,q,J,`≆`,`\\ncong`,!0),U(W,q,J,``,`\\@nshortparallel`),U(W,q,J,`∦`,`\\nparallel`,!0),U(W,q,J,`⊯`,`\\nVDash`,!0),U(W,q,J,`⋫`,`\\ntriangleright`),U(W,q,J,`⋭`,`\\ntrianglerighteq`,!0),U(W,q,J,``,`\\@nsupseteqq`),U(W,q,J,`⊋`,`\\supsetneq`,!0),U(W,q,J,``,`\\@varsupsetneq`),U(W,q,J,`⫌`,`\\supsetneqq`,!0),U(W,q,J,``,`\\@varsupsetneqq`),U(W,q,J,`⊮`,`\\nVdash`,!0),U(W,q,J,`⪵`,`\\precneqq`,!0),U(W,q,J,`⪶`,`\\succneqq`,!0),U(W,q,J,``,`\\@nsubseteqq`),U(W,q,EV,`⊴`,`\\unlhd`),U(W,q,EV,`⊵`,`\\unrhd`),U(W,q,J,`↚`,`\\nleftarrow`,!0),U(W,q,J,`↛`,`\\nrightarrow`,!0),U(W,q,J,`⇍`,`\\nLeftarrow`,!0),U(W,q,J,`⇏`,`\\nRightarrow`,!0),U(W,q,J,`↮`,`\\nleftrightarrow`,!0),U(W,q,J,`⇎`,`\\nLeftrightarrow`,!0),U(W,q,J,`△`,`\\vartriangle`),U(W,q,Y,`ℏ`,`\\hslash`),U(W,q,Y,`▽`,`\\triangledown`),U(W,q,Y,`◊`,`\\lozenge`),U(W,q,Y,`Ⓢ`,`\\circledS`),U(W,q,Y,`®`,`\\circledR`),U(G,q,Y,`®`,`\\circledR`),U(W,q,Y,`∡`,`\\measuredangle`,!0),U(W,q,Y,`∄`,`\\nexists`),U(W,q,Y,`℧`,`\\mho`),U(W,q,Y,`Ⅎ`,`\\Finv`,!0),U(W,q,Y,`⅁`,`\\Game`,!0),U(W,q,Y,`‵`,`\\backprime`),U(W,q,Y,`▲`,`\\blacktriangle`),U(W,q,Y,`▼`,`\\blacktriangledown`),U(W,q,Y,`■`,`\\blacksquare`),U(W,q,Y,`⧫`,`\\blacklozenge`),U(W,q,Y,`★`,`\\bigstar`),U(W,q,Y,`∢`,`\\sphericalangle`,!0),U(W,q,Y,`∁`,`\\complement`,!0),U(W,q,Y,`ð`,`\\eth`,!0),U(G,K,Y,`ð`,`ð`),U(W,q,Y,`╱`,`\\diagup`),U(W,q,Y,`╲`,`\\diagdown`),U(W,q,Y,`□`,`\\square`),U(W,q,Y,`□`,`\\Box`),U(W,q,Y,`◊`,`\\Diamond`),U(W,q,Y,`¥`,`\\yen`,!0),U(G,q,Y,`¥`,`\\yen`,!0),U(W,q,Y,`✓`,`\\checkmark`,!0),U(G,q,Y,`✓`,`\\checkmark`),U(W,q,Y,`ℶ`,`\\beth`,!0),U(W,q,Y,`ℸ`,`\\daleth`,!0),U(W,q,Y,`ℷ`,`\\gimel`,!0),U(W,q,Y,`ϝ`,`\\digamma`,!0),U(W,q,Y,`ϰ`,`\\varkappa`),U(W,q,jV,`┌`,`\\@ulcorner`,!0),U(W,q,DV,`┐`,`\\@urcorner`,!0),U(W,q,jV,`└`,`\\@llcorner`,!0),U(W,q,DV,`┘`,`\\@lrcorner`,!0),U(W,q,J,`≦`,`\\leqq`,!0),U(W,q,J,`⩽`,`\\leqslant`,!0),U(W,q,J,`⪕`,`\\eqslantless`,!0),U(W,q,J,`≲`,`\\lesssim`,!0),U(W,q,J,`⪅`,`\\lessapprox`,!0),U(W,q,J,`≊`,`\\approxeq`,!0),U(W,q,EV,`⋖`,`\\lessdot`),U(W,q,J,`⋘`,`\\lll`,!0),U(W,q,J,`≶`,`\\lessgtr`,!0),U(W,q,J,`⋚`,`\\lesseqgtr`,!0),U(W,q,J,`⪋`,`\\lesseqqgtr`,!0),U(W,q,J,`≑`,`\\doteqdot`),U(W,q,J,`≓`,`\\risingdotseq`,!0),U(W,q,J,`≒`,`\\fallingdotseq`,!0),U(W,q,J,`∽`,`\\backsim`,!0),U(W,q,J,`⋍`,`\\backsimeq`,!0),U(W,q,J,`⫅`,`\\subseteqq`,!0),U(W,q,J,`⋐`,`\\Subset`,!0),U(W,q,J,`⊏`,`\\sqsubset`,!0),U(W,q,J,`≼`,`\\preccurlyeq`,!0),U(W,q,J,`⋞`,`\\curlyeqprec`,!0),U(W,q,J,`≾`,`\\precsim`,!0),U(W,q,J,`⪷`,`\\precapprox`,!0),U(W,q,J,`⊲`,`\\vartriangleleft`),U(W,q,J,`⊴`,`\\trianglelefteq`),U(W,q,J,`⊨`,`\\vDash`,!0),U(W,q,J,`⊪`,`\\Vvdash`,!0),U(W,q,J,`⌣`,`\\smallsmile`),U(W,q,J,`⌢`,`\\smallfrown`),U(W,q,J,`≏`,`\\bumpeq`,!0),U(W,q,J,`≎`,`\\Bumpeq`,!0),U(W,q,J,`≧`,`\\geqq`,!0),U(W,q,J,`⩾`,`\\geqslant`,!0),U(W,q,J,`⪖`,`\\eqslantgtr`,!0),U(W,q,J,`≳`,`\\gtrsim`,!0),U(W,q,J,`⪆`,`\\gtrapprox`,!0),U(W,q,EV,`⋗`,`\\gtrdot`),U(W,q,J,`⋙`,`\\ggg`,!0),U(W,q,J,`≷`,`\\gtrless`,!0),U(W,q,J,`⋛`,`\\gtreqless`,!0),U(W,q,J,`⪌`,`\\gtreqqless`,!0),U(W,q,J,`≖`,`\\eqcirc`,!0),U(W,q,J,`≗`,`\\circeq`,!0),U(W,q,J,`≜`,`\\triangleq`,!0),U(W,q,J,`∼`,`\\thicksim`),U(W,q,J,`≈`,`\\thickapprox`),U(W,q,J,`⫆`,`\\supseteqq`,!0),U(W,q,J,`⋑`,`\\Supset`,!0),U(W,q,J,`⊐`,`\\sqsupset`,!0),U(W,q,J,`≽`,`\\succcurlyeq`,!0),U(W,q,J,`⋟`,`\\curlyeqsucc`,!0),U(W,q,J,`≿`,`\\succsim`,!0),U(W,q,J,`⪸`,`\\succapprox`,!0),U(W,q,J,`⊳`,`\\vartriangleright`),U(W,q,J,`⊵`,`\\trianglerighteq`),U(W,q,J,`⊩`,`\\Vdash`,!0),U(W,q,J,`∣`,`\\shortmid`),U(W,q,J,`∥`,`\\shortparallel`),U(W,q,J,`≬`,`\\between`,!0),U(W,q,J,`⋔`,`\\pitchfork`,!0),U(W,q,J,`∝`,`\\varpropto`),U(W,q,J,`◀`,`\\blacktriangleleft`),U(W,q,J,`∴`,`\\therefore`,!0),U(W,q,J,`∍`,`\\backepsilon`),U(W,q,J,`▶`,`\\blacktriangleright`),U(W,q,J,`∵`,`\\because`,!0),U(W,q,J,`⋘`,`\\llless`),U(W,q,J,`⋙`,`\\gggtr`),U(W,q,EV,`⊲`,`\\lhd`),U(W,q,EV,`⊳`,`\\rhd`),U(W,q,J,`≂`,`\\eqsim`,!0),U(W,K,J,`⋈`,`\\Join`),U(W,q,J,`≑`,`\\Doteq`,!0),U(W,q,EV,`∔`,`\\dotplus`,!0),U(W,q,EV,`∖`,`\\smallsetminus`),U(W,q,EV,`⋒`,`\\Cap`,!0),U(W,q,EV,`⋓`,`\\Cup`,!0),U(W,q,EV,`⩞`,`\\doublebarwedge`,!0),U(W,q,EV,`⊟`,`\\boxminus`,!0),U(W,q,EV,`⊞`,`\\boxplus`,!0),U(W,q,EV,`⋇`,`\\divideontimes`,!0),U(W,q,EV,`⋉`,`\\ltimes`,!0),U(W,q,EV,`⋊`,`\\rtimes`,!0),U(W,q,EV,`⋋`,`\\leftthreetimes`,!0),U(W,q,EV,`⋌`,`\\rightthreetimes`,!0),U(W,q,EV,`⋏`,`\\curlywedge`,!0),U(W,q,EV,`⋎`,`\\curlyvee`,!0),U(W,q,EV,`⊝`,`\\circleddash`,!0),U(W,q,EV,`⊛`,`\\circledast`,!0),U(W,q,EV,`⋅`,`\\centerdot`),U(W,q,EV,`⊺`,`\\intercal`,!0),U(W,q,EV,`⋒`,`\\doublecap`),U(W,q,EV,`⋓`,`\\doublecup`),U(W,q,EV,`⊠`,`\\boxtimes`,!0),U(W,q,J,`⇢`,`\\dashrightarrow`,!0),U(W,q,J,`⇠`,`\\dashleftarrow`,!0),U(W,q,J,`⇇`,`\\leftleftarrows`,!0),U(W,q,J,`⇆`,`\\leftrightarrows`,!0),U(W,q,J,`⇚`,`\\Lleftarrow`,!0),U(W,q,J,`↞`,`\\twoheadleftarrow`,!0),U(W,q,J,`↢`,`\\leftarrowtail`,!0),U(W,q,J,`↫`,`\\looparrowleft`,!0),U(W,q,J,`⇋`,`\\leftrightharpoons`,!0),U(W,q,J,`↶`,`\\curvearrowleft`,!0),U(W,q,J,`↺`,`\\circlearrowleft`,!0),U(W,q,J,`↰`,`\\Lsh`,!0),U(W,q,J,`⇈`,`\\upuparrows`,!0),U(W,q,J,`↿`,`\\upharpoonleft`,!0),U(W,q,J,`⇃`,`\\downharpoonleft`,!0),U(W,K,J,`⊶`,`\\origof`,!0),U(W,K,J,`⊷`,`\\imageof`,!0),U(W,q,J,`⊸`,`\\multimap`,!0),U(W,q,J,`↭`,`\\leftrightsquigarrow`,!0),U(W,q,J,`⇉`,`\\rightrightarrows`,!0),U(W,q,J,`⇄`,`\\rightleftarrows`,!0),U(W,q,J,`↠`,`\\twoheadrightarrow`,!0),U(W,q,J,`↣`,`\\rightarrowtail`,!0),U(W,q,J,`↬`,`\\looparrowright`,!0),U(W,q,J,`↷`,`\\curvearrowright`,!0),U(W,q,J,`↻`,`\\circlearrowright`,!0),U(W,q,J,`↱`,`\\Rsh`,!0),U(W,q,J,`⇊`,`\\downdownarrows`,!0),U(W,q,J,`↾`,`\\upharpoonright`,!0),U(W,q,J,`⇂`,`\\downharpoonright`,!0),U(W,q,J,`⇝`,`\\rightsquigarrow`,!0),U(W,q,J,`⇝`,`\\leadsto`),U(W,q,J,`⇛`,`\\Rrightarrow`,!0),U(W,q,J,`↾`,`\\restriction`),U(W,K,Y,`‘`,"`"),U(W,K,Y,`$`,`\\$`),U(G,K,Y,`$`,`\\$`),U(G,K,Y,`$`,`\\textdollar`),U(W,K,Y,`%`,`\\%`),U(G,K,Y,`%`,`\\%`),U(W,K,Y,`_`,`\\_`),U(G,K,Y,`_`,`\\_`),U(G,K,Y,`_`,`\\textunderscore`),U(W,K,Y,`∠`,`\\angle`,!0),U(W,K,Y,`∞`,`\\infty`,!0),U(W,K,Y,`′`,`\\prime`),U(W,K,Y,`△`,`\\triangle`),U(W,K,Y,`Γ`,`\\Gamma`,!0),U(W,K,Y,`Δ`,`\\Delta`,!0),U(W,K,Y,`Θ`,`\\Theta`,!0),U(W,K,Y,`Λ`,`\\Lambda`,!0),U(W,K,Y,`Ξ`,`\\Xi`,!0),U(W,K,Y,`Π`,`\\Pi`,!0),U(W,K,Y,`Σ`,`\\Sigma`,!0),U(W,K,Y,`Υ`,`\\Upsilon`,!0),U(W,K,Y,`Φ`,`\\Phi`,!0),U(W,K,Y,`Ψ`,`\\Psi`,!0),U(W,K,Y,`Ω`,`\\Omega`,!0),U(W,K,Y,`A`,`Α`),U(W,K,Y,`B`,`Β`),U(W,K,Y,`E`,`Ε`),U(W,K,Y,`Z`,`Ζ`),U(W,K,Y,`H`,`Η`),U(W,K,Y,`I`,`Ι`),U(W,K,Y,`K`,`Κ`),U(W,K,Y,`M`,`Μ`),U(W,K,Y,`N`,`Ν`),U(W,K,Y,`O`,`Ο`),U(W,K,Y,`P`,`Ρ`),U(W,K,Y,`T`,`Τ`),U(W,K,Y,`X`,`Χ`),U(W,K,Y,`¬`,`\\neg`,!0),U(W,K,Y,`¬`,`\\lnot`),U(W,K,Y,`⊤`,`\\top`),U(W,K,Y,`⊥`,`\\bot`),U(W,K,Y,`∅`,`\\emptyset`),U(W,q,Y,`∅`,`\\varnothing`),U(W,K,kV,`α`,`\\alpha`,!0),U(W,K,kV,`β`,`\\beta`,!0),U(W,K,kV,`γ`,`\\gamma`,!0),U(W,K,kV,`δ`,`\\delta`,!0),U(W,K,kV,`ϵ`,`\\epsilon`,!0),U(W,K,kV,`ζ`,`\\zeta`,!0),U(W,K,kV,`η`,`\\eta`,!0),U(W,K,kV,`θ`,`\\theta`,!0),U(W,K,kV,`ι`,`\\iota`,!0),U(W,K,kV,`κ`,`\\kappa`,!0),U(W,K,kV,`λ`,`\\lambda`,!0),U(W,K,kV,`μ`,`\\mu`,!0),U(W,K,kV,`ν`,`\\nu`,!0),U(W,K,kV,`ξ`,`\\xi`,!0),U(W,K,kV,`ο`,`\\omicron`,!0),U(W,K,kV,`π`,`\\pi`,!0),U(W,K,kV,`ρ`,`\\rho`,!0),U(W,K,kV,`σ`,`\\sigma`,!0),U(W,K,kV,`τ`,`\\tau`,!0),U(W,K,kV,`υ`,`\\upsilon`,!0),U(W,K,kV,`ϕ`,`\\phi`,!0),U(W,K,kV,`χ`,`\\chi`,!0),U(W,K,kV,`ψ`,`\\psi`,!0),U(W,K,kV,`ω`,`\\omega`,!0),U(W,K,kV,`ε`,`\\varepsilon`,!0),U(W,K,kV,`ϑ`,`\\vartheta`,!0),U(W,K,kV,`ϖ`,`\\varpi`,!0),U(W,K,kV,`ϱ`,`\\varrho`,!0),U(W,K,kV,`ς`,`\\varsigma`,!0),U(W,K,kV,`φ`,`\\varphi`,!0),U(W,K,EV,`∗`,`*`,!0),U(W,K,EV,`+`,`+`),U(W,K,EV,`−`,`-`,!0),U(W,K,EV,`⋅`,`\\cdot`,!0),U(W,K,EV,`∘`,`\\circ`,!0),U(W,K,EV,`÷`,`\\div`,!0),U(W,K,EV,`±`,`\\pm`,!0),U(W,K,EV,`×`,`\\times`,!0),U(W,K,EV,`∩`,`\\cap`,!0),U(W,K,EV,`∪`,`\\cup`,!0),U(W,K,EV,`∖`,`\\setminus`,!0),U(W,K,EV,`∧`,`\\land`),U(W,K,EV,`∨`,`\\lor`),U(W,K,EV,`∧`,`\\wedge`,!0),U(W,K,EV,`∨`,`\\vee`,!0),U(W,K,Y,`√`,`\\surd`),U(W,K,jV,`⟨`,`\\langle`,!0),U(W,K,jV,`∣`,`\\lvert`),U(W,K,jV,`∥`,`\\lVert`),U(W,K,DV,`?`,`?`),U(W,K,DV,`!`,`!`),U(W,K,DV,`⟩`,`\\rangle`,!0),U(W,K,DV,`∣`,`\\rvert`),U(W,K,DV,`∥`,`\\rVert`),U(W,K,J,`=`,`=`),U(W,K,J,`:`,`:`),U(W,K,J,`≈`,`\\approx`,!0),U(W,K,J,`≅`,`\\cong`,!0),U(W,K,J,`≥`,`\\ge`),U(W,K,J,`≥`,`\\geq`,!0),U(W,K,J,`←`,`\\gets`),U(W,K,J,`>`,`\\gt`,!0),U(W,K,J,`∈`,`\\in`,!0),U(W,K,J,``,`\\@not`),U(W,K,J,`⊂`,`\\subset`,!0),U(W,K,J,`⊃`,`\\supset`,!0),U(W,K,J,`⊆`,`\\subseteq`,!0),U(W,K,J,`⊇`,`\\supseteq`,!0),U(W,q,J,`⊈`,`\\nsubseteq`,!0),U(W,q,J,`⊉`,`\\nsupseteq`,!0),U(W,K,J,`⊨`,`\\models`),U(W,K,J,`←`,`\\leftarrow`,!0),U(W,K,J,`≤`,`\\le`),U(W,K,J,`≤`,`\\leq`,!0),U(W,K,J,`<`,`\\lt`,!0),U(W,K,J,`→`,`\\rightarrow`,!0),U(W,K,J,`→`,`\\to`),U(W,q,J,`≱`,`\\ngeq`,!0),U(W,q,J,`≰`,`\\nleq`,!0),U(W,K,NV,`\xA0`,`\\ `),U(W,K,NV,`\xA0`,`\\space`),U(W,K,NV,`\xA0`,`\\nobreakspace`),U(G,K,NV,`\xA0`,`\\ `),U(G,K,NV,`\xA0`,` `),U(G,K,NV,`\xA0`,`\\space`),U(G,K,NV,`\xA0`,`\\nobreakspace`),U(W,K,NV,``,`\\nobreak`),U(W,K,NV,``,`\\allowbreak`),U(W,K,MV,`,`,`,`),U(W,K,MV,`;`,`;`),U(W,q,EV,`⊼`,`\\barwedge`,!0),U(W,q,EV,`⊻`,`\\veebar`,!0),U(W,K,EV,`⊙`,`\\odot`,!0),U(W,K,EV,`⊕`,`\\oplus`,!0),U(W,K,EV,`⊗`,`\\otimes`,!0),U(W,K,Y,`∂`,`\\partial`,!0),U(W,K,EV,`⊘`,`\\oslash`,!0),U(W,q,EV,`⊚`,`\\circledcirc`,!0),U(W,q,EV,`⊡`,`\\boxdot`,!0),U(W,K,EV,`△`,`\\bigtriangleup`),U(W,K,EV,`▽`,`\\bigtriangledown`),U(W,K,EV,`†`,`\\dagger`),U(W,K,EV,`⋄`,`\\diamond`),U(W,K,EV,`⋆`,`\\star`),U(W,K,EV,`◃`,`\\triangleleft`),U(W,K,EV,`▹`,`\\triangleright`),U(W,K,jV,`{`,`\\{`),U(G,K,Y,`{`,`\\{`),U(G,K,Y,`{`,`\\textbraceleft`),U(W,K,DV,`}`,`\\}`),U(G,K,Y,`}`,`\\}`),U(G,K,Y,`}`,`\\textbraceright`),U(W,K,jV,`{`,`\\lbrace`),U(W,K,DV,`}`,`\\rbrace`),U(W,K,jV,`[`,`\\lbrack`,!0),U(G,K,Y,`[`,`\\lbrack`,!0),U(W,K,DV,`]`,`\\rbrack`,!0),U(G,K,Y,`]`,`\\rbrack`,!0),U(W,K,jV,`(`,`\\lparen`,!0),U(W,K,DV,`)`,`\\rparen`,!0),U(G,K,Y,`<`,`\\textless`,!0),U(G,K,Y,`>`,`\\textgreater`,!0),U(W,K,jV,`⌊`,`\\lfloor`,!0),U(W,K,DV,`⌋`,`\\rfloor`,!0),U(W,K,jV,`⌈`,`\\lceil`,!0),U(W,K,DV,`⌉`,`\\rceil`,!0),U(W,K,Y,`\\`,`\\backslash`),U(W,K,Y,`∣`,`|`),U(W,K,Y,`∣`,`\\vert`),U(G,K,Y,`|`,`\\textbar`,!0),U(W,K,Y,`∥`,`\\|`),U(W,K,Y,`∥`,`\\Vert`),U(G,K,Y,`∥`,`\\textbardbl`),U(G,K,Y,`~`,`\\textasciitilde`),U(G,K,Y,`\\`,`\\textbackslash`),U(G,K,Y,`^`,`\\textasciicircum`),U(W,K,J,`↑`,`\\uparrow`,!0),U(W,K,J,`⇑`,`\\Uparrow`,!0),U(W,K,J,`↓`,`\\downarrow`,!0),U(W,K,J,`⇓`,`\\Downarrow`,!0),U(W,K,J,`↕`,`\\updownarrow`,!0),U(W,K,J,`⇕`,`\\Updownarrow`,!0),U(W,K,AV,`∐`,`\\coprod`),U(W,K,AV,`⋁`,`\\bigvee`),U(W,K,AV,`⋀`,`\\bigwedge`),U(W,K,AV,`⨄`,`\\biguplus`),U(W,K,AV,`⋂`,`\\bigcap`),U(W,K,AV,`⋃`,`\\bigcup`),U(W,K,AV,`∫`,`\\int`),U(W,K,AV,`∫`,`\\intop`),U(W,K,AV,`∬`,`\\iint`),U(W,K,AV,`∭`,`\\iiint`),U(W,K,AV,`∏`,`\\prod`),U(W,K,AV,`∑`,`\\sum`),U(W,K,AV,`⨂`,`\\bigotimes`),U(W,K,AV,`⨁`,`\\bigoplus`),U(W,K,AV,`⨀`,`\\bigodot`),U(W,K,AV,`∮`,`\\oint`),U(W,K,AV,`∯`,`\\oiint`),U(W,K,AV,`∰`,`\\oiiint`),U(W,K,AV,`⨆`,`\\bigsqcup`),U(W,K,AV,`∫`,`\\smallint`),U(G,K,OV,`…`,`\\textellipsis`),U(W,K,OV,`…`,`\\mathellipsis`),U(G,K,OV,`…`,`\\ldots`,!0),U(W,K,OV,`…`,`\\ldots`,!0),U(W,K,OV,`⋯`,`\\@cdots`,!0),U(W,K,OV,`⋱`,`\\ddots`,!0),U(W,K,Y,`⋮`,`\\varvdots`),U(G,K,Y,`⋮`,`\\varvdots`),U(W,K,TV,`ˊ`,`\\acute`),U(W,K,TV,`ˋ`,`\\grave`),U(W,K,TV,`¨`,`\\ddot`),U(W,K,TV,`~`,`\\tilde`),U(W,K,TV,`ˉ`,`\\bar`),U(W,K,TV,`˘`,`\\breve`),U(W,K,TV,`ˇ`,`\\check`),U(W,K,TV,`^`,`\\hat`),U(W,K,TV,`⃗`,`\\vec`),U(W,K,TV,`˙`,`\\dot`),U(W,K,TV,`˚`,`\\mathring`),U(W,K,kV,``,`\\@imath`),U(W,K,kV,``,`\\@jmath`),U(W,K,Y,`ı`,`ı`),U(W,K,Y,`ȷ`,`ȷ`),U(G,K,Y,`ı`,`\\i`,!0),U(G,K,Y,`ȷ`,`\\j`,!0),U(G,K,Y,`ß`,`\\ss`,!0),U(G,K,Y,`æ`,`\\ae`,!0),U(G,K,Y,`œ`,`\\oe`,!0),U(G,K,Y,`ø`,`\\o`,!0),U(G,K,Y,`Æ`,`\\AE`,!0),U(G,K,Y,`Œ`,`\\OE`,!0),U(G,K,Y,`Ø`,`\\O`,!0),U(G,K,TV,`ˊ`,`\\'`),U(G,K,TV,`ˋ`,"\\`"),U(G,K,TV,`ˆ`,`\\^`),U(G,K,TV,`˜`,`\\~`),U(G,K,TV,`ˉ`,`\\=`),U(G,K,TV,`˘`,`\\u`),U(G,K,TV,`˙`,`\\.`),U(G,K,TV,`¸`,`\\c`),U(G,K,TV,`˚`,`\\r`),U(G,K,TV,`ˇ`,`\\v`),U(G,K,TV,`¨`,`\\"`),U(G,K,TV,`˝`,`\\H`),U(G,K,TV,`◯`,`\\textcircled`);var PV={"--":!0,"---":!0,"``":!0,"''":!0};U(G,K,Y,`–`,`--`,!0),U(G,K,Y,`–`,`\\textendash`),U(G,K,Y,`—`,`---`,!0),U(G,K,Y,`—`,`\\textemdash`),U(G,K,Y,`‘`,"`",!0),U(G,K,Y,`‘`,`\\textquoteleft`),U(G,K,Y,`’`,`'`,!0),U(G,K,Y,`’`,`\\textquoteright`),U(G,K,Y,`“`,"``",!0),U(G,K,Y,`“`,`\\textquotedblleft`),U(G,K,Y,`”`,`''`,!0),U(G,K,Y,`”`,`\\textquotedblright`),U(W,K,Y,`°`,`\\degree`,!0),U(G,K,Y,`°`,`\\degree`),U(G,K,Y,`°`,`\\textdegree`,!0),U(W,K,Y,`£`,`\\pounds`),U(W,K,Y,`£`,`\\mathsterling`,!0),U(G,K,Y,`£`,`\\pounds`),U(G,K,Y,`£`,`\\textsterling`,!0),U(W,q,Y,`✠`,`\\maltese`),U(G,q,Y,`✠`,`\\maltese`);for(var FV=`0123456789/@."`,IV=0;IV<FV.length;IV++){var LV=FV.charAt(IV);U(W,K,Y,LV,LV)}for(var RV=`0123456789!@*()-=+";:?/.,`,zV=0;zV<RV.length;zV++){var BV=RV.charAt(zV);U(G,K,Y,BV,BV)}for(var VV=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,HV=0;HV<VV.length;HV++){var UV=VV.charAt(HV);U(W,K,kV,UV,UV),U(G,K,Y,UV,UV)}U(W,q,Y,`C`,`ℂ`),U(G,q,Y,`C`,`ℂ`),U(W,q,Y,`H`,`ℍ`),U(G,q,Y,`H`,`ℍ`),U(W,q,Y,`N`,`ℕ`),U(G,q,Y,`N`,`ℕ`),U(W,q,Y,`P`,`ℙ`),U(G,q,Y,`P`,`ℙ`),U(W,q,Y,`Q`,`ℚ`),U(G,q,Y,`Q`,`ℚ`),U(W,q,Y,`R`,`ℝ`),U(G,q,Y,`R`,`ℝ`),U(W,q,Y,`Z`,`ℤ`),U(G,q,Y,`Z`,`ℤ`),U(W,K,kV,`h`,`ℎ`),U(G,K,kV,`h`,`ℎ`);for(var WV,GV=0;GV<VV.length;GV++){var KV=VV.charAt(GV);WV=String.fromCharCode(55349,56320+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),WV=String.fromCharCode(55349,56372+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),WV=String.fromCharCode(55349,56424+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),WV=String.fromCharCode(55349,56580+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),WV=String.fromCharCode(55349,56684+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),WV=String.fromCharCode(55349,56736+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),WV=String.fromCharCode(55349,56788+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),WV=String.fromCharCode(55349,56840+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),WV=String.fromCharCode(55349,56944+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),GV<26&&(WV=String.fromCharCode(55349,56632+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV),WV=String.fromCharCode(55349,56476+GV),U(W,K,kV,KV,WV),U(G,K,Y,KV,WV))}WV=`𝕜`,U(W,K,kV,`k`,WV),U(G,K,Y,`k`,WV);for(var qV=0;qV<10;qV++){var JV=qV.toString();WV=String.fromCharCode(55349,57294+qV),U(W,K,kV,JV,WV),U(G,K,Y,JV,WV),WV=String.fromCharCode(55349,57314+qV),U(W,K,kV,JV,WV),U(G,K,Y,JV,WV),WV=String.fromCharCode(55349,57324+qV),U(W,K,kV,JV,WV),U(G,K,Y,JV,WV),WV=String.fromCharCode(55349,57334+qV),U(W,K,kV,JV,WV),U(G,K,Y,JV,WV)}for(var YV=`ÐÞþ`,XV=0;XV<YV.length;XV++){var ZV=YV.charAt(XV);U(W,K,kV,ZV,ZV),U(G,K,Y,ZV,ZV)}var QV={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},$V={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},eH={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},tH={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},nH={mathClass:``,textClass:``,font:``},rH={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},iH={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},aH={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},oH={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},sH={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},cH={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},lH={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},uH=[QV,QV,$V,$V,eH,eH,tH,nH,nH,nH,rH,rH,iH,iH,aH,aH,oH,oH,sH,sH,cH,cH,nH,nH,lH,lH],dH=[QV,nH,oH,sH,lH],fH=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return uH[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return dH[Math.floor((r-120782)/10)];if(r===120485||r===120486)return uH[0];if(120486<r&&r<120782)return nH;throw new V(`Unsupported character: `+e)};function pH(e){var t=e.strict,n=e.errorCode,r=e.errorMsg,i=e.token,a=e.report,o=t;if(typeof t==`function`){if(a)o=t(n,r,i);else try{o=t(n,r,i)}catch{o=`error`}}switch(o){case!0:case`error`:if(a)throw new V(`LaTeX-incompatible input and strict mode is set to 'error': `+(r+` [`+n+`]`),i);return!0;case!1:case`ignore`:if(!a)return!1;break;default:if(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(r+` [`+n+`]`)),!a)return!1}}var mH=function(e,t,n){if(wV[n][e]){var r=wV[n][e].replace;r&&(e=r)}return{value:e,metrics:xV(e,t,n)}},hH=function(e,t,n,r,i){var a=mH(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new uV(e,o.height,o.depth,c,o.skew,o.width,i)}else pH({strict:r.strict,errorCode:`symbolNotInFont`,errorMsg:`No character metrics for '`+e+`' in style '`+t+`' and mode '`+n+`'`,report:!0}),s=new uV(e,0,0,0,0,0,i);s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();return l&&(s.style.color=l),s},gH=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&mH(e,`Main-Bold`,t).metrics?hH(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||wV[t][e].font===`main`?hH(e,`Main-Regular`,t,n,r):hH(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},_H=function(e,t,n){return n!==`textord`&&mH(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},vH=function(e,t){var n=e.type===`mathord`?`mathord`:`textord`,r=e.mode,i=e.text,a=[`mord`],o=t.font,s=t.fontFamily,c=t.fontWeight,l=t.fontShape,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=fH(i);f=m.font,p=m[r+`Class`]}if(f)return hH(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=_H(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=jH[o].fontName,g=[o]):(h=AH(s,c,l),g=[s,c,l]);if(mH(i,h,r).metrics)return hH(i,h,r,t,a.concat(g));if(Object.prototype.hasOwnProperty.call(PV,i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(hH(i[y],h,r,t,a.concat(g)));return TH(v)}}if(n===`mathord`)return hH(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=wV[r][i]&&wV[r][i].font;if(b===`ams`)return hH(i,AH(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return hH(i,AH(`textrm`,c,l),r,t,a.concat(c,l));var x=AH(b,c,l);return hH(i,x,r,t,a.concat(x,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},yH=(e,t)=>{if(eV(e.classes)!==eV(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},bH=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof uV&&r instanceof uV&&yH(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},xH=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},X=function(e,t,n,r){var i=new oV(e,t,n,r);return xH(i),i},SH=(e,t,n,r)=>new oV(e,t,n,r),CH=function(e,t,n){var r=X([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=H(r.height),r.maxFontSize=1,r},wH=function(e,t,n,r){var i=new sV(e,t,n,r);return xH(i),i},TH=function(e){var t=new YB(e);return xH(t),t},EH=function(e,t){return e instanceof YB?X([],[e],t):e},DH=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},OH=function(e,t){for(var n=DH(e),r=n.children,i=n.depth,a=0,o=0;o<r.length;o++){var s=r[o];if(s.type===`elem`){var c=s.elem;a=Math.max(a,c.maxFontSize,c.height)}}a+=2;var l=X([`pstrut`],[]);l.style.height=H(a);for(var u=[],d=i,f=i,p=i,m=0;m<r.length;m++){var h=r[m];if(h.type===`kern`)p+=h.size;else{var g=h.elem,_=h.wrapperClasses||[],v=h.wrapperStyle||{},y=X(_,[l,g],void 0,v);y.style.top=H(-a-p-g.depth),h.marginLeft&&(y.style.marginLeft=h.marginLeft),h.marginRight&&(y.style.marginRight=h.marginRight),u.push(y),p+=g.height+g.depth}d=Math.min(d,p),f=Math.max(f,p)}var b=X([`vlist`],u);b.style.height=H(f);var x;if(d<0){var S=X([`vlist`],[X([],[])]);S.style.height=H(-d),x=[X([`vlist-r`],[b,X([`vlist-s`],[new uV(`​`)])]),X([`vlist-r`],[S])]}else x=[X([`vlist-r`],[b])];var C=X([`vlist-t`],x);return x.length===2&&C.classes.push(`vlist-t2`),C.height=f,C.depth=-d,C},kH=(e,t)=>{var n=X([`mspace`],[],t),r=$B(e,t);return n.style.marginRight=H(r),n},AH=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},jH={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},MH={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},NH=function(e,t){var n=MH[e],r=n[0],i=n[1],a=n[2],o=SH([`katex-overlay`],[new dV([new fV(r)],{width:H(i),height:H(a),style:`width:`+H(i),viewBox:`0 0 `+1e3*i+` `+1e3*a,preserveAspectRatio:`xMinYMin`})],t);return o.height=a,o.style.height=H(a),o.style.width=H(i),o},PH={number:3,unit:`mu`},FH={number:4,unit:`mu`},IH={number:5,unit:`mu`},LH={mord:{mop:PH,mbin:FH,mrel:IH,minner:PH},mop:{mord:PH,mop:PH,mrel:IH,minner:PH},mbin:{mord:FH,mop:FH,mopen:FH,minner:FH},mrel:{mord:IH,mop:IH,mopen:IH,minner:IH},mopen:{},mclose:{mop:PH,mbin:FH,mrel:IH,minner:PH},mpunct:{mord:PH,mop:PH,mrel:IH,mopen:PH,mclose:PH,mpunct:PH,minner:PH},minner:{mord:PH,mop:PH,mbin:FH,mrel:IH,mopen:PH,mpunct:PH,minner:PH}},RH={mord:{mop:PH},mop:{mord:PH,mop:PH},mbin:{},mrel:{},mopen:{},mclose:{mop:PH},mpunct:{},minner:{mop:PH}},zH={},BH={},VH={};function Z(e){for(var t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder,a=0;a<n.length;++a)zH[n[a]]=e;t&&(r&&(BH[t]=r),i&&(VH[t]=i))}function HH(e){var t=e.type,n=e.htmlBuilder,r=e.mathmlBuilder;n&&(BH[t]=n),r&&(VH[t]=r)}var UH=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},WH=function(e){return e.type===`ordgroup`?e.body:[e]},GH=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),KH=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),qH={display:AB.DISPLAY,text:AB.TEXT,script:AB.SCRIPT,scriptscript:AB.SCRIPTSCRIPT},JH={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},YH=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=tU(e[a],t);if(o instanceof YB){var s=o.children;i.push(...s)}else i.push(o)}if(bH(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(qH[l.style]))}var u=X([r[0]||`leftmost`],[],t),d=X([r[1]||`rightmost`],[],t),f=n===`root`;return XH(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&KH.has(r)?t.classes[0]=`mord`:r===`mbin`&&GH.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),XH(i,(e,t)=>{var n=$H(t),r=$H(e),i=n&&r?e.hasClass(`mtight`)?RH[n]?.[r]:LH[n]?.[r]:null;if(i)return kH(i,c)},{node:u},d,f),i},XH=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=ZH(o);if(s)XH(s.children,t,n,null,i);else{var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`katex-newline`)&&(n.node=X([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}}r&&e.pop()},ZH=function(e){return e instanceof YB||e instanceof sV||e instanceof oV&&e.hasClass(`enclosing`)?e:null},QH=function(e,t){var n=ZH(e);if(n){var r=n.children;if(r.length){if(t===`right`)return QH(r[r.length-1],`right`);if(t===`left`)return QH(r[0],`left`)}}return e},$H=function(e,t){return e?(t&&(e=QH(e,t)),JH[e.classes[0]]||null):null},eU=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return X(t.concat(n))},tU=function(e,t,n){if(!e)return X();if(BH[e.type]){var r=BH[e.type](e,t);if(n&&t.size!==n.size){r=X(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new V(`Got group of unknown type: '`+e.type+`'`)};function nU(e,t){var n=X([`katex-base`],e,t),r=X([`katex-strut`]);return r.style.height=H(n.height+n.depth),n.depth&&(r.style.verticalAlign=H(-n.depth)),n.children.unshift(r),n}function rU(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=YH(e,t,`root`),i;r.length===2&&r[1].hasClass(`katex-tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`katex-newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(nU(o,t)),o=[])}else r[s].hasClass(`katex-newline`)&&(o.pop(),o.length>0&&(a.push(nU(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(nU(o,t));var l;n?(l=nU(YH(n,t,!0),t),l.classes=[`katex-tag`],a.push(l)):i&&a.push(i);var u=X([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=H(u.height+u.depth),u.depth&&(d.style.verticalAlign=H(-u.depth))}return u}function iU(e){return new YB(e)}var Q=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}this.classes.length>0&&(e.className=eV(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof aU&&this.children[i+1]instanceof aU){for(var a=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof aU;)a+=this.children[++i].toText();e.appendChild(new aU(a).toNode())}else e.appendChild(this.children[i].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e+=` `+n+`="`,e+=iB(r),e+=`"`}this.classes.length>0&&(e+=` class ="`+iB(eV(this.classes))+`"`),e+=`>`;for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},aU=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return iB(this.toText())}toText(){return this.text}},oU=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?`  `:e>=-.05556&&e<=-.05555?` ⁣`:e>=-.1667&&e<=-.1666?` ⁣`:e>=-.2223&&e<=-.2222?` ⁣`:e>=-.2778&&e<=-.2777?` ⁣`:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,H(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+H(this.width)+`"/>`}toText(){return this.character?this.character:` `}},sU=new Set([`\\imath`,`\\jmath`]),cU=new Set([`mrow`,`mtable`]),lU=function(e,t,n){var r,i;return wV[t][e]&&wV[t][e].replace&&e.charCodeAt(0)!==55349&&(!Object.prototype.hasOwnProperty.call(PV,e)||(n==null||(r=n.fontFamily)==null?void 0:r.slice(4,6))!==`tt`&&(n==null||(i=n.font)==null?void 0:i.slice(4,6))!==`tt`)&&(e=wV[t][e].replace),new aU(e)},uU=function(e){return e.length===1?e[0]:new Q(`mrow`,e)},dU={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},fU=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=dU[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(sU.has(a))return null;if(wV[r][a]){var o=wV[r][a].replace;o&&(a=o)}var s=jH[n].fontName;return xV(a,s,r)?jH[n].variant:null};function pU(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof aU&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof aU&&n.text===`,`}return!1}var mU=function(e,t,n){if(e.length===1){var r=gU(e[0],t);return n&&r instanceof Q&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=gU(e[o],t);if(s instanceof Q&&a instanceof Q){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)||s.type===`mn`&&a.type===`mn`||pU(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&pU(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||pU(a))){var c=s.children[0];c instanceof Q&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof aU&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof aU&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},hU=function(e,t,n){return uU(mU(e,t,n))},gU=function(e,t){if(!e)return new Q(`mrow`);if(VH[e.type])return VH[e.type](e,t);throw new V(`Got group of unknown type: '`+e.type+`'`)};function _U(e,t,n,r,i){var a=mU(e,n),o=a.length===1&&a[0]instanceof Q&&cU.has(a[0].type)?a[0]:new Q(`mrow`,a),s=new Q(`annotation`,[new aU(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Q(`math`,[new Q(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),X([i?`katex`:`katex-mathml`],[c])}var vU=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],yU=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],bU=function(e,t){return t.size<2?e:vU[e-1][t.size-1]},xU=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.strict=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=yU[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this.strict=t.strict,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness,strict:this.strict};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:bU(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:yU[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=bU(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`katex-sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`katex-sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=CV(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};xU.BASESIZE=6;var SU=e=>new xU({style:e.displayMode?AB.DISPLAY:AB.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness,strict:e.strict}),CU=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=X(n,[e])}return e},wU=function(e,t,n){var r=SU(n),i;return n.output===`mathml`?_U(e,t,r,n.displayMode,!0):(i=n.output===`html`?X([`katex`],[rU(e,r)]):X([`katex`],[_U(e,t,r,n.displayMode,!1),rU(e,r)]),CU(i,n))},TU=function(e,t){return CU(X([`katex`],[rU(e,SU(t))]),t)},EU={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},DU=function(e){var t=new Q(`mo`,[new aU(EU[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},OU={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},kU=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),AU=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(kU.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:SH([],[new dV([new fV(o)],{width:`100%`,height:H(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=OU[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var d=u[0],f=u[1],p=u[2],m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
486
+ `+h+` children.`);for(var v=0;v<h;v++){var y=new dV([new fV(d[v])],{width:`400em`,height:H(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=SH([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=H(m),l.push(b)}return{span:X([`katex-stretchy`],l,t),minWidth:f,height:m}}var r=n(),i=r.span,a=r.minWidth,o=r.height;return i.height=o,i.style.height=H(o),a>0&&(i.style.minWidth=H(a)),i},jU=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=X([`katex-stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new pV({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new pV({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=SH([],[new dV(c,{width:`100%`,height:H(o)})],i)}return a.height=o,a.style.height=H(o),a},MU=[`bin`,`close`,`inner`,`open`,`punct`,`rel`],NU=[`accent-token`,`mathord`,`op-token`,`spacing`,`textord`],PU=new Set(MU),FU=new Set(NU);function IU(e){return PU.has(e)}function LU(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function RU(e){var t=zU(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function zU(e){return e.type===`atom`||FU.has(e.type)?e:null}function BU(e,t,n){var r=``;for(var i of e.body)if(i.type===`textord`)r+=i.text;else if(n&&i.type===`spacing`&&i.text===` `)r+=` `;else throw new V(t,e);return r}var VU=e=>{if(e instanceof uV)return e;if(gV(e)&&e.children.length===1)return VU(e.children[0])},HU=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=LU(e.base,`accent`),n=r.base,e.base=n,i=hV(tU(e,t)),e.base=r):(r=LU(e,`accent`),n=r.base);var a=tU(n,t.havingCrampedStyle()),o=r.isShifty&&sB(n),s=0;o&&(s=VU(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=AU(r,t),u=OH({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+H(2*s)+`)`,marginLeft:H(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=NH(`vec`,t),f=MH.vec[1]):(d=vH({type:`textord`,mode:r.mode,text:r.label},t),d=mV(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=X([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=H(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=OH({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=X([`mord`,`katex-accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},UU=(e,t)=>{var n=e.isStretchy?DU(e.label):new Q(`mo`,[lU(e.label,e.mode)]),r=new Q(`mover`,[gU(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},WU=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));Z({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],numArgs:1,handler:(e,t)=>{var n=UH(t[0]),r=!WU.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:HU,mathmlBuilder:UU}),Z({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(pH({strict:e.parser.settings.strict,errorCode:`mathVsTextAccents`,errorMsg:`LaTeX's accent `+e.funcName+` works only in text mode`,report:!0}),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}}),Z({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=tU(e.base,t),r=AU(e,t),i=e.label===`\\utilde`?.12:0;return X([`mord`,`accentunder`],[OH({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=DU(e.label),r=new Q(`munder`,[gU(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var GU=e=>{var t=new Q(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};Z({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=e.funcName;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=EH(tU(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=EH(tU(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=AU(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=OH({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=OH({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return X([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=DU(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=GU(gU(e.body,t));r=e.below?new Q(`munderover`,[n,GU(gU(e.below,t)),i]):new Q(`mover`,[n,i])}else e.below?r=new Q(`munder`,[n,GU(gU(e.below,t))]):(r=GU(),r=new Q(`mover`,[n,r]));return r}});function KU(e,t){var n=YH(e.body,t,!0);return X([e.mclass],n,t)}function qU(e,t){var n,r=mU(e.body,t);return e.mclass===`minner`?n=new Q(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Q(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Q(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}Z({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],numArgs:1,primitive:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:WH(i),isCharacterBox:sB(i)}},htmlBuilder:KU,mathmlBuilder:qU});var JU=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};Z({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){return{type:`mclass`,mode:e.parser.mode,mclass:JU(t[0]),body:WH(t[1]),isCharacterBox:sB(t[1])}}}),Z({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){var n=e.parser,r=e.funcName,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:JU(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:WH(i)},c=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:sB(c)}}}),Z({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`pmb`,mode:e.parser.mode,mclass:JU(t[0]),body:WH(t[0])}},htmlBuilder(e,t){var n=YH(e.body,t,!0),r=X([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new Q(`mstyle`,mU(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var YU={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},XU=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),ZU=e=>e.type===`textord`&&e.text===`@`,QU=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function $U(e,t,n){var r=YU[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function eW(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new V(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=XU(),c=0;c<o.length;c++)if(!ZU(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=RU(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l)){if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(QU(o[p],l)){f=!1,c=p;break}if(ZU(o[p]))throw new V(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new V(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new V(`Expected one of "<>AV=|." after @`,o[c])}var m={type:`styling`,body:[$U(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=XU()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}Z({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=EH(tU(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=H(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Q(`mrow`,[gU(e.label,t)]);return n=new Q(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Q(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),Z({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){return{type:`cdlabelparent`,mode:e.parser.mode,fragment:t[0]}},htmlBuilder(e,t){var n=EH(tU(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Q(`mrow`,[gU(e.fragment,t)])}}),Z({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=BU(LU(t[0],`ordgroup`),`\\@char has non-numeric argument`),i=parseInt(r),a;if(isNaN(i))throw new V(`\\@char has non-numeric argument `+r);if(i<0||i>1114111)throw new V(`\\@char with invalid code point `+r);return i<=65535?a=String.fromCharCode(i):(i-=65536,a=String.fromCharCode((i>>10)+55296,(i&1023)+56320)),{type:`textord`,mode:n.mode,text:a}}}),Z({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){var n=e.parser,r=LU(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:WH(i)}},htmlBuilder:(e,t)=>TH(YH(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=new Q(`mstyle`,mU(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n}}),Z({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){var n=e.parser,r=e.breakOnTokenText,i=LU(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),Z({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=t.gullet.future().text===`[`?t.parseSizeGroup(!0):null,r=!t.settings.displayMode||!pH({strict:t.settings.strict,errorCode:`newLineInDisplayMode`,errorMsg:`In LaTeX, \\\\ or \\newline does nothing in display mode`,report:!1});return{type:`cr`,mode:t.mode,newLine:r,size:n&&LU(n,`size`).value}},htmlBuilder(e,t){var n=X([`mspace`],[],t);return e.newLine&&(n.classes.push(`katex-newline`),e.size&&(n.style.marginTop=H($B(e.size,t)))),n},mathmlBuilder(e,t){var n=new Q(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,H($B(e.size,t)))),n}});var tW={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},nW=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new V(`Expected a control sequence`,e);return t},rW=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},iW=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};Z({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var r=t.fetch();if(tW[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=tW[r.text]),LU(t.parseFunction(),`internal`);throw new V(`Invalid token after macro prefix`,r)}}),Z({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new V(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new V(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new V(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new V(`Expected a macro definition`);else s[a].push(r.text);var c=t.gullet.consumeArg().tokens;return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===tW[n]),{type:`internal`,mode:t.mode}}}),Z({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=nW(t.gullet.popToken());return t.gullet.consumeSpaces(),iW(t,r,rW(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),Z({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=nW(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return iW(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var aW=function(e,t,n){var r=xV(wV.math[e]&&wV.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},oW=function(e,t,n,r){var i=n.havingBaseStyle(t),a=X(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},sW=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=H(i),e.height-=i,e.depth+=i},cW=function(e,t,n,r,i,a){var o=oW(hH(e,`Main-Regular`,i,r),t,r,a);return n&&sW(o,r,t),o},lW=function(e,t,n,r){return hH(e,`Size`+t+`-Regular`,n,r)},uW=function(e,t,n,r,i,a){var o=lW(e,t,i,r),s=oW(X([`delimsizing`,`size`+t],[o],r),AB.TEXT,r,a);return n&&sW(s,r,AB.TEXT),s},dW=function(e,t,n,r){return{type:`elem`,elem:X([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[X([],[hH(e,t,n,r)])])}},fW=function(e,t,n){var r=_V[`Size4-Regular`][e.charCodeAt(0)]?_V[`Size4-Regular`][e.charCodeAt(0)][4]:_V[`Size1-Regular`][e.charCodeAt(0)][4],i=SH([],[new dV([new fV(`inner`,GB(e,Math.round(1e3*t)))],{width:H(r),height:H(t),style:`width:`+H(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=H(t),i.style.width=H(r),{type:`elem`,elem:i}},pW=.008,mW={type:`kern`,size:-1*pW},hW=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),gW=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),_W=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):hW.has(e)?(c=`∣`,u=`vert`,d=333):gW.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=aW(o,f,i),m=p.height+p.depth,h=aW(c,f,i),g=h.height+h.depth,_=aW(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=aW(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,E=[];if(u.length>0){var D=C-m-v,O=Math.round(C*1e3),k=qB(u,Math.round(D*1e3)),ee=new fV(u,k),te=H(d/1e3),ne=H(O/1e3),A=SH([],[new dV([ee],{width:te,height:ne,viewBox:`0 0 `+d+` `+O})],r);A.height=O/1e3,A.style.width=te,A.style.height=ne,E.push({type:`elem`,elem:A})}else{if(E.push(dW(l,f,i,r)),E.push(mW),s===null){var re=C-m-v+2*pW;E.push(fW(c,re,r))}else{var ie=(C-m-v-y)/2+2*pW;E.push(fW(c,ie,r)),E.push(mW),E.push(dW(s,f,i,r)),E.push(mW),E.push(fW(c,ie,r))}E.push(mW),E.push(dW(o,f,i,r))}var j=r.havingBaseStyle(AB.TEXT);return oW(X([`delimsizing`,`mult`],[OH({positionType:`bottom`,positionData:T,children:E})],j),AB.TEXT,r,a)},vW=80,yW=.08,bW=function(e,t,n,r,i){return SH([`hide-tail`],[new dV([new fV(e,WB(e,r,n))],{width:`400em`,height:H(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},xW=function(e,t){var n=t.havingBaseSizing(),r=jW(`\\surd`,e*n.sizeMultiplier,kW,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+vW,e<1?i=1:e<1.4&&(i=.7),s=(1+a+yW)/i,c=(1+a)/i,o=bW(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+vW)*TW[r.size],c=(TW[r.size]+a)/i,s=(TW[r.size]+a+yW)/i,o=bW(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+yW,c=e+a,l=Math.floor(1e3*e+a)+vW,o=bW(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=H(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},SW=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),CW=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),wW=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),TW=[0,1.2,1.8,2.4,3],EW=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),SW.has(e)||wW.has(e))return uW(e,t,!1,n,r,i);if(CW.has(e))return _W(e,TW[t],!1,n,r,i);throw new V(`Illegal delimiter: '`+e+`'`)},DW=[{type:`small`,style:AB.SCRIPTSCRIPT},{type:`small`,style:AB.SCRIPT},{type:`small`,style:AB.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],OW=[{type:`small`,style:AB.SCRIPTSCRIPT},{type:`small`,style:AB.SCRIPT},{type:`small`,style:AB.TEXT},{type:`stack`}],kW=[{type:`small`,style:AB.SCRIPTSCRIPT},{type:`small`,style:AB.SCRIPT},{type:`small`,style:AB.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],AW=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},jW=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=aW(e,AW(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},MW=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=wW.has(e)?DW:SW.has(e)?kW:OW,s=jW(e,t,o,r);return s.type===`small`?cW(e,s.style,n,r,i,a):s.type===`large`?uW(e,s.size,n,r,i,a):_W(e,t,n,r,i,a)},NW=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return MW(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},PW={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},FW=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function IW(e){return`isMiddle`in e}function LW(e,t){var n=zU(e);if(n&&FW.has(n.text))return n;throw n?new V(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new V(`Invalid delimiter type '`+e.type+`'`,e)}Z({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{var n=LW(UH(t[0]),e);return{type:`delimsizing`,mode:e.parser.mode,size:PW[e.funcName].size,mclass:PW[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?X([e.mclass]):EW(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(lU(e.delim,e.mode));var n=new Q(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=H(TW[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function RW(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}Z({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new V(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:LW(t[0],e).text,color:n}}}),Z({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=LW(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=LU(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{RW(e);for(var n=YH(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];IW(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?eU(t,[`mopen`]):NW(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(IW(u)){var d=u.isMiddle;n[l]=NW(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=eU(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=NW(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),X([`minner`],n,t)},mathmlBuilder:(e,t)=>{RW(e);var n=mU(e.body,t);if(e.left!==`.`){var r=new Q(`mo`,[lU(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Q(`mo`,[lU(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return uU(n)}}),Z({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=LW(t[0],e);if(!e.parser.leftrightDepth)throw new V(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=eU(t,[]):(n=EW(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new Q(`mo`,[e.delim===`\\vert`||e.delim===`|`?lU(`|`,`text`):lU(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}}),Z({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=LU(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:(e,t)=>{var n=EH(tU(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=sB(e.body);if(r===`sout`)a=X([`katex-stretchy`,`katex-sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=$B({number:.6,unit:`pt`},t),l=$B({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=H(d/2+c);var f=Math.floor(1e3*d*i);a=SH([`hide-tail`],[new dV([new fV(`phase`,HB(f))],{width:`400em`,height:H(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=H(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=jU(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=H(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=H(h),a.style.borderRightWidth=H(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=OH({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=OH({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?X([`mord`,`cancel-lap`],[g],t):X([`mord`],[g],t)},mathmlBuilder:(e,t)=>{var n,r=new Q(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[gU(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+H(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r}}),Z({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=LU(t[0],`color-token`).color,o=LU(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),Z({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\fbox`,body:t[0]}}}),Z({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),Z({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName;n.mode===`math`&&pH({strict:n.settings.strict,errorCode:`mathVsSout`,errorMsg:`LaTeX's \\sout works only in text mode`,report:!0});var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),Z({type:`enclose`,names:[`\\angl`],numArgs:1,argTypes:[`hbox`],allowedInText:!1,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\angl`,body:t[0]}}});var zW={};function BW(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)zW[n[c]]=s;a&&(BH[t]=a),o&&(VH[t]=o)}var VW={};function $(e,t){VW[e]=t}var HW=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},UW=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,HW.range(this,t))}};function WW(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var GW=e=>{if(!e.parser.settings.displayMode)throw new V(`{`+e.envName+`} can be used only in display mode.`)},KW=new Set([`gather`,`gather*`]);function qW(e){if(!e.includes(`ed`))return!e.includes(`*`)}function JW(e,t,n){var r=t.hskipBeforeAndAfter,i=t.addJot,a=t.cols,o=t.arraystretch,s=t.colSeparationType,c=t.autoTag,l=t.singleRow,u=t.emptySingleRow,d=t.maxNumCols,f=t.leqno;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new V(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new UW(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(WW(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new V(`Too many tab characters: &`,e.nextToken);pH({strict:e.settings.strict,errorCode:`textEnv`,errorMsg:`Too few columns specified in the {array} column argument.`,report:!0})}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&!Array.isArray(v?.[v.length-1])&&!(c&&v?.[v.length-1]===!0)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(WW(e)),m=[],h.push(m),y()}else throw new V(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function YW(e){return e.slice(0,1)===`d`?`display`:`text`}var XW=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(AB.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?$B({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=tU(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var w=e.rowGaps[n],T=0;w&&(T=$B(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var E=_/2+t.fontMetrics().axisHeight,D=e.cols||[],O=[],k,ee,te=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ne=s[n],A=ne.pos-E,re=e.tags[n],ie=void 0;ie=re===!0?X([`eqn-num`],[],t):re===!1?X([],[],t):X([],YH(re,t,!0),t),ie.depth=ne.depth,ie.height=ne.height,te.push({type:`elem`,elem:ie,shift:A})}for(r=0,ee=0;r<o||ee<D.length;++r,++ee){for(var j=D[ee],ae=!0;(oe=j)?.type===`separator`;){var oe;if(ae||(k=X([`arraycolsep`],[]),k.style.width=H(t.fontMetrics().doubleRuleSep),O.push(k)),j.separator===`|`||j.separator===`:`){var M=j.separator===`|`?`solid`:`dashed`,se=X([`vertical-separator`],[],t);se.style.height=H(_),se.style.borderRightWidth=H(l),se.style.borderRightStyle=M,se.style.margin=`0 `+H(-l/2);var ce=_-E;ce&&(se.style.verticalAlign=H(-ce)),O.push(se)}else throw new V(`Invalid separator type: `+j.separator);ee++,j=D[ee],ae=!1}if(!(r>=o)){var le=void 0;(r>0||e.hskipBeforeAndAfter)&&(le=j?.pregap??d,le!==0&&(k=X([`arraycolsep`],[]),k.style.width=H(le),O.push(k)));var ue=[];for(n=0;n<i;++n){var de=s[n],fe=de.cells[r];if(fe){var pe=de.pos-E;fe.depth=de.depth,fe.height=de.height,ue.push({type:`elem`,elem:fe,shift:pe})}}var me=OH({positionType:`individualShift`,children:ue}),N=X([`col-align-`+(j?.align||`c`)],[me]);O.push(N),(r<o-1||e.hskipBeforeAndAfter)&&(le=j?.postgap??d,le!==0&&(k=X([`arraycolsep`],[]),k.style.width=H(le),O.push(k)))}}var he=X([`mtable`],O);if(c.length>0){for(var ge=CH(`katex-hline`,t,l),_e=CH(`katex-hdashline`,t,l),ve=[{type:`elem`,elem:he,shift:0}];c.length>0;){var ye=c.pop(),be=ye.pos-E;ye.isDashed?ve.push({type:`elem`,elem:_e,shift:be}):ve.push({type:`elem`,elem:ge,shift:be})}he=OH({positionType:`individualShift`,children:ve})}if(te.length===0)return X([`mord`],[he],t);var xe=X([`katex-tag`],[OH({positionType:`individualShift`,children:te})],t);return TH([he,xe])},ZW={c:`center `,l:`left `,r:`right `},QW=function(e,t){for(var n=[],r=new Q(`mtd`,[],[`mtr-glue`]),i=new Q(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new Q(`mtd`,[gU(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new Q(`mtr`,s))}var l=new Q(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,H(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=ZW[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new Q(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new Q(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},$W=function(e,t){e.envName.includes(`ed`)||GW(e);var n=[],r=e.envName===`split`,i=JW(e.parser,{cols:n,addJot:!0,autoTag:r?void 0:qW(e.envName),emptySingleRow:!0,colSeparationType:e.envName.includes(`at`)?`alignat`:`align`,maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},`display`),a=0,o=0,s={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){var c=`Number of columns should be a positive integer`,l=BU(t[0],c);if(!/^[0-9]+$/.test(l)||Number(l)<1)throw new V(c,t[0]);a=Number(l),o=a*2}var u=!o;i.body.forEach(function(e){for(var t=1;t<e.length;t+=2)LU(LU(e[t],`styling`).body[0],`ordgroup`).body.unshift(s);if(u)o<e.length&&(o=e.length);else{var n=e.length/2;if(a<n)throw new V(`Too many math in a row: `+(`expected `+a+`, but got `+n),e[0])}});for(var d=0;d<o;++d){var f=`r`,p=0;d%2==1?f=`l`:d>0&&u&&(p=1),n[d]={type:`align`,align:f,pregap:p,postgap:0}}return i.colSeparationType=u?`align`:`alignat`,i};BW({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(zU(t[0])?[t[0]]:LU(t[0],`ordgroup`).body).map(function(e){var t=RU(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new V(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return JW(e.parser,r,YW(e.envName))},htmlBuilder:XW,mathmlBuilder:QW}),BW({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new V(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=JW(e.parser,r,YW(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:XW,mathmlBuilder:QW}),BW({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=JW(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:XW,mathmlBuilder:QW}),BW({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(zU(t[0])?[t[0]]:LU(t[0],`ordgroup`).body).map(function(e){var t=RU(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new V(`Unknown column alignment: `+t,e)});if(n.length>1)throw new V(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=JW(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new V(`{subarray} can contain only one column`);return i},htmlBuilder:XW,mathmlBuilder:QW}),BW({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=JW(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},YW(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:XW,mathmlBuilder:QW}),BW({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:$W,htmlBuilder:XW,mathmlBuilder:QW}),BW({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){KW.has(e.envName)&&GW(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:qW(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return JW(e.parser,t,`display`)},htmlBuilder:XW,mathmlBuilder:QW}),BW({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:$W,htmlBuilder:XW,mathmlBuilder:QW}),BW({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){GW(e);var t={autoTag:qW(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return JW(e.parser,t,`display`)},htmlBuilder:XW,mathmlBuilder:QW}),BW({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return GW(e),eW(e.parser)},htmlBuilder:XW,mathmlBuilder:QW}),$(`\\nonumber`,`\\gdef\\@eqnsw{0}`),$(`\\notag`,`\\nonumber`),Z({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new V(e.funcName+` valid only within array environment`)}});var eG=zW;Z({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){var n=e.parser,r=e.funcName,i=t[0];if(i.type!==`ordgroup`)throw new V(`Invalid environment name`,i);var a=BU(i,`Environment name should contain only text characters and spaces`,!0);if(r===`\\begin`){if(!Object.prototype.hasOwnProperty.call(eG,a))throw new V(`No such environment: `+a,i);var o=eG[a],s=n.parseArguments(`\\begin{`+a+`}`,o),c=s.args,l=s.optArgs,u={mode:n.mode,envName:a,parser:n},d=o.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=LU(n.parseFunction(),`environment`);if(p.name!==a)throw new V(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var tG=(e,t)=>{var n=e.font,r=t.withFont(n);return tU(e.body,r)},nG=(e,t)=>{var n=e.font,r=t.withFont(n);return gU(e.body,r)},rG={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};Z({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=UH(t[0]),a=r in rG?rG[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:tG,mathmlBuilder:nG}),Z({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`mclass`,mode:n.mode,mclass:JU(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:sB(r)}}}),Z({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=e.breakOnTokenText,a=n.mode,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}});var iG=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=tU(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=tU(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=$B(e.barSize,t),u=CH(`frac-line`,t,d)):u=CH(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===AB.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=OH({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=OH({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===AB.DISPLAY.size?t.fontMetrics().delim1:n.size===AB.SCRIPTSCRIPT.size?t.havingStyle(AB.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?eU(t,[`mopen`]):MW(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?X([]):e.rightDelim==null?eU(t,[`mclose`]):MW(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return X([`mord`].concat(a.sizingClasses(t)),[x,X([`mfrac`],[g]),S],t)},aG=(e,t)=>{var n=new Q(`mfrac`,[gU(e.numer,t),gU(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=$B(e.barSize,t);n.setAttribute(`linethickness`,H(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Q(`mo`,[new aU(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Q(`mo`,[new aU(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return uU(i)}return n},oG=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;Z({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),oG({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:iG,mathmlBuilder:aG}),Z({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){var t=e.parser,n=e.funcName,r=e.token,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var sG=[`display`,`text`,`script`,`scriptscript`],cG=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};Z({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){var n=e.parser,r=t[4],i=t[5],a=UH(t[0]),o=a.type===`atom`&&a.family===`open`?cG(a.text):null,s=UH(t[1]),c=s.type===`atom`&&s.family===`close`?cG(s.text):null,l=LU(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=LU(p.body[0],`textord`);f=sG[Number(m.text)]}}else p=LU(p,`textord`),f=sG[Number(p.text)];return oG({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),Z({type:`infix`,names:[`\\above`],numArgs:1,argTypes:[`size`],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:LU(t[0],`size`).value,token:r}}}),Z({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],i=LU(t[1],`infix`).size;if(!i)throw Error(`\\\\abovefrac expected size, but got `+String(i));var a=t[2],o=i.number>0;return{type:`genfrac`,mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var lG=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?tU(e.sup,t.havingStyle(n.sup()),t):tU(e.sub,t.havingStyle(n.sub()),t),i=LU(e.base,`horizBrace`)):i=LU(e,`horizBrace`);var a=tU(i.base,t.havingBaseStyle(AB.DISPLAY)),o=AU(i,t),s=i.isOver?OH({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):OH({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=X([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?OH({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):OH({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return X([`minner`,i.isOver?`mover`:`munder`],[s],t)};Z({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:lG,mathmlBuilder:(e,t)=>{var n=DU(e.label);return new Q(e.isOver?`mover`:`munder`,[gU(e.base,t),n])}}),Z({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],i=LU(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:WH(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=YH(e.body,t,!1);return wH(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=hU(e.body,t);return n instanceof Q||(n=new Q(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),Z({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=LU(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:WH(s)}}}),Z({type:`hbox`,names:[`\\hbox`],numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0,handler(e,t){return{type:`hbox`,mode:e.parser.mode,body:WH(t[0])}},htmlBuilder(e,t){return TH(YH(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new Q(`mrow`,mU(e.body,t.withFont(``)))}}),Z({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName;e.token;var i=LU(t[0],`raw`).string,a=t[1];n.settings.strict&&pH({strict:n.settings.strict,errorCode:`htmlExtension`,errorMsg:`HTML extension is disabled on strict mode`,report:!0});var o,s={};switch(r){case`\\htmlClass`:s.class=i,o={command:`\\htmlClass`,class:i};break;case`\\htmlId`:s.id=i,o={command:`\\htmlId`,id:i};break;case`\\htmlStyle`:s.style=i,o={command:`\\htmlStyle`,style:i};break;case`\\htmlData`:for(var c=`{,}`,l=[],u=``,d=0;d<i.length;d++)i.startsWith(c,d)?(u+=`,`,d+=c.length-1):i[d]===`,`?(l.push(u),u=``):u+=i[d];l.push(u);for(var f=0;f<l.length;f++){var p=l[f],m=p.indexOf(`=`);if(m<0)throw new V(`\\htmlData key/value '`+p+`' missing equals sign`);var h=p.slice(0,m),g=p.slice(m+1);s[`data-`+h.trim()]=g}o={command:`\\htmlData`,attributes:s};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(o)?{type:`html`,mode:n.mode,attributes:s,body:WH(a)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=YH(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=X(r,n,t);for(var a of Object.entries(e.attributes)){var o=a[0],s=a[1];o!==`class`&&i.setAttribute(o,s)}return i},mathmlBuilder:(e,t)=>hU(e.body,t)}),Z({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>({type:`htmlmathml`,mode:e.parser.mode,html:WH(t[0]),mathml:WH(t[1])}),htmlBuilder:(e,t)=>TH(YH(e.html,t,!1)),mathmlBuilder:(e,t)=>hU(e.mathml,t)});var uG=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new V(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!QB(n))throw new V(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};Z({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=LU(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=uG(d);break;case`height`:a=uG(d);break;case`totalheight`:o=uG(d);break;default:throw new V(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=LU(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=$B(e.height,t),r=0;e.totalheight.number>0&&(r=$B(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=$B(e.width,t));var a={height:H(n+r)};i>0&&(a.width=H(i)),r>0&&(a.verticalAlign=H(-r));var o=new cV(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Q(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=$B(e.height,t),i=0;if(e.totalheight.number>0&&(i=$B(e.totalheight,t)-r,n.setAttribute(`valign`,H(-i))),n.setAttribute(`height`,H(r+i)),e.width.number>0){var a=$B(e.width,t);n.setAttribute(`width`,H(a))}return n.setAttribute(`src`,e.src),n}}),Z({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=LU(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||pH({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`),report:!0}),n.mode!==`math`&&pH({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` works only in math mode`,report:!0})):o&&pH({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` doesn't support mu units`,report:!0})}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return kH(e.dimension,t)},mathmlBuilder(e,t){return new oU($B(e.dimension,t))}}),Z({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=X([],[tU(e.body,t)]),n=X([`katex-inner`],[n],t)):n=X([`katex-inner`],[tU(e.body,t)]);var r=X([`katex-fix`],[]),i=X([e.alignment],[n,r],t),a=X([`katex-strut`]);return a.style.height=H(i.height+i.depth),i.depth&&(a.style.verticalAlign=H(-i.depth)),i.children.unshift(a),i=X([`katex-thinbox`],[i],t),X([`mord`,`katex-vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[gU(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),Z({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),Z({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new V(`Mismatched `+e.funcName)}});var dG=(e,t)=>{switch(t.style.size){case AB.DISPLAY.size:return e.display;case AB.TEXT.size:return e.text;case AB.SCRIPT.size:return e.script;case AB.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Z({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>({type:`mathchoice`,mode:e.parser.mode,display:WH(t[0]),text:WH(t[1]),script:WH(t[2]),scriptscript:WH(t[3])}),htmlBuilder:(e,t)=>TH(YH(dG(e,t),t,!1)),mathmlBuilder:(e,t)=>hU(dG(e,t),t)});var fG=(e,t,n,r,i,a,o)=>{e=X([],[e]);var s=n&&sB(n),c,l;if(t){var u=tU(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=tU(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=OH({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:H(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:H(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=OH({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:H(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=OH({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:H(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=X([`mspace`],[],r);m.style.marginRight=H(a),p.unshift(m)}return X([`mop`,`op-limits`],p,r)},pG=new Set([`\\smallint`]),mG=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=LU(e.base,`op`),i=!0):a=LU(e,`op`);var o=t.style,s=!1;o.size===AB.DISPLAY.size&&a.symbol&&!pG.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=hH(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=NH(d+`Size`+(s?`2`:`1`),t);c=OH({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=YH(a.body,t,!0);p.length===1&&p[0]instanceof uV?(c=p[0],c.classes[0]=`mop`):c=X([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(gH(a.name[h],a.mode,t));c=X([`mop`],m,t)}var g=0,_=0;return(c instanceof uV||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?fG(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=H(g)),c)},hG=(e,t)=>{var n;if(e.symbol)n=new Q(`mo`,[lU(e.name,e.mode)]),pG.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Q(`mo`,mU(e.body,t));else{n=new Q(`mi`,[new aU(e.name.slice(1))]);var r=new Q(`mo`,[lU(`⁡`,`text`)]);n=e.parentIsSupSub?new Q(`mrow`,[n,r]):iU([n,r])}return n},gG={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};Z({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{var n=e.parser,r=e.funcName;return r.length===1&&(r=gG[r]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:mG,mathmlBuilder:hG}),Z({type:`op`,names:[`\\mathop`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:WH(r)}}});var _G={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};Z({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),Z({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),Z({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){var t=e.parser,n=e.funcName;return n.length===1&&(n=_G[n]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}}});var vG=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=LU(e.base,`operatorname`),i=!0):a=LU(e,`operatorname`);var o;if(a.body.length>0){for(var s=YH(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof uV&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=X([`mop`],s,t)}else o=X([`mop`],[],t);return i?fG(o,n,r,t,t.style,0,0):o};Z({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`operatorname`,mode:n.mode,body:WH(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:vG,mathmlBuilder:(e,t)=>{for(var n=mU(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof oU)){if(a instanceof Q)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof aU?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new aU(n.map(e=>e.toText()).join(``))]);var s=new Q(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Q(`mo`,[lU(`⁡`,`text`)]);return e.parentIsSupSub?new Q(`mrow`,[s,c]):iU([s,c])}}),$(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),HH({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?TH(YH(e.body,t,!1)):X([`mord`],YH(e.body,t,!0),t)},mathmlBuilder(e,t){return hU(e.body,t,!0)}}),Z({type:`overline`,names:[`\\overline`],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=tU(e.body,t.havingCrampedStyle()),r=CH(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`katex-overline`],[OH({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new aU(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`mover`,[gU(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),Z({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`phantom`,mode:n.mode,body:WH(r)}},htmlBuilder:(e,t)=>TH(YH(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new Q(`mphantom`,mU(e.body,t))}),$(`\\hphantom`,`\\smash{\\phantom{#1}}`),Z({type:`vphantom`,names:[`\\vphantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>X([`mord`,`rlap`],[X([`katex-inner`],[tU(e.body,t.withPhantom())]),X([`katex-fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[new Q(`mphantom`,mU(WH(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),Z({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){var n=e.parser,r=LU(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=tU(e.body,t);return OH({positionType:`shift`,positionData:-$B(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Q(`mpadded`,[gU(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}});var yG=(e,t)=>({type:`reflectbox`,mode:e.parser.mode,body:t[0]});Z({type:`reflectbox`,names:[`\\reflectbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler:yG,htmlBuilder(e,t){return X([`mord`,`reflectbox`],[tU(e.body,t)],t)},mathmlBuilder(e,t){return gU(e.body,t)}}),Z({type:`reflectbox`,names:[`\\mathreflectbox`],numArgs:1,argTypes:[`math`],handler:yG}),Z({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){return{type:`internal`,mode:e.parser.mode}}}),Z({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){var r=e.parser,i=n[0],a=LU(t[0],`size`),o=LU(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&LU(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=X([`mord`,`katex-rule`],[],t),r=$B(e.width,t),i=$B(e.height,t),a=e.shift?$B(e.shift,t):0;return n.style.borderRightWidth=H(r),n.style.borderTopWidth=H(i),n.style.bottom=H(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=$B(e.width,t),r=$B(e.height,t),i=e.shift?$B(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Q(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,H(n)),o.setAttribute(`height`,H(r));var s=new Q(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,H(i)):(s.setAttribute(`height`,H(i)),s.setAttribute(`depth`,H(-i))),s.setAttribute(`voffset`,H(i)),s}});function bG(e,t,n){for(var r=YH(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`katex-sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return TH(r)}var xG=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];Z({type:`sizing`,names:xG,numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:xG.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return bG(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new Q(`mstyle`,mU(e.body,n));return r.setAttribute(`mathsize`,H(n.sizeMultiplier)),r}}),Z({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,i=!1,a=!1,o=n[0]&&LU(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=RU(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=X([],[tU(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return X([`mord`,`katex-smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return X([`mord`],[OH({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new Q(`mpadded`,[gU(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),Z({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=tU(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=EH(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<AB.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,o=xW(n.height+n.depth+a+r,t),s=o.span,c=o.ruleWidth,l=o.advanceWidth,u=s.height-c;u>n.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=s.height-n.height-a-c;n.style.paddingLeft=H(l);var f=OH({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:s},{type:`kern`,size:c}]});if(e.index){var p=t.havingStyle(AB.SCRIPTSCRIPT),m=tU(e.index,p,t);return X([`mord`,`sqrt`],[X([`katex-root`],[OH({positionType:`shift`,positionData:-(.6*(f.height-f.depth)),children:[{type:`elem`,elem:m}]})]),f],t)}return X([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var n=e.body,r=e.index;return r?new Q(`mroot`,[gU(n,t),gU(r,t)]):new Q(`msqrt`,[gU(n,t)])}});var SG={display:AB.DISPLAY,text:AB.TEXT,script:AB.SCRIPT,scriptscript:AB.SCRIPTSCRIPT};function CG(e){return e in SG}Z({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!CG(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=SG[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),bG(e.body,r,t)},mathmlBuilder(e,t){var n=SG[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new Q(`mstyle`,mU(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var wG=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===AB.DISPLAY.size||n.alwaysHandleSupSub)?mG:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===AB.DISPLAY.size||n.limits)?vG:null:n.type===`accent`?sB(n.base)?HU:null:n.type===`horizBrace`&&!e.sub===n.isOver?lG:null:null};HH({type:`supsub`,htmlBuilder(e,t){var n=wG(e,t);if(n)return n(e,t);var r=e.base,i=e.sup,a=e.sub,o=tU(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&sB(r);if(i){var p=t.havingStyle(t.style.sup());s=tU(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=tU(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===AB.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=H(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof uV||y)&&(v=H(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=OH({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=OH({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=OH({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return X([$H(o,`right`)||`mord`],[o,X([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[gU(e.base,t)];e.sub&&a.push(gU(e.sub,t)),e.sup&&a.push(gU(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===AB.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===AB.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===AB.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===AB.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===AB.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===AB.DISPLAY)?`munder`:`msub`}return new Q(o,a)}}),HH({type:`atom`,htmlBuilder(e,t){return gH(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Q(`mo`,[lU(e.text,e.mode)]);if(e.family===`bin`){var r=fU(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var TG={mi:`italic`,mn:`normal`,mtext:`normal`};HH({type:`mathord`,htmlBuilder(e,t){return vH(e,t)},mathmlBuilder(e,t){var n=new Q(`mi`,[lU(e.text,e.mode,t)]),r=fU(e,t)||`italic`;return r!==TG[n.type]&&n.setAttribute(`mathvariant`,r),n}}),HH({type:`textord`,htmlBuilder(e,t){return vH(e,t)},mathmlBuilder(e,t){var n=lU(e.text,e.mode,t),r=fU(e,t)||`normal`,i=e.mode===`text`?new Q(`mtext`,[n]):/[0-9]/.test(e.text)?new Q(`mn`,[n]):e.text===`\\prime`?new Q(`mo`,[n]):new Q(`mi`,[n]);return r!==TG[i.type]&&i.setAttribute(`mathvariant`,r),i}});var EG=new Map([[`\\nobreak`,`nobreak`],[`\\allowbreak`,`allowbreak`]]),DG=new Map([[` `,{}],[`\\ `,{}],[`~`,{className:`nobreak`}],[`\\space`,{}],[`\\nobreakspace`,{className:`nobreak`}]]);HH({type:`spacing`,htmlBuilder(e,t){var n=DG.get(e.text),r=EG.get(e.text);if(n){var i=n.className||``;if(e.mode===`text`){var a=vH(e,t);return a.classes.push(i),a}return X([`mspace`,i],[gH(e.text,e.mode,t)],t)}if(r)return X([`mspace`,r],[],t);throw new V(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(DG.has(e.text))n=new Q(`mtext`,[new aU(`\xA0`)]);else if(EG.has(e.text))return new Q(`mspace`);else throw new V(`Unknown type of space "`+e.text+`"`);return n}});var OG=()=>{var e=new Q(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};HH({type:`tag`,mathmlBuilder(e,t){var n=new Q(`mtable`,[new Q(`mtr`,[OG(),new Q(`mtd`,[hU(e.body,t)]),OG(),new Q(`mtd`,[hU(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var kG={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},AG={"\\textbf":`textbf`,"\\textmd":`textmd`},jG={"\\textit":`textit`,"\\textup":`textup`},MG=(e,t)=>{var n=e.font;return n?kG[n]?t.withTextFontFamily(kG[n]):AG[n]?t.withTextFontWeight(AG[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(jG[n]):t};Z({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`text`,mode:n.mode,body:WH(i),font:r}},htmlBuilder(e,t){var n=MG(e,t);return X([`mord`,`text`],YH(e.body,n,!0),n)},mathmlBuilder(e,t){var n=MG(e,t);return hU(e.body,n)}}),Z({type:`underline`,names:[`\\underline`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`underline`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=tU(e.body,t),r=CH(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`katex-underline`],[OH({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new Q(`mo`,[new aU(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Q(`munder`,[gU(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),Z({type:`vcenter`,names:[`\\vcenter`],numArgs:1,argTypes:[`original`],allowedInText:!1,handler(e,t){return{type:`vcenter`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=tU(e.body,t),r=t.fontMetrics().axisHeight;return OH({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new Q(`mrow`,[new Q(`mpadded`,[gU(e.body,t)],[`vcenter`])])}}),Z({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new V(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=NG(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(hH(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return X([`mord`,`text`].concat(i.sizingClasses(t)),bH(r),i)},mathmlBuilder(e,t){var n=new Q(`mtext`,[new aU(NG(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var NG=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),PG=zH,FG=`[ \r
487
+ ]`,IG=`\\\\[a-zA-Z@]+`,LG=`\\\\[^\ud800-\udfff]`,RG=`(`+IG+`)`+FG+`*`,zG=`\\\\(
488
+ |[ \r ]+
489
+ ?)[ \r ]*`,BG=`[̀-ͯ]`,VG=RegExp(BG+`+$`),HG=`(`+FG+`+)|`+(zG+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(BG+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(BG+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+RG)+(`|`+LG+`)`),UG=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(HG,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new UW(`EOF`,new HW(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new V(`Unexpected character: '`+e[t]+`'`,new UW(e[t],new HW(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
490
+ `,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,pH({strict:this.settings.strict,errorCode:`commentAtEnd`,errorMsg:`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`,report:!0})):this.tokenRegex.lastIndex=i+1,this.lex()}return new UW(r,new HW(this,t,this.tokenRegex.lastIndex))}},WG=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new V(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}},GG=VW;$(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),$(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),$(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),$(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),$(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),$(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),$(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var KG={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};$(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new V("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=KG[t.text],r==null||r>=n)throw new V(`Invalid base-`+n+` digit `+t.text);for(var i;(i=KG[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var qG=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new V(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new V(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new V(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new V(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};$(`\\newcommand`,e=>qG(e,!1,!0,!1)),$(`\\renewcommand`,e=>qG(e,!0,!1,!1)),$(`\\providecommand`,e=>qG(e,!0,!0,!0)),$(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),$(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),$(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),PG[n],wV.math[n],wV.text[n]),``}),$(`\\bgroup`,`{`),$(`\\egroup`,`}`),$(`~`,`\\nobreakspace`),$(`\\lq`,"`"),$(`\\rq`,`'`),$(`\\aa`,`\\r a`),$(`\\AA`,`\\r A`),$(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),$(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),$(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),$(`ℬ`,`\\mathscr{B}`),$(`ℰ`,`\\mathscr{E}`),$(`ℱ`,`\\mathscr{F}`),$(`ℋ`,`\\mathscr{H}`),$(`ℐ`,`\\mathscr{I}`),$(`ℒ`,`\\mathscr{L}`),$(`ℳ`,`\\mathscr{M}`),$(`ℛ`,`\\mathscr{R}`),$(`ℭ`,`\\mathfrak{C}`),$(`ℌ`,`\\mathfrak{H}`),$(`ℨ`,`\\mathfrak{Z}`),$(`\\Bbbk`,`\\Bbb{k}`),$(`\\llap`,`\\mathllap{\\textrm{#1}}`),$(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),$(`\\clap`,`\\mathclap{\\textrm{#1}}`),$(`\\mathstrut`,`\\vphantom{(}`),$(`\\underbar`,`\\underline{\\text{#1}}`),$(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),$(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),$(`\\ne`,`\\neq`),$(`≠`,`\\neq`),$(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),$(`∉`,`\\notin`),$(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),$(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),$(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),$(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),$(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),$(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),$(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),$(`⟂`,`\\perp`),$(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),$(`∌`,`\\notni`),$(`⌜`,`\\ulcorner`),$(`⌝`,`\\urcorner`),$(`⌞`,`\\llcorner`),$(`⌟`,`\\lrcorner`),$(`©`,`\\copyright`),$(`®`,`\\textregistered`),$(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),$(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),$(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),$(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),$(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),$(`⋮`,`\\vdots`),$(`\\varGamma`,`\\mathit{\\Gamma}`),$(`\\varDelta`,`\\mathit{\\Delta}`),$(`\\varTheta`,`\\mathit{\\Theta}`),$(`\\varLambda`,`\\mathit{\\Lambda}`),$(`\\varXi`,`\\mathit{\\Xi}`),$(`\\varPi`,`\\mathit{\\Pi}`),$(`\\varSigma`,`\\mathit{\\Sigma}`),$(`\\varUpsilon`,`\\mathit{\\Upsilon}`),$(`\\varPhi`,`\\mathit{\\Phi}`),$(`\\varPsi`,`\\mathit{\\Psi}`),$(`\\varOmega`,`\\mathit{\\Omega}`),$(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),$(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),$(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),$(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),$(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),$(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),$(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),$(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var JG={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},YG=new Set([`bin`,`rel`]);$(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in JG?t=JG[n]:(n.slice(0,4)===`\\not`||n in wV.math&&YG.has(wV.math[n].group))&&(t=`\\dotsb`),t});var XG={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};$(`\\dotso`,function(e){return e.future().text in XG?`\\ldots\\,`:`\\ldots`}),$(`\\dotsc`,function(e){var t=e.future().text;return t in XG&&t!==`,`?`\\ldots\\,`:`\\ldots`}),$(`\\cdots`,function(e){return e.future().text in XG?`\\@cdots\\,`:`\\@cdots`}),$(`\\dotsb`,`\\cdots`),$(`\\dotsm`,`\\cdots`),$(`\\dotsi`,`\\!\\cdots`),$(`\\dotsx`,`\\ldots\\,`),$(`\\DOTSI`,`\\relax`),$(`\\DOTSB`,`\\relax`),$(`\\DOTSX`,`\\relax`),$(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),$(`\\,`,`\\tmspace+{3mu}{.1667em}`),$(`\\thinspace`,`\\,`),$(`\\>`,`\\mskip{4mu}`),$(`\\:`,`\\tmspace+{4mu}{.2222em}`),$(`\\medspace`,`\\:`),$(`\\;`,`\\tmspace+{5mu}{.2777em}`),$(`\\thickspace`,`\\;`),$(`\\!`,`\\tmspace-{3mu}{.1667em}`),$(`\\negthinspace`,`\\!`),$(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),$(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),$(`\\enspace`,`\\kern.5em `),$(`\\enskip`,`\\hskip.5em\\relax`),$(`\\quad`,`\\hskip1em\\relax`),$(`\\qquad`,`\\hskip2em\\relax`),$(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),$(`\\tag@paren`,`\\tag@literal{({#1})}`),$(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new V(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),$(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),$(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),$(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),$(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),$(`\\newline`,`\\\\\\relax`),$(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var ZG=H(_V[`Main-Regular`][84][1]-.7*_V[`Main-Regular`][65][1]);$(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+ZG+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),$(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+ZG+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),$(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),$(`\\@hspace`,`\\hskip #1\\relax`),$(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),$(`\\ordinarycolon`,`:`),$(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),$(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),$(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),$(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),$(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),$(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),$(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),$(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),$(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),$(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),$(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),$(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),$(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),$(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),$(`∷`,`\\dblcolon`),$(`∹`,`\\eqcolon`),$(`≔`,`\\coloneqq`),$(`≕`,`\\eqqcolon`),$(`⩴`,`\\Coloneqq`),$(`\\ratio`,`\\vcentcolon`),$(`\\coloncolon`,`\\dblcolon`),$(`\\colonequals`,`\\coloneqq`),$(`\\coloncolonequals`,`\\Coloneqq`),$(`\\equalscolon`,`\\eqqcolon`),$(`\\equalscoloncolon`,`\\Eqqcolon`),$(`\\colonminus`,`\\coloneq`),$(`\\coloncolonminus`,`\\Coloneq`),$(`\\minuscolon`,`\\eqcolon`),$(`\\minuscoloncolon`,`\\Eqcolon`),$(`\\coloncolonapprox`,`\\Colonapprox`),$(`\\coloncolonsim`,`\\Colonsim`),$(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),$(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),$(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),$(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),$(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),$(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),$(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),$(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),$(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),$(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),$(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),$(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),$(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),$(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),$(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),$(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),$(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),$(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),$(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),$(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),$(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),$(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),$(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),$(`\\imath`,`\\html@mathml{\\@imath}{ı}`),$(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),$(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),$(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),$(`⟦`,`\\llbracket`),$(`⟧`,`\\rrbracket`),$(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),$(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),$(`↤`,`\\mapsfrom`),$(`\\mapsfrom`,"\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}"),$(`⦃`,`\\lBrace`),$(`⦄`,`\\rBrace`),$(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),$(`⦵`,`\\minuso`),$(`\\darr`,`\\downarrow`),$(`\\dArr`,`\\Downarrow`),$(`\\Darr`,`\\Downarrow`),$(`\\lang`,`\\langle`),$(`\\rang`,`\\rangle`),$(`\\uarr`,`\\uparrow`),$(`\\uArr`,`\\Uparrow`),$(`\\Uarr`,`\\Uparrow`),$(`\\N`,`\\mathbb{N}`),$(`\\R`,`\\mathbb{R}`),$(`\\Z`,`\\mathbb{Z}`),$(`\\alef`,`\\aleph`),$(`\\alefsym`,`\\aleph`),$(`\\Alpha`,`\\mathrm{A}`),$(`\\Beta`,`\\mathrm{B}`),$(`\\bull`,`\\bullet`),$(`\\Chi`,`\\mathrm{X}`),$(`\\clubs`,`\\clubsuit`),$(`\\cnums`,`\\mathbb{C}`),$(`\\Complex`,`\\mathbb{C}`),$(`\\Dagger`,`\\ddagger`),$(`\\diamonds`,`\\diamondsuit`),$(`\\empty`,`\\emptyset`),$(`\\Epsilon`,`\\mathrm{E}`),$(`\\Eta`,`\\mathrm{H}`),$(`\\exist`,`\\exists`),$(`\\harr`,`\\leftrightarrow`),$(`\\hArr`,`\\Leftrightarrow`),$(`\\Harr`,`\\Leftrightarrow`),$(`\\hearts`,`\\heartsuit`),$(`\\image`,`\\Im`),$(`\\infin`,`\\infty`),$(`\\Iota`,`\\mathrm{I}`),$(`\\isin`,`\\in`),$(`\\Kappa`,`\\mathrm{K}`),$(`\\larr`,`\\leftarrow`),$(`\\lArr`,`\\Leftarrow`),$(`\\Larr`,`\\Leftarrow`),$(`\\lrarr`,`\\leftrightarrow`),$(`\\lrArr`,`\\Leftrightarrow`),$(`\\Lrarr`,`\\Leftrightarrow`),$(`\\Mu`,`\\mathrm{M}`),$(`\\natnums`,`\\mathbb{N}`),$(`\\Nu`,`\\mathrm{N}`),$(`\\Omicron`,`\\mathrm{O}`),$(`\\plusmn`,`\\pm`),$(`\\rarr`,`\\rightarrow`),$(`\\rArr`,`\\Rightarrow`),$(`\\Rarr`,`\\Rightarrow`),$(`\\real`,`\\Re`),$(`\\reals`,`\\mathbb{R}`),$(`\\Reals`,`\\mathbb{R}`),$(`\\Rho`,`\\mathrm{P}`),$(`\\sdot`,`\\cdot`),$(`\\sect`,`\\S`),$(`\\spades`,`\\spadesuit`),$(`\\sub`,`\\subset`),$(`\\sube`,`\\subseteq`),$(`\\supe`,`\\supseteq`),$(`\\Tau`,`\\mathrm{T}`),$(`\\thetasym`,`\\vartheta`),$(`\\weierp`,`\\wp`),$(`\\Zeta`,`\\mathrm{Z}`),$(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),$(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),$(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),$(`\\bra`,`\\mathinner{\\langle{#1}|}`),$(`\\ket`,`\\mathinner{|{#1}\\rangle}`),$(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),$(`\\Bra`,`\\left\\langle#1\\right|`),$(`\\Ket`,`\\left|#1\\right\\rangle`);var QG=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};$(`\\bra@ket`,QG(!1)),$(`\\bra@set`,QG(!0)),$(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),$(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),$(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),$(`\\angln`,`{\\angl n}`),$(`\\blue`,`\\textcolor{##6495ed}{#1}`),$(`\\orange`,`\\textcolor{##ffa500}{#1}`),$(`\\pink`,`\\textcolor{##ff00af}{#1}`),$(`\\red`,`\\textcolor{##df0030}{#1}`),$(`\\green`,`\\textcolor{##28ae7b}{#1}`),$(`\\gray`,`\\textcolor{gray}{#1}`),$(`\\purple`,`\\textcolor{##9d38bd}{#1}`),$(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),$(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),$(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),$(`\\blueD`,`\\textcolor{##11accd}{#1}`),$(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),$(`\\tealA`,`\\textcolor{##94fff5}{#1}`),$(`\\tealB`,`\\textcolor{##26edd5}{#1}`),$(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),$(`\\tealD`,`\\textcolor{##01a995}{#1}`),$(`\\tealE`,`\\textcolor{##208170}{#1}`),$(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),$(`\\greenB`,`\\textcolor{##8af281}{#1}`),$(`\\greenC`,`\\textcolor{##74cf70}{#1}`),$(`\\greenD`,`\\textcolor{##1fab54}{#1}`),$(`\\greenE`,`\\textcolor{##0d923f}{#1}`),$(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),$(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),$(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),$(`\\goldD`,`\\textcolor{##e07d10}{#1}`),$(`\\goldE`,`\\textcolor{##a75a05}{#1}`),$(`\\redA`,`\\textcolor{##fca9a9}{#1}`),$(`\\redB`,`\\textcolor{##ff8482}{#1}`),$(`\\redC`,`\\textcolor{##f9685d}{#1}`),$(`\\redD`,`\\textcolor{##e84d39}{#1}`),$(`\\redE`,`\\textcolor{##bc2612}{#1}`),$(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),$(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),$(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),$(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),$(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),$(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),$(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),$(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),$(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),$(`\\purpleE`,`\\textcolor{##543b78}{#1}`),$(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),$(`\\mintB`,`\\textcolor{##edf2df}{#1}`),$(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),$(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),$(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),$(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),$(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),$(`\\grayE`,`\\textcolor{##babec2}{#1}`),$(`\\grayF`,`\\textcolor{##888d93}{#1}`),$(`\\grayG`,`\\textcolor{##626569}{#1}`),$(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),$(`\\grayI`,`\\textcolor{##21242c}{#1}`),$(`\\kaBlue`,`\\textcolor{##314453}{#1}`),$(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var $G={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},eK=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new WG(GG,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new UG(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new UW(`EOF`,n.loc)),this.pushTokens(r),new UW(``,HW.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new V(`Extra }`,i)}else if(i.text===`EOF`)throw new V(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new V(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new V(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new V(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new V(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new V(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new V(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new UW(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new UG(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(PG,e)||Object.prototype.hasOwnProperty.call(wV.math,e)||Object.prototype.hasOwnProperty.call(wV.text,e)||Object.prototype.hasOwnProperty.call($G,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(PG,e)&&!PG[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},tK=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,nK=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),rK={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},iK={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},aK=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new eK(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new V(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new UW(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&PG[i.text]&&PG[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new V(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new V(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new V(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new V(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new V(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new V(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(nK[i.text]){var s=tK.test(i.text),c=[];for(c.push(new UW(nK[i.text])),this.consume();;){var l=this.fetch().text;if(!nK[l]||tK.test(l)!==s)break;c.unshift(new UW(nK[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n&&r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:r?{type:`supsub`,mode:this.mode,base:t,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=PG[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new V(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new V(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new V(`Can't use function '`+r+`' in math mode`,n);var a=this.parseArguments(r,i),o=a.args,s=a.optArgs;return this.callFunction(r,o,s,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=PG[e];if(o&&o.handler)return o.handler(a,t,n);throw new V(`No function handler for `+e)}parseArguments(e,t){var n=t.numOptionalArgs??0,r=t.numArgs+n;if(r===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<r;o++){var s=t.argTypes?.[o],c=o<n;(`primitive`in t&&t.primitive&&s==null||t.type===`sqrt`&&o===1&&a[0]==null)&&(s=`primitive`);var l=this.parseGroupOfType(`argument to '`+e+`'`,s,c);if(c)a.push(l);else if(l!=null)i.push(l);else throw new V(`Null argument, please report this as a bug`)}return{args:i,optArgs:a}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:this.gullet.consumeSpaces();var i=this.gullet.lexer.catcodes[`%`];this.gullet.lexer.setCatcode(`%`,12);var a=this.parseStringGroup(n);return this.gullet.lexer.setCatcode(`%`,i),a==null?null:{type:`raw`,mode:`text`,string:a.text};case`primitive`:if(n)throw new V(`A primitive argument cannot be optional`);var o=this.parseGroup(e);if(o==null)throw new V(`Expected group as `+e,this.fetch());return o;case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new V(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;for(var n=``,r;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new V(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new V(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new V(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!QB(i))throw new V(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){var t=this.gullet.lexer.catcodes[`%`],n=this.gullet.lexer.catcodes[`~`];this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var r=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode(`%`,t),this.gullet.lexer.setCatcode(`~`,n),r==null)return null;var i=r.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:i}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:HW.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!Object.prototype.hasOwnProperty.call($G,r)){if(this.settings.throwOnError)throw new V(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:HW.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:HW.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:HW.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new V(`\\verb assertion failed --
491
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Object.prototype.hasOwnProperty.call(iK,t[0])&&!wV[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&pH({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Accented Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e}),t=iK[t[0]]+t.slice(1));var i=VG.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(wV[this.mode][t]){this.settings.strict&&this.mode===`math`&&YV.includes(t)&&pH({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e});var o=wV[this.mode][t].group,s=HW.range(e);a=IU(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(PB(t.charCodeAt(0))?this.mode===`math`&&pH({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e}):pH({strict:this.settings.strict,errorCode:`unknownSymbol`,errorMsg:`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),report:!0,token:e})),a={type:`textord`,mode:`text`,loc:HW.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!rK[l])throw new V(`Unknown accent ' `+l+`'`,e);var u=rK[l][this.mode]||rK[l].text;if(!u)throw new V(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:HW.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};aK.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var oK=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new aK(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new V(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new UW(`\\df@tag`)])}]}return r},sK=function(e,t,n){t.textContent=``;var r=dK(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),sK=function(){throw new V(`KaTeX doesn't work in quirks mode.`)});var cK=function(e,t){return dK(e,t).toMarkup()},lK=function(e,t){return oK(e,new pB(t))},uK=function(e,t,n){if(n.throwOnError||!(e instanceof V))throw e;var r=X([`katex-error`],[new uV(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},dK=function(e,t){var n=new pB(t);try{return wU(oK(e,n),e,n)}catch(t){return uK(t,e,n)}},fK={version:`0.19.1`,render:sK,renderToString:cK,ParseError:V,SETTINGS_SCHEMA:lB,__parse:lK,__renderToDomTree:dK,__renderToHTMLTree:function(e,t){var n=new pB(t);try{return TU(oK(e,n),n)}catch(t){return uK(t,e,n)}},__setFontMetrics:bV,__defineSymbol:U,__defineFunction:Z,__defineMacro:$,__domTree:{Span:oV,Anchor:sV,SymbolNode:uV,SvgNode:dV,PathNode:fV,LineNode:pV}};function pK(e){let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e===-1)continue;let r=n.slice(0,e).trim().replace(/-([a-z])/g,(e,t)=>t.toUpperCase());t[r]=n.slice(e+1).trim()}return t}function mK(e,t){if(e.nodeType===Node.TEXT_NODE)return e.textContent;if(e.nodeType!==Node.ELEMENT_NODE)return null;let n=e,r={key:t};for(let e of n.attributes)e.name===`class`?r.className=e.value:e.name===`data-dsh-style`?r.style=pK(e.value):r[e.name]=e.value;let i=[...n.childNodes].map(mK);return i.length===0?(0,P.createElement)(n.localName,r):(0,P.createElement)(n.localName,r,...i)}function hK(e,t){let n;try{n=fK.renderToString(e,{displayMode:t,throwOnError:!0})}catch(r){try{n=fK.renderToString(e,{displayMode:t,strict:`ignore`,throwOnError:!1})}catch{return(0,F.jsx)(`span`,{className:`katex-error`,style:{color:`#cc0000`},title:String(r),children:e})}}let r=n.replace(/<[^>]+>/g,e=>e.replace(/\sstyle="/g,` data-dsh-style="`));return[...new DOMParser().parseFromString(r,`text/html`).body.childNodes].map(mK)}var gK=`<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>`,_K=`</title><path d="`,vK=`"/></svg>`,yK={title:`AliExpress`,slug:`aliexpress`,get svg(){return gK+`AliExpress`+_K+this.path+vK},path:`M5.166 9.096a.022.022 0 0 0-.022.021c0 .396-.32.717-.713.717a.021.021 0 0 0-.021.022c0 .012.01.021.021.021.394 0 .713.322.713.718 0 .012.01.021.022.021.011 0 .021-.01.021-.021A.717.717 0 0 1 5.9 9.88a.021.021 0 0 0 0-.043.716.716 0 0 1-.713-.718v-.002a.021.021 0 0 0-.006-.015.022.022 0 0 0-.015-.006zm-3.693.526L0 13.462h.48l.355-.922h1.782l.354.922h.481L1.98 9.622zm2.264.002v3.838h.491V9.624zm2.375 0v3.838h2.413v-.502H6.613v-1.19H8.19v-.477H6.613v-1.166h1.773v-.502zm-4.386.592l.698 1.82H1.028zm14.689.402a1.466 1.466 0 0 0-.966.366V10.7h-.491v2.763h.49c.002-.477 0-.955.002-1.433a.969.969 0 0 1 .965-.918zm4.18.007c-.053 0-.105.003-.158.01-.315.031-.606.175-.753.377a.689.689 0 0 0-.14.465c.007.2.066.357.233.496.184.147.42.2.657.259.311.067.426.095.546.186.08.07.133.127.136.27 0 .25-.221.372-.42.41a.89.89 0 0 1-.894-.344l-.371.288c.33.382.777.505 1.09.5.54-.01.891-.217 1.029-.534.066-.153.063-.309.063-.38a.677.677 0 0 0-.267-.545c-.228-.177-.583-.228-.636-.242-.437-.078-.658-.196-.697-.341-.043-.192.102-.35.297-.411a.76.76 0 0 1 .857.277l.367-.247a1.166 1.166 0 0 0-.939-.494zm2.387 0c-.052 0-.105.003-.157.01-.316.031-.607.175-.753.377a.689.689 0 0 0-.14.465c.006.2.065.357.233.496.183.147.42.2.657.259.31.067.426.095.545.186.081.07.134.127.136.27.001.25-.221.372-.42.41a.89.89 0 0 1-.894-.344l-.371.288c.33.382.777.505 1.09.5.541-.01.891-.217 1.03-.534.065-.153.062-.309.062-.38a.677.677 0 0 0-.267-.545c-.227-.177-.583-.228-.636-.242-.437-.078-.658-.196-.696-.341-.043-.192.101-.35.297-.411a.76.76 0 0 1 .857.277l.367-.247a1.167 1.167 0 0 0-.94-.494zm-9.84.002a1.461 1.461 0 0 0-1.42 1.117 1.305 1.305 0 0 0-.041.327v2.833h.491v-1.813c.17.18.487.42.96.454a1.447 1.447 0 0 0 1.208-.627 1.457 1.457 0 0 0-1.199-2.292zm4.804 0a1.448 1.448 0 0 0-1.288 2.08c.255.53.811.87 1.412.833a1.452 1.452 0 0 0 1.012-.51l-.363-.291a.968.968 0 0 1-1.106.273 1.01 1.01 0 0 1-.602-.69h2.239l.002-.427a1.295 1.295 0 0 0-1.306-1.268zm-9.2.08l1.062 1.377-1.062 1.378h.581l.779-1.01.778 1.01h.581l-1.062-1.378 1.062-1.378h-.581l-.778 1.01-.779-1.01zm-3.825.015v2.74h.49v-2.74zm8.233.37a.96.96 0 0 1 .95.993.963.963 0 0 1-.863.998.962.962 0 0 1-1.034-.739c-.074-.382 0-.746.307-1.019a.959.959 0 0 1 .64-.233zm4.79.015a.823.823 0 0 1 .819.755h-1.76a.964.964 0 0 1 .94-.755z`,source:`https://www.alibabagroup.com/en/ir/reports`,hex:`FF4747`},bK={title:`Apple`,slug:`apple`,get svg(){return gK+`Apple`+_K+this.path+vK},path:`M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701`,source:`https://www.apple.com`,hex:`000000`},xK={title:`Baidu`,slug:`baidu`,get svg(){return gK+`Baidu`+_K+this.path+vK},path:`M9.154 0C7.71 0 6.54 1.658 6.54 3.707c0 2.051 1.171 3.71 2.615 3.71 1.446 0 2.614-1.659 2.614-3.71C11.768 1.658 10.6 0 9.154 0zm7.025.594C14.86.58 13.347 2.589 13.2 3.927c-.187 1.745.25 3.487 2.179 3.735 1.933.25 3.175-1.806 3.422-3.364.252-1.555-.995-3.364-2.362-3.674a1.218 1.218 0 0 0-.261-.03zM3.582 5.535a2.811 2.811 0 0 0-.156.008c-2.118.19-2.428 3.24-2.428 3.24-.287 1.41.686 4.425 3.297 3.864 2.617-.561 2.262-3.68 2.183-4.362-.125-1.018-1.292-2.773-2.896-2.75zm16.534 1.753c-2.308 0-2.617 2.119-2.617 3.616 0 1.43.121 3.425 2.988 3.362 2.867-.063 2.553-3.238 2.553-3.988 0-.745-.62-2.99-2.924-2.99zm-8.264 2.478c-1.424.014-2.708.925-3.323 1.947-1.118 1.868-2.863 3.05-3.112 3.363-.25.309-3.61 2.116-2.864 5.42.746 3.301 3.365 3.237 3.365 3.237s1.93.19 4.171-.31c2.24-.495 4.17.123 4.17.123s5.233 1.748 6.665-1.616c1.43-3.364-.808-5.109-.808-5.109s-2.99-2.306-4.736-4.798c-1.072-1.665-2.348-2.268-3.528-2.257zm-2.234 3.84l1.542.024v8.197H7.758c-1.47-.291-2.055-1.292-2.13-1.462-.072-.173-.488-.976-.268-2.343.635-2.049 2.447-2.196 2.447-2.196h1.81zm3.964 2.39v3.881c.096.413.612.488.612.488h1.614v-4.343h1.689v5.782h-3.915c-1.517-.39-1.59-1.465-1.59-1.465v-4.317zm-5.458 1.147c-.66.197-.978.708-1.05.928-.076.22-.247.78-.1 1.269.294 1.095 1.248 1.144 1.248 1.144h1.37v-3.34z`,source:`https://www.baidu.com`,hex:`2932E1`},SK={title:`Bilibili`,slug:`bilibili`,get svg(){return gK+`Bilibili`+_K+this.path+vK},path:`M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.658.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.657-.373.906zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.786 1.894v7.52c.017.764.28 1.395.786 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373-.275 1.88-.773.506-.498.769-1.129.786-1.893v-7.52c-.017-.765-.28-1.396-.786-1.894-.507-.497-1.134-.755-1.88-.773zM8 11.107c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c0-.373.129-.689.386-.947.258-.257.574-.386.947-.386zm8 0c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373Z`,source:`https://www.bilibili.com`,hex:`00A1D6`},CK={title:`CSDN`,slug:`csdn`,get svg(){return gK+`CSDN`+_K+this.path+vK},path:`M4.693 13.638c-.497.568-1.363.63-1.712.63-.648 0-1.144-.164-1.474-.488-.313-.307-.478-.76-.489-1.346-.025-1.358.744-2.762 2.074-2.762.635 0 1.124.455 1.311.644a.337.337 0 0 0 .282.099.38.38 0 0 0 .241-.159c.068-.087.135-.237.138-.401s-.057-.344-.243-.49a2.642 2.642 0 0 0-1.668-.591c-.819 0-1.627.376-2.218 1.033-.621.691-.953 1.63-.935 2.646.015.815.282 1.5.773 1.982.528.518 1.3.791 2.235.791 1.097 0 1.776-.325 2.154-.597a.584.584 0 0 0 .24-.456.702.702 0 0 0-.208-.497c-.23-.248-.448-.101-.503-.037ZM9.663 11.488a7.471 7.471 0 0 0-.698-.248c-.157-.048-.309-.091-.45-.131-.922-.26-1.027-.5-1.017-.68.022-.363.515-.853 1.352-.792.607.045 1.015.509 1.205.781.149.214.371.135.434.095a.602.602 0 0 0 .309-.514.626.626 0 0 0-.209-.488 2.654 2.654 0 0 0-3.347-.273c-.456.323-.744.772-.77 1.202-.064 1.061 1.015 1.366 1.803 1.588.214.061.429.127.667.202 1.14.357 1.173.717 1.092 1.267-.082.556-.696.834-1.685.761-1.029-.076-1.464-.61-1.612-.901-.05-.098-.205-.248-.413-.156-.514.229-.473.731-.26.993.339.416 1.15 1.035 2.667 1.035 1.734 0 2.255-.875 2.378-1.64.092-.572-.022-1.028-.348-1.396-.236-.267-.592-.495-1.101-.706ZM16.44 9.323c-.598-.431-1.393-.61-2.36-.532-.712.058-1.274.243-1.335.263l-.006.002a.437.437 0 0 0-.297.379l-.47 5.201a.337.337 0 0 0 .247.35l.072.02.066.018.086.021a7.914 7.914 0 0 0 1.64.183c.972 0 1.765-.23 2.36-.684.764-.583 1.141-1.5 1.118-2.725-.021-1.135-.398-1.974-1.121-2.495Zm-.662 4.461c-.836.639-2.09.562-2.677.481a.128.128 0 0 1-.109-.137l.397-4.248a.113.113 0 0 1 .086-.1c.999-.241 1.777-.168 2.312.218.189.137.348.331.471.568.176.339.277.765.286 1.234.017.916-.24 1.583-.765 1.984ZM23.967 10.41a1.92 1.92 0 0 0-.432-.919c-.399-.465-1.029-.689-1.848-.689-.734 0-1.372.228-1.947.799.007-.086.019-.159.018-.223s-.017-.116-.066-.163c-.048-.045-.077-.067-.127-.077-.05-.01-.122-.008-.256-.006a.587.587 0 0 0-.589.54s-.325 3.874-.428 5.165a.308.308 0 0 0 .073.228.36.36 0 0 0 .26.131h.387a.224.224 0 0 0 .226-.205l.273-2.929.014-.147a1.902 1.902 0 0 1 .082-.412c.014-.045.03-.092.047-.14.245-.694.803-1.72 1.971-1.694.84.018 1.449.455 1.385 1.114-.101 1.034-.266 3.1-.358 4.14-.019.209.182.273.252.273h.304a.442.442 0 0 0 .444-.404s.185-2.127.294-3.352l.048-.532a1.959 1.959 0 0 0-.026-.5Z`,source:`https://www.csdn.net/company/index.html`,hex:`FC5531`},wK={title:`DuckDuckGo`,slug:`duckduckgo`,get svg(){return gK+`DuckDuckGo`+_K+this.path+vK},path:`M12 0C5.37 0 0 5.37 0 12s5.37 12 12 12 12-5.37 12-12S18.63 0 12 0zm0 .984C18.083.984 23.016 5.916 23.016 12S18.084 23.016 12 23.016.984 18.084.984 12C.984 5.917 5.916.984 12 .984zm0 .938C6.434 1.922 1.922 6.434 1.922 12c0 4.437 2.867 8.205 6.85 9.55-.237-.82-.776-2.753-1.6-6.052-1.184-4.741-2.064-8.606 2.379-9.813.047-.011.064-.064.03-.093-.514-.467-1.382-.548-2.233-.38a.06.06 0 0 1-.07-.058c0-.011 0-.023.011-.035.205-.286.572-.507.822-.64a1.843 1.843 0 0 0-.607-.335c-.059-.022-.059-.12-.006-.144.006-.006.012-.012.024-.012 1.749-.233 3.586.292 4.49 1.448.011.011.023.017.035.023 2.968.635 3.509 4.837 3.328 5.998a9.607 9.607 0 0 0 2.346-.576c.746-.286 1.008-.222 1.101-.053.1.193-.018.513-.28.81-.496.567-1.393 1.01-2.974 1.137-.546.044-1.029.024-1.445.006-.789-.035-1.339-.059-1.633.39-.192.298-.041.998 1.487 1.22 1.09.157 2.078.047 2.798-.034.643-.07 1.073-.118 1.172.069.21.402-.996 1.207-3.066 1.224-.158 0-.315-.006-.467-.011-1.283-.065-2.227-.414-2.816-.735a.094.094 0 0 1-.035-.017c-.105-.059-.31.045-.188.267.07.134.444.478 1.004.776-.058.466.087 1.184.338 2l.088-.016c.041-.009.087-.019.134-.025.507-.082.775.012.926.175.717-.536 1.913-1.294 2.03-1.154.583.694.66 2.332.53 2.99-.004.012-.017.024-.04.035-.274.117-1.783-.296-1.783-.511-.059-1.075-.26-1.173-.493-1.225h-.156c.006.006.012.018.018.03l.052.12c.093.257.24 1.063.13 1.26-.112.199-.835.297-1.284.303-.443.006-.543-.158-.637-.408-.07-.204-.103-.675-.103-.95a.857.857 0 0 1 .012-.216c-.134.058-.333.193-.397.281-.017.262-.017.682.123 1.149.07.221-1.518 1.164-1.74.99-.227-.181-.634-1.952-.459-2.67-.187.017-.338.075-.42.191-.367.508.093 2.933.582 3.248.257.169 1.54-.553 2.176-1.095.105.145.305.158.553.158.326-.012.782-.06 1.103-.158.192.45.423.972.613 1.388 4.47-1.032 7.803-5.037 7.803-9.82 0-5.566-4.512-10.078-10.078-10.078zm1.791 5.646c-.42 0-.678.146-.795.332-.023.047.047.094.094.07.14-.075.357-.161.701-.156.328.006.516.09.67.159l.023.01c.041.017.088-.03.059-.065-.134-.18-.332-.35-.752-.35zm-5.078.198a1.24 1.24 0 0 0-.522.082c-.454.169-.67.526-.67.76 0 .051.112.057.141.011.081-.123.21-.31.617-.478.408-.17.73-.146.951-.094.047.012.083-.041.041-.07a.989.989 0 0 0-.558-.211zm5.434 1.423a.651.651 0 0 0-.655.647.652.652 0 0 0 1.307 0 .646.646 0 0 0-.652-.647zm.283.262h.008a.17.17 0 0 1 .17.17c0 .093-.077.17-.17.17a.17.17 0 0 1-.17-.17c0-.09.072-.165.162-.17zm-5.358.076a.752.752 0 0 0-.758.758c0 .42.338.758.758.758s.758-.337.758-.758a.756.756 0 0 0-.758-.758zm.328.303h.01c.112 0 .2.089.2.2 0 .11-.088.197-.2.197a.195.195 0 0 1-.197-.198c0-.107.082-.194.187-.199z`,source:`https://github.com/duckduckgo/duckduckgo-privacy-extension/blob/5c6ac8d6a07421adbfb97ee2ff855dd7655f8d71/shared/img/logo-small-grayscale.svg`,hex:`DE5833`,guidelines:`https://duckduckgo.com/press#press-materials`},TK={title:`eBay`,slug:`ebay`,get svg(){return gK+`eBay`+_K+this.path+vK},path:`M6.056 12.132v-4.92h1.2v3.026c.59-.703 1.402-.906 2.202-.906 1.34 0 2.828.904 2.828 2.855 0 .233-.015.457-.06.668.24-.953 1.274-1.305 2.896-1.344.51-.018 1.095-.018 1.56-.018v-.135c0-.885-.556-1.244-1.53-1.244-.72 0-1.245.3-1.305.81h-1.275c.136-1.29 1.5-1.62 2.686-1.62 1.064 0 1.995.27 2.415 1.02l-.436-.84h1.41l2.055 4.125 2.055-4.126H24l-3.72 7.305h-1.346l1.07-2.04-2.33-4.38c.13.255.2.555.2.93v2.46c0 .346.01.69.04 1.005H16.8a6.543 6.543 0 01-.046-.765c-.603.734-1.32.96-2.32.96-1.48 0-2.272-.78-2.272-1.695 0-.15.015-.284.037-.405-.3 1.246-1.36 2.086-2.767 2.086-.87 0-1.694-.315-2.2-.93 0 .24-.015.494-.04.734h-1.18c.02-.39.04-.855.04-1.245v-1.05h-4.83c.065 1.095.818 1.74 1.853 1.74.718 0 1.355-.3 1.568-.93h1.24c-.24 1.29-1.61 1.725-2.79 1.725C.95 15.009 0 13.822 0 12.232c0-1.754.982-2.91 3.116-2.91 1.688 0 2.93.886 2.94 2.806v.005zm9.137.183c-1.095.034-1.77.233-1.77.95 0 .465.36.97 1.305.97 1.26 0 1.935-.69 1.935-1.814v-.13c-.45 0-.99.006-1.484.022h.012zm-6.06 1.875c1.11 0 1.876-.806 1.876-2.02s-.768-2.02-1.893-2.02c-1.11 0-1.89.806-1.89 2.02s.765 2.02 1.875 2.02h.03zm-4.35-2.514c-.044-1.125-.854-1.546-1.725-1.546-.944 0-1.694.474-1.815 1.546z`,source:`https://go.developer.ebay.com/logos`,hex:`E53238`},EK={title:`Facebook`,slug:`facebook`,get svg(){return gK+`Facebook`+_K+this.path+vK},path:`M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z`,source:`https://about.meta.com/brand/resources/facebook/logo`,hex:`0866FF`,guidelines:`https://about.meta.com/brand/resources/facebook/logo`},DK={title:`GitHub`,slug:`github`,get svg(){return gK+`GitHub`+_K+this.path+vK},path:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`,source:`https://github.com/logos`,hex:`181717`,guidelines:`https://github.com/logos`},OK={title:`GitLab`,slug:`gitlab`,get svg(){return gK+`GitLab`+_K+this.path+vK},path:`m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z`,source:`https://about.gitlab.com/press/press-kit/`,hex:`FC6D26`,guidelines:`https://about.gitlab.com/handbook/marketing/corporate-marketing/brand-activation/trademark-guidelines/`},kK={title:`Google`,slug:`google`,get svg(){return gK+`Google`+_K+this.path+vK},path:`M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z`,source:`https://partnermarketinghub.withgoogle.com`,hex:`4285F4`,guidelines:`https://about.google/brand-resource-center/brand-elements/`},AK={title:`Instagram`,slug:`instagram`,get svg(){return gK+`Instagram`+_K+this.path+vK},path:`M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077`,source:`https://about.meta.com/brand/resources/instagram`,hex:`FF0069`,guidelines:`https://about.meta.com/brand/resources/instagram`},jK={title:`Juejin`,slug:`juejin`,get svg(){return gK+`Juejin`+_K+this.path+vK},path:`m12 14.316 7.454-5.88-2.022-1.625L12 11.1l-.004.003-5.432-4.288-2.02 1.624 7.452 5.88Zm0-7.247 2.89-2.298L12 2.453l-.004-.005-2.884 2.318 2.884 2.3Zm0 11.266-.005.002-9.975-7.87L0 12.088l.194.156 11.803 9.308 7.463-5.885L24 12.085l-2.023-1.624Z`,source:`https://juejin.cn`,hex:`007FFF`},MK={title:`MDN Web Docs`,slug:`mdnwebdocs`,get svg(){return gK+`MDN Web Docs`+_K+this.path+vK},path:`m21.538 1.1-6.745 21.8h-2.77L18.77 1.1ZM24 1.1v21.8h-2.462V1.1Zm-12 0v21.8H9.538V1.1Zm-2.462 0L2.77 22.9H0L6.746 1.1Z`,source:`https://github.com/mdn/yari/blob/77e6cda02f7013219e9da27a00b9424085e60fdb/client/src/assets/mdn-logo.svg`,hex:`000000`},NK={title:`Netflix`,slug:`netflix`,get svg(){return gK+`Netflix`+_K+this.path+vK},path:`m5.398 0 8.348 23.602c2.346.059 4.856.398 4.856.398L10.113 0H5.398zm8.489 0v9.172l4.715 13.33V0h-4.715zM5.398 1.5V24c1.873-.225 2.81-.312 4.715-.398V14.83L5.398 1.5z`,source:`https://brand.netflix.com/en/assets/logos`,hex:`E50914`,guidelines:`https://brand.netflix.com/en/assets/logos`},PK={title:`npm`,slug:`npm`,get svg(){return gK+`npm`+_K+this.path+vK},path:`M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z`,source:`https://www.npmjs.com`,hex:`CB3837`,guidelines:`https://docs.npmjs.com/policies/logos-and-usage`},FK={title:`PyPI`,slug:`pypi`,get svg(){return gK+`PyPI`+_K+this.path+vK},path:`M23.922 13.58v3.912L20.55 18.72l-.078.055.052.037 3.45-1.256.026-.036v-3.997l-.053-.036-.025.092z M23.621 5.618l-3.04 1.107v3.912l3.339-1.215V5.509zM23.92 13.457V9.544l-3.336 1.215v3.913zM20.47 14.71V10.8L17.17 12v3.913zM17.034 19.996v-3.912l-3.313 1.206v3.912zM17.17 16.057v3.868l3.314-1.206V14.85l-3.314 1.206zm2.093 1.882c-.367.134-.663-.074-.663-.463s.296-.814.663-.947c.365-.133.662.075.662.464s-.297.814-.662.946z M13.225 9.315l.365-.132-3.285-1.197-3.323 1.21.102.037 3.184 1.16zM20.507 10.664V6.751L17.17 7.965v3.913zM17.058 11.918V8.005l-3.302 1.202v3.912zM13.643 9.246l-3.336 1.215v3.913l3.336-1.215zM6.907 13.165l3.322 1.209v-3.913L6.907 9.252z M10.34 7.873l3.281 1.193V5.198l-3.28-1.193zM20.507 2.715L17.19 3.922v3.913l3.317-1.207zM16.95 3.903L13.724 2.73l-3.269 1.19 3.225 1.174zM15.365 4.606l-1.624.592v3.868l3.317-1.207V3.991l-1.693.615zm-.391 2.778c-.367.134-.662-.074-.662-.464s.295-.813.662-.946c.366-.133.663.074.663.464s-.297.813-.663.946z M10.229 18.41v-3.914l-3.322-1.209V17.2zM13.678 17.182v-3.913l-3.371 1.227v3.913z M13.756 17.154l3.3-1.2V12.04l-3.3 1.2zM13.678 21.217l-3.371 1.227v-3.912h-.078v3.912l-3.322-1.209v-3.913l-.053-.058-.025-.06-3.336-1.21v-3.948l.034.013 3.287 1.196.015-.078-3.261-1.187 3.26-1.187v-.109L3.876 9.62l-.307-.112 3.26-1.188v.877l.079-.055V6.769l3.257 1.185.058-.061L7.084 6.75l-.102-.037 3.24-1.179v-.083L6.854 6.677v.018l-.025.018v1.523L3.44 9.47v.02l-.025.017v4.007l-3.39 1.233v.019L0 14.784v3.995l.025.037 3.4 1.237.008-.006.007.01 3.4 1.238.008-.006.006.01 3.4 1.237.014-.009.012.01 3.45-1.256.026-.037-.078-.027zM3.493 9.563l3.257 1.185-3.257 1.187V9.562zM3.4 19.96L.078 18.752v-3.913l2.361.86.96.349v3.913zm.015-3.99L.335 14.85l-.182-.066 3.262-1.187v2.374zm3.399 5.231l-3.321-1.209v-3.912l3.321 1.209v3.912zM23.791 5.434l-3.21-1.17v2.338zM20.387 2.643l-3.24-1.18-3.27 1.19 3.247 1.182z`,source:`https://pypi.org`,hex:`3775A9`},IK={title:`QQ`,slug:`qq`,get svg(){return gK+`QQ`+_K+this.path+vK},path:`M21.395 15.035a40 40 0 0 0-.803-2.264l-1.079-2.695c.001-.032.014-.562.014-.836C19.526 4.632 17.351 0 12 0S4.474 4.632 4.474 9.241c0 .274.013.804.014.836l-1.08 2.695a39 39 0 0 0-.802 2.264c-1.021 3.283-.69 4.643-.438 4.673.54.065 2.103-2.472 2.103-2.472 0 1.469.756 3.387 2.394 4.771-.612.188-1.363.479-1.845.835-.434.32-.379.646-.301.778.343.578 5.883.369 7.482.189 1.6.18 7.14.389 7.483-.189.078-.132.132-.458-.301-.778-.483-.356-1.233-.646-1.846-.836 1.637-1.384 2.393-3.302 2.393-4.771 0 0 1.563 2.537 2.103 2.472.251-.03.581-1.39-.438-4.673`,source:`https://en.wikipedia.org/wiki/File:Tencent_QQ.svg`,hex:`1EBAFC`,guidelines:`https://qq.design/brand/BrandDesign/Logo`},LK={title:`Quora`,slug:`quora`,get svg(){return gK+`Quora`+_K+this.path+vK},path:`M7.3799.9483A11.9628 11.9628 0 0 1 21.248 19.5397l2.4096 2.4225c.7322.7362.21 1.9905-.8272 1.9905l-10.7105.01a12.52 12.52 0 0 1-.304 0h-.02A11.9628 11.9628 0 0 1 7.3818.9503Zm7.3217 4.428a7.1717 7.1717 0 1 0-5.4873 13.2512 7.1717 7.1717 0 0 0 5.4883-13.2511Z`,source:`https://www.quora.com`,hex:`B92B27`},RK={title:`Reddit`,slug:`reddit`,get svg(){return gK+`Reddit`+_K+this.path+vK},path:`M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z`,source:`https://www.redditinc.com/brand`,hex:`FF4500`,guidelines:`https://www.redditinc.com/brand`},zK={title:`Sina Weibo`,slug:`sinaweibo`,get svg(){return gK+`Sina Weibo`+_K+this.path+vK},path:`M10.098 20.323c-3.977.391-7.414-1.406-7.672-4.02-.259-2.609 2.759-5.047 6.74-5.441 3.979-.394 7.413 1.404 7.671 4.018.259 2.6-2.759 5.049-6.737 5.439l-.002.004zM9.05 17.219c-.384.616-1.208.884-1.829.602-.612-.279-.793-.991-.406-1.593.379-.595 1.176-.861 1.793-.601.622.263.82.972.442 1.592zm1.27-1.627c-.141.237-.449.353-.689.253-.236-.09-.313-.361-.177-.586.138-.227.436-.346.672-.24.239.09.315.36.18.601l.014-.028zm.176-2.719c-1.893-.493-4.033.45-4.857 2.118-.836 1.704-.026 3.591 1.886 4.21 1.983.64 4.318-.341 5.132-2.179.8-1.793-.201-3.642-2.161-4.149zm7.563-1.224c-.346-.105-.57-.18-.405-.615.375-.977.42-1.804 0-2.404-.781-1.112-2.915-1.053-5.364-.03 0 0-.766.331-.571-.271.376-1.217.315-2.224-.27-2.809-1.338-1.337-4.869.045-7.888 3.08C1.309 10.87 0 13.273 0 15.348c0 3.981 5.099 6.395 10.086 6.395 6.536 0 10.888-3.801 10.888-6.82 0-1.822-1.547-2.854-2.915-3.284v.01zm1.908-5.092c-.766-.856-1.908-1.187-2.96-.962-.436.09-.706.511-.616.932.09.42.511.691.932.602.511-.105 1.067.044 1.442.465.376.421.466.977.316 1.473-.136.406.089.856.51.992.405.119.857-.105.992-.512.33-1.021.12-2.178-.646-3.035l.03.045zm2.418-2.195c-1.576-1.757-3.905-2.419-6.054-1.968-.496.104-.812.587-.706 1.081.104.496.586.813 1.082.707 1.532-.331 3.185.15 4.296 1.383 1.112 1.246 1.429 2.943.947 4.416-.165.48.106 1.007.586 1.157.479.165.991-.104 1.157-.586.675-2.088.241-4.478-1.338-6.235l.03.045z`,source:`https://en.wikipedia.org/wiki/Sina_Weibo`,hex:`E6162D`},BK={title:`Spotify`,slug:`spotify`,get svg(){return gK+`Spotify`+_K+this.path+vK},path:`M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z`,source:`https://developer.spotify.com/documentation/general/design-and-branding/#using-our-logo`,hex:`1ED760`,guidelines:`https://developer.spotify.com/documentation/general/design-and-branding/#using-our-logo`},VK={title:`Stack Overflow`,slug:`stackoverflow`,get svg(){return gK+`Stack Overflow`+_K+this.path+vK},path:`M15.725 0l-1.72 1.277 6.39 8.588 1.716-1.277L15.725 0zm-3.94 3.418l-1.369 1.644 8.225 6.85 1.369-1.644-8.225-6.85zm-3.15 4.465l-.905 1.94 9.702 4.517.904-1.94-9.701-4.517zm-1.85 4.86l-.44 2.093 10.473 2.201.44-2.092-10.473-2.203zM1.89 15.47V24h19.19v-8.53h-2.133v6.397H4.021v-6.396H1.89zm4.265 2.133v2.13h10.66v-2.13H6.154Z`,source:`https://stackoverflow.design/brand/logo/`,hex:`F58025`,guidelines:`https://stackoverflow.com/legal/trademark-guidance`},HK={title:`Taobao`,slug:`taobao`,get svg(){return gK+`Taobao`+_K+this.path+vK},path:`M21.3099 9.9008c.5285 0 .9584.4284.9584.9589 0 .5276-.4299.958-.9584.958-.5276 0-.9585-.4304-.9585-.958 0-.5305.4309-.959.9585-.959zm2.3899 3.0462h-10.408v-.9595h4.15V9.7591h-2.8869v-.768h2.8868v-.9234h-2.508v.2034h-1.6418V5.3733h1.6418v.3497c.4945-.0607 1.463-.1814 2.5175-.2956v-.8257h1.8522v.6408c.9249-.0807 1.753-.1312 2.211-.1112 1.489.0716 2.4449.2816 2.485 1.273.0356.989-1.4244 1.9043-1.4244 1.9043l-.4509-.4338v.1929h-2.8116v.9233h3.229v.768h-3.229v2.2285h4.3873v.9595zM21.5259 7.299l-.0115-.0115s1.3722-.7595.3427-1.272c-.8633-.43-5.5346.3056-6.9234.6257v.6578h6.5922zM1.8822 6.4166c.5515 0 .9985-.449.9985-1 0-.5531-.447-.9995-.9985-.9995a.9984.9984 0 00-1.001.9995c0 .551.4463 1 1.001 1zm3.4094-.8596c.252-.4364.3717-.7195.3717-.7195l-1.466-.4123S3.6068 6.3546 2.5527 7.253c0 0 1.0195.5897 1.0095.5732a9.6444 9.6444 0 00.782-.8793c.2345-.1017.4585-.198.6794-.2876-.2715.487-.7094 1.219-1.1478 1.6809l.6178.5385s.4198-.4033.8792-.8907h.5246v.8993H3.8557v.7204h2.0416v1.7235c-.025 0-.0521 0-.0782-.002-.224-.0106-.5751-.0476-.7124-.265-.1678-.2636-.044-.7496-.0346-1.0457H3.6608l-.0496.026s-.517 2.3142 1.489 2.2621c1.8793.0521 2.9544-.523 3.4725-.9178l.2064.7645 1.1583-.4825-.785-1.9183-.941.292.1764.6574c-.2415.1809-.518.3157-.8187.4134V9.6076h1.995v-.7204h-1.995v-.8993h2.003v-.72h-3.557c.2565-.3111.4589-.5982.5095-.78L5.9058 6.32c2.6603-.9519 4.1408-.7886 4.1278.773v4.1128s.1568 1.4124-1.461 1.3107l-.8757-.188-.207.8307s3.7822 1.0812 4.0913-1.8246c.3096-2.9058-.0767-4.7576-.0767-4.7576s-.3451-2.6824-6.213-1.02zM.0582 12.1534l1.5867.9905c1.0967-2.3813 1.0265-2.0657 1.302-2.92.2832-.8737.3453-1.54-.1362-2.023-.6172-.6197-.6844-.6773-1.6017-1.3582L.5487 7.8562l1.2164.7576s.8141.4153.4274 1.1903c-.3617.7375-2.1343 2.3493-2.1343 2.3493zm19.94 6.8484s-.0186.523-.6704.523c-.5892 0-.6363-.4113-.6363-.4113-.2485.2996-.6207.4549-1.0696.4549-.7606 0-1.2961-.5135-1.2961-1.2896 0-.786.5576-1.28 1.3983-1.28.3832 0 .725.1462.9258.4037.0066-.0706.0136-.1362.0136-.1968 0-.5622-.3092-.8127-1.01-.8127-.3382 0-.6659.0486-1.0136.1408.1107-.219.1924-.3793.2971-.4574.1202-.0972.4294-.1408.9419-.1408 1.269 0 1.742.4259 1.742 1.4279v1.2024c0 .3161.033.4359.3772.4359zm-1.3272-.745c0-.4815-.2555-.747-.6378-.747-.4043 0-.6668.2825-.6668.7595 0 .467.2775.7615.6533.7615.3882 0 .6513-.275.6513-.774zm5.2706-.501c0 1.1528-.6924 1.8271-1.7786 1.8271-1.0957 0-1.7766-.6743-1.7766-1.8271 0-1.1584.6809-1.8252 1.7766-1.8252 1.0862 0 1.7786.6719 1.7786 1.8252zm-1.0867 0c0-.8693-.237-1.2997-.692-1.2997-.4734 0-.6938.4304-.6938 1.2997 0 .8662.2204 1.299.6939 1.299.467 0 .6919-.4328.6919-1.299zm-7.1313-.0441c0 1.1703-.6534 1.8567-1.5767 1.8567-.4233 0-.8056-.1633-1.0466-.47 0 0-.1082.4264-.6618.4264-.6884 0-.6644-.523-.6644-.523.3868.0165.3758-.2145.3758-.436v-2.8862c0-.3552-.0742-.4795-.4269-.4865.0136-.1072.0777-.5376.6789-.5376.8156 0 .7615.9149.7615.9149v.786c.229-.268.5516-.3942.9905-.3942.9624 0 1.5697.6447 1.5697 1.7495zm-1.0937.0806c0-.8983-.2716-1.3557-.7616-1.3557-.4393 0-.74.3968-.74 1.1047v.3602c0 .7205.3152 1.1168.7631 1.1168.477 0 .7385-.4134.7385-1.226zm-3.2425-.0365c0 1.1528-.688 1.8271-1.7806 1.8271-1.0937 0-1.7726-.6743-1.7726-1.8271 0-1.1584.6789-1.8252 1.7726-1.8252 1.0927 0 1.7806.6719 1.7806 1.8252zm-1.0832 0c0-.8693-.236-1.2997-.6974-1.2997-.467 0-.6874.4304-.6874 1.2997 0 .8662.2205 1.299.6874 1.299.469 0 .6974-.4328.6974-1.299zm-5.9895-2.716c-.268.0782-.7901.0972-1.5516.0972-.925 0-1.5391-.039-1.8543-.039-.5195 0-.7254.1342-.9088.6592.3006-.1017.6729-.1087 1.1353-.1087.3512 0 .4108.0431.4108.2941V18.846c0 .2821.1178.6789.7255.6789.7104 0 .8346-.526.8346-.526-.3552-.007-.4248-.1313-.4248-.4865V15.952c0-.2675.1012-.2795.471-.2795.1252 0 .2094.007.2605.007.545 0 .6883-.1047.9018-.6398zm3.1303 3.962s-.018.523-.6664.523c-.556 0-.6403-.4113-.6403-.4113-.248.2996-.6207.4549-1.0656.4549-.7655 0-1.2996-.5135-1.2996-1.2896 0-.786.557-1.28 1.3993-1.28.3843 0 .7274.1462.9258.4037.0036-.0706.0106-.1362.0106-.1968 0-.5622-.3051-.8127-1.007-.8127-.3382 0-.6669.0486-1.015.1408.1131-.219.1923-.3793.2945-.4574.1293-.0972.4329-.1408.9469-.1408 1.265 0 1.746.4259 1.746 1.4279v1.2024c0 .3161.0276.4359.3708.4359zm-1.3262-.745c0-.4815-.2555-.747-.6378-.747-.4013 0-.6668.2825-.6668.7595 0 .467.279.7615.6513.7615.3893 0 .6533-.275.6533-.774z`,source:`https://www.alibabagroup.com/en/ir/reports`,hex:`E94F20`},UK={title:`Telegram`,slug:`telegram`,get svg(){return gK+`Telegram`+_K+this.path+vK},path:`M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z`,source:`https://telegram.org/tour/screenshots`,hex:`26A5E4`},WK={title:`TikTok`,slug:`tiktok`,get svg(){return gK+`TikTok`+_K+this.path+vK},path:`M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z`,source:`https://tiktok.com`,hex:`000000`},GK={title:`V2EX`,slug:`v2ex`,get svg(){return gK+`V2EX`+_K+this.path+vK},path:`M.671 1.933h13.821a1.342 1.342 0 0 1 .98.425l8.166 8.725a1.342 1.342 0 0 1 0 1.834l-8.166 8.724a1.342 1.342 0 0 1-.98.426H.673A.671.671 0 0 1 0 21.395v-6.878h13.19l2.276-2.28a.336.336 0 0 0 0-.474l-2.276-2.28H0V2.604a.671.671 0 0 1 .671-.671Z`,source:`https://www.v2ex.com`,hex:`1F1F1F`},KK={title:`WeChat`,slug:`wechat`,get svg(){return gK+`WeChat`+_K+this.path+vK},path:`M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 0 1-.023-.156.49.49 0 0 1 .201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.01-.27-.027-.407-.03zm-2.53 3.274c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.97-.982zm4.844 0c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.969-.982z`,source:`https://wechat.design/tool/brand`,hex:`07C160`,guidelines:`https://wechat.design/brand/main-brand`},qK={title:`WhatsApp`,slug:`whatsapp`,get svg(){return gK+`WhatsApp`+_K+this.path+vK},path:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z`,source:`https://about.meta.com/brand/resources/whatsapp/whatsapp-brand`,hex:`25D366`,guidelines:`https://about.meta.com/brand/resources/whatsapp/whatsapp-brand`},JK={title:`Wikipedia`,slug:`wikipedia`,get svg(){return gK+`Wikipedia`+_K+this.path+vK},path:`M12.09 13.119c-.936 1.932-2.217 4.548-2.853 5.728-.616 1.074-1.127.931-1.532.029-1.406-3.321-4.293-9.144-5.651-12.409-.251-.601-.441-.987-.619-1.139-.181-.15-.554-.24-1.122-.271C.103 5.033 0 4.982 0 4.898v-.455l.052-.045c.924-.005 5.401 0 5.401 0l.051.045v.434c0 .119-.075.176-.225.176l-.564.031c-.485.029-.727.164-.727.436 0 .135.053.33.166.601 1.082 2.646 4.818 10.521 4.818 10.521l.136.046 2.411-4.81-.482-1.067-1.658-3.264s-.318-.654-.428-.872c-.728-1.443-.712-1.518-1.447-1.617-.207-.023-.313-.05-.313-.149v-.468l.06-.045h4.292l.113.037v.451c0 .105-.076.15-.227.15l-.308.047c-.792.061-.661.381-.136 1.422l1.582 3.252 1.758-3.504c.293-.64.233-.801.111-.947-.07-.084-.305-.22-.812-.24l-.201-.021c-.052 0-.098-.015-.145-.051-.045-.031-.067-.076-.067-.129v-.427l.061-.045c1.247-.008 4.043 0 4.043 0l.059.045v.436c0 .121-.059.178-.193.178-.646.03-.782.095-1.023.439-.12.186-.375.589-.646 1.039l-2.301 4.273-.065.135 2.792 5.712.17.048 4.396-10.438c.154-.422.129-.722-.064-.895-.197-.172-.346-.273-.857-.295l-.42-.016c-.061 0-.105-.014-.152-.045-.043-.029-.072-.075-.072-.119v-.436l.059-.045h4.961l.041.045v.437c0 .119-.074.18-.209.18-.648.03-1.127.18-1.443.421-.314.255-.557.616-.736 1.067 0 0-4.043 9.258-5.426 12.339-.525 1.007-1.053.917-1.503-.031-.571-1.171-1.773-3.786-2.646-5.71l.053-.036z`,source:`https://commons.wikimedia.org/wiki/File:Wikipedia-logo-v2.svg`,hex:`000000`},YK={title:`X`,slug:`x`,get svg(){return gK+`X`+_K+this.path+vK},path:`M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z`,source:`https://x.com`,hex:`000000`,guidelines:`https://about.x.com/en/who-we-are/brand-toolkit`},XK={title:`Y Combinator`,slug:`ycombinator`,get svg(){return gK+`Y Combinator`+_K+this.path+vK},path:`M0 24V0h24v24H0zM6.951 5.896l4.112 7.708v5.064h1.583v-4.972l4.148-7.799h-1.749l-2.457 4.875c-.372.745-.688 1.434-.688 1.434s-.297-.708-.651-1.434L8.831 5.896h-1.88z`,source:`https://www.ycombinator.com/press`,hex:`F0652F`},ZK={title:`YouTube`,slug:`youtube`,get svg(){return gK+`YouTube`+_K+this.path+vK},path:`M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z`,source:`https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors`,hex:`FF0000`,guidelines:`https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors`},QK={"github.com":DK,"github.io":DK,"raw.githubusercontent.com":DK,"gitlab.com":OK,"npmjs.com":PK,"pypi.org":FK,"stackoverflow.com":VK,"developer.mozilla.org":MK,"wikipedia.org":JK,"news.ycombinator.com":XK,"youtube.com":ZK,"youtu.be":ZK,"x.com":YK,"twitter.com":YK,"bilibili.com":SK,"zhihu.com":{title:`Zhihu`,slug:`zhihu`,get svg(){return gK+`Zhihu`+_K+this.path+vK},path:`M5.721 0C2.251 0 0 2.25 0 5.719V18.28C0 21.751 2.252 24 5.721 24h12.56C21.751 24 24 21.75 24 18.281V5.72C24 2.249 21.75 0 18.281 0zm1.964 4.078c-.271.73-.5 1.434-.68 2.11h4.587c.545-.006.445 1.168.445 1.171H9.384a58.104 58.104 0 01-.112 3.797h2.712c.388.023.393 1.251.393 1.266H9.183a9.223 9.223 0 01-.408 2.102l.757-.604c.452.456 1.512 1.712 1.906 2.177.473.681.063 2.081.063 2.081l-2.794-3.382c-.653 2.518-1.845 3.607-1.845 3.607-.523.468-1.58.82-2.64.516 2.218-1.73 3.44-3.917 3.667-6.497H4.491c0-.015.197-1.243.806-1.266h2.71c.024-.32.086-3.254.086-3.797H6.598c-.136.406-.158.447-.268.753-.594 1.095-1.603 1.122-1.907 1.155.906-1.821 1.416-3.6 1.591-4.064.425-1.124 1.671-1.125 1.671-1.125zM13.078 6h6.377v11.33h-2.573l-2.184 1.373-.401-1.373h-1.219zm1.313 1.219v8.86h.623l.263.937 1.455-.938h1.456v-8.86z`,source:`https://www.zhihu.com`,hex:`0084FF`},"juejin.cn":jK,"csdn.net":CK,"google.com":kK,"baidu.com":xK,"duckduckgo.com":wK,"tiktok.com":WK,"netflix.com":NK,"spotify.com":BK,"facebook.com":EK,"instagram.com":AK,"reddit.com":RK,"telegram.org":UK,"t.me":UK,"weixin.qq.com":KK,"qq.com":IK,"whatsapp.com":qK,"wa.me":qK,"weibo.com":zK,"taobao.com":HK,"aliexpress.com":yK,"ebay.com":TK,"quora.com":LK,"v2ex.com":GK,"apple.com":bK};function $K(e){let t;try{let n=new URL(e);if(n.protocol!==`http:`&&n.protocol!==`https:`)return;t=n.hostname.toLowerCase()}catch{return}let n,r=0;for(let[e,i]of Object.entries(QK))(t===e||t.endsWith(`.${e}`))&&e.length>r&&(n=i,r=e.length);return n}function eq({href:e,size:t,className:n}){let r=e===void 0?void 0:$K(e);if(r!==void 0)return(0,F.jsx)(`svg`,{width:t,height:t,className:n,viewBox:`-2 -2 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":!0,children:(0,F.jsx)(`path`,{d:r.path,fill:`currentColor`})})}function tq(e){let t=BA(e),n=zA(e);if(NA(t))return PA(n)?`code`:`other`;if(n===``)return`other`;switch(t){case`code`:case`html`:return`code`;case`image`:return`image`;case`excel`:case`pdf`:case`ppt`:case`word`:return`document`;case`markdown`:case`other`:case`video`:return`other`;default:return aq(t)}}var nq=({size:e,className:t,strokeWidth:n})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,strokeWidth:n,children:[(0,F.jsx)(`path`,{d:`M12.4326 2.38086H3.56763C2.46306 2.38086 1.56763 3.27629 1.56763 4.38086V11.6192C1.56763 12.7237 2.46306 13.6192 3.56763 13.6192H12.4326C13.5372 13.6192 14.4326 12.7237 14.4326 11.6192V4.38086C14.4326 3.27629 13.5372 2.38086 12.4326 2.38086Z`,stroke:`currentColor`}),(0,F.jsx)(`path`,{d:`M10.536 7.03286C11.1948 7.03286 11.7288 6.49884 11.7288 5.8401C11.7288 5.18136 11.1948 4.64734 10.536 4.64734C9.87728 4.64734 9.34326 5.18136 9.34326 5.8401C9.34326 6.49884 9.87728 7.03286 10.536 7.03286Z`,stroke:`currentColor`}),(0,F.jsx)(`path`,{d:`M1.5979 9.28409L4.17738 7.37514C4.57462 7.08117 5.12701 7.12145 5.47741 7.46992L8.3322 10.309C8.6572 10.6323 9.1605 10.6931 9.5532 10.4566L10.8859 9.65399C11.2531 9.43289 11.7205 9.47039 12.0477 9.74729L14.2823 11.6379`,stroke:`currentColor`})]}),rq=({size:e,className:t,strokeWidth:n})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,strokeWidth:n,children:[(0,F.jsx)(`path`,{d:`M3.51919 14.5069H12.4807C13.0679 14.5069 13.5438 14.031 13.5438 13.4438V5.97499C13.5438 5.68818 13.428 5.41352 13.2226 5.21341L9.71251 1.79459C9.51402 1.60124 9.24781 1.49304 8.97075 1.49304H3.51919C2.93204 1.49304 2.45605 1.96902 2.45605 2.55618V13.4438C2.45605 14.031 2.93203 14.5069 3.51919 14.5069Z`,stroke:`currentColor`}),(0,F.jsx)(`path`,{d:`M8.90454 1.6095V4.87091C8.90454 5.45806 9.38051 5.93405 9.96768 5.93405H13.4953`,stroke:`currentColor`}),(0,F.jsx)(`path`,{d:`M4.31152 8.7561H7.83046`,stroke:`currentColor`}),(0,F.jsx)(`path`,{d:`M4.31152 11.3651H9.36598`,stroke:`currentColor`})]}),iq=({size:e,className:t,strokeWidth:n})=>(0,F.jsxs)(`svg`,{width:e,height:e,className:t,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,strokeWidth:n,children:[(0,F.jsx)(`path`,{d:`M3.75275 14.271H12.2473C12.7749 14.271 13.2027 13.8433 13.2027 13.3156V5.91732C13.2027 5.65958 13.0985 5.41276 12.9139 5.23293L9.59477 2.00011C9.4164 1.82636 9.17717 1.72913 8.9282 1.72913H3.75275C3.22511 1.72913 2.79736 2.15686 2.79736 2.68451V13.3156C2.79736 13.8433 3.22511 14.271 3.75275 14.271Z`,stroke:`currentColor`}),(0,F.jsx)(`path`,{d:`M8.84888 1.83838V4.94133C8.84888 5.46896 9.2766 5.89671 9.80426 5.89671H13.157`,stroke:`currentColor`})]});function aq(e){throw Error(`unreachable link icon kind: ${String(e)}`)}function oq({kind:e,href:t,size:n=14,className:r,strokeWidth:i}){switch(e){case`url`:return eq({href:t,size:n,className:r})??(0,F.jsx)(ie,{size:n,className:r,strokeWidth:i});case`folder`:return(0,F.jsx)(S,{size:n,className:r,strokeWidth:i});case`code`:return(0,F.jsx)(y,{size:n,className:r,strokeWidth:i});case`image`:return(0,F.jsx)(nq,{size:n,className:r,strokeWidth:i});case`document`:return(0,F.jsx)(rq,{size:n,className:r,strokeWidth:i});case`other`:return(0,F.jsx)(iq,{size:n,className:r,strokeWidth:i});default:return aq(e)}}function sq(e){return(0,F.jsx)(oq,{...e,strokeWidth:oe})}function cq(e){let t=(0,P.useRef)(null),n=(0,P.useRef)(e);n.current=e;let r=(0,P.useCallback)(()=>{t.current!==null&&(clearTimeout(t.current),t.current=null)},[]),i=(0,P.useCallback)(()=>{r(),t.current=setTimeout(()=>{t.current=null,n.current()},200)},[r]);return(0,P.useEffect)(()=>r,[r]),{arm:i,cancel:r}}function lq(e){let t=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue(`--dsh-frame-top-clearance`));return Number.isNaN(t)?e:Math.max(e,t)}var uq={root:`_root_38jqx_3`,card:`_card_38jqx_9`,copyable:`_copyable_38jqx_21`,feedback:`_feedback_38jqx_30`,copied:`_copied_38jqx_36`,status:`_status_38jqx_43`,preview:`_preview_38jqx_52`,inline:`_inline_38jqx_79`,media:`_media_38jqx_80`},dq=100,fq=420,pq=24,mq=300,hq=8,gq=8;function _q({anchor:e,content:t,openDelayMs:r=500,disabled:i=!1,copyText:a,copyLabel:o,copiedLabel:s,variant:c=`compact`,widthAnchorRef:l,inline:u=!1}){let d=(0,P.useRef)(null),f=(0,P.useRef)(null),p=(0,P.useRef)(null),m=(0,P.useRef)(null),h=(0,P.useRef)(null),g=(0,P.useRef)(0),_=(0,P.useRef)(!1),v=(0,P.useRef)(!0),[y,b]=(0,P.useState)(`closed`),x=y!==`closed`,S=y===`closing`,[C,w]=(0,P.useState)(null),T=C!==null,[E,D]=(0,P.useState)(!1),[O,k]=(0,P.useState)(!1),ee=(0,P.useCallback)(()=>{m.current!==null&&(clearTimeout(m.current),m.current=null),h.current=null,D(!1)},[]),te=(0,P.useCallback)(()=>{g.current+=1,ee(),b(e=>c===`preview`&&e!==`closed`?`closing`:`closed`)},[ee,c]),{arm:ne,cancel:A}=cq(te),re=()=>{p.current!==null&&(clearTimeout(p.current),p.current=null)};(0,P.useEffect)(()=>{if(!S)return;let e=setTimeout(()=>{b(`closed`)},dq);return()=>{clearTimeout(e)}},[S]),(0,P.useEffect)(()=>{i&&(re(),A(),te())},[i,A,te]),(0,P.useEffect)(()=>(v.current=!0,()=>{v.current=!1,g.current+=1,re(),m.current!==null&&(clearTimeout(m.current),m.current=null)}),[]),(0,P.useEffect)(()=>{if(!x||c!==`preview`&&!u)return;let e=e=>{e.key===`Escape`&&(u&&e.stopPropagation(),re(),A(),te())};return window.addEventListener(`keydown`,e,u),()=>{window.removeEventListener(`keydown`,e,u)}},[x,c,u,A,te]),(0,P.useLayoutEffect)(()=>{if(!x){w(null);return}let e=()=>{let e=d.current;if(e===null)return;let t=e.getBoundingClientRect(),n=f.current?.offsetHeight??0;if(c===`preview`){let e=l?.current?.getBoundingClientRect()??t,r=Math.max(0,Math.min(e.width-48,window.innerWidth-16)),i=lq(gq),a=Math.max(i,t.bottom+hq),o=Math.max(0,t.top-hq-i),s=Math.max(0,window.innerHeight-a-gq),c=o>=Math.min(fq,s),u=Math.min(fq,c?o:s);w({left:Math.max(gq,Math.min(e.left+pq,window.innerWidth-r-gq)),top:c?Math.max(i,t.top-Math.min(n,u)-hq):a,width:r,maxHeight:u});return}if(u){let e=Math.max(n,f.current?.scrollHeight??0),r=Math.max(0,Math.min(mq,window.innerWidth-16)),i=lq(gq),a=Math.max(i,t.bottom+hq),o=Math.max(0,t.top-hq-i),s=Math.max(0,window.innerHeight-a-gq),c=e>s&&o>s,l=c?o:s;w({left:Math.max(gq,Math.min(t.left,window.innerWidth-r-gq)),top:c?t.top-hq-Math.min(e,l):a,width:r,maxHeight:l});return}let r=t.top+n>window.innerHeight-gq?window.innerHeight-n-gq:t.top;w({left:t.right+hq,top:r})};e();let t=(c===`preview`||u)&&typeof ResizeObserver<`u`?new ResizeObserver(e):null;for(let e of[f.current,d.current,l?.current])e!=null&&t?.observe(e);return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{t?.disconnect(),window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[x,c,l,T,u]),(0,P.useLayoutEffect)(()=>{if(!x||C===null||c===`preview`||u||O)return;let e=f.current?.offsetHeight??0;C.top+e>window.innerHeight-gq&&w({left:C.left,top:window.innerHeight-e-gq})},[x,C,c,u,O]);let ie=async e=>{if(E||_.current)return;_.current=!0;let t=g.current,n=await ef(e);_.current=!1;let r=f.current;if(!n||!v.current||t!==g.current||r===null)return;let i=r.offsetHeight;h.current=i>0?i:null,D(!0),m.current=setTimeout(ee,1e3)},j=a!==void 0,ae=e=>{f.current?.contains(e.target)||(re(),A(),te())},oe=x&&C!==null&&!O&&(0,F.jsx)(`div`,{ref:f,className:n(uq.card,c===`preview`&&uq.preview,u&&uq.media,j&&uq.copyable,E&&uq.feedback),"data-closing":S||void 0,style:{...C,minHeight:E&&h.current!==null?h.current:void 0,"--dsh-hover-preview-fade":`${dq}ms`},role:j?`button`:void 0,tabIndex:j?0:void 0,"aria-label":j?`${o}: ${a}`:void 0,onClick:j?e=>{let t=window.getSelection();if(t!==null&&!t.isCollapsed){for(let n=0;n<t.rangeCount;n+=1)if(t.getRangeAt(n).intersectsNode(e.currentTarget))return}ie(a)}:void 0,onKeyDown:j?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),ie(a))}:void 0,children:E?(0,F.jsx)(`span`,{className:uq.copied,"aria-hidden":`true`,children:s}):t});return(0,F.jsxs)(`span`,{ref:d,className:n(uq.root,u&&uq.inline),onFocus:u?e=>{!i&&e.target.matches(`:focus-visible`)&&(A(),b(`open`))}:void 0,onBlur:u?e=>{e.currentTarget.contains(e.relatedTarget)||(re(),A(),te())}:void 0,onPointerEnter:e=>{i||u&&e.pointerType===`touch`||(A(),x?b(`open`):(re(),p.current=setTimeout(()=>{b(`open`)},r)))},onPointerLeave:()=>{re(),x&&ne()},onPointerDownCapture:ae,onClickCapture:ae,children:[(0,F.jsx)(pO.Provider,{value:k,children:e}),x&&!O&&j&&(0,F.jsx)(`span`,{className:uq.status,role:`status`,children:E?s:``}),oe!==!1&&(0,At.createPortal)(oe,document.body)]})}var vq={backdrop:`_backdrop_1hos8_1`,mask:`_mask_1hos8_11`,image:`_image_1hos8_18`,close:`_close_1hos8_29`};function yq({src:e,alt:t,labels:n,onClose:r}){let i=(0,P.useRef)(null),a=(0,P.useRef)(null);return(0,P.useEffect)(()=>{a.current=document.activeElement instanceof HTMLElement?document.activeElement:null,i.current?.focus();let e=e=>{e.key===`Escape`&&(e.stopPropagation(),r()),e.key===`Tab`&&(e.preventDefault(),i.current?.focus())};return window.addEventListener(`keydown`,e,!0),()=>{window.removeEventListener(`keydown`,e,!0),a.current?.focus()}},[r]),(0,At.createPortal)((0,F.jsxs)(`div`,{className:vq.backdrop,role:`dialog`,"aria-modal":`true`,"aria-label":n.dialog,children:[(0,F.jsx)(`div`,{className:vq.mask,"aria-hidden":`true`,onMouseDown:r}),(0,F.jsx)(`img`,{className:vq.image,src:e,alt:t}),(0,F.jsx)(`button`,{ref:i,type:`button`,className:vq.close,"aria-label":n.close,onClick:r,children:(0,F.jsx)(O,{size:16})})]}),document.body)}var bq={frame:`_frame_1hfzl_1`,image:`_image_1hfzl_11`,status:`_status_1hfzl_13`};function xq({src:e,alt:t,loadingLabel:n,failedLabel:r}){return(0,F.jsx)(Sq,{src:e,alt:t,loadingLabel:n,failedLabel:r},e)}function Sq({src:e,alt:t,loadingLabel:n,failedLabel:r}){let[i,a]=(0,P.useState)(`loading`);return(0,F.jsxs)(`span`,{className:bq.frame,children:[i!==`failed`&&(0,F.jsx)(`img`,{src:e,alt:t,loading:`lazy`,decoding:`async`,referrerPolicy:`no-referrer`,className:bq.image,"data-ready":i===`ready`||void 0,onLoad:()=>{a(`ready`)},onError:()=>{a(`failed`)}}),i!==`ready`&&(0,F.jsxs)(`span`,{className:bq.status,role:`status`,children:[i===`loading`&&(0,F.jsx)(se,{size:16}),(0,F.jsx)(`span`,{children:i===`loading`?n:r})]})]})}var Cq={markdown:`_markdown_1ypvv_5`,fileLink:`_fileLink_1ypvv_59`,fileMention:`_fileMention_1ypvv_85`,linkIcon:`_linkIcon_1ypvv_94`,tableScroll:`_tableScroll_1ypvv_192`,tableFill:`_tableFill_1ypvv_239`,imageAlt:`_imageAlt_1ypvv_287`,image:`_image_1ypvv_287`,compact:`_compact_1ypvv_331`,imageButton:`_imageButton_1ypvv_446`,previewName:`_previewName_1ypvv_458`};function wq(e){try{switch(new URL(e).protocol){case`http:`:case`https:`:case`mailto:`:return e;default:return``}}catch{return``}}function Tq(e){try{let t=new URL(e).protocol;return t===`http:`||t===`https:`?e:void 0}catch{return}}function Eq(e){try{let t=new URL(e).protocol;return t===`http:`||t===`https:`||t===`blob:`||t===`data:`||e.startsWith(`dsh-app://app/api/file?`)?e:void 0}catch{return}}function Dq(e,t){let n=Tq(wq(li(e)));if(n!==void 0)return n;let r=t?.resolve(e);return r===void 0?void 0:Eq(r)}function Oq(){return{definitions:new Map,footnotes:new Map}}function kq(e,t){for(let n of e){if(n.type===`definition`){let e=n.identifier.toUpperCase();t.definitions.has(e)||t.definitions.set(e,n)}else if(n.type===`footnoteDefinition`){let e=n.identifier.toUpperCase();t.footnotes.has(e)||t.footnotes.set(e,n)}`children`in n&&kq(n.children,t)}}function Aq(e,t){return e.map(e=>Pq(e.node,e.key,t)).filter(e=>e!==null)}function jq(e,t){let n=[];for(let r of e)(t||n.length>0)&&n.push(`
492
+ `),n.push(r);return t&&e.length>0&&n.push(`
493
+ `),n}function Mq(e,t){let n=[];for(let[r,i]of e.entries())if(i.type===`paragraph`)n.push({paragraph:Nq(i.children,t)});else{let e=Pq(i,r,t);e!==null&&n.push({element:e})}return n}function Nq(e,t){return e.map((e,n)=>Pq(e,n,t))}function Pq(e,t,n){switch(e.type){case`text`:return e.value;case`paragraph`:return(0,F.jsx)(`p`,{children:Nq(e.children,n)},t);case`heading`:return(0,P.createElement)(`h${e.depth}`,{key:t},...Nq(e.children,n));case`blockquote`:return(0,F.jsx)(`blockquote`,{children:jq(Nq(e.children,{...n,inBlockquote:!0}).filter(e=>e!==null),!0)},t);case`thematicBreak`:return(0,F.jsx)(`hr`,{},t);case`break`:return(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(`br`,{}),`
494
+ `]},t);case`strong`:return(0,F.jsx)(`strong`,{children:Nq(e.children,n)},t);case`emphasis`:return(0,F.jsx)(`em`,{children:Nq(e.children,n)},t);case`delete`:return(0,F.jsx)(`del`,{children:Nq(e.children,n)},t);case`inlineCode`:{let r=e.value.replace(/\r?\n|\r/g,` `),i=qq(r);if(i!==void 0)return(0,F.jsx)(`code`,{children:Uq(i,[r],`link`)},t);let a=n.inLink===!0?void 0:n.fileMentions?.resolve(r);return a===void 0?(0,F.jsx)(`code`,{children:r},t):(0,F.jsx)(`code`,{children:(0,F.jsxs)(`button`,{type:`button`,className:Cq.fileMention,title:a.title,"aria-label":a.label,onClick:a.open,children:[(0,F.jsx)(sq,{kind:tq(r),className:Cq.linkIcon}),r]})},t)}case`html`:return e.value;case`code`:return Fq(e,t,n);case`math`:return(0,F.jsx)(P.Fragment,{children:hK(e.value,!0)},t);case`inlineMath`:return(0,F.jsx)(P.Fragment,{children:hK(e.value,!1)},t);case`list`:return Rq(e,t,n);case`listItem`:return zq(e,Lq(e),t,n);case`table`:return Bq(e,t,n);case`link`:return Gq(e.url,Nq(e.children,{...n,inLink:!0}),t,!Hq(e.children),n.streaming);case`linkReference`:return Qq(e,t,n);case`image`:return Jq(e.url,e.alt??``,t,n);case`imageReference`:return $q(e,t,n);case`footnoteReference`:return eJ(e,t,n);case`definition`:case`footnoteDefinition`:return null;default:return null}}function Fq(e,t,n){let r=e.lang??void 0;if(e.value===``)return(0,F.jsx)(`pre`,{children:(0,F.jsx)(`code`,{className:r===void 0?void 0:`language-${r}`})},t);let i=r===void 0?void 0:/^[\w-]+/.exec(r)?.[0];return!n.streaming&&i===`math`?(0,F.jsx)(P.Fragment,{children:hK(`${e.value}\n`,!0)},t):(0,F.jsx)($z,{code:`${e.value}\n`,lang:i,streaming:n.streaming,copyLabel:n.labels.code.copyLabel,copiedLabel:n.labels.code.copiedLabel,toolbarLabels:n.labels.code.toolbarLabels},t)}function Iq(e){return(e.spread??!1)||e.children.some(Lq)}function Lq(e){return e.spread??e.children.length>1}function Rq(e,t,n){let r=Iq(e),i={};return typeof e.start==`number`&&e.start!==1&&(i.start=e.start),e.children.some(e=>typeof e.checked==`boolean`)&&(i.className=`contains-task-list`),(0,P.createElement)(e.ordered===!0?`ol`:`ul`,{key:t,...i},...e.children.map((e,t)=>zq(e,r,t,n)))}function zq(e,t,n,r){let i=Mq(e.children,r),a=typeof e.checked==`boolean`;if(a){let t=(0,F.jsx)(`input`,{type:`checkbox`,checked:e.checked===!0,disabled:!0},`task-checkbox`),n=i[0];n!==void 0&&`paragraph`in n?n.paragraph=n.paragraph.length>0?[t,` `,...n.paragraph]:[t]:i.unshift({paragraph:[t]})}let o=[];for(let[e,n]of i.entries()){let r=`paragraph`in n;(t||e!==0||!r)&&o.push(`
495
+ `),r?t?o.push((0,F.jsx)(`p`,{children:n.paragraph},`p-${e}`)):o.push((0,F.jsx)(P.Fragment,{children:n.paragraph},`p-${e}`)):o.push(n.element)}let s=i[i.length-1];return s!==void 0&&(t||!(`paragraph`in s))&&o.push(`
496
+ `),(0,F.jsx)(`li`,{className:a?`task-list-item`:void 0,children:o},n)}function Bq(e,t,r){let i=e.align??null,[a,...o]=e.children,s=(i===null?a?.children.length??0:i.length)>=4&&r.inBlockquote!==!0;return(0,F.jsx)(`div`,{className:n(Cq.tableScroll,s?`md-table-wide`:Cq.tableFill),tabIndex:s?0:void 0,children:(0,F.jsxs)(`table`,{children:[a!==void 0&&(0,F.jsx)(`thead`,{children:Vq(a,`th`,i,0,r)}),o.length>0&&(0,F.jsx)(`tbody`,{children:o.map((e,t)=>Vq(e,`td`,i,t+1,r))})]})},t)}function Vq(e,t,n,r,i){let a=n===null?e.children.length:n.length,o=[];for(let r=0;r<a;r++){let a=e.children[r],s=n?.[r];o.push((0,P.createElement)(t,{key:r,style:s==null?void 0:{textAlign:s}},...a===void 0?[]:Nq(a.children,i)))}return(0,F.jsx)(`tr`,{children:o},r)}function Hq(e){return e.length>0&&e.every(e=>e.type===`image`||e.type===`imageReference`)}function Uq(e,t,n,r=!0){let i=wq(e);return i===``?(0,F.jsx)(P.Fragment,{children:t},n):(0,F.jsx)(Wq,{href:i,glyph:r,children:t},n)}function Wq({href:e,glyph:t,children:n}){let{openExternalLink:r}=Qd(),i=[`http:`,`https:`].includes(new URL(e).protocol),a=i?r:void 0;return(0,F.jsxs)(`a`,{href:e,...i?{target:`_blank`,rel:`noopener noreferrer`}:{},onClick:a===void 0?void 0:t=>{t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),a(e))},children:[t&&(0,F.jsx)(sq,{kind:`url`,href:e,className:Cq.linkIcon}),n]})}function Gq(e,t,n,r=!0,i=!1){let a=i?void 0:$d(e);return a===void 0?Uq(li(e),t,n,r):(0,F.jsx)(Kq,{file:a,glyph:r,children:t},n)}function Kq({file:e,glyph:t,children:r}){let{openFile:i,fileImages:a}=Qd();if(i===void 0)return(0,F.jsx)(F.Fragment,{children:r});let o=t&&tq(e.path)===`image`?a:void 0,s=o?.resolve(e.path),c=(0,F.jsxs)(`button`,{type:`button`,className:n(Cq.fileMention,Cq.fileLink),title:s===void 0?e.path:void 0,onClick:()=>{i(e.path,e.line===void 0?void 0:{line:e.line})},children:[t&&(0,F.jsx)(sq,{kind:tq(e.path),className:Cq.linkIcon}),r]});return s===void 0||o===void 0?c:(0,F.jsx)(_q,{inline:!0,anchor:c,content:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(xq,{src:s,alt:e.path,loadingLabel:o.labels.loading,failedLabel:o.labels.failed}),(0,F.jsx)(`span`,{className:Cq.previewName,children:e.path.split(/[\\/]/u).pop()})]})})}function qq(e){if(e.trim()===e)try{let t=new URL(e).protocol;return t===`http:`||t===`https:`?e:void 0}catch{return}}function Jq(e,t,n,r){return(0,F.jsx)(Yq,{destination:e,alt:t,pathImages:r.pathImages,streaming:r.streaming,inLink:r.inLink===!0},`${n}:${e}`)}function Yq({destination:e,alt:t,pathImages:n,streaming:r,inLink:i}){let{fileImages:a}=Qd(),o=r?void 0:$d(e),s=(o===void 0?void 0:a?.resolve(o.path))??Dq(e,n);return s===void 0?(0,F.jsx)(`span`,{className:Cq.imageAlt,children:t}):(0,F.jsx)(Xq,{src:s,alt:t,destination:e,preview:i?void 0:a},s)}function Xq({src:e,alt:t,destination:n,preview:r}){let[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),c=(0,P.useCallback)(()=>{s(!1)},[]);if(i)return(0,F.jsxs)(`span`,{className:Cq.imageAlt,children:[r===void 0?``:`${r.labels.failed} · `,t||n]});let l=(0,F.jsx)(`img`,{className:Cq.image,src:e,alt:t,onError:()=>{a(!0)},loading:`lazy`,decoding:`async`,referrerPolicy:`no-referrer`});return r===void 0?l:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{type:`button`,className:Cq.imageButton,title:r.labels.open,"aria-label":t?`${r.labels.open}: ${t}`:r.labels.open,onClick:()=>{s(!0)},children:l}),o&&(0,F.jsx)(yq,{src:e,alt:t,labels:r.labels,onClose:c})]})}function Zq(e){return e.referenceType===`collapsed`?`][]`:e.referenceType===`full`?`][${e.label??e.identifier}]`:`]`}function Qq(e,t,n){let r=n.targets.definitions.get(e.identifier.toUpperCase());if(r===void 0)return(0,F.jsxs)(P.Fragment,{children:[`[`,Nq(e.children,n),Zq(e)]},t);let i=Nq(e.children,{...n,inLink:!0});return Gq(r.url,i,t,!Hq(e.children),n.streaming)}function $q(e,t,n){let r=n.targets.definitions.get(e.identifier.toUpperCase());return r===void 0?`![${e.alt??``}${Zq(e)}`:Jq(r.url,e.alt??``,t,n)}function eJ(e,t,n){let r=e.identifier.toUpperCase(),i=n.footnoteCounts.get(r);return i===void 0&&n.footnoteOrder.push(r),n.footnoteCounts.set(r,(i??0)+1),(0,F.jsx)(`sup`,{children:String(n.footnoteOrder.indexOf(r)+1)},t)}function tJ(e){let t=[];for(let n of e.footnoteOrder){let r=e.targets.footnotes.get(n);if(r===void 0)continue;let i=e.footnoteCounts.get(n)??0,a=[];for(let e=1;e<=i;e++)a.length>0&&a.push(` `),a.push(`↩`),e>1&&a.push((0,F.jsx)(`sup`,{children:String(e)},`re-${e}`));let o=Mq(r.children,e),s=o[o.length-1],c=o.map((e,t)=>`paragraph`in e?(0,F.jsxs)(`p`,{children:[e.paragraph,e===s&&(0,F.jsxs)(F.Fragment,{children:[` `,a]})]},`p-${t}`):e.element);s!==void 0&&`paragraph`in s||c.push(...a),t.push((0,F.jsx)(`li`,{id:`user-content-fn-${li(n.toLowerCase())}`,children:jq(c,!0)},n))}return t.length===0?null:(0,F.jsxs)(`section`,{"data-footnotes":!0,className:`footnotes`,children:[(0,F.jsx)(`h2`,{id:`footnote-label`,className:`sr-only`,children:e.labels.footnotes}),(0,F.jsx)(`ol`,{children:t})]},`footnotes`)}function nJ(e,t,n,r){let i=hj(e),a=Oq();kq(i.children,a);let o={streaming:!1,labels:t,fileMentions:n,pathImages:r,targets:a,footnoteOrder:[],footnoteCounts:new Map},s=jq(Aq(i.children.map((e,t)=>({node:e,key:e.position?.start.offset??-(t+1)})),o),!1),c=tJ(o);return c===null?s:[...s,`
497
+ `,c]}var rJ=class{labels;parser=new TA(mj);generation=-1;frozenCount=0;frozenElements=[];frozenTargets=Oq();frozenFootnoteOrder=[];frozenFootnoteCounts=new Map;lastText=null;lastRendered=[];constructor(e){this.labels=e}render(e){if(e===this.lastText)return this.lastRendered;let{frozen:t,tail:n,generation:r}=this.parser.update(e);r!==this.generation&&(this.generation=r,this.frozenCount=0,this.frozenElements=[],this.frozenTargets=Oq(),this.frozenFootnoteOrder=[],this.frozenFootnoteCounts=new Map);let i=t.slice(this.frozenCount);kq(i.map(e=>e.node),this.frozenTargets);let a={definitions:new Map(this.frozenTargets.definitions),footnotes:new Map(this.frozenTargets.footnotes)};if(kq(n.map(e=>e.node),a),i.length>0){let e={streaming:!0,labels:this.labels,fileMentions:void 0,pathImages:void 0,targets:a,footnoteOrder:this.frozenFootnoteOrder,footnoteCounts:this.frozenFootnoteCounts},n=[...this.frozenElements];for(let t of Aq(i,e))n.length>0&&n.push(`
498
+ `),n.push(t);this.frozenElements=n,this.frozenCount=t.length}let o={streaming:!0,labels:this.labels,fileMentions:void 0,pathImages:void 0,targets:a,footnoteOrder:[...this.frozenFootnoteOrder],footnoteCounts:new Map(this.frozenFootnoteCounts)},s=[...this.frozenElements];for(let e of Aq(n,o))s.length>0&&s.push(`
499
+ `),s.push(e);let c=tJ(o);return c!==null&&s.push(`
500
+ `,c),this.lastText=e,this.lastRendered=s,this.lastRendered}},iJ=(0,P.memo)(function({text:e,streaming:t=!1,labels:r,fileMentions:i,pathImages:a,variant:o=`body`}){let s=(0,P.useRef)(null),c=(0,P.useRef)(r),l=(0,P.useMemo)(()=>t?((s.current===null||c.current!==r)&&(s.current=new rJ(r),c.current=r),s.current.render(e)):(s.current=null,nJ(e,r,i,a)),[e,t,r,i,a]);return(0,F.jsx)(`div`,{className:n(Cq.markdown,o===`compact`&&Cq.compact),"data-markdown-variant":o===`compact`?o:void 0,children:l})});function aJ(e,t){throw Error(`${t}: unhandled ${JSON.stringify(e)}`)}function oJ(e,t){let n=e.nodes[t];if(n===void 0)throw Error(`layout: unknown node ${t}`);return n}function sJ(e,t){let n=oJ(e,t);if(n.kind!==`pane`)throw Error(`layout: ${t} is not a pane`);return n}function cJ(e,t){let n=oJ(e,t);if(n.kind!==`split`)throw Error(`layout: ${t} is not a split`);return n}function lJ(e,t){let n=e.tabs[t];if(n===void 0)throw Error(`layout: unknown tab ${t}`);return n}function uJ(e){if(e.host!==`float`||e.rect===void 0)throw Error(`layout: ${e.id} is not floating`);return e.rect}function dJ(e,t){let n=e.floats.indexOf(t);if(n<0)throw Error(`layout: floating pane ${t} is not in the z order`);return n}function fJ(e){let t=e.tabs[0];if(t===void 0||e.tabs.length!==1)throw Error(`layout: ${e.id} does not hold exactly one tab`);return t}function pJ(e,t){for(let n of Object.values(e.nodes))if(n.kind===`split`&&n.children.includes(t))return n}function mJ(e,t){for(let n of Object.values(e.nodes))if(n.kind===`pane`&&n.tabs.includes(t))return n;throw Error(`layout: tab ${t} has no pane`)}function hJ(e){let t=[],n=r=>{let i=oJ(e,r);if(i.kind===`pane`)t.push(i.id);else for(let e of i.children)n(e)};return n(e.rootId),t}function gJ(e){let t=e.reduce((e,t)=>e+t,0);if(!(t>0))throw Error(`layout: sizes must sum above zero`);return Math.abs(t-1)<1e-12?[...e]:e.map(e=>e/t)}function _J(e){return Object.entries(e)}function vJ(e){return Object.keys(e)}function yJ(e,t){let n={};for(let[r,i]of _J(e.nodes))r in t||(n[r]=i);for(let[e,r]of _J(t))r!==null&&(n[e]=r);return{...e,nodes:n}}function bJ(e,t){let n={};for(let[r,i]of _J(e.tabs))r in t||(n[r]=i);for(let[e,r]of _J(t))r!==null&&(n[e]=r);return{...e,tabs:n}}function xJ(e,t,n){let r=Math.max(0,Math.min(t,e.length));return[...e.slice(0,r),n,...e.slice(r)]}function SJ(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function CJ(e,t){let n=SJ(e,t);if(n.length!==0)return n[Math.max(0,t-1)]}function wJ(e,t,n){return{...e,tabs:t,activeTabId:n}}function TJ(e,t,n){let r=pJ(e,t);if(r===void 0){if(e.rootId!==t)throw Error(`layout: ${t} is neither rooted nor parented`);return{...e,rootId:n}}let i=r.children.map(e=>e===t?n:e);return yJ(e,{[r.id]:{...r,children:i}})}function EJ(e,t){let n=oJ(e,e.rootId);for(;n.kind===`split`;){let r=t(n);if(r===void 0)throw Error(`layout: split ${n.id} has no children`);n=oJ(e,r)}return n.id}function DJ(e){return EJ(e,e=>e.children[0])}function OJ(e){return EJ(e,e=>e.axis===`row`?e.children.at(-1):e.children[0])}function kJ(e,t){let n={};for(let r of t)n[r]=sJ(e,r).activeTabId;return{type:`restoreFocus`,activePaneId:e.activePaneId,floats:e.floats,paneActiveTabs:n}}function AJ(e,t){return[...e.filter(e=>e!==t),t]}function jJ(e,t){return e.activePaneId===t?{...e,activePaneId:DJ(e)}:e}function MJ(e){return{kind:`pane`,id:e,host:`dock`,tabs:[],activeTabId:void 0,rect:void 0}}function NJ(e,t){if(e.nodes[t]!==void 0)throw Error(`layout: node ${t} already exists`)}function PJ(e,t){if(e.tabs[t]!==void 0)throw Error(`layout: tab ${t} already exists`)}function FJ(e,t){if(sJ(e,t.paneId).host!==`dock`)throw Error(`layout: split requires a docked pane`);NJ(e,t.newPaneId);let n=MJ(t.newPaneId),r=pJ(e,t.paneId);if(r!==void 0&&r.axis===t.axis){let i=r.children.indexOf(t.paneId),a=t.direction===`after`?i+1:i,o=xJ(r.children,a,t.newPaneId),s=r.sizes.flatMap((e,t)=>t===i?[e/2,e/2]:[e]);return{state:yJ(e,{[t.newPaneId]:n,[r.id]:{...r,children:o,sizes:s}}),inverse:[{type:`merge`,paneId:t.newPaneId},{type:`resize`,splitId:r.id,sizes:r.sizes}]}}NJ(e,t.newSplitId);let i=TJ(e,t.paneId,t.newSplitId),a=t.direction===`after`?[t.paneId,t.newPaneId]:[t.newPaneId,t.paneId];return{state:yJ(i,{[t.newPaneId]:n,[t.newSplitId]:{kind:`split`,id:t.newSplitId,axis:t.axis,children:a,sizes:[.5,.5]}}),inverse:[{type:`merge`,paneId:t.newPaneId}]}}function IJ(e,t){let n=sJ(e,t.paneId);if(n.tabs.length>0)throw Error(`layout: merge requires an empty pane`);let r=kJ(e,[]);if(n.host===`float`){let i=dJ(e,t.paneId);return{state:jJ(yJ({...e,floats:SJ(e.floats,i)},{[t.paneId]:null}),t.paneId),inverse:[{type:`insertPane`,pane:n,tabs:[],attach:{mode:`float`,index:i}},r]}}let i=pJ(e,t.paneId);if(i===void 0)throw Error(`layout: the docked root pane cannot be merged`);let a=i.children.indexOf(t.paneId);if(i.children.length>2){let o=SJ(i.children,a),s=gJ(SJ(i.sizes,a));return{state:jJ(yJ(e,{[t.paneId]:null,[i.id]:{...i,children:o,sizes:s}}),t.paneId),inverse:[{type:`insertPane`,pane:n,tabs:[],attach:{mode:`child`,parentId:i.id,index:a,sizes:i.sizes}},r]}}let o=i.children[1-a];if(o===void 0)throw Error(`layout: merge found a split without a sibling`);return{state:jJ(yJ(TJ(e,i.id,o),{[t.paneId]:null,[i.id]:null}),t.paneId),inverse:[{type:`insertPane`,pane:n,tabs:[],attach:{mode:`wrap`,targetId:o,split:i}},r]}}function LJ(e,t){let n=sJ(e,t.paneId);if(n.host!==`dock`)throw Error(`layout: openTab requires a docked pane`);PJ(e,t.tab.id);let r=kJ(e,[n.id]);return{state:{...yJ(bJ(e,{[t.tab.id]:t.tab}),{[n.id]:wJ(n,xJ(n.tabs,t.index,t.tab.id),t.tab.id)}),activePaneId:n.id},inverse:[{type:`closeTab`,tabId:t.tab.id},r]}}function RJ(e,t){let n=sJ(e,t.paneId);if(n.host!==`dock`)throw Error(`layout: insertTab requires a docked pane`);PJ(e,t.tab.id);let r=kJ(e,[n.id]),i=xJ(n.tabs,t.index,t.tab.id);return{state:yJ(bJ(e,{[t.tab.id]:t.tab}),{[n.id]:wJ(n,i,n.activeTabId??t.tab.id)}),inverse:[{type:`closeTab`,tabId:t.tab.id},r]}}function zJ(e,t){let n=lJ(e,t.tabId),r=mJ(e,t.tabId),i=r.tabs.indexOf(t.tabId),a=kJ(e,[r.id]);if(r.host===`float`){let i=dJ(e,r.id);return{state:jJ(bJ(yJ({...e,floats:SJ(e.floats,i)},{[r.id]:null}),{[t.tabId]:null}),r.id),inverse:[{type:`insertPane`,pane:r,tabs:[n],attach:{mode:`float`,index:i}},a]}}let o=r.activeTabId===t.tabId?CJ(r.tabs,i):r.activeTabId;return{state:bJ(yJ(e,{[r.id]:wJ(r,SJ(r.tabs,i),o)}),{[t.tabId]:null}),inverse:[{type:`insertTab`,paneId:r.id,tab:n,index:i},a]}}function BJ(e,t){if(NJ(e,t.pane.id),t.pane.tabs.length!==t.tabs.length)throw Error(`layout: insertPane tab records do not match the pane`);if(t.pane.host===`dock`&&t.tabs.length>0)throw Error(`layout: insertPane returns a docked pane empty`);let n={};for(let r of t.tabs)PJ(e,r.id),n[r.id]=r;let r=t.tabs[0],i=r===void 0?[{type:`merge`,paneId:t.pane.id}]:[{type:`closeTab`,tabId:r.id},kJ(e,[])],a=t.attach;switch(a.mode){case`child`:{let r=cJ(e,a.parentId),o=xJ(r.children,a.index,t.pane.id);if(a.sizes.length!==o.length)throw Error(`layout: insertPane sizes do not match the split`);return i.push({type:`resize`,splitId:r.id,sizes:r.sizes}),{state:yJ(bJ(e,n),{[t.pane.id]:t.pane,[r.id]:{...r,children:o,sizes:a.sizes}}),inverse:i}}case`wrap`:if(!a.split.children.includes(t.pane.id))throw Error(`layout: insertPane wrap split does not list the pane`);return{state:yJ(bJ(TJ(e,a.targetId,a.split.id),n),{[t.pane.id]:t.pane,[a.split.id]:a.split}),inverse:i};case`float`:{if(t.pane.host!==`float`)throw Error(`layout: float attachment requires a floating pane`);let r=xJ(e.floats,a.index,t.pane.id);return{state:yJ(bJ({...e,floats:r},n),{[t.pane.id]:t.pane}),inverse:i}}default:return aJ(a,`layout: insertPane attachment`)}}function VJ(e,t){let n=mJ(e,t.tabId);if(n.host!==`dock`)throw Error(`layout: moveTab source must be docked; use unfloat`);let r=sJ(e,t.toPaneId);if(r.host!==`dock`)throw Error(`layout: moveTab target must be docked`);if(r.id===n.id)throw Error(`layout: moveTab across one pane; use reorderTab`);let i=n.tabs.indexOf(t.tabId),a=kJ(e,[n.id,r.id]),o=n.activeTabId===t.tabId?CJ(n.tabs,i):n.activeTabId;return{state:{...yJ(e,{[n.id]:wJ(n,SJ(n.tabs,i),o),[r.id]:wJ(r,xJ(r.tabs,t.index,t.tabId),t.tabId)}),activePaneId:r.id},inverse:[{type:`moveTab`,tabId:t.tabId,toPaneId:n.id,index:i},a]}}function HJ(e,t){let n=mJ(e,t.tabId),r=n.tabs.indexOf(t.tabId),i=xJ(SJ(n.tabs,r),t.index,t.tabId);return{state:yJ(e,{[n.id]:{...n,tabs:i}}),inverse:[{type:`reorderTab`,tabId:t.tabId,index:r}]}}function UJ(e,t){let n=mJ(e,t.tabId),r=kJ(e,[n.id]),i=yJ(e,{[n.id]:{...n,activeTabId:t.tabId}}),a=n.host===`float`?AJ(i.floats,n.id):i.floats;return{state:{...i,activePaneId:n.id,floats:a},inverse:[r]}}function WJ(e,t){let n=sJ(e,t.paneId),r=kJ(e,[]),i=n.host===`float`?AJ(e.floats,n.id):e.floats;return{state:{...e,activePaneId:n.id,floats:i},inverse:[r]}}function GJ(e,t){let n=cJ(e,t.splitId);if(t.sizes.length!==n.children.length)throw Error(`layout: resize sizes do not match the split`);if(t.sizes.some(e=>!(e>0)))throw Error(`layout: resize sizes must all be above zero`);return{state:yJ(e,{[n.id]:{...n,sizes:gJ(t.sizes)}}),inverse:[{type:`resize`,splitId:n.id,sizes:n.sizes}]}}function KJ(e,t){lJ(e,t.tabId);let n=mJ(e,t.tabId);if(n.host!==`dock`)throw Error(`layout: float requires a docked tab`);NJ(e,t.newPaneId);let r=n.tabs.indexOf(t.tabId),i=kJ(e,[n.id]),a=n.activeTabId===t.tabId?CJ(n.tabs,r):n.activeTabId,o=yJ(e,{[n.id]:wJ(n,SJ(n.tabs,r),a),[t.newPaneId]:{kind:`pane`,id:t.newPaneId,host:`float`,tabs:[t.tabId],activeTabId:t.tabId,rect:t.rect}});return{state:{...o,floats:[...o.floats,t.newPaneId],activePaneId:t.newPaneId},inverse:[{type:`unfloat`,paneId:t.newPaneId,toPaneId:n.id,index:r},i]}}function qJ(e,t){let n=sJ(e,t.paneId),r=uJ(n),i=fJ(n),a=sJ(e,t.toPaneId);if(a.host!==`dock`)throw Error(`layout: unfloat target must be docked`);let o=kJ(e,[a.id]);return{state:{...yJ({...e,floats:SJ(e.floats,dJ(e,t.paneId))},{[t.paneId]:null,[a.id]:wJ(a,xJ(a.tabs,t.index,i),i)}),activePaneId:a.id},inverse:[{type:`float`,tabId:i,newPaneId:t.paneId,rect:r},o]}}function JJ(e,t,n){let r=yJ(e,{[t.id]:{...t,rect:n}});return{...r,activePaneId:t.id,floats:AJ(r.floats,t.id)}}function YJ(e,t){let n=sJ(e,t.paneId),r=uJ(n);return{state:JJ(e,n,{...r,x:t.x,y:t.y}),inverse:[{type:`moveFloat`,paneId:t.paneId,x:r.x,y:r.y},kJ(e,[])]}}function XJ(e,t){let n=sJ(e,t.paneId),r=uJ(n);if(!(t.rect.width>0)||!(t.rect.height>0))throw Error(`layout: float size must be above zero`);return{state:JJ(e,n,t.rect),inverse:[{type:`resizeFloat`,paneId:t.paneId,rect:r},kJ(e,[])]}}function ZJ(e,t){let n=kJ(e,vJ(t.paneActiveTabs));for(let n of t.floats)if(sJ(e,n).host!==`float`)throw Error(`layout: restoreFocus lists docked pane ${n} as floating`);let r=e;for(let[e,n]of _J(t.paneActiveTabs)){let t=sJ(r,e);r=yJ(r,{[e]:{...t,activeTabId:n}})}return sJ(r,t.activePaneId),{state:{...r,activePaneId:t.activePaneId,floats:t.floats},inverse:[n]}}function QJ(e,t){switch(t.type){case`split`:return FJ(e,t);case`merge`:return IJ(e,t);case`openTab`:return LJ(e,t);case`insertTab`:return RJ(e,t);case`closeTab`:return zJ(e,t);case`insertPane`:return BJ(e,t);case`moveTab`:return VJ(e,t);case`reorderTab`:return HJ(e,t);case`focusTab`:return UJ(e,t);case`focusPane`:return WJ(e,t);case`resize`:return GJ(e,t);case`float`:return KJ(e,t);case`unfloat`:return qJ(e,t);case`moveFloat`:return YJ(e,t);case`resizeFloat`:return XJ(e,t);case`setExpanded`:return{state:{...e,expanded:t.expanded},inverse:[{type:`setExpanded`,expanded:e.expanded}]};case`setMode`:return{state:{...e,mode:t.mode},inverse:[{type:`setMode`,mode:e.mode}]};case`restoreFocus`:return ZJ(e,t);default:return aJ(t,`layout: operation`)}}function $J(e,t){return t.reduce((e,t)=>QJ(e,t).state,e)}var eY={entries:[],cursor:0},tY=new Set([`focusTab`,`focusPane`,`restoreFocus`]);function nY(e){return tY.has(e.type)}function rY(e,t){let n=e.entries[t];return n!==void 0&&n.ops.every(nY)}function iY(e){return e.cursor>0}function aY(e){return e.cursor<e.entries.length}function oY(e){return e.entries.flatMap(e=>e.ops)}function sY(e,t,n){if(n.length===0)return{history:e,state:t};let r=t,i=[];for(let e of n){let t=QJ(r,e);r=t.state,i.unshift(...t.inverse)}return{history:{entries:[...e.cursor===e.entries.length?e.entries:e.entries.slice(0,e.cursor),{ops:n,inverse:i}],cursor:e.cursor+1},state:r}}function cY(e,t){if(!iY(e))return;let n=1;if(rY(e,e.cursor-1))for(;rY(e,e.cursor-1-n);)n+=1;let r=t;for(let t of e.entries.slice(e.cursor-n,e.cursor).reverse())for(let e of t.inverse)r=QJ(r,e).state;return{history:{entries:e.entries,cursor:e.cursor-n},state:r}}function lY(e,t){if(!aY(e))return;let n=1;if(rY(e,e.cursor))for(;rY(e,e.cursor+n);)n+=1;let r=t;for(let t of e.entries.slice(e.cursor,e.cursor+n))for(let e of t.ops)r=QJ(r,e).state;return{history:{entries:e.entries,cursor:e.cursor+n},state:r}}var uY=class{current;recorded=eY;constructor(e){this.current=e}get state(){return this.current}get history(){return this.recorded}get ops(){return oY(this.recorded)}get cursor(){return this.recorded.cursor}get canUndo(){return iY(this.recorded)}get canRedo(){return aY(this.recorded)}dispatch(e){return this.dispatchAll([e])}dispatchAll(e){let t=sY(this.recorded,this.current,e);return this.recorded=t.history,this.current=t.state,this.current}undo(){let e=cY(this.recorded,this.current);return e!==void 0&&(this.recorded=e.history,this.current=e.state,!0)}redo(){let e=lY(this.recorded,this.current);return e!==void 0&&(this.recorded=e.history,this.current=e.state,!0)}},dY=.12,fY={width:380,height:300},pY={width:220,height:140},mY=.25;function hY(e){return hJ(e).length}function gY(e){return hY(e)<4}function _Y(e,t,n=mY){let r=`left`,i=e;return 1-e<i&&(r=`right`,i=1-e),t<i&&(r=`top`,i=t),1-t<i&&(r=`bottom`,i=1-t),i<n?r:`center`}function vY(e){switch(e){case`center`:return;case`left`:return{axis:`row`,direction:`before`};case`right`:return{axis:`row`,direction:`after`};case`top`:return{axis:`column`,direction:`before`};case`bottom`:return{axis:`column`,direction:`after`};default:return aJ(e,`layout: dock zone`)}}function yY(e,t=dY){if(e.length===0)return[];let n=Math.min(t,1/e.length),r=e.map(e=>e>0?e:0),i=r.reduce((e,t)=>e+t,0),a=i>0?r.map(e=>e/i):r.map(()=>1/e.length),o=new Set;for(;;){let e=a.flatMap((e,t)=>!o.has(t)&&e<n?[t]:[]);if(e.length===0)return a;for(let t of e)o.add(t);let t=1-o.size*n,r=a.reduce((e,t,n)=>o.has(n)?e:e+t,0);a=a.map((e,i)=>o.has(i)?n:e/r*t)}}function bY(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function xY(e,t,n,r=mY){return!(e.width>0)||!(e.height>0)?`center`:_Y((t-e.x)/e.width,(n-e.y)/e.height,r)}function SY(e,t){let n=0;for(let r of e){if(t<r.x+r.width/2)break;n+=1}return n}var CY={divider:0,chip:100,body:48};function wY(e,t=CY){let{pane:n,strip:r}=e;if(!(n.width>0)||!(n.height>0)||!(r.width>0))return{row:!0,column:!0};let i=Math.max(0,n.width-r.width),a=Math.max(0,r.width-e.chipsWidth-e.fillWidth-(e.splitControlWidth??0)),o=(n.width-t.divider)/2-i,s=(n.height-t.divider)/2-i;return{row:o>=a+t.chip,column:s>=r.height+t.body}}function TY(e,t,n,r){return Math.abs(n-e)>=4||Math.abs(r-t)>=4}function EY(e,t,n){let r=e[t],i=e[t+1];if(r===void 0||i===void 0)return[...e];let a=[...e];return a[t]=r+n,a[t+1]=i-n,a}function DY(e,t,n){return{...e,x:e.x+t,y:e.y+n}}function OY(e,t,n,r){return{...e,width:Math.max(r.width,e.width+t),height:Math.max(r.height,e.height+n)}}function kY(e,t,n){return{x:Math.max(0,e-AY.x),y:Math.max(0,t-AY.y),...n}}var AY={x:60,y:14},jY=24,MY={x:160,y:120},NY=[];function PY(e,t,n,r){for(let i of sJ(e,t).tabs){let t=e.tabs[i];if(t?.contentId===n&&(r===void 0||t.kind===r))return i}}function FY(e,t,n){for(let r of[...hJ(e),...e.floats]){let i=PY(e,r,t,n);if(i!==void 0)return i}}function IY(e){let t=sJ(e,e.activePaneId);return t.host===`dock`?t.id:DJ(e)}function LY(e,t,n,r){return e.host===`float`?{type:`unfloat`,paneId:e.id,toPaneId:n,index:r}:{type:`moveTab`,tabId:t,toPaneId:n,index:r}}function RY(e,t){return e.expanded===t?NY:[{type:`setExpanded`,expanded:t}]}function zY(e,t){return e.mode===t?NY:[{type:`setMode`,mode:t}]}function BY(e,t,n,r){if(!gY(e))return NY;let i=n??IY(e);if(sJ(e,i).host!==`dock`)return NY;let a=t(`pane`),o=[{type:`split`,paneId:i,axis:`row`,direction:`after`,newPaneId:a,newSplitId:t(`split`)}],s=r?.(t(`tab`));return s!==void 0&&o.push({type:`openTab`,paneId:a,tab:s,index:0}),o}function VY(e,t,n,r){if(r===void 0)return NY;let i=sJ(e,n);return i.host===`dock`?[{type:`openTab`,paneId:n,tab:r(t(`tab`)),index:i.tabs.length}]:NY}function HY(e,t,n){let r=n.revealIfOpened===!1?void 0:FY(e,n.contentId,n.kind);if(r!==void 0)return{ops:[{type:`focusTab`,tabId:r}],tabId:r};let i=n.paneId??IY(e),a={id:t(`tab`),kind:n.kind,contentId:n.contentId,title:n.title};return{ops:[{type:`openTab`,paneId:i,tab:a,index:n.index??sJ(e,i).tabs.length}],tabId:a.id}}function UY(e,t,n){let r=lJ(e,n),i=mJ(e,n),a=i.host===`dock`?i.id:IY(e),o=i.host===`dock`?i.tabs.indexOf(n)+1:sJ(e,a).tabs.length,s={...r,id:t(`tab`)};return{ops:[{type:`openTab`,paneId:a,tab:s,index:o}],tabId:s.id}}function WY(e,t,n,r){let i=mJ(e,t);if(sJ(e,n).host!==`dock`)return NY;if(i.id===n){let e=i.tabs.indexOf(t),n=r>e?r-1:r;return n===e?NY:[{type:`reorderTab`,tabId:t,index:n}]}return[LY(i,t,n,r)]}function GY(e,t,n,r,i,a){let o=mJ(e,n),s=sJ(e,r);if(s.host!==`dock`)return NY;let c=vY(i);if(c===void 0)return o.id===r?NY:[LY(o,n,r,s.tabs.length)];let l=o.id===r&&o.tabs.length===1;if(l&&a===void 0||!gY(e))return NY;let u=t(`pane`),d=[{type:`split`,paneId:r,axis:c.axis,direction:c.direction,newPaneId:u,newSplitId:t(`split`)}];return l&&a!==void 0&&d.push({type:`openTab`,paneId:r,tab:a(t(`tab`)),index:o.tabs.length}),d.push(LY(o,n,u,0)),d}function KY(e,t,n,r){let i=e.floats.length*jY,a=t(`float`);return{ops:[{type:`float`,tabId:n,newPaneId:a,rect:r??{x:MY.x+i,y:MY.y+i,width:fY.width,height:fY.height}}],paneId:a}}function qY(e,t,n){let r=n??IY(e);return[{type:`unfloat`,paneId:t,toPaneId:r,index:sJ(e,r).tabs.length}]}function JY(e,t,n){return[{type:`resize`,splitId:e,sizes:yY(t,n)}]}function YY(e,t,n){let r=[],i=e;for(;;){let e=hJ(i).find(e=>e!==i.rootId&&sJ(i,e).tabs.length===0);if(e===void 0)break;let t={type:`merge`,paneId:e};r.push(t),i=QJ(i,t).state}let a=oJ(i,i.rootId);return a.kind===`pane`&&a.tabs.length===0&&n!==void 0&&r.push({type:`openTab`,paneId:a.id,tab:n(t(`tab`)),index:0}),r}function XY(e=0){let t=e;return{next:(e=>(t+=1,`${e}${t}`))}}function ZY(e,t,n=`push`){let r=e.next(`pane`),i=t?.(e.next(`tab`));return{nodes:{[r]:{kind:`pane`,id:r,host:`dock`,tabs:i===void 0?[]:[i.id],activeTabId:i?.id,rect:void 0}},tabs:i===void 0?{}:{[i.id]:i},rootId:r,floats:[],activePaneId:r,expanded:!1,mode:n}}var QY=class{minter;sequencer;listeners=new Set;makePaneTab;snapshot;constructor(e={}){this.minter=XY(),this.makePaneTab=e.makePaneTab,this.sequencer=new uY(ZY(this.minter,e.makeInitialTab,e.mode)),this.snapshot=this.buildSnapshot()}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.snapshot;get ops(){return this.sequencer.ops}buildSnapshot(){let e=this.sequencer.state;return{state:e,canUndo:this.sequencer.canUndo,canRedo:this.sequencer.canRedo,canSplit:gY(e),opCount:this.sequencer.ops.length,cursor:this.sequencer.cursor}}commit(){this.snapshot=this.buildSnapshot();for(let e of[...this.listeners])e()}get state(){return this.sequencer.state}get mint(){return this.minter.next}run(e,t=!1){if(e.length===0)return!1;if(t){let t=$J(this.state,e);e=[...e,...YY(t,this.mint,t.floats.length>0?this.makePaneTab:void 0)]}return this.sequencer.dispatchAll(e),this.commit(),!0}setExpanded(e){this.run(RY(this.state,e))}toggleExpanded(){this.setExpanded(!this.state.expanded)}setMode(e){this.run(zY(this.state,e))}splitPane(e){return this.run(BY(this.state,this.mint,e,this.makePaneTab))}addTab(e){return this.run(VY(this.state,this.mint,e,this.makePaneTab))}openContent(e){let t=HY(this.state,this.mint,e);return this.run(t.ops),t.tabId}duplicateTab(e){let t=UY(this.state,this.mint,e);return this.run(t.ops),t.tabId}closeTab(e){this.run([{type:`closeTab`,tabId:e}],!0)}focusTab(e){this.run([{type:`focusTab`,tabId:e}])}focusPane(e){this.run([{type:`focusPane`,paneId:e}])}reorderTab(e,t){this.run([{type:`reorderTab`,tabId:e,index:t}])}placeTab(e,t,n){return this.run(WY(this.state,e,t,n),!0)}dropTab(e,t,n){return this.run(GY(this.state,this.mint,e,t,n),!0)}floatTab(e,t){let n=KY(this.state,this.mint,e,t);return this.run(n.ops,!0),n.paneId}unfloatPane(e,t){this.run(qY(this.state,e,t))}moveFloat(e,t,n){this.run([{type:`moveFloat`,paneId:e,x:t,y:n}])}resizeFloat(e,t){this.run([{type:`resizeFloat`,paneId:e,rect:t}])}resizeSplit(e,t){this.run(JY(e,t))}undo(){return this.sequencer.undo()?(this.commit(),!0):!1}redo(){return this.sequencer.redo()?(this.commit(),!0):!1}activeDockPaneId(){return IY(this.state)}},$Y={x:0,y:0,width:0,height:0},eX={row:!0,column:!0};function tX(e){return e===null?$Y:e.getBoundingClientRect()}function nX(e){let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function rX(e){let t=[];for(let n of e.querySelectorAll(`[data-dockkit-pane]`)){let e=n.dataset.dockkitPane;e!==void 0&&t.push([e,n])}return t}function iX(e){let t=e.querySelector(`[data-dockkit-tab]`);if(t===null)return CY.chip;let n=getComputedStyle(t),r=nX(n.minWidth);return r<=0?CY.chip:n.boxSizing===`border-box`?r:r+nX(n.paddingLeft)+nX(n.paddingRight)+nX(n.borderLeftWidth)+nX(n.borderRightWidth)}function aX(e){let t=e.querySelector(`[data-dockkit-divider]`);if(t===null)return CY.divider;let{width:n,height:r}=t.getBoundingClientRect(),i=Math.min(n,r);return i>0?i:CY.divider}function oX(e){let t=e.querySelector(`[data-dockkit-split-button]`);if(t===null)return 0;let n=t.getBoundingClientRect().width;if(!(n>0))return 0;let r=e.querySelector(`[data-dockkit-strip]`);return n+(r===null?0:nX(getComputedStyle(r).columnGap))}function sX(e,t=!1){let n={divider:aX(e),chip:iX(e),body:CY.body},r=new Map;for(let[i,a]of rX(e))r.set(i,wY({pane:tX(a),strip:tX(a.querySelector(`[data-dockkit-strip]`)),chipsWidth:tX(a.querySelector(`[data-dockkit-strip-tabs]`)).width,fillWidth:tX(a.querySelector(`[data-dockkit-strip-fill]`)).width,splitControlWidth:t?oX(a):0},n));return r}function cX(e,t){return e.get(t)??eX}function lX(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e){let e=t.get(n);if(e===void 0||e.row!==r.row||e.column!==r.column)return!1}return!0}function uX(e,t){typeof e.setPointerCapture==`function`&&e.setPointerCapture(t)}function dX(e,t,n){uX(e,t);let r=new AbortController,{signal:i}=r;e.dataset.dockkitPointer=String(t),i.addEventListener(`abort`,()=>{e.dataset.dockkitPointer===String(t)&&delete e.dataset.dockkitPointer},{once:!0});let a=e=>e.pointerId===t;return window.addEventListener(`pointermove`,e=>{a(e)&&n.move(e)},{signal:i}),window.addEventListener(`pointerup`,e=>{a(e)&&(r.abort(),n.up(e))},{signal:i}),window.addEventListener(`pointercancel`,e=>{a(e)&&(r.abort(),n.cancel())},{signal:i}),()=>{r.abort()}}function fX(e){let t=(0,P.useRef)(void 0);return(0,P.useEffect)(()=>()=>{t.current?.stop()},[]),(n,r,i)=>{t.current?.end();let a=()=>{t.current=void 0,e()},o=dX(n,r,{move:i.move,up:e=>{a(),i.up(e)},cancel:a});t.current={stop:o,end:()=>{o(),a()}}}}var pX=new WeakMap,mX=new Set([`Tab`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);function hX(e,t){pX.get(e)?.();let n=()=>{e.removeAttribute(`data-dsh-automatic-focus`),e.removeEventListener(`blur`,n),e.removeEventListener(`keydown`,r,!0),pX.delete(e)},r=e=>{e.isComposing||e.ctrlKey||e.altKey||e.metaKey||!mX.has(e.key)||n()};pX.set(e,n),e.setAttribute(`data-dsh-automatic-focus`,``),e.addEventListener(`blur`,n),e.addEventListener(`keydown`,r,!0),e.focus(t),e.matches(`:focus`)||n()}function gX(e){let t=!1,n=!1,r=()=>{t=!0},i=()=>{t=!1,n=!0},a=()=>{n=!1},o=()=>{t=!1,n=!1};return e.addEventListener(`compositionstart`,r,!0),e.addEventListener(`compositionend`,i,!0),e.addEventListener(`keyup`,a,!0),e.defaultView?.addEventListener(`blur`,o),{guards:e=>{let r=t||n||e.isComposing||e.keyCode===229;return n=!1,r},dispose:()=>{e.removeEventListener(`compositionstart`,r,!0),e.removeEventListener(`compositionend`,i,!0),e.removeEventListener(`keyup`,a,!0),e.defaultView?.removeEventListener(`blur`,o)}}}var _X=new WeakMap,vX=`button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], [tabindex="0"]`;function yX(e,t,n){let r=(0,P.useRef)(n);r.current=n,(0,P.useLayoutEffect)(()=>{let n=e.current;if(!t||n===null)return;let i=n.ownerDocument,a=gX(i),o=i.activeElement,s=_X.get(i)??[];_X.set(i,s);let c={element:n,close:()=>{r.current()}};s.push(c);let l=n.querySelector(`[data-modal-autofocus]`)??n.querySelector(vX)??n;n.contains(i.activeElement)||hX(l);let u=e=>{let t=a.guards(e);if(s.at(-1)!==c||e.defaultPrevented||t||e.ctrlKey||e.altKey||e.metaKey||(e.key===`Escape`&&!e.shiftKey&&(e.preventDefault(),e.repeat||r.current()),e.key!==`Tab`)||i.activeElement?.closest(`[role="menu"]`))return;let o=[...n.querySelectorAll(vX)].filter(e=>!e.closest(`[inert], [hidden]`)),l=o[0]??n,u=o.at(-1)??n,d=e.shiftKey?i.activeElement===l:i.activeElement===u;(i.activeElement===n||!n.contains(i.activeElement)||d)&&(e.preventDefault(),(e.shiftKey?u:l).focus())};return i.addEventListener(`keydown`,u),()=>{a.dispose();let e=s.at(-1)===c;if(s.splice(s.indexOf(c),1),i.removeEventListener(`keydown`,u),s.length===0&&_X.delete(i),e){let e=o instanceof HTMLElement&&o.isConnected?o:s.at(-1)?.element;e!==void 0&&hX(e)}}},[e,t])}var bX={split:`_split_1s7ij_17`,splitRow:`_splitRow_1s7ij_24`,splitColumn:`_splitColumn_1s7ij_28`,splitCell:`_splitCell_1s7ij_32`,divider:`_divider_1s7ij_39`,surface:`_surface_1s7ij_125`,tabLayout:`_tabLayout_1s7ij_134`,tabCell:`_tabCell_1s7ij_142`,emptyTabHost:`_emptyTabHost_1s7ij_143`,floatingCell:`_floatingCell_1s7ij_156`,tabHost:`_tabHost_1s7ij_162`,float:`_float_1s7ij_156`,tabHostHeader:`_tabHostHeader_1s7ij_177`,tabHostBody:`_tabHostBody_1s7ij_181`,tabLayoutDivider:`_tabLayoutDivider_1s7ij_186`,pane:`_pane_1s7ij_209`,tabStrip:`_tabStrip_1s7ij_237`,stripTabs:`_stripTabs_1s7ij_257`,stripFill:`_stripFill_1s7ij_288`,stripChrome:`_stripChrome_1s7ij_296`,paneBody:`_paneBody_1s7ij_318`,slot:`_slot_1s7ij_327`,tabActive:`_tabActive_1s7ij_346`,slotCaret:`_slotCaret_1s7ij_346`,tab:`_tab_1s7ij_134`,tabTitle:`_tabTitle_1s7ij_389`,floatTitle:`_floatTitle_1s7ij_409`,tabClose:`_tabClose_1s7ij_417`,addTab:`_addTab_1s7ij_449`,tabQuiet:`_tabQuiet_1s7ij_488`,tabDragging:`_tabDragging_1s7ij_505`,iconButton:`_iconButton_1s7ij_511`,menu:`_menu_1s7ij_547`,menuItem:`_menuItem_1s7ij_561`,empty:`_empty_1s7ij_143`,dockScrim:`_dockScrim_1s7ij_599`,dockScrimIn:`_dockScrimIn_1s7ij_1`,dockHint:`_dockHint_1s7ij_601`,dockHintCard:`_dockHintCard_1s7ij_606`,dockHintIn:`_dockHintIn_1s7ij_1`,dockHintLabel:`_dockHintLabel_1s7ij_694`,floatHeader:`_floatHeader_1s7ij_765`,dockGlyph:`_dockGlyph_1s7ij_782`,floatBody:`_floatBody_1s7ij_787`,floatResize:`_floatResize_1s7ij_797`},xX=4;function SX(e,t){let n=e.getBoundingClientRect(),r=t.offsetWidth,i=n.left+r+xX>window.innerWidth?Math.max(xX,n.right-r):n.left;return{top:n.bottom+xX,left:i}}function CX({labels:e,anchor:t,onClose:n,onDismiss:r,extras:i}){let a=(0,P.useRef)(null),[o,s]=(0,P.useState)(void 0),c=n!==void 0||P.Children.toArray(i).some(e=>e!==``);return(0,P.useLayoutEffect)(()=>{a.current!==null&&s(SX(t,a.current))},[t,c]),(0,P.useEffect)(()=>{let e=a.current;if(e===null)return;let n=e.ownerDocument,i=gX(n),o=a=>{if(i.guards(a)||a.defaultPrevented||a.key!==`Escape`||a.ctrlKey||a.altKey||a.metaKey||a.shiftKey||[...n.querySelectorAll(`[role="dialog"][aria-modal="true"], [role="menu"]`)].at(-1)!==e||(a.preventDefault(),a.repeat))return;let o=e.contains(n.activeElement);r(),o&&hX(t)};n.addEventListener(`keydown`,o,!0);let s=t=>{t.target instanceof Node&&e.contains(t.target)||r()};return window.addEventListener(`pointerdown`,s,!0),()=>{i.dispose(),n.removeEventListener(`keydown`,o,!0),window.removeEventListener(`pointerdown`,s,!0)}},[t,r,c]),c?(0,At.createPortal)((0,F.jsxs)(Op,{className:bX.menu,ref:a,role:`menu`,"data-dockkit-tab-menu":!0,style:o??{visibility:`hidden`,top:0,left:0},onPointerDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation()},children:[n!==void 0&&(0,F.jsx)(`button`,{type:`button`,role:`menuitem`,className:bX.menuItem,"data-dockkit-menu-close":!0,onClick:n,children:e.closeTab}),i]}),document.body):null}function wX(e){e.scrollWidth>e.clientWidth+1?e.dataset.dockkitTabClipped=``:delete e.dataset.dockkitTabClipped}function TX({children:e}){let t=(0,P.useRef)(null);return(0,P.useLayoutEffect)(()=>{t.current!==null&&wX(t.current)}),(0,P.useLayoutEffect)(()=>{let e=t.current;if(e===null||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>{wX(e)});return n.observe(e),()=>{n.disconnect()}},[]),(0,F.jsx)(`span`,{ref:t,className:bX.tabTitle,"data-dockkit-tab-title":!0,children:e})}var EX=`M9.67272 0.522841C10.8339 0.522841 11.76 0.522714 12.4963 0.602493C13.2453 0.683657 13.8789 0.854248 14.4264 1.25197C14.7504 1.48739 15.0355 1.77247 15.2709 2.0965C15.6686 2.64394 15.8392 3.27758 15.9204 4.02655C16.0002 4.7629 16 5.68895 16 6.85014V9.14986C16 10.3111 16.0002 11.2371 15.9204 11.9735C15.8392 12.7224 15.6686 13.3561 15.2709 13.9035C15.0355 14.2275 14.7504 14.5126 14.4264 14.748C13.8789 15.1458 13.2453 15.3163 12.4963 15.3975C11.76 15.4773 10.8339 15.4772 9.67272 15.4772H6.3273C5.16611 15.4772 4.24006 15.4773 3.50371 15.3975C2.75474 15.3163 2.1211 15.1458 1.57366 14.748C1.24963 14.5126 0.964549 14.2275 0.729131 13.9035C0.331407 13.3561 0.160817 12.7224 0.0796529 11.9735C-0.000126137 11.2371 1.25338e-09 10.3111 1.25338e-09 9.14986V6.85014C1.25329e-09 5.68895 -0.000126137 4.7629 0.0796529 4.02655C0.160817 3.27758 0.331407 2.64394 0.729131 2.0965C0.964549 1.77247 1.24963 1.48739 1.57366 1.25197C2.1211 0.854248 2.75474 0.683657 3.50371 0.602493C4.24006 0.522714 5.16611 0.522841 6.3273 0.522841H9.67272ZM4.1828 14.0873L5.54303 14.1118C5.78636 14.1128 6.04709 14.1169 6.3273 14.1169H9.67272C10.8639 14.1169 11.7032 14.1164 12.3493 14.0465C12.9824 13.9779 13.3497 13.8494 13.6268 13.6482C13.8354 13.4966 14.0195 13.3125 14.1711 13.1039C14.3723 12.8268 14.5007 12.4595 14.5693 11.8264C14.6393 11.1803 14.6398 10.341 14.6398 9.14986V6.85014C14.6398 5.65896 14.6393 4.81967 14.5693 4.1736C14.5007 3.54048 14.3723 3.17318 14.1711 2.89609C14.0195 2.68747 13.8354 2.50337 13.6268 2.35179C13.3497 2.1506 12.9824 2.02212 12.3493 1.95353C11.7032 1.88358 10.8639 1.88307 9.67272 1.88307H6.3273C6.04709 1.88307 5.78636 1.8862 5.54303 1.88715L4.1828 1.91166C3.99125 1.9216 3.8148 1.93577 3.65076 1.95353C3.01764 2.02212 2.65034 2.1506 2.37325 2.35179C2.16463 2.50337 1.98052 2.68747 1.82895 2.89609C1.62776 3.17318 1.49928 3.54048 1.43069 4.1736C1.36074 4.81967 1.36023 5.65896 1.36023 6.85014V9.14986C1.36023 10.341 1.36074 11.1803 1.43069 11.8264C1.49928 12.4595 1.62776 12.8268 1.82895 13.1039C1.98052 13.3125 2.16463 13.4966 2.37325 13.6482C2.65034 13.8494 3.01764 13.9779 3.65076 14.0465C3.81478 14.0642 3.99127 14.0774 4.1828 14.0873Z`;function DX(){return(0,F.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M13.5 1.5H2.5C1.94772 1.5 1.5 1.94772 1.5 2.5V13.5C1.5 14.0523 1.94772 14.5 2.5 14.5H13.5C14.0523 14.5 14.5 14.0523 14.5 13.5V2.5C14.5 1.94772 14.0523 1.5 13.5 1.5Z`,stroke:`currentColor`}),(0,F.jsx)(`path`,{d:`M8 1.5V14.5`,stroke:`currentColor`})]})}var OX={center:`M4.56 3.48H11.44A1.6 1.6 0 0 1 13.04 5.08V10.92A1.6 1.6 0 0 1 11.44 12.52H4.56A1.6 1.6 0 0 1 2.96 10.92V5.08A1.6 1.6 0 0 1 4.56 3.48Z`,left:`M4 0.523H8V15.477H4A4 4 0 0 1 0 11.477V4.523A4 4 0 0 1 4 0.523Z`,right:`M8 0.523H12A4 4 0 0 1 16 4.523V11.477A4 4 0 0 1 12 15.477H8Z`,top:`M0 8V4.523A4 4 0 0 1 4 0.523H12A4 4 0 0 1 16 4.523V8Z`,bottom:`M0 8H16V11.477A4 4 0 0 1 12 15.477H4A4 4 0 0 1 0 11.477Z`};function kX({zone:e}){return(0,F.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:EX,fill:`currentColor`}),(0,F.jsx)(`path`,{d:OX[e],fill:`currentColor`})]})}function AX({zone:e,active:t,labels:n}){return(0,F.jsx)(`div`,{className:bX.dockHint,"data-dockkit-dock-zone":e,"data-dockkit-drop-active":t||void 0,children:(0,F.jsxs)(`div`,{className:bX.dockHintCard,children:[(0,F.jsx)(kX,{zone:e}),(0,F.jsx)(`span`,{className:bX.dockHintLabel,children:n.dropZone[e]})]})})}function jX(e,t,n){let r=t.length,i=t.indexOf(n);switch(e){case`ArrowLeft`:return t[(i-1+r)%r];case`ArrowRight`:return t[(i+1)%r];case`Home`:return t[0];case`End`:return t.at(-1);default:return}}function MX(e){return e===`Enter`||e===` `}function NX(e){let t=e.scrollLeft>1,n=e.scrollLeft+e.clientWidth<e.scrollWidth-1;if(t&&n)return`start end`;if(t)return`start`;if(n)return`end`}function PX(e,t){(0,P.useLayoutEffect)(()=>{let t=e.current;if(t===null)return;let n=()=>{let e=NX(t);e===void 0?delete t.dataset.dockkitStripScroll:t.dataset.dockkitStripScroll=e};n(),t.addEventListener(`scroll`,n,{passive:!0});let r=typeof ResizeObserver>`u`?void 0:new ResizeObserver(n);return r?.observe(t),()=>{t.removeEventListener(`scroll`,n),r?.disconnect()}},[e,t])}function FX(e,t,n,r){(0,P.useLayoutEffect)(()=>{let n=e.current,i=r===void 0?void 0:t.get(r);if(n===null||i===void 0)return;let a=n.getBoundingClientRect(),o=i.getBoundingClientRect();o.left<a.left?n.scrollLeft+=o.left-a.left-IX:o.right>a.right&&(n.scrollLeft+=o.right-a.right+IX)},[e,t,n,r])}var IX=24;function LX(e,t){switch(t){case`budget`:return e.splitPaneDisabled;case`width`:return e.splitPaneNarrow}}function RX({state:e,pane:t,callbacks:r}){let[i,a]=(0,P.useState)(void 0),[o]=(0,P.useState)(()=>new Map),s=(0,P.useRef)(null);PX(s,t.tabs),FX(s,o,t.tabs,t.activeTabId);let c=r.splitBlock(t.id),l=r.dropTarget,u=l!==void 0&&l.kind===`strip`&&l.paneId===t.id?l.index:void 0,d=n=>{(e.activePaneId!==t.id||t.activeTabId!==n)&&r.onFocusTab(n)},f=e=>{let t=o.get(e);t!==void 0&&t.focus()};return(0,F.jsxs)(`div`,{className:bX.tabStrip,role:`tablist`,"data-dockkit-strip":t.id,"data-window-drag":e.floats.length===0||void 0,children:[(0,F.jsxs)(`div`,{ref:s,className:bX.stripTabs,role:`presentation`,"data-dockkit-strip-tabs":t.id,children:[t.tabs.map((s,c)=>{let l=lJ(e,s),p=s===t.activeTabId,m=r.canCloseTab(s),h=!m&&t.tabs.length===1;return(0,F.jsxs)(P.Fragment,{children:[(c>0||u===c)&&(0,F.jsx)(`div`,{className:n(bX.slot,u===c&&bX.slotCaret),"data-dockkit-caret":u===c?c:void 0}),(0,F.jsxs)(`div`,{role:`tab`,"aria-selected":p,tabIndex:p?0:-1,className:n(bX.tab,p&&bX.tabActive,h&&bX.tabQuiet,r.draggingTabId===s&&bX.tabDragging),"data-dockkit-tab":s,"data-dockkit-tab-quiet":h||void 0,ref:e=>{e===null?o.delete(s):o.set(s,e)},onPointerDown:e=>{e.button!==2&&r.onTabPressed(s,e)},onClick:e=>{e.stopPropagation(),d(s)},onKeyDown:e=>{if(e.target!==e.currentTarget||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.nativeEvent.isComposing)return;let n=jX(e.key,t.tabs,s);n===void 0?MX(e.key)&&(e.preventDefault(),d(s)):(e.preventDefault(),f(n))},onContextMenu:e=>{e.preventDefault();let t=e.currentTarget;a(e=>e?.tabId===s?void 0:{tabId:s,anchor:t})},children:[(0,F.jsx)(TX,{children:r.renderTabTitle?.(l)??l.title}),m&&(0,F.jsx)(mO,{disabled:i!==void 0,label:r.labels.closeTab,shortcutKeys:r.labels.closeTabKeys,side:`bottom`,delayMs:500,children:(0,F.jsx)(`button`,{type:`button`,className:bX.tabClose,"aria-label":r.labels.closeTab,"aria-keyshortcuts":r.labels.closeTabShortcut,"data-dockkit-tab-close":s,onPointerDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation(),r.onCloseTab(s)},children:(0,F.jsx)(le,{size:14})})}),i?.tabId===s&&(0,F.jsx)(CX,{labels:r.labels,anchor:i.anchor,onClose:m?()=>{a(void 0),r.onCloseTab(s)}:void 0,onDismiss:()=>{a(void 0)},extras:r.renderTabMenuItems?.(l,()=>{a(void 0)})})]})]},s)}),u===t.tabs.length&&(0,F.jsx)(`div`,{className:n(bX.slot,bX.slotCaret),"data-dockkit-caret":u})]}),r.canAddTab(t.id)&&(0,F.jsx)(mO,{label:r.labels.addTab,side:`bottom`,delayMs:500,children:(0,F.jsx)(`button`,{type:`button`,className:bX.addTab,"aria-label":r.labels.addTab,"data-dockkit-add-tab":t.id,onClick:e=>{e.stopPropagation(),r.onAddTab(t.id)},children:(0,F.jsx)(me,{size:14})})}),(0,F.jsx)(`div`,{className:bX.stripFill,"data-dockkit-strip-fill":!0}),!(r.hideSplitWhenBlocked&&c!==void 0)&&(0,F.jsx)(mO,{label:c===void 0?r.labels.splitPane:LX(r.labels,c),shortcutKeys:r.labels.splitPaneKeys,side:`bottom`,delayMs:500,children:(0,F.jsx)(`span`,{tabIndex:c===void 0?void 0:0,"aria-label":c===void 0?void 0:LX(r.labels,c),children:(0,F.jsx)(`button`,{type:`button`,className:bX.iconButton,"aria-label":r.labels.splitPane,"aria-keyshortcuts":r.labels.splitPaneShortcut,disabled:c!==void 0,"data-dockkit-split-button":t.id,"data-dockkit-split-blocked":c,onClick:e=>{e.stopPropagation(),r.onSplitPane(t.id)},children:(0,F.jsx)(DX,{})})})}),t.id===r.chromePaneId&&r.chrome!==void 0&&(0,F.jsx)(`div`,{className:bX.stripChrome,"data-dockkit-strip-chrome":!0,onClick:e=>{e.stopPropagation()},children:r.chrome})]})}function zX({pane:e,callbacks:t}){let n=t.dropTarget,r=n?.kind===`zone`&&n.paneId===e.id?n.zone:void 0;return r===void 0?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:bX.dockScrim,"data-dockkit-dock-scrim":!0}),t.horizontalDrops&&r!==`center`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(AX,{zone:`left`,active:r===`left`,labels:t.labels}),(0,F.jsx)(AX,{zone:`right`,active:r===`right`,labels:t.labels})]}):(0,F.jsx)(AX,{zone:r,active:!0,labels:t.labels})]})}function BX({state:e,pane:t,callbacks:n}){let r=t.activeTabId===void 0?void 0:lJ(e,t.activeTabId);return(0,F.jsxs)(`section`,{className:bX.pane,"data-dockkit-pane":t.id,tabIndex:-1,"data-dockkit-pane-active":e.activePaneId===t.id||void 0,onClick:()=>{e.activePaneId!==t.id&&n.onFocusPane(t.id)},children:[(0,F.jsx)(RX,{state:e,pane:t,callbacks:n}),(0,F.jsxs)(`div`,{className:bX.paneBody,children:[r===void 0?(0,F.jsx)(`p`,{className:bX.empty,children:n.labels.emptyPane}):n.renderTab(r),(0,F.jsx)(zX,{pane:t,callbacks:n})]})]})}function VX(e,t,n){let r=t-e.originX,i=n-e.originY;return e.mode===`move`?DY(e.rect,r,i):OY(e.rect,r,i,pY)}function HX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function UX(e,t){return e.activePaneId===t&&e.floats.at(-1)===t}function WX(e,t){let[n,r]=(0,P.useState)(void 0),i=fX(()=>{r(void 0)}),a=n=>{UX(e,n)||t.focusPane(n)};return{preview:n,raise:a,drag:(n,o,s)=>{s.stopPropagation();let c={mode:n,originX:s.clientX,originY:s.clientY,rect:uJ(sJ(e,o))};i(s.currentTarget,s.pointerId,{move:e=>{r({paneId:o,rect:VX(c,e.clientX,e.clientY)})},up:e=>{let r=VX(c,e.clientX,e.clientY);HX(r,c.rect)?a(o):n===`move`?t.moveFloat(o,r.x,r.y):t.resizeFloat(o,r)}})}}}function GX({paneId:e,tab:t,labels:r,intents:i,renderTabTitle:a,canCloseTab:o,drag:s}){return(0,F.jsxs)(`header`,{className:n(bX.tabStrip,bX.floatHeader),"data-dockkit-float-grip":e,onPointerDown:t=>{s(`move`,e,t)},children:[(0,F.jsx)(`div`,{className:n(bX.tab,bX.floatTitle),"data-dockkit-float-title":!0,children:(0,F.jsx)(TX,{children:a?.(t)??t.title})}),(0,F.jsx)(`div`,{className:bX.stripFill}),(0,F.jsx)(mO,{label:r.dockFloat,side:`bottom`,delayMs:500,children:(0,F.jsx)(`button`,{type:`button`,className:bX.iconButton,"aria-label":r.dockFloat,"data-dockkit-float-dock":e,onPointerDown:e=>{e.stopPropagation()},onClick:()=>{i.unfloatPane(e)},children:(0,F.jsx)(te,{className:bX.dockGlyph})})}),(o?.(t.id)??!0)&&(0,F.jsx)(mO,{label:r.closeTab,shortcutKeys:r.closeTabKeys,side:`bottom`,delayMs:500,children:(0,F.jsx)(`button`,{type:`button`,className:bX.iconButton,"aria-label":r.closeTab,"data-dockkit-float-close":e,onPointerDown:e=>{e.stopPropagation()},onClick:()=>{i.closeTab(t.id)},children:(0,F.jsx)(O,{})})})]})}function KX({state:e,callbacks:t,intents:r,tab:i,pane:a,column:o,floats:s,focusRequest:c,keepMounted:l,active:u=!0}){let d=a.host===`float`,f=d||a.activeTabId===i.id,p=u&&f&&(d||e.expanded),m=l?.(i)??!1,[h,g]=(0,P.useState)(p);p&&!h&&g(!0);let _=(0,P.useRef)(null),v=(0,P.useRef)(null);(0,P.useLayoutEffect)(()=>{let e=_.current;e.inert=!p;let t=document.activeElement;!p&&t instanceof HTMLElement&&e.contains(t)&&t.blur();let n=c.current;p&&n?.tabId===i.id&&(c.current=void 0,(t===null||t===document.body||t===document.documentElement||t===n.origin)&&[...e.querySelector(`[data-dockkit-strip]`)?.querySelectorAll(`[data-dockkit-tab]`)??[]].find(e=>e.dataset.dockkitTab===i.id)?.focus({preventScroll:!0}))},[p,i.id,c]),(0,P.useEffect)(()=>{let n=v.current,r=()=>{p&&(d?s.raise(a.id):e.activePaneId!==a.id&&t.onFocusPane(a.id))};return n.addEventListener(`focus`,r,!0),()=>{n.removeEventListener(`focus`,r,!0)}},[p,d,s,a.id,e.activePaneId,t]);let y=d&&s.preview?.paneId===a.id?s.preview.rect:void 0,b=d?y??uJ(a):void 0,x=y===void 0?e.floats.indexOf(a.id)+1:e.floats.length+1;return(0,F.jsx)(`div`,{className:n(bX.tabCell,d&&bX.floatingCell),hidden:!f,"data-dockkit-host":d?`float`:`dock`,"data-dockkit-column":d?void 0:o,style:{gridColumn:d?1:o*2+1,gridRow:1,order:d?x:0},children:(0,F.jsxs)(`section`,{ref:_,tabIndex:-1,className:n(bX.tabHost,d?bX.float:bX.pane),"aria-hidden":!p||void 0,"data-dockkit-content":i.id,"data-dockkit-pane":!d&&f?a.id:void 0,"data-dockkit-pane-active":!d&&e.activePaneId===a.id||void 0,"data-dockkit-float":d?a.id:void 0,"data-dockkit-float-active":d&&e.activePaneId===a.id||void 0,"data-dockkit-column":d?void 0:o,style:b===void 0?void 0:{left:b.x,top:b.y,width:b.width,height:b.height},onPointerDown:()=>{d&&s.raise(a.id)},onClick:()=>{!d&&e.activePaneId!==a.id&&t.onFocusPane(a.id)},children:[(0,F.jsx)(`div`,{className:bX.tabHostHeader,children:f&&(d?(0,F.jsx)(GX,{paneId:a.id,tab:i,labels:t.labels,intents:r,renderTabTitle:t.renderTabTitle,canCloseTab:t.canCloseTab,drag:s.drag}):(0,F.jsx)(RX,{state:e,pane:a,callbacks:t}))}),(0,F.jsxs)(`div`,{ref:v,className:n(bX.tabHostBody,d?bX.floatBody:bX.paneBody),children:[h&&(m||u&&f)?t.renderTab(i):null,!d&&(0,F.jsx)(zX,{pane:a,callbacks:t})]}),d&&(0,F.jsx)(`div`,{className:bX.floatResize,"data-dockkit-float-resize":a.id,onPointerDown:e=>{s.drag(`resize`,a.id,e)}})]})})}function qX(e){let{state:t,callbacks:r,preview:i}=e,a=(0,P.useRef)(void 0),o={...r,onFocusTab:e=>{a.current=mJ(t,e).activeTabId===e?void 0:{tabId:e,origin:document.activeElement},r.onFocusTab(e)}},s=oJ(t,t.rootId);if(s.kind===`split`&&(s.axis!==`row`||s.children.length!==2))throw Error(`DockLayout requires one pane or two horizontally split panes`);let c=s.kind===`pane`?[s]:s.children.map(e=>sJ(t,e)),l=s.kind===`split`?i?.splitId===s.id?i.sizes:s.sizes:[1],u=WX(t,e.intents),d=l.map(e=>`minmax(0, ${e}fr)`).join(` 0px `);return(0,F.jsxs)(`div`,{className:bX.tabLayout,"data-dockkit-split":s.kind===`split`?s.id:void 0,style:{gridTemplateColumns:d},children:[Object.values(t.tabs).sort((e,t)=>e.id.localeCompare(t.id)).map(n=>{let r=mJ(t,n.id);return(0,F.jsx)(KX,{...e,callbacks:o,tab:n,pane:r,column:c.findIndex(e=>e.id===r.id),floats:u,focusRequest:a},n.id)}),c.filter(e=>e.tabs.length===0).map(e=>(0,F.jsx)(`div`,{className:bX.emptyTabHost,"data-dockkit-empty":!0,style:{gridColumn:c.indexOf(e)*2+1,gridRow:1},children:(0,F.jsx)(BX,{state:t,pane:e,callbacks:r})},e.id)),s.kind===`split`&&(0,F.jsx)(`div`,{className:n(bX.divider,bX.tabLayoutDivider),"data-dockkit-divider":`${s.id}:0`,style:{gridColumn:2,gridRow:1},onPointerDown:e=>{r.onDividerPressed(s.id,0,e)}})]})}var JX={draggingTabId:void 0,dropTarget:void 0,sizes:void 0},YX=new Map,XX=()=>!0;function ZX(e,t,n,r,i,a){for(let[o,s]of rX(e)){let e=s.getBoundingClientRect();if(!bY(e,t,n))continue;let c=s.querySelector(`[data-dockkit-strip]`);if(c!==null&&bY(c.getBoundingClientRect(),t,n))return{kind:`strip`,paneId:o,index:SY([...c.querySelectorAll(`[data-dockkit-tab]`)].map(e=>e.getBoundingClientRect()),t)};let l=a===`horizontal`?r&&cX(i,o).row?t<e.x+e.width/2?`left`:`right`:`center`:xY(e,t,n);if(l!==`center`){let e=cX(i,o),t=l===`left`||l===`right`?e.row:e.column;if(!r||!t)return}return{kind:`zone`,paneId:o,zone:l}}}function QX(e,t,n,r){let i=(e.axis===`row`?t:n)-e.origin,a=e.extent>0?i/e.extent:0;return yY(EY(e.sizes,e.index,a),r)}var $X=1e-9;function eZ(e,t){return e.length===t.length&&e.every((e,n)=>{let r=t[n];return r!==void 0&&Math.abs(e-r)<$X})}function tZ({state:e,canSplit:t,canAddTab:n,canCloseTab:r,intents:i,labels:a,renderTab:o,renderTabTitle:s,renderTabMenuItems:c,chrome:l,onRoom:u,draw:d,dropZones:f=`edges`,minPaneFraction:p=dY,hideSplitWhenBlocked:m=!1}){let h=(0,P.useRef)(null),[g,_]=(0,P.useState)(JX),[v,y]=(0,P.useState)(YX),b=fX(()=>{_(JX)}),x=(0,P.useCallback)(e=>{let t=h.current;t!==null&&e(t)},[]),S=(0,P.useCallback)(()=>{x(e=>{let t=sX(e,m);y(e=>lX(e,t)?e:t)})},[x,m]);(0,P.useLayoutEffect)(()=>{S()}),(0,P.useEffect)(()=>{u?.(v)},[v,u]),(0,P.useEffect)(()=>{let e=h.current;if(e===null||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{S()});return t.observe(e),()=>{t.disconnect()}},[S]);let C={onFocusTab:i.focusTab.bind(i),onFocusPane:i.focusPane.bind(i),onSplitPane:i.splitPane.bind(i),onAddTab:i.addTab.bind(i),onCloseTab:i.closeTab.bind(i),onTabPressed:(e,n)=>{x(r=>{let a=n.clientX,o=n.clientY,s=!1;b(n.currentTarget,n.pointerId,{move:n=>{if(!s){if(!TY(a,o,n.clientX,n.clientY))return;s=!0}_({...JX,draggingTabId:e,dropTarget:ZX(r,n.clientX,n.clientY,t,v,f)})},up:n=>{if(!s)return;let a=ZX(r,n.clientX,n.clientY,t,v,f);if(a===void 0){if(bY(r.getBoundingClientRect(),n.clientX,n.clientY))return;i.floatTab(e,kY(n.clientX,n.clientY,fY))}else a.kind===`strip`?i.placeTab(e,a.paneId,a.index):i.dropTab(e,a.paneId,a.zone)}})})},onDividerPressed:(t,n,r)=>{let a=r.currentTarget.parentElement;if(a===null)return;let o=cJ(e,t),s=a.getBoundingClientRect(),c={splitId:t,index:n,axis:o.axis,origin:o.axis===`row`?r.clientX:r.clientY,extent:o.axis===`row`?s.width:s.height,sizes:o.sizes};b(r.currentTarget,r.pointerId,{move:e=>{_({...JX,sizes:{splitId:t,sizes:QX(c,e.clientX,e.clientY,p)}})},up:e=>{let n=QX(c,e.clientX,e.clientY,p);eZ(n,c.sizes)||i.resizeSplit(t,n)}})},splitBlock:e=>t?cX(v,e).row?void 0:`width`:`budget`,hideSplitWhenBlocked:m,canAddTab:n??XX,canCloseTab:r??XX,dropTarget:g.dropTarget,horizontalDrops:f===`horizontal`,draggingTabId:g.draggingTabId,labels:a,renderTab:o,renderTabTitle:s,renderTabMenuItems:c,chromePaneId:OJ(e),chrome:l};return(0,F.jsx)(`div`,{className:bX.surface,ref:h,"data-dockkit-surface":!0,"data-dockkit-drop-zones":f,children:d(C,g.sizes)})}function nZ(e){return(0,F.jsx)(tZ,{...e,draw:(t,n)=>(0,F.jsx)(qX,{...e,callbacks:t,preview:n})})}var rZ={session:`_session_nj5n1_24`,panel:`_panel_nj5n1_32`,iconButton:`_iconButton_nj5n1_121`,collapseGlyph:`_collapseGlyph_nj5n1_147`,panelBody:`_panelBody_nj5n1_151`,unavailable:`_unavailable_nj5n1_157`,tabTitle:`_tabTitle_nj5n1_165`,tabBody:`_tabBody_nj5n1_169`};function iZ(){return(0,F.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:(0,F.jsx)(`path`,{d:`M2.33203 10.4054V13.1681C2.33229 13.444 2.55605 13.6681 2.83203 13.6681H5.49512V14.6681H2.83203C2.00376 14.6681 1.33229 13.9963 1.33203 13.1681V10.4054H2.33203ZM14.6689 13.1681C14.6687 13.996 13.9968 14.6676 13.1689 14.6681H10.4951V13.6681H13.1689C13.4445 13.6676 13.6687 13.4437 13.6689 13.1681V10.4054H14.6689V13.1681ZM13.1689 1.33118C13.9969 1.33163 14.6688 2.00315 14.6689 2.83118V5.4054H13.6689V2.83118C13.6688 2.55544 13.4446 2.33162 13.1689 2.33118H10.4951V1.33118H13.1689ZM5.49512 2.33118H2.83203C2.55598 2.33118 2.33218 2.55516 2.33203 2.83118V5.4054H1.33203V2.83118C1.33218 2.00288 2.00369 1.33118 2.83203 1.33118H5.49512V2.33118Z`,fill:`currentColor`})})}function aZ(){return(0,F.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M9 2.5V6C9 6.26522 9.10536 6.51957 9.29289 6.70711C9.48043 6.89464 9.73478 7 10 7H13.5`,stroke:`currentColor`}),(0,F.jsx)(`path`,{d:`M7 13.5V10C7 9.73478 6.89464 9.48043 6.70711 9.29289C6.51957 9.10536 6.26522 9 6 9H2.5`,stroke:`currentColor`})]})}function oZ({sessionId:e,fullscreen:t,focus:n=!1,actions:r,t:i,shortcuts:a,toggleFullscreen:o}){let s=t?`push`:`fullscreen`,c=i(n?`chrome.exitFocus`:t?`chrome.exitFullscreen`:`chrome.toFullscreen`),l=a.find(e=>e.id===`pane.fullscreen.toggle`),u=a.find(e=>e.id===`sidebar.right.toggle`);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(mO,{label:c,shortcutKeys:l?.keys,side:`bottom`,delayMs:500,children:(0,F.jsx)(`button`,{type:`button`,className:rZ.iconButton,"aria-label":c,"aria-keyshortcuts":l?.aria,"data-sidebar-right-mode":s,onClick:o,children:t?(0,F.jsx)(aZ,{}):(0,F.jsx)(iZ,{})})}),(0,F.jsx)(mO,{label:i(`chrome.collapse`),shortcutKeys:u?.keys,side:`bottom`,delayMs:500,children:(0,F.jsx)(`button`,{type:`button`,className:rZ.iconButton,"aria-label":i(`chrome.collapseAria`),"aria-keyshortcuts":u?.aria,"data-sidebar-right-toggle":!0,onClick:()=>{r.toggleExpanded(e)},children:(0,F.jsx)(te,{className:rZ.collapseGlyph})})})]})}function sZ(e,t,n){return{emptyPane:e(`dock.emptyPane`),splitPane:e(`dock.splitPane`),splitPaneShortcut:t?.aria,splitPaneKeys:t?.keys,splitPaneDisabled:e(`dock.splitPaneDisabled`),splitPaneNarrow:e(`dock.splitPaneNarrow`),closeTab:e(`dock.closeTab`),closeTabShortcut:n?.aria,closeTabKeys:n?.keys,addTab:e(`dock.addTab`),dockFloat:e(`dock.dockFloat`),closeFloat:e(`dock.closeFloat`),dropZone:{center:e(`dock.drop.center`),left:e(`dock.drop.left`),right:e(`dock.drop.right`),top:e(`dock.drop.top`),bottom:e(`dock.drop.bottom`)}}}var cZ={"command.close":`关闭当前页面/窗口`,"command.refresh":`刷新当前页面`,"command.noRefresh":`当前页面不支持刷新`,"command.toggle":`展开/收起右侧栏`,"command.fullscreen":`面板全屏/退出全屏`,"command.noSession":`请先选择会话`,"command.noFocus":`请先聚焦右侧面板`,"command.stale":`页面已切换,请重新聚焦`,"command.collapsed":`请先展开右侧栏`,"command.float":`浮动面板不支持此操作`,"command.empty":`请先打开页面`,"command.budget":`已达两格上限`,"command.width":`栏宽不足,拖宽侧边栏后再分栏`,"chrome.expand":`打开侧边栏`,"chrome.expandAria":`打开右侧边栏`,"chrome.collapse":`收起侧边栏`,"chrome.collapseAria":`收起右侧边栏`,"chrome.toFullscreen":`全屏`,"chrome.exitFullscreen":`退出全屏`,"chrome.exitFocus":`退出专注模式`,"dock.emptyPane":`空面板`,"dock.splitPane":`分栏`,"dock.splitPaneDisabled":`已达两格上限`,"dock.splitPaneNarrow":`栏宽不足,拖宽侧边栏后再分栏`,"dock.closeTab":`关闭`,"dock.addTab":`新标签页`,"dock.dockFloat":`收回到侧边栏`,"dock.closeFloat":`关闭`,"dock.drop.center":`移到这里`,"dock.drop.left":`左分栏`,"dock.drop.right":`右分栏`,"dock.drop.top":`上分栏`,"dock.drop.bottom":`下分栏`,"tab.guide.title":`开始`,"tab.unavailable":`这类内容还没有可用的查看方式。`},lZ={"command.close":`Close current page or window`,"command.refresh":`Refresh current page`,"command.noRefresh":`This page cannot be refreshed`,"command.toggle":`Toggle right sidebar`,"command.fullscreen":`Toggle panel fullscreen`,"command.noSession":`Select a session first`,"command.noFocus":`Focus a right sidebar pane first`,"command.stale":`The page changed; focus it again`,"command.collapsed":`Expand the right sidebar first`,"command.float":`This action is unavailable in a floating panel`,"command.empty":`Open a page first`,"command.budget":`Two panes is the limit`,"command.width":`Not enough width to split, widen the sidebar`,"chrome.expand":`Open sidebar`,"chrome.expandAria":`Open right sidebar`,"chrome.collapse":`Collapse sidebar`,"chrome.collapseAria":`Collapse right sidebar`,"chrome.toFullscreen":`Fullscreen`,"chrome.exitFullscreen":`Exit fullscreen`,"chrome.exitFocus":`Exit focus mode`,"dock.emptyPane":`Empty pane`,"dock.splitPane":`Split`,"dock.splitPaneDisabled":`Two panes is the limit`,"dock.splitPaneNarrow":`Not enough width to split, widen the sidebar`,"dock.closeTab":`Close`,"dock.addTab":`New tab`,"dock.dockFloat":`Send back to the sidebar`,"dock.closeFloat":`Close`,"dock.drop.center":`Move here`,"dock.drop.left":`Add left split`,"dock.drop.right":`Add right split`,"dock.drop.top":`Add top split`,"dock.drop.bottom":`Add bottom split`,"tab.guide.title":`Start`,"tab.unavailable":`Nothing here can view this kind of content yet.`},uZ={button:`_button_1rv3m_2`,md:`_md_1rv3m_23`,sm:`_sm_1rv3m_28`,primary:`_primary_1rv3m_36`,ghost:`_ghost_1rv3m_45`,outline:`_outline_1rv3m_54`,toolbar:`_toolbar_1rv3m_63`,icon:`_icon_1rv3m_71`},dZ=(0,P.forwardRef)(function({variant:e=`ghost`,size:t=`md`,icon:r,className:i,children:a,...o},s){return(0,F.jsxs)(`button`,{ref:s,type:`button`,className:n(uZ.button,uZ[e],uZ[t],i),...o,children:[r!=null&&(0,F.jsx)(`span`,{className:uZ.icon,children:r}),a]})}),fZ={button:`_button_11lrx_2`,icon:`_icon_11lrx_15`};function pZ(e,t){if(!e||typeof e!=`object`)throw Error(`Module must default export a plugin definition`);let n=e;if(n.id!==t||n.apiVersion!==1)throw Error(`Plugin id or apiVersion does not match the catalog`);if(typeof n.activate!=`function`)throw Error(`Plugin must declare synchronous activate(context)`);for(let e of[`slots`,`commands`,`menuItems`,`interactions`,`artifactTools`])if(n[e]!==void 0&&!Array.isArray(n[e]))throw Error(`${e} must be an array`);let r=new Set;for(let e of n.slots??[]){if(!e||![`composer.controls`,`turn.tail`,`rightbar.panel`,`rightbar.title`].includes(e.slot)||typeof e.id!=`string`||typeof e.component!=`function`||r.has(e.id))throw Error(`Invalid or duplicate slot`);r.add(e.id)}for(let e of[...n.commands??[],...n.menuItems??[]]){if(!e||typeof e.id!=`string`||typeof e.action!=`string`||r.has(e.id))throw Error(`Invalid or duplicate command/menu contribution`);r.add(e.id)}if((n.commands??[]).some(e=>!u(e)))throw Error(`Invalid command`);let i=new Set;for(let e of n.interactions??[]){if(!e||typeof e.kind!=`string`||!e.kind||i.has(e.kind)||typeof e.component!=`function`)throw Error(`Invalid or duplicate interaction`);i.add(e.kind)}if(n.composerPlaceholder!==void 0&&typeof n.composerPlaceholder!=`function`)throw Error(`Invalid composer placeholder`);if(n.composerAction!==void 0&&typeof n.composerAction!=`function`)throw Error(`Invalid composer action`);if(n.artifactTools?.some(e=>typeof e!=`string`))throw Error(`Invalid artifact tools`);if(n.workbench){let{entry:e,panels:t,toolViews:r,beforeSend:i}=n.workbench;if(i!==void 0&&typeof i!=`function`)throw Error(`Invalid workbench pre-send hook`);if(r!==void 0&&(!Array.isArray(r)||r.some(e=>!e||!Array.isArray(e.tools)||!e.tools.length||e.tools.some(e=>typeof e!=`string`||!e)||typeof e.component!=`function`)))throw Error(`Invalid workbench tool view`);if(n.workbench.resolvePanel!==void 0&&typeof n.workbench.resolvePanel!=`function`)throw Error(`Invalid workbench artifact resolver`);if(n.workbench.apiVersion!==1||!Array.isArray(t)||t.some(e=>typeof e.kind!=`string`||typeof e.component!=`function`)||new Set(t.map(e=>e.kind)).size!==t.length)throw Error(`Invalid workbench contribution`);if(e!==void 0&&(!e||typeof e.kind!=`string`||!e.kind||!p(e.label)||!p(e.description)||e.panelTitle!==void 0&&!p(e.panelTitle)||typeof e.icon!=`function`||!t.some(t=>t.kind===e.kind)))throw Error(`Invalid workbench entry`)}return n}function mZ(e,t,n){return new Promise((r,i)=>{let a,o=()=>s(Error(`Plugin load aborted`)),s=(e,n)=>{clearTimeout(a),t.removeEventListener(`abort`,o),e?i(e):r(n)};t.addEventListener(`abort`,o,{once:!0}),n!==void 0&&(a=setTimeout(()=>s(Error(`Plugin load timed out`)),n)),e.then(e=>s(null,e),e=>s(e)),t.aborted&&o()})}var hZ=class{controller=new AbortController;cleanups=[];disposed=!1;report;constructor(e){this.report=e}context(e){return{sessionId:e,signal:this.controller.signal,onDispose:e=>{if(typeof e!=`function`)throw Error(`onDispose expects a cleanup function`);this.disposed?this.clean(e):this.cleanups.push(e)}}}clean(e){try{e()}catch(e){this.report(e)}}dispose(){if(!this.disposed){this.disposed=!0,this.controller.abort();for(let e of this.cleanups.splice(0).reverse())this.clean(e)}}},gZ=(e,t=null)=>({sessionId:t,generation:e,plugins:[],errors:[],ready:!1}),_Z=class{environment;run=null;snapshot=gZ(0);generation=0;listeners=new Set;constructor(e){this.environment=e}getSnapshot=()=>this.snapshot;subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});update(e){this.snapshot=e;for(let e of this.listeners)e()}error(e,t,n,r){let i=`plugin=${t} session=${e.sessionId} generation=${e.generation} stage=${n}: ${r instanceof Error?r.message:String(r)}`;(this.environment.report??console.error)(i),this.run===e&&this.update({...this.snapshot,errors:[...this.snapshot.errors,i]})}async start(e,t){this.dispose();let n={sessionId:e,generation:++this.generation,controller:new AbortController,scopes:[]};this.run=n,this.update(gZ(n.generation,e));try{let r=await mZ(Promise.resolve().then(t),n.controller.signal);if(this.run!==n)return;for(let e of r.errors)this.error(n,`catalog`,`discover`,e);for(let t of r.plugins){if(this.run!==n)break;let r=new hZ(e=>this.error(n,t.id,`dispose`,e));n.scopes.push(r);let i=r.context(e),a=`load`;try{let e=await mZ(this.environment.loadModule(t.client),n.controller.signal,this.environment.loadTimeoutMs??1e4);if(this.run!==n)break;a=`validate`;let o=pZ(e?.default,t.id);if(t.style&&(a=`style`,await mZ(this.environment.loadStyle(t.style,i.signal).then(e=>{i.onDispose(e)}),n.controller.signal,this.environment.loadTimeoutMs??1e4)),this.run!==n)break;a=`activate`;let s=new Set(this.snapshot.plugins.flatMap(e=>e.definition.workbench?.panels.map(e=>e.kind)??[]));if(o.workbench?.panels.some(e=>s.has(e.kind)))throw Error(`Workbench panel kind already registered`);let c=o.activate(i);if(c!==void 0)throw Promise.resolve(c).catch(e=>this.error(n,t.id,`activate`,e)),Error(`activate must be synchronous and return void`);if(this.run!==n){r.dispose();break}this.update({...this.snapshot,plugins:[...this.snapshot.plugins,{id:t.id,definition:o,instanceId:`${n.generation}/${t.id}`}]})}catch(e){this.run===n&&this.error(n,t.id,a,e),r.dispose()}}}catch(e){this.run===n&&this.error(n,`catalog`,`discover`,e)}this.run===n&&this.update({...this.snapshot,ready:!0})}dispose(){let e=this.run;if(e){this.run=null,e.controller.abort();for(let t of e.scopes.reverse())t.dispose();this.update(gZ(this.generation))}}},vZ={"builtin:@pi-webapp/files":()=>N(()=>import(`./plugin-D3ueGV13.js`),__vite__mapDeps([34,2,3,35,36])),"builtin:@pi-webapp/terminal":()=>N(()=>import(`./plugin-Cw0h9Dlw.js`),__vite__mapDeps([37,2,3,38])),"builtin:@pi-webapp/git":()=>N(()=>import(`./plugin-Daa3_Q-m.js`),__vite__mapDeps([39,2,3,35,36,40]))};function yZ(e){let t=vZ[e];if(!t)throw Error(`Unknown builtin plugin module`);return t()}function bZ(e,t){return new Promise((n,r)=>{let i=document.createElement(`link`);i.rel=`stylesheet`,i.href=e;let a=()=>{t.removeEventListener(`abort`,o),i.onload=i.onerror=null,i.remove()},o=()=>{a(),r(Error(`Plugin stylesheet aborted`))};t.addEventListener(`abort`,o,{once:!0}),i.onload=()=>{t.removeEventListener(`abort`,o),i.onload=i.onerror=null,n(a)},i.onerror=()=>{a(),r(Error(`Plugin stylesheet failed to load`))},t.aborted?o():document.head.append(i)})}function xZ(e,t,n,r=0){let[i]=(0,P.useState)(()=>new _Z({loadModule:e=>e.startsWith(`builtin:`)?yZ(e):import(e),loadStyle:bZ})),a=(0,P.useSyncExternalStore)(i.subscribe,i.getSnapshot),o=(0,P.useRef)(new Map);a.sessionId&&a.ready&&o.current.set(a.sessionId,a.plugins.filter(e=>e.definition.workbench)),(0,P.useEffect)(()=>{if(e&&t)return globalThis.__PI_WEBAPP_REACT__=P,i.start(t,n),()=>i.dispose()},[i,e,t,r]);let s=e&&a.sessionId===t;return{plugins:s?a.plugins:!e&&t?o.current.get(t)??[]:[],errors:s?a.errors:[]}}var SZ=class extends P.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error(`pi-webapp plugin ${this.props.id}:`,e)}render(){return this.state.failed?null:this.props.children}};function CZ(e,t){return{...e,invokeAction:(n,r)=>e.invokePluginAction(t,n,r),resolveInteraction:n=>!e.interaction||e.interaction.pluginId!==t?Promise.reject(Error(`No pending interaction`)):e.resolvePluginInteraction(t,e.interaction.requestId,n)}}function wZ({plugins:e,props:t}){let n=t.session?.interactions?.find(t=>e.some(e=>e.id===t.pluginId&&e.definition.interactions?.some(e=>e.kind===t.kind))),r=e.find(e=>e.id===n?.pluginId),i=r?.definition.interactions?.find(e=>e.kind===n?.kind)?.component;return!n||!r||!i?null:(0,F.jsx)(SZ,{id:r.id,children:(0,F.jsx)(i,{...CZ({...t,interaction:n},r.id)})},`${r.instanceId??r.id}/${n.requestId}`)}function TZ({plugins:e,props:t,call:n,result:r,running:i}){let a=e.flatMap(e=>(e.definition.workbench?.toolViews??[]).map(t=>({plugin:e,view:t}))).find(({view:e})=>e.tools.includes(n.toolName??``));if(!a)return null;let o=a.view.component;return(0,F.jsx)(SZ,{id:a.plugin.id,children:(0,F.jsx)(o,{...CZ(t,a.plugin.id),call:n,result:r,running:i})})}function EZ({plugins:e,slot:t,props:n}){let r=e.flatMap(e=>(e.definition.slots??[]).filter(e=>e.slot===t).map(t=>({plugin:e,item:t})));return r.sort((e,t)=>(e.item.order??0)-(t.item.order??0)||e.plugin.id.localeCompare(t.plugin.id)||e.item.id.localeCompare(t.item.id)),(0,F.jsx)(F.Fragment,{children:r.map(({plugin:e,item:t})=>{let r=t.component;return(0,F.jsx)(SZ,{id:e.id,children:(0,F.jsx)(r,{...CZ(n,e.id)})},`${e.instanceId??e.id}/${t.id}`)})})}function DZ(e,t=[]){let n=(0,P.useRef)(new Map),{controller:r,resources:i,owners:a}=(0,P.useMemo)(()=>{let t=e??``,r=n.current.get(t);if(!r){let e=e=>({id:e,kind:`guide`,contentId:`guide`,title:`开始`});r={controller:new QY({makeInitialTab:e,makePaneTab:e}),resources:new Map,owners:new Map};let i=r;i.controller.subscribe(()=>{let e=i.controller.getSnapshot().state.tabs;for(let[t,n]of i.resources)e[t]||(n.dispose?.(),i.resources.delete(t));for(let t of i.owners.keys())e[t]||i.owners.delete(t)}),n.current.set(t,r)}return r},[e]);(0,P.useEffect)(()=>{for(let[t,r]of n.current)for(let n of r.resources.values())n.activate?.(t===e)},[e]),(0,P.useEffect)(()=>{for(let e of n.current.values())for(let[n,r]of[...e.owners])t.includes(r)&&e.controller.closeTab(n)},[t]),(0,P.useEffect)(()=>()=>{for(let e of n.current.values())for(let t of e.resources.values())t.dispose?.()},[]);let o=(0,P.useSyncExternalStore)(r.subscribe,r.getSnapshot),s=sJ(o.state,o.state.activePaneId).activeTabId,c=s?lJ(o.state,s):void 0;return{controller:r,snapshot:o,panelId:c?.kind===`plugin`?c.contentId:null,resources:i,owners:a,expand:()=>{Object.keys(r.getSnapshot().state.tabs).length||r.openContent({kind:`guide`,contentId:`guide`,title:`开始`}),r.setExpanded(!0)},openContent:(0,P.useCallback)((e,t,n,i,o)=>{let s=r.getSnapshot().state,c=i&&sJ(s,i).host===`dock`?i:IY(s),l=sJ(s,c),u=l.activeTabId&&s.tabs[l.activeTabId]?.kind===`guide`?l.activeTabId:void 0,d=l.tabs.find(n=>s.tabs[n]?.kind===e&&s.tabs[n]?.contentId===t),f=d??r.openContent({kind:e,contentId:t,title:n,paneId:c,revealIfOpened:e!==`files`});return o&&a.set(f,o),d&&r.focusTab(d),u&&r.closeTab(u),r.setExpanded(!0),requestAnimationFrame(()=>document.querySelector(`[data-dockkit-content="${f}"]`)?.focus()),f},[r,a]),shown:o.state.expanded&&Object.keys(o.state.tabs).length>0}}function OZ({panel:e,width:t,narrow:n,focus:i,onExitFocus:a,plugins:o,props:s,cwd:c}){let{controller:l,snapshot:u,openContent:d}=e,{state:f}=u,[p,m]=(0,P.useState)(``),h=(0,P.useRef)(!1),g=(0,P.useMemo)(()=>new Proxy(l,{get(e,t){if(t===`closeTab`)return t=>{if(h.current)return;h.current=!0;let n=s.session?.sessionId??``;ap.flush(n).then(async()=>{let r=document.querySelector(`[data-dockkit-content="${CSS.escape(t)}"]`);r&&await ap.retireWithin(n,r),m(``),e.closeTab(t)}).catch(e=>m(e instanceof Error?e.message:String(e))).finally(()=>{h.current=!1})};let n=Reflect.get(e,t,e);return typeof n==`function`?n.bind(e):n}}),[l,s.session?.sessionId]),_=n||f.mode===`fullscreen`,v=s.locale===`zh`?cZ:lZ,y=e=>v[e]??e,b=e=>typeof e==`string`?e:e[s.locale],x=o.flatMap(e=>(e.definition.workbench?.panels??[]).map(t=>({plugin:e,contribution:t}))),S=()=>{a(),l.setExpanded(!1),requestAnimationFrame(()=>document.querySelector(`[data-sidebar-right-expand]`)?.focus())},C=n?`100vw`:t;return(0,F.jsx)(`div`,{className:rZ.panel,style:{width:C,"--dsh-sidebar-width":typeof C==`number`?`${C}px`:C},"data-sidebar-right-session":s.session?.sessionId,"data-sidebar-right-panel":_?`fullscreen`:i?`focus`:`push`,"data-sidebar-right-open":e.shown||void 0,"aria-hidden":!e.shown||void 0,children:(0,F.jsxs)(`div`,{className:rZ.panelBody,children:[p&&(0,F.jsx)(`p`,{role:`alert`,children:p}),(0,F.jsx)(nZ,{state:f,canSplit:u.canSplit&&hJ(f).length<2,dropZones:`horizontal`,minPaneFraction:.2,intents:g,labels:sZ(y),active:!0,keepMounted:()=>!0,renderTab:t=>{let n=mJ(f,t.id).id,i=f.expanded&&sJ(f,n).activeTabId===t.id;if(t.kind===`guide`)return(0,F.jsx)(`div`,{className:ue.guide,children:(0,F.jsxs)(`div`,{className:ue.guideGrid,role:`group`,"aria-label":r(`工作区工具`,`Workspace tools`),children:[o.map(e=>{let t=e.definition.workbench?.entry;if(!t)return null;let r=t.icon;return(0,F.jsxs)(`button`,{type:`button`,className:ue.guideEntry,disabled:!s.session||!c,"aria-label":b(t.label),onClick:()=>d(t.kind,t.multiple?ge():`workspace`,b(t.panelTitle??t.label),n,e.id),children:[(0,F.jsx)(`span`,{className:ue.guideIcon,"aria-hidden":`true`,children:(0,F.jsx)(r,{size:24})}),(0,F.jsxs)(`span`,{className:ue.guideCopy,children:[(0,F.jsx)(`span`,{className:ue.guideLabel,children:b(t.label)}),(0,F.jsx)(`span`,{className:ue.guideDescription,children:b(t.description)})]})]},e.id)}),!o.some(e=>e.definition.workbench?.entry)&&(0,F.jsx)(`p`,{className:ue.state,children:r(`没有已启用的工作区插件,可在设置中启用。`,`No workspace plugins enabled. Enable one in Settings.`)})]})});let a=x.find(e=>e.contribution.kind===t.kind);if(a&&s.session){let{plugin:r,contribution:o}=a;e.owners.set(t.id,r.id);let c=o.component;return(0,F.jsx)(SZ,{id:r.id,children:(0,F.jsx)(c,{sendMessage:s.sendMessage,session:s.session,locale:s.locale,visible:i,contentId:t.contentId,title:t.title,renderMarkdown:s.renderMarkdown,resource:(n,r,i)=>{let a=e.resources.get(t.id);if(!a){let o=n();a={value:o,dispose:()=>r?.(o),activate:e=>i?.(o,e)},e.resources.set(t.id,a)}return a.value},open:(e,t,i)=>d(e,t,i,n,r.id)})})}return(0,F.jsx)(EZ,{plugins:o,slot:`rightbar.panel`,props:{...s,panelId:t.contentId}})},renderTabTitle:e=>{if(e.kind===`guide`)return y(`tab.guide.title`);let t=x.find(t=>t.contribution.kind===e.kind);return t?(0,F.jsx)(`span`,{className:ue.title,children:t.contribution.title?.(e.contentId,e.title)??e.title}):(0,F.jsx)(EZ,{plugins:o,slot:`rightbar.title`,props:{...s,panelId:e.contentId}})},chrome:(0,F.jsx)(oZ,{sessionId:s.session?.sessionId??``,fullscreen:_||i,focus:i,shortcuts:[],t:y,actions:{toggleExpanded:S},toggleFullscreen:()=>i?a():n?S():l.setMode(_?`push`:`fullscreen`)})})]})})}function kZ({panel:e,locale:t}){if(e.shown)return null;let n=t===`zh`?cZ:lZ;return(0,F.jsx)(mO,{label:n[`chrome.expand`],side:`bottom`,delayMs:500,children:(0,F.jsx)(dZ,{size:`sm`,className:fZ.button,"aria-label":n[`chrome.expandAria`],"data-sidebar-right-expand":!0,onClick:e.expand,children:(0,F.jsx)(te,{className:fZ.icon})})})}function AZ(e,t){let n=e.filter(e=>e.enabled&&e.generation!==void 0&&e.contribution&&e.documentUrl&&e.controllerUrl).map(e=>{let n=t.find(t=>t.pluginId===e.pluginId);return n&&n.generation===e.generation&&n.name===e.name&&n.icon===e.icon&&n.documentUrl===e.documentUrl&&n.controllerUrl===e.controllerUrl&&JSON.stringify(n.contribution)===JSON.stringify(e.contribution)?n:e});return n.length===t.length&&n.every((e,n)=>e===t[n])?t:n}var jZ=`pi:hosted:unconfirmed-views:v1`,MZ=`pi:hosted:unconfirmed-view:v1:`,NZ=`pi:hosted:retired-view:v1:`,PZ=``,FZ=()=>{PZ=`View recovery journal could not be read. Its original data has been retained.`},IZ=()=>{PZ=`View recovery journal could not be stored. Keep this page open and download local drafts.`};function LZ(e){if(!e||typeof e!=`object`)return!1;let t=e;return[`controller`,`workspace`,`editor`,`tool`].includes(String(t.kind))&&[`sessionId`,`pluginId`,`mountId`,`viewToken`].every(e=>typeof t[e]==`string`&&t[e].length>0&&t[e].length<=214)&&Number.isSafeInteger(t.generation)&&Number(t.generation)>=1&&(t.contentId===void 0||typeof t.contentId==`string`)&&(t.createdAt===void 0||Number.isSafeInteger(t.createdAt))&&[`retained`,`frameStarted`].every(e=>t[e]===void 0||typeof t[e]==`boolean`)&&(t.backups===void 0||Array.isArray(t.backups)&&t.backups.every(e=>e&&typeof e.key==`string`&&typeof e.name==`string`))}function RZ(){try{if(typeof sessionStorage>`u`)return[];let e=sessionStorage.getItem(jZ);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t)||!t.every(LZ))throw Error(`Invalid view recovery journal`);return t}catch{return FZ(),[]}}function zZ(e){if(typeof localStorage>`u`)return null;let t=localStorage.getItem(NZ+e);if(t!==null){if(JSON.parse(t)!==!0)throw Error(`Invalid view retirement receipt`);return`retired`}let n=localStorage.getItem(MZ+e);if(!n)return null;let r=JSON.parse(n);if(!LZ(r)||r.viewToken!==e)throw Error(`Invalid durable view recovery record`);return r}function BZ(e,t){return e.sessionId===t.sessionId&&e.pluginId===t.pluginId&&e.generation===t.generation&&e.mountId===t.mountId}var VZ=RZ(),HZ=new Set(VZ.map(e=>e.viewToken));function UZ(){let e=new Map(VZ.map(e=>[e.viewToken,e]));try{if(typeof localStorage<`u`)for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t),r=n?.startsWith(MZ)?MZ:n?.startsWith(NZ)?NZ:void 0;if(!r)continue;let i=n.slice(r.length);try{let t=zZ(i);if(t===`retired`)e.delete(i);else if(t){let n=e.get(i);if(n&&!BZ(n,t))throw Error(`Conflicting view recovery identity`);e.set(i,{...t,discovered:!HZ.has(i)})}}catch{FZ()}}}catch{FZ()}return[...e.values()]}var WZ=UZ(),GZ=[...WZ];function KZ(){return GZ=GZ.filter(e=>{try{return zZ(e.viewToken)!==`retired`}catch{return FZ(),!0}}),GZ.filter(e=>WZ.some(t=>t.viewToken===e.viewToken))}var qZ=new Map,JZ=`pi:hosted:recovery-draft:v1:`,YZ=()=>PZ;function XZ(){if(PZ)return!1;try{return typeof sessionStorage<`u`&&sessionStorage.setItem(jZ,JSON.stringify(GZ.filter(e=>HZ.has(e.viewToken)))),!0}catch{return IZ(),!1}}function ZZ(e){if(PZ)return!1;try{if(typeof localStorage>`u`)return!0;let t=zZ(e.viewToken);if(t===`retired`)return!1;if(t&&!BZ(t,e))throw Error(`Conflicting view recovery identity`);let{discovered:n,...r}={...e,...t?.frameStarted?{frameStarted:!0}:{},...t?.retained?{retained:!0}:{},backups:[...new Map([...t?.backups??[],...e.backups??[]].map(e=>[e.key,e])).values()]};return localStorage.setItem(MZ+e.viewToken,JSON.stringify(r)),!0}catch{return IZ(),!1}}function QZ(e,t,n){HZ.add(t),GZ=GZ.filter(e=>e.viewToken!==t);let r={...e,viewToken:t,kind:n.kind,contentId:n.contentId,frameStarted:!1,createdAt:Date.now()};GZ.push(r),ZZ(r),XZ()}function $Z(e){let t=GZ.find(t=>t.viewToken===e);if(!t||t.retained)return!1;let n={...t,frameStarted:!0};return ZZ(n)?(GZ=GZ.map(t=>t.viewToken===e?n:t),XZ()):!1}function eQ(e){GZ=GZ.filter(t=>t.viewToken!==e),HZ.delete(e);try{zZ(e),typeof localStorage<`u`&&localStorage.setItem(NZ+e,JSON.stringify(!0))}catch{FZ()}XZ()}async function tQ(e){if(e.discovered&&(e.kind===`controller`||e.frameStarted!==!0))return;let t=(await Bk.view({...e,operation:`reconcile`})).recovery;return t?.state===`unconfirmed`&&e.frameStarted===!1&&HZ.has(e.viewToken)&&(await Bk.view({...e,operation:`cancel-initialization`}),eQ(e.viewToken),t={...t,state:`retired`}),(t?.state===`retired`||t?.state===`absent`&&e.kind===`controller`)&&eQ(e.viewToken),t}var nQ=3e5,rQ=new Set([`invalid_scope`,`unknown_plugin`]),iQ=`@chengzhiyi/pi-excalidraw`;function aQ(e){if(!Array.isArray(e))return;let t=e.filter(e=>e&&typeof e==`object`&&!e.isDeleted).map(e=>[String(e.id),e.version,e.versionNonce]);return JSON.stringify(t.sort((e,t)=>e[0]<t[0]?-1:+(e[0]>t[0])))}async function oQ(e,t){if(e.kind===`controller`)return!0;let n=uQ(e);if(!n.length)return!0;if(e.pluginId!==iQ||t===void 0)return!1;for(let r of n){let n=/^recovery-(.+)\.excalidraw$/.exec(r.name)?.[1];if(!n)return!1;try{let i=await Bk.action({sessionId:e.sessionId,pluginId:e.pluginId,generation:t,action:`get`,input:{id:n}}),a=aQ(JSON.parse(r.json).elements);if(!a||a!==aQ(i?.scene?.elements))return!1}catch{return!1}}return!0}async function sQ(e,t,n=Date.now()){if(e.retained)return{state:`retained`};let r=e.frameStarted===!0||e.createdAt===void 0||n-e.createdAt>nQ,i=async()=>await oQ(e,t)?(eQ(e.viewToken),!0):!1,a;try{a=(await Bk.view({...e,operation:`status`})).recovery}catch(t){let n=t?.code;if(r&&typeof n==`string`&&rQ.has(n)&&await i())return{state:`retired`};if(t instanceof Error&&t.message===`Unknown view operation`)return tQ(e);throw t}if(a?.state===`retired`)return eQ(e.viewToken),a;if(a?.state===`absent`)return r&&await i()?{state:`retired`}:r||e.discovered?a:tQ(e);if(a?.state===`unconfirmed`&&a.stale){if(e.kind===`controller`)return tQ({...e,discovered:!1});if(!a.dirty&&!a.busy&&await oQ(e,t))try{return await Bk.view({...e,operation:`close`}),eQ(e.viewToken),{state:`retired`}}catch{return a}return a}return a?.state===`unconfirmed`&&!e.discovered?tQ(e):a}async function cQ(e){let t=await Bk.view({...e,operation:`recover`,confirmation:`retain-unconfirmed-edits`});if(t.recovery?.state===`retired`){eQ(e.viewToken);return}if(!t.recovery||![`retained`,`absent`].includes(t.recovery.state))throw Error(`This view still has an active operation. Its recovery state was preserved.`);GZ=GZ.map(t=>t.viewToken===e.viewToken?{...t,retained:!0}:t);let n=GZ.find(t=>t.viewToken===e.viewToken);n&&ZZ(n),XZ()}async function lQ(e){(await Bk.view({...e,operation:`reconcile`})).recovery?.state!==`absent`&&await Bk.view({...e,operation:`discard`,confirmation:`discard-unconfirmed-edits`}),eQ(e.viewToken)}function uQ(e){if(e.pluginId!==`@chengzhiyi/pi-excalidraw`)return[];let t=`pi-diagram:${e.sessionId}:`,n=[];try{if(typeof localStorage>`u`)return[];for(let t of e.backups??[]){if(!t.key.startsWith(`${JZ}${e.viewToken}:`))continue;let r=qZ.get(t.key)??localStorage.getItem(t.key);r&&n.push({name:t.name,json:r})}if(n.length)return n;for(let r=0;r<localStorage.length;r++){let i=localStorage.key(r);if(!i?.startsWith(t)||e.contentId&&i!==t+e.contentId)continue;let a=localStorage.getItem(i);if(!(!a||a.length>16777216))try{let e=JSON.parse(a);if(!e||!Array.isArray(e.elements))continue;let r=i.slice(t.length).replace(/[^\w.-]/g,`_`).slice(0,100);n.push({name:`recovery-${r}.excalidraw`,json:a})}catch{}}}catch{}return n}for(let e of WZ){if(e.kind===`controller`)continue;let t=uQ(e);t.length&&(e.backups=t.map(t=>{let n=`${JZ}${e.viewToken}:${t.name}`;qZ.set(n,t.json);try{localStorage.getItem(n)||localStorage.setItem(n,t.json)}catch{PZ=`Recovery copy could not be stored. Keep this page open and download local drafts before reloading.`}return{key:n,name:t.name}}))}for(let e of GZ)ZZ(e);XZ();function dQ(e){let t=e;if(!t||!(t.blob instanceof Blob)||!t.blob.size||t.blob.size>16777216||typeof t.name!=`string`||t.name.length>200||/[/\\\x00-\x1f\x7f]/.test(t.name))throw Error(`Invalid drawing download`);let n={png:`image/png`,svg:`image/svg+xml`,excalidraw:`application/json`,json:`application/json`}[t.name.split(`.`).pop()?.toLowerCase()??``];if(!n||t.blob.type!==n)throw Error(`Unsupported drawing download`);return{blob:t.blob,name:t.name}}function fQ(e){let{blob:t,name:n}=dQ(e),r=URL.createObjectURL(t),i=document.createElement(`a`);i.href=r,i.download=n,i.hidden=!0,document.body.append(i);try{i.click()}finally{i.remove(),setTimeout(()=>URL.revokeObjectURL(r),3e4)}}var pQ={entry:`_entry_ic7m3_1`,trigger:`_trigger_ic7m3_3`,dialog:`_dialog_ic7m3_5`,content:`_content_ic7m3_8`,list:`_list_ic7m3_10`,item:`_item_ic7m3_11`,error:`_error_ic7m3_14`,history:`_history_ic7m3_20`,actions:`_actions_ic7m3_24`};function mQ({sessionId:e,locale:t,openRecovered:n}){let[r,i]=(0,P.useState)(KZ),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(``),[d,f]=(0,P.useState)(!1),[p,m]=(0,P.useState)(0),h=(e,n)=>t===`zh`?e:n,[g,_]=(0,P.useState)(new Set),[v,y]=(0,P.useState)(new Set),b=r.filter(e=>v.has(e.viewToken)&&!g.has(e.viewToken)),x=YZ(),S=e=>{eQ(e),i(t=>t.filter(t=>t.viewToken!==e))};if((0,P.useEffect)(()=>{o(!1),c(null),u(``)},[e]),(0,P.useEffect)(()=>{let e=!0;return(async()=>{let t=new Map;try{t=new Map((await Bk.catalog()).plugins.flatMap(e=>e.generation===void 0?[]:[[e.pluginId,e.generation]]))}catch{}let n=e=>y(t=>new Set(t).add(e));for(let a of r){if(!e)return;try{let r=await sQ(a,t.get(a.pluginId));if(!e)return;r?.state===`retired`||r?.state===`absent`&&a.kind===`controller`?S(a.viewToken):r?.state===`retained`&&i(e=>e.map(e=>e.viewToken===a.viewToken?{...e,retained:!0}:e)),_(e=>{let t=new Set(e);return a.discovered&&r?.state===`unconfirmed`&&r.stale===!1?t.add(a.viewToken):t.delete(a.viewToken),t}),n(a.viewToken)}catch(t){if(!e)return;if(t instanceof Error&&t.message===`Unknown view operation`){y(new Set(r.map(e=>e.viewToken)));return}n(a.viewToken),u(String(t))}}})(),()=>{e=!1}},[e,p]),!b.length&&!x)return null;let C=e=>({controller:h(`后台控制器`,`Controller`),workspace:h(`工作区`,`Workspace`),editor:h(`编辑器`,`Editor`),tool:h(`工具预览`,`Tool preview`)})[e]??h(`插件视图`,`Plugin view`),w=s?.operation===`retain`;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:pQ.entry,"data-hosted-recovery":!0,children:[(0,F.jsx)(`p`,{children:h(`刷新或关闭窗口后,旧插件视图可能尚未完成保存和关闭确认;部分记录也可能属于仍打开的窗口。请先核对原窗口及备份,再保留失联视图的恢复记录,解除升级等操作的阻塞。`,`After reloading or closing a window, previous plugin views may lack save and close confirmations. Some records may belong to windows still open. Check original windows and backups, then retain disconnected views for recovery to unblock updates and other operations.`)}),(0,F.jsxs)(`button`,{type:`button`,className:pQ.trigger,"aria-haspopup":`dialog`,onClick:()=>o(!0),children:[h(`插件视图恢复`,`Plugin view recovery`),` · `,b.length]})]}),(0,F.jsx)(DO,{open:a,onClose:()=>o(!1),title:h(`检查之前的插件视图`,`Review previous plugin views`),closeLabel:h(`关闭`,`Close`),className:pQ.dialog,footer:(0,F.jsx)(TO,{variant:`outline`,disabled:d,onClick:()=>{u(``),m(e=>e+1)},children:h(`重新检查`,`Check again`)}),children:(0,F.jsxs)(`div`,{className:pQ.content,children:[(0,F.jsx)(`p`,{children:h(`以下列出所有会话中待确认的旧插件视图。请先检查原窗口、编辑器和本地备份,只处理已失联的视图;仍打开的窗口请先正常保存并关闭。`,`These are previous plugin views awaiting confirmation across all sessions. Check original windows, editors and local backups. Only recover disconnected views; save and close windows that remain open first.`)}),(0,F.jsx)(`p`,{children:h(`保留恢复记录会停止旧视图继续写入,不会覆盖当前图稿。丢弃未确认的记录不会保存或恢复图稿,无法找回的最新修改可能永久丢失。`,`Retaining recovery records stops old views writing without overwriting the current drawing. Discarding unconfirmed records does not save or restore a drawing; unrecoverable recent edits may be permanently lost.`)}),(0,F.jsx)(`div`,{className:pQ.list,children:b.map((t,r)=>(0,F.jsxs)(`section`,{className:pQ.item,"data-unconfirmed-view":t.mountId,children:[(0,F.jsxs)(`h3`,{children:[C(t.kind),` `,r+1]}),t.retained&&(0,F.jsx)(`p`,{children:h(`失联视图的恢复记录已保留。插件可继续操作;旧稿是否完整仍需核对。`,`Disconnected view recovery record retained. Plugin operations may continue; the old draft still needs verification.`)}),(0,F.jsxs)(`details`,{children:[(0,F.jsx)(`summary`,{children:h(`视图信息`,`View details`)}),(0,F.jsxs)(`dl`,{children:[(0,F.jsx)(`dt`,{children:h(`会话`,`Session`)}),(0,F.jsx)(`dd`,{children:t.sessionId}),(0,F.jsx)(`dt`,{children:h(`插件`,`Plugin`)}),(0,F.jsx)(`dd`,{children:t.pluginId}),(0,F.jsx)(`dt`,{children:h(`版本代次`,`Generation`)}),(0,F.jsx)(`dd`,{children:t.generation}),(0,F.jsx)(`dt`,{children:h(`视图标识`,`View ID`)}),(0,F.jsx)(`dd`,{children:t.mountId}),t.contentId&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`dt`,{children:h(`内容标识`,`Content ID`)}),(0,F.jsx)(`dd`,{children:t.contentId})]})]})]}),(0,F.jsxs)(`div`,{className:pQ.actions,children:[uQ(t).map(e=>(0,F.jsxs)(TO,{variant:`outline`,disabled:d,onClick:()=>fQ({blob:new Blob([e.json],{type:`application/json`}),name:e.name}),children:[h(`下载本地恢复副本`,`Download local recovery copy`),` · `,e.name]},e.name)),t.contentId&&t.sessionId===e&&n&&(0,F.jsx)(TO,{variant:`outline`,disabled:d,onClick:()=>{o(!1),n(t.contentId)},children:h(`打开图稿并核对备份`,`Open drawing and compare backup`)}),!t.retained&&(0,F.jsx)(TO,{variant:`outline`,disabled:d,onClick:()=>c({item:t,operation:`retain`}),children:h(`保留恢复记录并解除阻塞`,`Retain recovery record and unblock`)}),(0,F.jsx)(TO,{variant:`outline`,disabled:d,onClick:()=>c({item:t,operation:`discard`}),children:h(`丢弃此视图的未确认修改`,`Discard this view's unconfirmed edits`)})]})]},t.viewToken))}),(l||x)&&(0,F.jsxs)(`div`,{role:`alert`,className:pQ.error,children:[h(`未能确认部分视图,请保留恢复记录并重试。`,`Some views could not be verified. Keep their recovery records and retry.`),(0,F.jsxs)(`details`,{children:[(0,F.jsx)(`summary`,{children:h(`诊断信息`,`Diagnostics`)}),l||x]})]})]})}),(0,F.jsx)(DO,{open:!!s&&a,onClose:()=>c(null),title:w?h(`保留此视图用于恢复?`,`Retain this view for recovery?`):h(`丢弃此视图的未确认修改?`,`Discard this view's unconfirmed edits?`),closeLabel:h(`关闭`,`Close`),description:w?h(`请先确认旧视图已失联并核对备份。此操作保留恢复记录和本地副本,停止旧视图继续写入,不会保存、覆盖或丢弃图稿。`,`First confirm the old view is disconnected and review backups. This preserves recovery records and local copies and stops the old view writing, without saving, overwriting or discarding a drawing.`):h(`请先确认原标签页已关闭,并下载可恢复的草稿。此操作不会保存或恢复内容;无法找回的修改可能永久丢失。`,`First confirm the original tab is closed and download any recoverable draft. This does not save or restore content; unrecovered edits may be permanently lost.`),footer:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(TO,{variant:`outline`,disabled:d,onClick:()=>c(null),children:h(`取消`,`Cancel`)}),(0,F.jsx)(TO,{variant:`primary`,disabled:d,onClick:()=>{if(!s||d)return;let{item:e,operation:t}=s;f(!0),u(``),(t===`retain`?cQ(e):lQ(e)).then(()=>{t===`retain`?i(KZ()):S(e.viewToken),c(null)}).catch(e=>{u(String(e)),c(null)}).finally(()=>f(!1))},children:w?h(`保留恢复记录`,`Retain record`):h(`确认丢弃`,`Discard edits`)})]})})]})}var hQ=new class{entries=new Set;releaseLock;timer;running=!1;interval;request;constructor(e=250,t=async e=>{let t=new AbortController,n=setTimeout(()=>t.abort(),5e3);try{return await zk(`/views`,{operation:`pollMany`,views:e},t.signal)}finally{clearTimeout(n)}}){this.interval=e,this.request=t}add(e){return this.entries.add(e),this.holdLock(),this.schedule(0),()=>{this.entries.delete(e),this.entries.size||(this.timer&&=(clearTimeout(this.timer),void 0),this.releaseLock?.())}}holdLock(){if(this.releaseLock||typeof navigator>`u`||!navigator.locks)return;let e,t=new Promise(t=>{e=t});this.releaseLock=()=>{this.releaseLock=void 0,e()},navigator.locks.request(`pi:hosted:view-poller:${crypto.randomUUID()}`,()=>t).catch(()=>{this.releaseLock=void 0})}wake(){!this.running&&this.entries.size&&(this.timer&&=(clearTimeout(this.timer),void 0),this.schedule(0))}schedule(e){this.running||this.timer||!this.entries.size||(this.timer=setTimeout(()=>{this.timer=void 0,this.tick()},e))}async tick(){this.running=!0;let e=[...this.entries];try{for(let t=0;t<e.length;t+=64){let n=e.slice(t,t+64).filter(e=>this.entries.has(e));if(!n.length)continue;let{replies:r}=await this.request(n.map(e=>e.input()));if(!Array.isArray(r)||r.length!==n.length)throw Error(`Invalid aggregate view reply`);await Promise.all(n.map(async(e,t)=>{if(this.entries.has(e))try{let n=r[t];if(n.failure)throw Object.assign(Error(n.failure.body.error),{status:n.failure.status});if(!n.reply||n.reply.viewToken!==e.input().viewToken)throw Error(`Mismatched view reply`);await e.accept(n.reply)}catch(t){this.entries.delete(e),e.fail(t)}}))}}catch(t){for(let n of e)this.entries.delete(n)&&n.fail(t)}finally{this.running=!1,this.schedule(this.interval)}}};typeof document<`u`&&document.addEventListener(`visibilitychange`,()=>{document.hidden||hQ.wake()});var gQ=class{token=``;get capability(){return{viewToken:this.token,mountId:this.identity.mountId}}stopped=!1;closed=!1;closing;abort=new AbortController;unlisten;after=0;snapshot;frozen=!1;localCloseCheckpoint=!1;frameStarted=!1;connecting(){if(!$Z(this.token)&&this.mount.kind!==`controller`)throw Error(`Cannot protect the editor recovery journal; download local drafts before opening another editor`);this.frameStarted=!0}async flushed(){await this.changed({dirty:!1,busy:!1})}identity;adapter;mount;reconnect;failed;poller;constructor(e,t,n,r,i,a=hQ){this.poller=a,this.identity=e,this.adapter=t,this.mount=n,this.reconnect=r,this.failed=i}async start(){this.token=crypto.randomUUID(),QZ(this.identity,this.token,this.mount);let e=await Bk.view({...this.identity,operation:`register`,kind:this.mount.kind,viewToken:this.token});e.viewToken!==this.token&&(eQ(this.token),this.token=e.viewToken,QZ(this.identity,this.token,this.mount))}listen(){this.stopped||this.unlisten||(this.unlisten=this.poller.add({input:()=>({...this.identity,viewToken:this.token,operation:`poll`,after:this.after}),accept:e=>this.receive(e),fail:e=>{this.stopped||this.failed(e)}}))}retry(){if(this.closed)throw Error(`Closed view cannot reconnect`);this.unlisten?.(),this.unlisten=void 0,this.stopped=!1,this.abort=new AbortController,this.localCloseCheckpoint?this.adapter.call(`restore`,this.snapshot).then(()=>{this.frozen=!1,this.localCloseCheckpoint=!1,this.listen()}).catch(this.failed):this.listen()}request(e){return Bk.view({...this.identity,viewToken:this.token,...e},this.abort.signal)}async changed(e){let t=e;if(typeof t?.dirty!=`boolean`||typeof t.busy!=`boolean`)throw Error(`Invalid frame status`);await this.request({operation:`change`,dirty:t.dirty,busy:t.busy})}async receive(e){for(let t of e.commands){if(this.stopped)return;let e;try{if(t.type===`freeze`&&!this.frozen&&(this.snapshot=await this.adapter.call(`freeze`),this.frozen=!0),t.type===`resume`&&this.frozen&&(await this.adapter.call(`restore`,this.snapshot),this.frozen=!1),t.type===`committed`){await this.request({operation:`ack`,commandId:t.id,ok:!0}),await this.close(),this.reconnect();return}}catch(t){e=t}await this.request({operation:`ack`,commandId:t.id,ok:!e,...e?{error:e instanceof Error?e.message:String(e)}:{}}),this.after=t.id,e&&this.failed(e)}}close(){return this.closed?Promise.resolve():(this.closing||=(this.stopped=!0,this.unlisten?.(),this.abort.abort(),(async()=>{this.token&&(this.mount.kind!==`controller`&&!this.frameStarted?await Bk.view({...this.identity,viewToken:this.token,operation:`cancel-initialization`}):(this.mount.kind!==`controller`&&!this.frozen&&(this.snapshot=await this.adapter.call(`freeze`),this.frozen=!0,this.localCloseCheckpoint=!0),this.localCloseCheckpoint&&await Bk.view({...this.identity,viewToken:this.token,operation:`change`,dirty:!1,busy:!1}),await Bk.view({...this.identity,viewToken:this.token,operation:`close`})),this.closed=!0,eQ(this.token))})().catch(e=>{throw this.closing=void 0,e})),this.closing)}},_Q={card:`_card_1g0je_1`,header:`_header_1g0je_2`,toggle:`_toggle_1g0je_6`,title:`_title_1g0je_7`,status:`_status_1g0je_8`,chevron:`_chevron_1g0je_9`,parameters:`_parameters_1g0je_12`,preview:`_preview_1g0je_13`,dialog:`_dialog_1g0je_15`,details:`_details_1g0je_18`};function vQ({title:e,tool:t,locale:n,children:r}){let[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),c=(0,P.useId)(),l=(e,t)=>n===`zh`?e:t,u=t.result?.blocks.filter(e=>e.kind===`text`).map(e=>e.text??``).join(`
501
+ `);return(0,F.jsxs)(`article`,{className:e?_Q.card:void 0,"data-hosted-tool-card":e?``:void 0,children:[e&&(0,F.jsxs)(`header`,{className:_Q.header,children:[(0,F.jsxs)(`button`,{type:`button`,className:_Q.toggle,"aria-label":l(`展开或收起预览`,`Toggle preview`),"aria-expanded":!i,"aria-controls":c,onClick:()=>a(e=>!e),children:[(0,F.jsx)(`span`,{className:_Q.title,children:e}),(0,F.jsx)(`span`,{className:_Q.status,children:t.result?.isError?l(`失败`,`Failed`):t.result?l(`已完成`,`Completed`):t.running?l(`运行中`,`Running`):l(`未完成`,`Incomplete`)}),(0,F.jsx)(`span`,{className:_Q.chevron,"data-collapsed":i,"aria-hidden":`true`,children:(0,F.jsx)(ct,{size:16})})]}),(0,F.jsx)(`button`,{type:`button`,className:_Q.parameters,"aria-haspopup":`dialog`,onClick:()=>s(!0),children:l(`查看参数`,`View parameters`)})]}),(0,F.jsx)(`div`,{id:c,hidden:!!e&&i,className:_Q.preview,children:r}),(0,F.jsx)(DO,{open:o&&!!e,onClose:()=>s(!1),title:l(`工具参数`,`Tool parameters`),closeLabel:l(`关闭`,`Close`),className:_Q.dialog,children:(0,F.jsxs)(`div`,{className:_Q.details,"data-tool-parameters":!0,children:[(0,F.jsx)(`h3`,{children:l(`输入参数`,`Input`)}),(0,F.jsx)(`pre`,{tabIndex:0,children:t.call.text}),u!==void 0&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`h3`,{children:l(`工具结果`,`Result`)}),(0,F.jsx)(`pre`,{tabIndex:0,children:u})]})]})})]})}function yQ(e){let t=e;if(typeof t?.title!=`string`||!t.title.trim()||t.title.length>160)throw Error(`Invalid tool presentation`);return{title:t.title}}function bQ(e){let t=e?.height;if(typeof t!=`number`||!Number.isFinite(t)||t<0||t>4096)throw Error(`Invalid tool height`);return Math.max(1,Math.ceil(t))}function xQ(e){let t=e;if(typeof t?.message!=`string`||t.message.length>4e3||t.level!==`info`&&t.level!==`error`)throw Error(`Invalid notification`);return{message:t.message,level:t.level}}function SQ({card:e,mount:t,update:n,open:r,sendMessage:i,reconnect:a,abort:o}){let s=(0,P.useRef)(null),c=(0,P.useRef)(null),l=(0,P.useRef)(null),u=(0,P.useRef)(Promise.resolve()),d=(0,P.useRef)({open:r,sendMessage:i,reconnect:a,abort:o});d.current={open:r,sendMessage:i,reconnect:a,abort:o};let[f,p]=(0,P.useState)(``),[m,h]=(0,P.useState)(),[g,_]=(0,P.useState)(240),[v,y]=(0,P.useState)(),[b,x]=(0,P.useState)(CQ);(0,P.useEffect)(()=>{let e=new MutationObserver(()=>x(CQ()));return e.observe(document.body,{attributes:!0,attributeFilter:[`data-ds-dark-theme`]}),()=>e.disconnect()},[]),(0,P.useEffect)(()=>{if(!s.current||e.generation===void 0)return;let r={pluginId:e.pluginId,generation:e.generation,sessionId:t.sessionId,mountId:crypto.randomUUID()},i=!0,a=e=>{i&&p(e instanceof Error?e.message:String(e))},o,f=new ip(s.current,r,async(n,a)=>{if(!i)throw Error(`Frame mount cancelled`);let s=a;if(n===`toolPresentation`&&t.kind===`tool`)return h(yQ(a)),null;if(n===`resize`&&t.kind===`tool`)return _(bQ(a)),null;if(n===`notify`)return y(xQ(a)),null;if(n===`action`){if(typeof s?.action!=`string`)throw Error(`Invalid action`);return Bk.action({sessionId:r.sessionId,pluginId:r.pluginId,generation:r.generation,...o.capability,action:s.action,input:s.input})}if(n===`downloadDrawing`&&[`editor`,`workspace`].includes(t.kind))return fQ(a),null;if(n===`changed`)return o.changed(a);if(n===`abort`&&d.current.abort)return await d.current.abort(),null;if(n===`openPanel`){if(typeof s?.kind!=`string`||!e.contribution?.panels.includes(s.kind)||typeof s.contentId!=`string`)throw Error(`Undeclared panel`);return d.current.open(s.kind,s.contentId,typeof s.title==`string`?s.title:e.name),null}if(n===`sendMessage`&&typeof s?.text==`string`)return await d.current.sendMessage(s.text),null;throw Error(`Unsupported frame host method: ${n}`)});o=new gQ(r,f,t,()=>d.current.reconnect(),a),c.current=f,l.current=o;let m=(async()=>{if(await o.start(),!i)throw Error(`Frame mount cancelled`);o.connecting(),await f.connect(t.kind===`controller`?e.controllerUrl:e.documentUrl,{...t,theme:CQ(),hostUi:{toolCard:!0,autoResize:!0,notifications:!0}}),o.listen()})();u.current=m;let g=ap.add({identity:r,ready:m,adapter:f,afterFlush:()=>o.flushed(),toolCallId:n?.call?.toolCallId,retire:()=>o.close()});return m.catch(a),()=>{i=!1,g(),c.current=null,l.current=null,m.catch(()=>{}).then(()=>o.close()).catch(e=>console.error(`Hosted view cleanup did not acknowledge edits`,e)).finally(()=>f.dispose())}},[e.pluginId,e.generation,e.documentUrl,e.controllerUrl,t.sessionId,t.kind,t.contentId]),(0,P.useEffect)(()=>{u.current.then(()=>c.current?.call(`update`,{...t,...n??{},theme:b})).catch(e=>p(String(e)))},[n,t.locale,b,t.visible,t.title]);let S=(0,F.jsxs)(`div`,{"data-hosted-plugin":e.pluginId,style:{height:t.kind===`controller`||t.kind===`tool`?`auto`:`100%`,minHeight:0},children:[f&&(0,F.jsxs)(`p`,{role:`alert`,children:[f,` `,(0,F.jsx)(`button`,{type:`button`,onClick:()=>{try{l.current?.retry(),p(``)}catch(e){p(String(e))}},children:`Retry view connection`})]}),v&&(0,F.jsxs)(`p`,{role:v.level===`error`?`alert`:`status`,children:[v.message,(0,F.jsx)(`button`,{type:`button`,"aria-label":t.locale===`zh`?`关闭通知`:`Dismiss notification`,onClick:()=>y(void 0),children:`×`})]}),(0,F.jsx)(`iframe`,{hidden:t.kind===`controller`,ref:s,title:`${e.name} ${t.kind}`,style:{display:t.kind===`controller`?`none`:`block`,width:`100%`,height:t.kind===`tool`?g:`100%`,border:0}})]});return t.kind===`tool`?(0,F.jsx)(vQ,{title:m?.title,tool:n,locale:t.locale,children:S}):S}var CQ=()=>document.body.hasAttribute(`data-ds-dark-theme`)?`dark`:`light`;function wQ(e,t,n){let r=e.contribution,i=t=>`hosted:${e.pluginId}:${t}`;return{id:e.pluginId,instanceId:`${e.pluginId}/${e.generation}`,definition:{id:e.pluginId,apiVersion:1,activate(){},artifactTools:r.artifactTools,workbench:{apiVersion:1,entry:{...r.entry,kind:i(r.entry.kind),icon:t=>(0,F.jsx)(Wk,{card:e,...t})},panels:r.panels.map(a=>({kind:i(a),component:o=>(0,F.jsx)(SQ,{card:e,reconnect:t,abort:()=>n.current.abort?.()??Promise.reject(Error(`Abort unavailable`)),mount:{kind:a===r.entry.kind?`workspace`:`editor`,sessionId:o.session.sessionId,contentId:o.contentId,title:o.title,visible:o.visible,locale:o.locale,theme:CQ()},open:(e,t,n)=>o.open(i(e),t,n),sendMessage:o.sendMessage})})),toolViews:r.toolViews.length?[{tools:r.toolViews,component:i=>i.session?(0,F.jsx)(SQ,{card:e,reconnect:t,abort:()=>n.current.abort?.()??Promise.reject(Error(`Abort unavailable`)),mount:{kind:`tool`,sessionId:i.session.sessionId,locale:i.locale,theme:CQ()},update:{call:i.call,result:i.result,running:i.running},open:(e,t)=>i.openPanel(`${r.panelAlias.prefix}${t}`),sendMessage:i.sendMessage},ap.incarnation(i.session.sessionId,i.call.toolCallId)):null}]:[],resolvePanel:e=>e.startsWith(r.panelAlias.prefix)?{kind:i(r.panelAlias.kind),contentId:e.slice(r.panelAlias.prefix.length),title:r.panelAlias.title}:null}}}}function TQ(e,t,n,r,i){let a=mQ({sessionId:t,locale:i,openRecovered:e=>r.current.openPanel?.(`diagram:${e}`)}),[o,s]=(0,P.useState)([]),[c,l]=(0,P.useState)([]),[u,d]=(0,P.useState)([]),[f,p]=(0,P.useState)(0),[m,h]=(0,P.useState)(``),g=(0,P.useMemo)(()=>()=>p(e=>e+1),[]);(0,P.useEffect)(()=>{if(!e||!t){s([]);return}let n=!0,r=new AbortController;return window.addEventListener(`pi:hosted-catalog-changed`,g),Bk.catalog(r.signal).then(e=>{n&&(s(t=>AZ(e.plugins,t)),l(e.approvals??[]),e.offline||d(e.plugins.filter(e=>!e.installed||!e.enabled).map(e=>e.pluginId)),h(``))}).catch(()=>{}),()=>{n=!1,r.abort(),window.removeEventListener(`pi:hosted-catalog-changed`,g)}},[e,t,n,f]);let _=(0,P.useRef)(new WeakMap),v=(0,P.useMemo)(()=>o.map(e=>{let t=_.current.get(e);return t||(t=wQ(e,g,r),_.current.set(e,t)),t}),[o,g,r]),y=e&&t?o.map(e=>(0,F.jsx)(SQ,{card:e,reconnect:g,abort:()=>r.current.abort?.()??Promise.reject(Error(`Abort unavailable`)),mount:{kind:`controller`,sessionId:t,locale:i,theme:CQ()},open:(t,n)=>r.current.openPanel?.(`${e.contribution.panelAlias.prefix}${n}`),sendMessage:async e=>{if(!r.current.sendMessage)throw Error(`Composer unavailable`);await r.current.sendMessage(e)}},`${t}/${e.pluginId}/${e.generation}`)):null,b=(0,P.useCallback)((e,t)=>{Bk.decide(e,t).then(e=>l(e.approvals??[])).catch(e=>h(String(e)))},[]);return{plugins:e?v:[],inactivePlugins:u,recovery:a,controllers:y,error:m,approvals:c,decide:b}}var EQ={zh:{title:`插件请求执行权限`,body:(e,t)=>`${e} 想让后台会话「${t}」获得写入与命令权限(此前只读)。`,allow:`允许`,deny:`拒绝`},en:{title:`A plugin requests permission to execute`,body:(e,t)=>`${e} wants background session "${t}" to gain write and command access (read-only until now).`,allow:`Allow`,deny:`Deny`}};function DQ({approvals:e,locale:t,decide:n}){let r=EQ[t];return e.length?(0,F.jsxs)(`section`,{role:`alertdialog`,"aria-label":r.title,style:{position:`fixed`,right:16,bottom:16,zIndex:1e3,maxWidth:420,padding:12,borderRadius:8,background:`var(--pi-surface, #fff)`,color:`var(--pi-text, #111)`,border:`1px solid var(--pi-border, #888)`,boxShadow:`0 4px 16px rgba(0,0,0,.25)`},children:[(0,F.jsx)(`strong`,{children:r.title}),e.map(e=>(0,F.jsxs)(`div`,{style:{marginTop:8},children:[(0,F.jsx)(`p`,{style:{margin:`0 0 6px`},children:r.body(e.pluginId,e.title)}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>n(e.id,`allow`),children:r.allow}),` `,(0,F.jsx)(`button`,{type:`button`,onClick:()=>n(e.id,`deny`),children:r.deny})]},e.id))]}):null}var OQ=`@chengzhiyi/pi-excalidraw`,kQ=[`excalidraw_create_view`,`diagram_create`,`diagram_patch`];function AQ(e){let t=({locale:t})=>(0,F.jsxs)(`section`,{role:`status`,className:pQ.history,children:[(0,F.jsx)(`h3`,{children:`Excalidraw`}),(0,F.jsx)(`p`,{children:t===`zh`?`Excalidraw 编辑器当前不可用。请在插件管理中检查安装、启用状态及运行时诊断。未从历史工具参数重建图稿;原检查点、工作区文件和浏览器备份均保留。`:`The Excalidraw editor is currently unavailable. Check installation, enablement and runtime diagnostics in plugin management. Historical tool arguments are not the latest scene. Checkpoints, workspace files and browser backups are preserved.`}),(0,F.jsx)(TO,{variant:`outline`,onClick:e,children:t===`zh`?`打开插件管理`:`Open plugin management`})]});return{id:OQ,instanceId:`drawing-recovery`,definition:{id:OQ,apiVersion:1,activate(){},artifactTools:kQ,workbench:{apiVersion:1,panels:[{kind:`drawing-recovery`,component:t}],toolViews:[{tools:kQ,component:t}],resolvePanel:e=>/^diagram:[\w-]{1,80}$/.test(e)?{kind:`drawing-recovery`,contentId:e.slice(8),title:`Excalidraw`}:null}}}}function jQ(){let e=l(),t={"session.new.label":r(`新会话`,`New session`),"session.new":r(`新会话`,`New session`),"toggle.open":r(`展开侧栏`,`Expand sidebar`),"toggle.collapse":r(`收起侧栏`,`Collapse sidebar`),"sidebar.label":r(`对话管理`,`Conversation navigation`),"sidebar.close":r(`关闭侧栏`,`Close sidebar`),"panels.label":r(`面板`,`Panels`),"rightbar.drag.focus":r(`继续拖动以专注工作区`,`Keep dragging to focus workspace`),"rightbar.drag.collapse":r(`继续拖动以收起工作区面板`,`Keep dragging to collapse workspace panel`),"brand.localBuild":`pi-webapp`},n=_A(),i=(0,P.useRef)(n.session?.sessionId);i.current=n.session?.sessionId;let[a,o]=(0,P.useState)(``);(0,P.useEffect)(()=>o(``),[n.session?.sessionId]);let{plugins:s,errors:c}=xZ(n.connection===`connected`,n.session?.sessionId,n.plugins,n.pluginGeneration),u=(0,P.useRef)({}),f=TQ(n.connection===`connected`,n.session?.sessionId,n.pluginGeneration,u,e);Bt(`hosted-runtime`,f.error);let[p,m]=(0,P.useState)(!1),[h,g]=(0,P.useState)(!1),_=(0,P.useMemo)(()=>AQ(()=>g(!0)),[]),v=[...s,...f.plugins.filter(e=>!s.some(t=>t.id===e.id||t.definition.artifactTools?.some(t=>e.definition.artifactTools?.includes(t))))],y=v.some(e=>e.id===`@chengzhiyi/pi-excalidraw`)?v:[...v,_],b=(0,P.useMemo)(()=>[...n.disabledPlugins,...f.inactivePlugins],[n.disabledPlugins,f.inactivePlugins]),x=DZ(n.session?.sessionId,b),S=x.panelId,C=n.connection===`connected`&&n.session!==null&&n.modelsStatus===`ready`&&n.models.length===0;(0,P.useEffect)(()=>{C&&m(!0)},[C]);let w=(0,P.useCallback)(()=>{m(!1),requestAnimationFrame(()=>document.querySelector(`[aria-haspopup="dialog"].pi-settings-sidebar`)?.focus())},[]),[T,E]=(0,P.useState)(()=>({sidebar:280,viewportWidth:window.innerWidth,narrowExpanded:!1,rightbar:null,rightbarShown:!1,rightbarTrack:!1,rightbarFullscreen:!1,rightbarFocus:!1,rightbarInstant:!1})),D=(0,P.useRef)(280),O=(0,P.useRef)(!1),[k,ee]=(0,P.useState)(!1),te=(0,P.useCallback)(()=>E(e=>({...e,narrowExpanded:!1})),[]),ne=async e=>{if(!O.current){O.current=!0,ee(!0);try{n.session?.sessionId&&await ap.flush(n.session.sessionId),await e(),g(!1),te()}catch(e){throw o(e instanceof Error?e.message:String(e)),e}finally{O.current=!1,ee(!1)}}},A=(0,P.useMemo)(()=>({closeSidebar:te,setViewportWidth(e){E(t=>t.viewportWidth===e?t:{...t,viewportWidth:e,narrowExpanded:t.viewportWidth<1024==e<1024&&t.narrowExpanded})},setSidebar(e){D.current=Math.min(420,Math.max(264,Math.round(e))),E(e=>({...e,sidebar:D.current}))},setRightbar(e){E(t=>({...t,rightbar:Ne(e,300,t.viewportWidth*Ae)}))},focusRightbar(){E(e=>({...e,rightbarFocus:!0}))},collapseRightbar(){E(e=>({...e,rightbarFocus:!1})),x.controller.setExpanded(!1)}}),[te,x.controller]),re=e=>{let t=y.flatMap(t=>{let n=t.definition.workbench?.resolvePanel?.(e);return n?[{...n,pluginId:t.id}]:[]})[0];t?x.openContent(t.kind,t.contentId,t.title,void 0,t.pluginId):x.controller.openContent({kind:`plugin`,contentId:e,title:r(`预览`,`Preview`)}),x.controller.setExpanded(!0),g(!1),E(e=>({...e,narrowExpanded:!1}))},ie=()=>x.controller.setExpanded(!1),j=(0,P.useCallback)(e=>{if(!n.session||n.disabledPlugins.includes(d.files))return;let t=Yt(n.session.cwd,e);x.openContent(`file-preview`,t,t.split(`/`).at(-1),void 0,d.files),E(e=>({...e,narrowExpanded:!1}))},[n.session?.cwd,n.disabledPlugins,x.openContent]);(0,P.useEffect)(()=>{let e=T.viewportWidth<767||x.snapshot.state.mode===`fullscreen`;E(t=>({...t,rightbarShown:x.shown&&!h,rightbarTrack:x.shown&&!h,rightbarFullscreen:e,rightbarFocus:t.rightbarFocus&&x.shown&&!h&&!e}))},[x.shown,x.snapshot.state.mode,T.viewportWidth,h]),(0,P.useEffect)(()=>{E(e=>e.rightbarFocus?{...e,rightbarFocus:!1}:e)},[n.session?.sessionId]);let ae=(0,P.useCallback)((e,t)=>(0,F.jsx)(iJ,{text:e,pathImages:t,labels:{code:{copyLabel:r(`复制`,`Copy`),copiedLabel:r(`已复制`,`Copied`),toolbarLabels:{codeLabel:r(`代码块`,`Code block`),wrapLabel:r(`自动换行`,`Wrap`),unwrapLabel:r(`取消换行`,`Unwrap`)}},footnotes:r(`脚注`,`Footnotes`)}}),[e]),oe=async(...e)=>{let t=n.session?.sessionId;o(``);try{if(t){await ap.flush(t);for(let e of y)await e.definition.workbench?.beforeSend?.(t)}if(t!==i.current)throw Error(r(`会话已切换,请在原会话重试`,`Session changed. Retry in the original conversation.`))}catch(e){throw o(e instanceof Error?e.message:String(e)),e}return n.send(...e)},M={session:n.session,locale:e,openPanel:re,closePanel:ie,panelId:S,invokePluginAction:n.invokePluginAction,resolvePluginInteraction:n.resolvePluginInteraction,sendMessage:e=>oe(e,[]),renderMarkdown:ae};u.current={openPanel:re,sendMessage:M.sendMessage,abort:n.stop};let se=(e,t)=>(0,F.jsx)(EZ,{plugins:y,slot:e,props:{...M,turn:t}}),ce=()=>E(e=>e.viewportWidth<1024?{...e,narrowExpanded:!e.narrowExpanded}:{...e,sidebar:e.sidebar===0?D.current:0}),le=e=>e({layoutInfo:T}),ue=e=>e({activePanelId:h?`plugins`:null}),de=e=>e([{id:`plugins`,label:r(`插件`,`Plugins`)}]),pe=(e,t,i)=>e===`sidebar.brand.mark`?(0,F.jsx)(Je,{size:24}):e===`sidebar.brand.name`?(0,F.jsx)(`span`,{children:`pi-webapp`}):e===`sidebar.footer.action`?(0,F.jsx)(Zk,{wide:t.wide,hideError:p,getUpdate:n.getUpdate,getRunningVersion:n.getRunningVersion,setUpdateChannel:n.setUpdateChannel,cancelUpdate:n.cancelUpdate,update:n.update}):e===`sidebar.panellist`?(0,F.jsx)(fe,{size:t.size}):e===`sidebar.settings`?(0,F.jsx)(`div`,{className:`pi-settings-trigger-row ${t.wide?``:`pi-settings-trigger-rail`}`,children:(0,F.jsxs)(`button`,{className:`pi-settings-sidebar`,"data-wide":t.wide,type:`button`,"aria-label":r(`Pi 设置`,`Pi Settings`),"aria-haspopup":`dialog`,"aria-expanded":p,onClick:()=>m(!0),children:[t.wide?(0,F.jsx)(rt,{size:16}):(0,F.jsx)(nt,{size:18}),t.wide&&(0,F.jsx)(`span`,{children:r(`Pi 设置`,`Pi Settings`)})]})}):e===`sidebar.workspaces`?(0,F.jsx)(YO,{wide:t.wide,expandSidebar:t.expandSidebar,session:n.session,workspaces:n.workspaces,navigationBusy:k,connected:n.connection===`connected`&&n.session!==null,onAdd:(e,t)=>ne(()=>n.addWorkspace(e,t)),directoryPickerKind:n.directoryPickerKind,pickDirectory:n.pickDirectory,listDirectory:n.listDirectory,createDirectory:n.createDirectory,onRemove:e=>ne(()=>n.removeWorkspace(e)),onSelectSession:(e,t,r)=>ne(()=>n.selectSession(e,t,r)),onNewSession:e=>ne(()=>n.newSessionInWorkspace(e)),onRenameSession:(e,t,r,i)=>n.renameSession(e,t,r,i),onDeleteSession:(e,t,r)=>ne(()=>n.deleteSession(e,t,r))}):i?.fallback??null;return(0,F.jsxs)(wk,{actions:n,children:[f.controllers,(0,F.jsx)(Ut,{closeLabel:r(`关闭`,`Dismiss`),detailLabel:r(`诊断信息`,`Diagnostics`)}),(0,F.jsx)(DQ,{approvals:f.approvals,locale:e,decide:f.decide}),(0,F.jsx)(Ke,{useStore:le,usePanelInfo:ue,actions:A,renderSlot:(r,i)=>r===`sidebar`?(0,F.jsx)(Jt,{collapsed:i.collapsed,width:i.width,startSession:()=>{ne(n.newSession).catch(()=>{})},sessionBusy:k||n.connection!==`connected`||n.session===null,toggleSidebar:ce,selectPanel:()=>{g(!0),te()},usePanels:de,usePanelInfo:ue,t:e=>t[e]??e,renderSlot:pe}):r===`main`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{hidden:h,style:{height:`100%`},children:(0,F.jsx)(Zd,{openFile:j,children:(0,F.jsx)(CO,{rightbarControl:(0,F.jsx)(kZ,{panel:x,locale:e}),session:n.session,streaming:n.streaming,connection:n.connection,error:a||n.error,onDismissError:()=>{o(``),n.clearError()},onSend:oe,onUpdateQueuedPrompt:n.updateQueuedPrompt,onLoadImage:n.loadMessageImage,onUpload:n.upload,onDiscardAttachment:n.discardAttachment,onStop:n.stop,onResume:n.resume,onCompact:n.compact,onNewSession:()=>ne(n.newSession),commands:n.commands,models:n.models,modelsStatus:n.modelsStatus,onConfigureModels:()=>m(!0),onSetModel:n.setModel,onSetThinkingLevel:n.setThinkingLevel,composerInteraction:n.session?.interactions?.some(e=>y.some(t=>t.id===e.pluginId&&t.definition.interactions?.some(t=>t.kind===e.kind)))?(0,F.jsx)(wZ,{plugins:y,props:M}):void 0,renderToolView:(e,t,n)=>(0,F.jsx)(TZ,{plugins:y,props:M,call:e,result:t,running:n}),renderPluginSlot:se,plugins:y,onPluginAction:n.invokePluginAction})})}),h&&(0,F.jsx)(Yk,{recovery:f.recovery,getPluginManagement:n.getPluginManagement,togglePlugin:n.togglePlugin,generation:n.pluginGeneration})]}):r===`rightbar`&&Object.keys(x.snapshot.state.tabs).length>0?(0,F.jsx)(`div`,{hidden:h,style:{height:`100%`},children:(0,F.jsx)(OZ,{panel:x,cwd:n.session?.cwd,width:i.width,narrow:T.viewportWidth<767,focus:T.rightbarFocus,onExitFocus:()=>E(e=>({...e,rightbarFocus:!1})),plugins:y,props:M},n.session?.sessionId)}):null,t:e=>t[e]??e}),c.length>0&&(0,F.jsxs)(`div`,{className:`pi-plugin-errors`,role:`status`,title:c.join(`
502
+ `),children:[r(`插件加载失败`,`Plugin load failed`),`: `,c.length]}),p&&(0,F.jsx)(Fk,{onBack:w,setupMode:C,getConfig:n.getConfig,updateConfig:n.updateConfig,getUpdate:n.getUpdate,getRunningVersion:n.getRunningVersion,setUpdateChannel:n.setUpdateChannel,cancelUpdate:n.cancelUpdate,update:n.update,getProviders:n.getProviders,getProviderModels:n.getProviderModels,updateProviderModel:n.updateProviderModel,logoutProvider:n.logoutProvider,addCustomProvider:n.addCustomProvider,startProviderLogin:n.startProviderLogin,getProviderLogin:n.getProviderLogin,getActiveProviderLogin:n.getActiveProviderLogin,respondProviderLogin:n.respondProviderLogin,cancelProviderLogin:n.cancelProviderLogin,refreshModels:n.refreshModels})]})}var MQ=e({});dk(),h();var NQ=document.getElementById(`root`);if(!NQ)throw Error(`Missing #root`);(0,De.createRoot)(NQ).render((0,F.jsx)(Oe,{children:(0,F.jsx)(jQ,{})}));export{$z as a,ef as c,gX as i,dZ as n,Mp as o,yX as r,Op as s,MQ as t};
503
+ //# debugId=09b8c52c-1dbb-4da4-b078-a43f68e56557