@cloudflare/think 0.14.0 → 0.15.1

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 (100) hide show
  1. package/README.md +20 -16
  2. package/dist/cli/index.js +1 -1
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/extensions/index.d.ts +100 -8
  5. package/dist/{hook-proxy-CkF0EhRO.js → hook-proxy-Dogs9wbj.js} +3 -3
  6. package/dist/{hook-proxy-CkF0EhRO.js.map → hook-proxy-Dogs9wbj.js.map} +1 -1
  7. package/dist/{index-CDNxUctz.d.ts → index-s3Pl812H.d.ts} +44 -16
  8. package/dist/messengers/index.d.ts +1 -1
  9. package/dist/messengers/telegram.d.ts +1 -1
  10. package/dist/studio/assets/{angular-html-Dl5doFtz.js → angular-html-B26lsrRw.js} +1 -1
  11. package/dist/studio/assets/{angular-ts-CbN7_mlY.js → angular-ts-B0BTTyHo.js} +1 -1
  12. package/dist/studio/assets/{apl-CUTyCKtR.js → apl-W5hJk0fj.js} +1 -1
  13. package/dist/studio/assets/{astro-4sWs7Jg3.js → astro-ChkXCqsA.js} +1 -1
  14. package/dist/studio/assets/{blade-NmhW_pJp.js → blade-Dy0zTtr6.js} +1 -1
  15. package/dist/studio/assets/{c-_ropPcoN.js → c-DOHYbsuN.js} +1 -1
  16. package/dist/studio/assets/{cobol-BacpIX4U.js → cobol-DtGo7U_-.js} +1 -1
  17. package/dist/studio/assets/{coffee-DcwgCl9J.js → coffee-Uf9fkZqI.js} +1 -1
  18. package/dist/studio/assets/{cpp-BCPbrI0m.js → cpp-CVwmol0l.js} +1 -1
  19. package/dist/studio/assets/{crystal-DZXQ6wBH.js → crystal-ChHObCtF.js} +1 -1
  20. package/dist/studio/assets/{css-BYyCaTYR.js → css-DYjZAj5w.js} +1 -1
  21. package/dist/studio/assets/{edge-CVh9HJt8.js → edge-C2J43zbu.js} +1 -1
  22. package/dist/studio/assets/{elixir-9uvyi7ZY.js → elixir-B7WZ8XhB.js} +1 -1
  23. package/dist/studio/assets/{elm-DDSgRIyn.js → elm-PN4qGuR2.js} +1 -1
  24. package/dist/studio/assets/{erb-DAVyz0cP.js → erb-CkbjE2OZ.js} +1 -1
  25. package/dist/studio/assets/{git-rebase-z3txLW9w.js → git-rebase-CsGmQhFO.js} +1 -1
  26. package/dist/studio/assets/{glimmer-js-BRADiKXN.js → glimmer-js-D85-ZYXa.js} +1 -1
  27. package/dist/studio/assets/{glimmer-ts-B6C6vVGo.js → glimmer-ts-B_0SLVPe.js} +1 -1
  28. package/dist/studio/assets/{glsl-34bCtA9U.js → glsl-BE5n0T0t.js} +1 -1
  29. package/dist/studio/assets/{graphql-CL83z2DV.js → graphql-BVcCJEBO.js} +1 -1
  30. package/dist/studio/assets/{hack-B9WxPQav.js → hack-CyUu15_C.js} +1 -1
  31. package/dist/studio/assets/{haml-oavex6g4.js → haml-Dj54pugT.js} +1 -1
  32. package/dist/studio/assets/{handlebars-pd64xhEq.js → handlebars-l3llPaCT.js} +1 -1
  33. package/dist/studio/assets/{highlighted-body-OFNGDK62-DB3-I0_d.js → highlighted-body-OFNGDK62-D_z62he-.js} +1 -1
  34. package/dist/studio/assets/{html-A_mALprL.js → html--Tmh4628.js} +1 -1
  35. package/dist/studio/assets/{html-derivative-CBwZyoIR.js → html-derivative-B0Q_m8BM.js} +1 -1
  36. package/dist/studio/assets/{http-Cua_-o-V.js → http-BXKW9YQL.js} +1 -1
  37. package/dist/studio/assets/{hurl-Dpr8mC4K.js → hurl-C60QjgUE.js} +1 -1
  38. package/dist/studio/assets/index-Cd4PgOFu.js +390 -0
  39. package/dist/studio/assets/{java-B1Ptmnmm.js → java-aXeLcVht.js} +1 -1
  40. package/dist/studio/assets/{javascript-waNlhfIS.js → javascript-BQcRH4fE.js} +1 -1
  41. package/dist/studio/assets/{jinja-D06CyNkk.js → jinja-DGNUkEt-.js} +1 -1
  42. package/dist/studio/assets/{jison-CQo2g2q_.js → jison-DwfSvoKv.js} +1 -1
  43. package/dist/studio/assets/{json-T8-gmbyP.js → json-B0ukOVyl.js} +1 -1
  44. package/dist/studio/assets/{jsx-pi8aEi7y.js → jsx-CzJUnsSO.js} +1 -1
  45. package/dist/studio/assets/{julia-DQ0CkLQi.js → julia-D8zt_FEP.js} +1 -1
  46. package/dist/studio/assets/{just-BaZbjeHH.js → just-nn4e9Gpd.js} +1 -1
  47. package/dist/studio/assets/{latex-CKRYEGLe.js → latex-OBwqlec5.js} +1 -1
  48. package/dist/studio/assets/{liquid-KfgQvxVp.js → liquid-CktG-Iuw.js} +1 -1
  49. package/dist/studio/assets/{lua-BDYsw9Eb.js → lua-ZqavSetL.js} +1 -1
  50. package/dist/studio/assets/{marko-BSPq2tuh.js → marko-CxDLRfNz.js} +1 -1
  51. package/dist/studio/assets/{mdc-ZTdTy2-Y.js → mdc-COZbBQqS.js} +1 -1
  52. package/dist/studio/assets/mermaid-GHXKKRXX-ChY6AJ7l.js +1 -0
  53. package/dist/studio/assets/{nginx-BsBsElo9.js → nginx-DB8A8-iZ.js} +1 -1
  54. package/dist/studio/assets/{nim-Fud12WJN.js → nim-Cs5VB9QZ.js} +1 -1
  55. package/dist/studio/assets/{perl-BcRrrqpJ.js → perl-pV-3Dli_.js} +1 -1
  56. package/dist/studio/assets/{php-CvBMy7ll.js → php-CFSq0mhc.js} +1 -1
  57. package/dist/studio/assets/{pug-9fn0F-sp.js → pug-DuCfu-AK.js} +1 -1
  58. package/dist/studio/assets/{qml-DPYDKGeG.js → qml-Gqte1OeW.js} +1 -1
  59. package/dist/studio/assets/{r-B-BlSOk_.js → r-B8XqafmU.js} +1 -1
  60. package/dist/studio/assets/{razor-BBsuDNIH.js → razor-HyK7qWun.js} +1 -1
  61. package/dist/studio/assets/{regexp-siAWelih.js → regexp-Bdipf9Ks.js} +1 -1
  62. package/dist/studio/assets/{rst-DpBCyEwj.js → rst-DtdOQB-0.js} +1 -1
  63. package/dist/studio/assets/{ruby-BQ1xX5ej.js → ruby-DOExsDws.js} +1 -1
  64. package/dist/studio/assets/{sas-Dft5mTiQ.js → sas-BLRRJVWF.js} +1 -1
  65. package/dist/studio/assets/{scss-BFMJsYGZ.js → scss-BILH_sWZ.js} +1 -1
  66. package/dist/studio/assets/{shellscript-Cncrs_5T.js → shellscript-CC2KTOv4.js} +1 -1
  67. package/dist/studio/assets/{shellsession-BngbHbQf.js → shellsession-CiGs-_qT.js} +1 -1
  68. package/dist/studio/assets/{soy-BY5W-W7z.js → soy-QSSlYQhf.js} +1 -1
  69. package/dist/studio/assets/{sql-rEN1gzdE.js → sql-CPD_IP3i.js} +1 -1
  70. package/dist/studio/assets/{stata-BDRzO3gs.js → stata-jhUDP248.js} +1 -1
  71. package/dist/studio/assets/{surrealql-DgF3SPLS.js → surrealql-CEI1vHaO.js} +1 -1
  72. package/dist/studio/assets/{svelte-BsPFEf_A.js → svelte-BqMghnvQ.js} +1 -1
  73. package/dist/studio/assets/{templ-D4eIDjcz.js → templ-DhMt3Gd_.js} +1 -1
  74. package/dist/studio/assets/{tex-hl_BDesm.js → tex-B2oLGu4M.js} +1 -1
  75. package/dist/studio/assets/{ts-tags-mYERLvfx.js → ts-tags-DbXbAuWo.js} +1 -1
  76. package/dist/studio/assets/{tsx-4zmdohFv.js → tsx-BWdjt-eB.js} +1 -1
  77. package/dist/studio/assets/{twig-J6ElH33g.js → twig-b7sZE9-Z.js} +1 -1
  78. package/dist/studio/assets/{typescript-DaBxXTXh.js → typescript-B5gQukXY.js} +1 -1
  79. package/dist/studio/assets/{vue-CnJAvLlE.js → vue-DGv3yRD9.js} +1 -1
  80. package/dist/studio/assets/{vue-html-5M7J-A2F.js → vue-html-Cx5Ph-Io.js} +1 -1
  81. package/dist/studio/assets/{vue-vine-BgG3D4Fz.js → vue-vine-G05O51ag.js} +1 -1
  82. package/dist/studio/assets/{xml-BuA8iyrb.js → xml-Bd8eSLdt.js} +1 -1
  83. package/dist/studio/assets/{xsl-CEhAy4QP.js → xsl-DVLXYJQL.js} +1 -1
  84. package/dist/studio/assets/{yaml-CKMEvlUE.js → yaml-CO0sPwby.js} +1 -1
  85. package/dist/studio/index.html +1 -1
  86. package/dist/think.d.ts +2 -2
  87. package/dist/think.js +229 -98
  88. package/dist/think.js.map +1 -1
  89. package/dist/tools/execute.d.ts +1 -1
  90. package/dist/tools/extensions.d.ts +4 -37
  91. package/dist/tools/extensions.js.map +1 -1
  92. package/dist/tools/workspace.d.ts +1 -1
  93. package/dist/tools/workspace.js +1 -13
  94. package/dist/tools/workspace.js.map +1 -1
  95. package/dist/workflows.d.ts +1 -1
  96. package/dist/{workspace-BZXdZcuw.d.ts → workspace-DxZQSbko.d.ts} +10 -157
  97. package/package.json +12 -12
  98. package/dist/index-B-zgBVj2.d.ts +0 -109
  99. package/dist/studio/assets/index-DmVgVRjr.js +0 -390
  100. package/dist/studio/assets/mermaid-GHXKKRXX-UMXpy7w5.js +0 -1
@@ -0,0 +1,390 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-B26lsrRw.js","./html--Tmh4628.js","./javascript-BQcRH4fE.js","./css-DYjZAj5w.js","./angular-ts-B0BTTyHo.js","./scss-BILH_sWZ.js","./apl-W5hJk0fj.js","./xml-Bd8eSLdt.js","./java-aXeLcVht.js","./json-B0ukOVyl.js","./astro-ChkXCqsA.js","./typescript-B5gQukXY.js","./postcss-BXeXVLqQ.js","./tsx-BWdjt-eB.js","./blade-Dy0zTtr6.js","./html-derivative-B0Q_m8BM.js","./sql-CPD_IP3i.js","./bsl-BkkzgIyY.js","./sdbl-bTVj8UrX.js","./cairo-DLTphjLi.js","./python-gzcpVVnB.js","./cobol-DtGo7U_-.js","./coffee-Uf9fkZqI.js","./cpp-CVwmol0l.js","./regexp-Bdipf9Ks.js","./glsl-BE5n0T0t.js","./c-DOHYbsuN.js","./crystal-ChHObCtF.js","./shellscript-CC2KTOv4.js","./edge-C2J43zbu.js","./elixir-B7WZ8XhB.js","./elm-PN4qGuR2.js","./erb-CkbjE2OZ.js","./ruby-DOExsDws.js","./haml-Dj54pugT.js","./graphql-BVcCJEBO.js","./jsx-CzJUnsSO.js","./lua-ZqavSetL.js","./yaml-CO0sPwby.js","./erlang-Cphh6RMH.js","./markdown-BYOwaDjH.js","./fortran-fixed-form-DEKoE2YW.js","./fortran-free-form-CYNrtFtB.js","./fsharp-D13ZGOAj.js","./gdresource-C0sCabJj.js","./gdshader-CBce3t8t.js","./gdscript-Cp2uCuqX.js","./git-commit-BSykSTBG.js","./diff-woXpYk--.js","./git-rebase-CsGmQhFO.js","./glimmer-js-D85-ZYXa.js","./glimmer-ts-B_0SLVPe.js","./hack-CyUu15_C.js","./handlebars-l3llPaCT.js","./http-BXKW9YQL.js","./hurl-C60QjgUE.js","./csv-Dx-8-gkx.js","./hxml-B0Qn7Nwc.js","./haxe-OTjmBuCE.js","./jinja-DGNUkEt-.js","./jison-DwfSvoKv.js","./julia-D8zt_FEP.js","./r-B8XqafmU.js","./just-nn4e9Gpd.js","./perl-pV-3Dli_.js","./latex-OBwqlec5.js","./tex-B2oLGu4M.js","./liquid-CktG-Iuw.js","./marko-CxDLRfNz.js","./less-DVTAwKKz.js","./mdc-COZbBQqS.js","./nextflow-Bbiyy34d.js","./nextflow-groovy-Dc_ddanL.js","./nginx-DB8A8-iZ.js","./nim-Cs5VB9QZ.js","./php-CFSq0mhc.js","./pug-DuCfu-AK.js","./qml-Gqte1OeW.js","./razor-HyK7qWun.js","./csharp-Ct8U2NOr.js","./rst-DtdOQB-0.js","./cmake-Bj61d0ZC.js","./sas-BLRRJVWF.js","./shaderlab-TOUzSsQk.js","./hlsl-Cvrh5tZx.js","./shellsession-CiGs-_qT.js","./soy-QSSlYQhf.js","./sparql-D_iOobhT.js","./turtle-ByJddavk.js","./stata-jhUDP248.js","./surrealql-CEI1vHaO.js","./svelte-BqMghnvQ.js","./templ-DhMt3Gd_.js","./go-BJwz_mda.js","./ts-tags-DbXbAuWo.js","./twig-b7sZE9-Z.js","./vue-DGv3yRD9.js","./vue-html-Cx5Ph-Io.js","./vue-vine-G05O51ag.js","./stylus-B6D30XZt.js","./xsl-DVLXYJQL.js"])))=>i.map(i=>d[i]);
2
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=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)},te={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=te,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),h=o(((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=m()})),g=o((e=>{var t=d(),n=p(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function 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}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function L(e){return{current:e}}function ie(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function R(e,t){re++,ne[re]=e.current,e.current=t}var ae=L(null),oe=L(null),se=L(null),ce=L(null);function le(e,t){switch(R(se,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Qd(t),e=$d(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ie(ae),R(ae,e)}function ue(){ie(ae),ie(oe),ie(se)}function de(e){e.memoizedState!==null&&R(ce,e);var t=ae.current,n=$d(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function fe(e){oe.current===e&&(ie(ae),ie(oe)),ce.current===e&&(ie(ce),lp._currentValue=I)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
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{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(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&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ge(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=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(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 Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(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 Je(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(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-Le(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&&Qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Le(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function $e(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Le(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function et(e,t){var n=t&-t;return n=n&42?1:tt(n),(n&(e.suspendedLanes|t))===0?n:0}function tt(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 nt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function rt(){var e=te.p;return e===0?(e=window.event,e===void 0?32:Tp(e.type)):e}function it(e,t){var n=te.p;try{return te.p=e,t()}finally{te.p=n}}var at=Math.random().toString(36).slice(2),ot=`__reactFiber$`+at,z=`__reactProps$`+at,st=`__reactContainer$`+at,ct=`__reactEvents$`+at,lt=`__reactListeners$`+at,ut=`__reactHandles$`+at,dt=`__reactResources$`+at,B=`__reactMarker$`+at;function ft(e){delete e[ot],delete e[z],delete e[ct],delete e[lt],delete e[ut]}function pt(e){var t=e[ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sf(e);e!==null;){if(n=e[ot])return n;e=Sf(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[ot]||e[st]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[dt];return t||=e[dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[B]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=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]*$`),Ct={},wt={};function Tt(e){return be.call(wt,e)?!0:be.call(Ct,e)?!1:St.test(e)?wt[e]=!0:(Ct[e]=!0,!1)}function Et(e,t,n){if(Tt(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 Dt(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 Ot(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 kt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function At(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function jt(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 Mt(e){if(!e._valueTracker){var t=At(e)?`checked`:`value`;e._valueTracker=jt(e,t,``+e[t])}}function Nt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=At(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Pt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ft=/[\n"\\]/g;function It(e){return e.replace(Ft,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Lt(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=``+kt(t)):e.value!==``+kt(t)&&(e.value=``+kt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):zt(e,o,kt(n)):zt(e,o,kt(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=``+kt(s):e.removeAttribute(`name`)}function Rt(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)){Mt(e);return}n=n==null?``:``+kt(n),t=t==null?n:``+kt(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),Mt(e)}function zt(e,t,n){t===`number`&&Pt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Bt(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=``+kt(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 Vt(e,t,n){if(t!=null&&(t=``+kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+kt(n)}function Ht(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ee(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=kt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Mt(e)}function Ut(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wt=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 Gt(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||Wt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Kt(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]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Gt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Gt(e,o,t[o])}function qt(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 Jt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Yt=/^[\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 Xt(e){return Yt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Zt(){}var Qt=null;function $t(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var en=null,tn=null;function nn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[z]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Lt(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="`+It(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[z]||null;if(!a)throw Error(i(90));Lt(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&&Nt(r)}break a;case`textarea`:Vt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Bt(e,!!n.multiple,t,!1)}}}var rn=!1;function an(e,t,n){if(rn)return e(t,n);rn=!0;try{return e(t)}finally{if(rn=!1,(en!==null||tn!==null)&&(Ou(),en&&(t=en,e=tn,tn=en=null,nn(t),e)))for(t=0;t<e.length;t++)nn(e[t])}}function on(e,t){var n=e.stateNode;if(n===null)return null;var r=n[z]||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 sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var ln={};Object.defineProperty(ln,"passive",{get:function(){cn=!0}}),window.addEventListener(`test`,ln,ln),window.removeEventListener(`test`,ln,ln)}catch{cn=!1}var un=null,dn=null,fn=null;function pn(){if(fn)return fn;var e,t=dn,n=t.length,r,i=`value`in un?un.value:un.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 mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function hn(){return!0}function gn(){return!1}function _n(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)?hn:gn,this.isPropagationStopped=gn,this}return m(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=hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=hn)},persist:function(){},isPersistent:hn}),t}var vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yn=_n(vn),bn=m({},vn,{view:0,detail:0}),xn=_n(bn),Sn,Cn,wn,Tn=m({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,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!==wn&&(wn&&e.type===`mousemove`?(Sn=e.screenX-wn.screenX,Cn=e.screenY-wn.screenY):Cn=Sn=0,wn=e),Sn)},movementY:function(e){return`movementY`in e?e.movementY:Cn}}),En=_n(Tn),Dn=_n(m({},Tn,{dataTransfer:0})),On=_n(m({},bn,{relatedTarget:0})),kn=_n(m({},vn,{animationName:0,elapsedTime:0,pseudoElement:0})),An=_n(m({},vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),jn=_n(m({},vn,{data:0})),Mn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Nn={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`},Pn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Fn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pn[e])?!!t[e]:!1}function In(){return Fn}var Ln=_n(m({},bn,{key:function(e){if(e.key){var t=Mn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Nn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return e.type===`keypress`?mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Rn=_n(m({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),zn=_n(m({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Bn=_n(m({},vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Vn=_n(m({},Tn,{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})),Hn=_n(m({},vn,{newState:0,oldState:0})),Un=[9,13,27,32],Wn=sn&&`CompositionEvent`in window,Gn=null;sn&&`documentMode`in document&&(Gn=document.documentMode);var Kn=sn&&`TextEvent`in window&&!Gn,qn=sn&&(!Wn||Gn&&8<Gn&&11>=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=pn(),fn=dn=un=null,Qn=!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 qn&&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 nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!tr[e.type]:t===`textarea`}function rr(e,t,n,r){en?tn?tn.push(r):tn=[r]:en=r,t=Id(t,`onChange`),0<t.length&&(n=new yn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ir=null,ar=null;function or(e){Od(e,0)}function sr(e){if(Nt(ht(e)))return e}function cr(e,t){if(e===`change`)return t}var lr=!1;if(sn){var ur;if(sn){var dr=`oninput`in document;if(!dr){var fr=document.createElement(`div`);fr.setAttribute(`oninput`,`return;`),dr=typeof fr.oninput==`function`}ur=dr}else ur=!1;lr=ur&&(!document.documentMode||9<document.documentMode)}function pr(){ir&&(ir.detachEvent(`onpropertychange`,mr),ar=ir=null)}function mr(e){if(e.propertyName===`value`&&sr(ar)){var t=[];rr(t,ar,e,$t(e)),an(or,t)}}function hr(e,t,n){e===`focusin`?(pr(),ir=t,ar=n,ir.attachEvent(`onpropertychange`,mr)):e===`focusout`&&pr()}function gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return sr(ar)}function _r(e,t){if(e===`click`)return sr(t)}function vr(e,t){if(e===`input`||e===`change`)return sr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var br=typeof Object.is==`function`?Object.is:yr;function xr(e,t){if(br(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(!be.call(t,i)||!br(e[i],t[i]))return!1}return!0}function Sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cr(e,t){var n=Sr(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=Sr(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pt(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=Pt(e.document)}return t}function Er(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 Dr=sn&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==Pt(r)||(r=Or,`selectionStart`in r&&Er(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}),Ar&&xr(Ar,r)||(Ar=r,r=Id(kr,`onSelect`),0<r.length&&(t=new yn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Or)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Pr={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionrun:Nr(`Transition`,`TransitionRun`),transitionstart:Nr(`Transition`,`TransitionStart`),transitioncancel:Nr(`Transition`,`TransitionCancel`),transitionend:Nr(`Transition`,`TransitionEnd`)},Fr={},Ir={};sn&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),`TransitionEvent`in window||delete Pr.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionrun`),Hr=Lr(`transitionstart`),Ur=Lr(`transitioncancel`),Wr=Lr(`transitionend`),Gr=new Map,Kr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Kr.push(`scrollEnd`);function qr(e,t){Gr.set(e,t),bt(t,[e])}var Jr=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)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[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&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(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-Le(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<yu)throw yu=0,bu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(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 oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(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&65011712,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 li(e,t){e.flags&=65011714;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 ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=ep(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=oi(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return di(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=oi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=oi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=oi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Le(r)-1;r&=~(1<<i),n+=1;var a=32-Le(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Le(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,V=!1,Ni=null,Pi=!1,Fi=Error(i(519));function Ii(e){throw Hi(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ot]=e,t[z]=r,n){case`dialog`:kd(`cancel`,t),kd(`close`,t);break;case`iframe`:case`object`:case`embed`:kd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Ed.length;n++)kd(Ed[n],t);break;case`source`:kd(`error`,t);break;case`img`:case`image`:case`link`:kd(`error`,t),kd(`load`,t);break;case`details`:kd(`toggle`,t);break;case`input`:kd(`invalid`,t),Rt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:kd(`invalid`,t);break;case`textarea`:kd(`invalid`,t),Ht(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||Hd(t.textContent,n)?(r.popover!=null&&(kd(`beforetoggle`,t),kd(`toggle`,t)),r.onScroll!=null&&kd(`scroll`,t),r.onScrollEnd!=null&&kd(`scrollend`,t),r.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:ji=ji.return}}function zi(e){if(e!==ji)return!1;if(!V)return Ri(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||ef(e.type,e.memoizedProps)),n=!n),n&&Mi&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=xf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=xf(e)}else t===27?(t=Mi,lf(e.type)?(e=bf,bf=null,Mi=e):Mi=t):Mi=ji?yf(e.stateNode.nextSibling):null;return!0}function Bi(){Mi=ji=null,V=!1}function Vi(){var e=Ni;return e!==null&&(au===null?au=e:au.push.apply(au,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=L(null),Wi=null,Gi=null;function Ki(e,t,n){R(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,ie(Ui)}function Ji(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 Yi(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),Ji(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),Ji(s,n,e),s=null}else 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 Xi(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;br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lp]:e.push(lp))}a=a.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(i(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=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()})}},ra=t.unstable_scheduleCallback,ia=t.unstable_NormalPriority,aa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=bd(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ha=F.S;F.S=function(e,t){cu=Te(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=L(null);function _a(){var e=ga.current;return e===null?Ul.pooledCache:e}function va(e,t){t===null?R(ga,ga.current):R(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zt,Zt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(Zt,Zt);else{if(e=Ul,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,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(i(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(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=ci(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|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fi(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===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ea(i)===t.type)?(t=a(t,n.props),Na(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),Na(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=mi(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=di(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=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ui(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case v:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=Ea(t),f(e,t,n)}if(ee(t)||M(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===C)return f(e,ea(e,t),n);Pa(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 _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ea(n),p(e,t,n,r)}if(ee(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===C)return p(e,t,ea(e,n),r);Pa(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 _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ea(r),m(e,t,n,r,i)}if(ee(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ma(r),i);if(r.$$typeof===C)return m(e,t,n,ea(t,r),i);Pa(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),V&&Ei(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 V&&Ei(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(g.key===null?h:g.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)}),V&&Ei(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),V&&Ei(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 V&&Ei(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(v.key===null?g:v.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)}),V&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),Na(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Na(c,o),c.return=e,e=c)}return s(e);case v: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}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ea(o),b(e,r,o,c)}if(ee(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ma(o),c);if(o.$$typeof===C)return b(e,r,ea(e,o),c);Pa(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=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ja=0;var i=b(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Hl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Ua(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,$e(e,n)}}function Wa(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;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ga=!1;function Ka(){if(Ga){var e=da;if(e!==null)throw e}}function qa(e,t,n,r){Ga=!1;var i=e.updateQueue;Ra=!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?(Gl&f)===f:(r&f)===f){f!==0&&f===ua&&(Ga=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ra=!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),$l|=o,e.lanes=o,e.memoizedState=d}}function Ja(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ya(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ja(n[e],t)}var Xa=L(null),Za=L(0);function Qa(e,t){e=Zl,R(Za,e),R(Xa,t),Zl=e|t.baseLanes}function $a(){R(Za,Zl),R(Xa,Xa.current)}function eo(){Zl=Za.current,ie(Xa),ie(Za)}var to=L(null),no=null;function ro(e){var t=e.alternate;R(co,co.current&1),R(to,e),no===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(no=e)}function io(e){R(co,co.current),R(to,e),no===null&&(no=e)}function ao(e){e.tag===22?(R(co,co.current),R(to,e),no===null&&(no=e)):oo(e)}function oo(){R(co,co.current),R(to,to.current)}function so(e){ie(to),no===e&&(no=null),ie(co)}var co=L(0);function lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gf(n)||_f(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){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 uo=0,fo=null,po=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(i(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return uo=a,fo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Vs:Hs,_o=!1,a=n(r,i),_o=!1,go&&(a=Eo(t,n,r,i)),To(e),a}function To(e){F.H=Bs;var t=po!==null&&po.next!==null;if(uo=0,mo=po=fo=null,ho=!1,yo=0,bo=null,t)throw Error(i(300));e===null||ac||(e=e.dependencies,e!==null&&Zi(e)&&(ac=!0))}function Eo(e,t,n,r){fo=e;var a=0;do{if(go&&(bo=null),yo=0,go=!1,25<=a)throw Error(i(301));if(a+=1,mo=po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Us,o=t(n,r)}while(go);return o}function Do(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Po(t):t,e=e.useState()[0],(po===null?null:po.memoizedState)!==e&&(fo.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}uo=0,mo=po=fo=null,go=!1,yo=vo=0,bo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?fo.memoizedState=mo=e:mo=mo.next=e,mo}function Mo(){if(po===null){var e=fo.alternate;e=e===null?null:e.memoizedState}else e=po.next;var t=mo===null?fo.memoizedState:mo.next;if(t!==null)mo=t,po=e;else{if(e===null)throw fo.alternate===null?Error(i(467)):Error(i(310));po=e,e={memoizedState:po.memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},mo===null?fo.memoizedState=mo=e:mo=mo.next=e}return mo}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=Ta(bo,e,t),t=fo,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Vs:Hs),e}function Fo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Po(e);if(e.$$typeof===C)return $i(e)}throw Error(i(438,String(e)))}function Io(e){var t=null,n=fo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=fo.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=No(),fo.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]=A;return t.index++,n}function Lo(e,t){return typeof t==`function`?t(e):t}function Ro(e){return zo(Mo(),po,e)}function zo(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?(uo&f)===f:(Gl&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((uo&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,fo.lanes|=p,$l|=p;f=u.action,_o&&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,fo.lanes|=f,$l|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!br(o,e.memoizedState)&&(ac=!0,d&&(n=da,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 Bo(e){var t=Mo(),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);br(o,t.memoizedState)||(ac=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Vo(e,t,n){var r=fo,a=Mo(),o=V;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!br((po||a).memoizedState,n);if(s&&(a.memoizedState=n,ac=!0),a=a.queue,fs(Wo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,a,n,t),null),Ul===null)throw Error(i(349));o||uo&127||Ho(r,t,n)}return n}function Ho(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fo.updateQueue,t===null?(t=No(),fo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Uo(e,t,n,r){t.value=n,t.getSnapshot=r,Go(t)&&Ko(e)}function Wo(e,t,n){return n(function(){Go(t)&&Ko(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function Ko(e){var t=ti(e,2);t!==null&&Cu(t,e,2)}function qo(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),_o){Ie(!0);try{n()}finally{Ie(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:e},t}function Jo(e,t,n,r){return e.baseState=n,zo(e,po,typeof r==`function`?r:Lo)}function Yo(e,t,n,r,a){if(Ls(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)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Xo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Xo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Zo(e,t,s)}catch(n){$o(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Zo(e,t,a)}catch(n){$o(e,t,n)}}function Zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Qo(e,t,n)},function(n){return $o(e,t,n)}):Qo(e,t,n)}function Qo(e,t,n){t.status=`fulfilled`,t.value=n,es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xo(e,n)))}function $o(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,es(t),t=t.next;while(t!==r)}e.action=null}function es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ts(e,t){return t}function ns(e,t){if(V){var n=Ul.formState;if(n!==null){a:{var r=fo;if(V){if(Mi){b:{for(var i=Mi,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=yf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=yf(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:t},n.queue=r,n=Ps.bind(null,fo,r),r.dispatch=n,r=qo(!1),a=Is.bind(null,fo,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Yo.bind(null,fo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function rs(e){return is(Mo(),po,e)}function is(e,t,n){if(t=zo(e,t,ts)[0],e=Ro(Lo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Po(t)}catch(e){throw e===ba?Sa:e}else r=t;t=Mo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(fo.flags|=2048,ss(9,{destroy:void 0},as.bind(null,i,n),null)),[r,a,e]}function as(e,t){e.action=t}function os(e){var t=Mo(),n=po;if(n!==null)return is(t,n,e);Mo(),t=t.memoizedState,n=Mo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=fo.updateQueue,t===null&&(t=No(),fo.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 cs(){return Mo().memoizedState}function ls(e,t,n,r){var i=jo();fo.flags|=e,i.memoizedState=ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=i.memoizedState.inst;po!==null&&r!==null&&Co(r,po.memoizedState.deps)?i.memoizedState=ss(t,a,n,r):(fo.flags|=e,i.memoizedState=ss(1|t,a,n,r))}function ds(e,t){ls(8390656,8,e,t)}function fs(e,t){us(2048,8,e,t)}function ps(e){fo.flags|=4;var t=fo.updateQueue;if(t===null)t=No(),fo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=Mo().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(Hl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function hs(e,t){return us(4,2,e,t)}function gs(e,t){return us(4,4,e,t)}function _s(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 vs(e,t,n){n=n==null?null:n.concat([e]),us(4,4,_s.bind(null,t,e),n)}function ys(){}function bs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),_o){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||uo&1073741824&&!(Gl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Su(),fo.lanes|=e,$l|=e,n)}function Cs(e,t,n,r){return br(n,t)?n:Xa.current===null?!(uo&42)||uo&1073741824&&!(Gl&261930)?(ac=!0,e.memoizedState=n):(e=Su(),fo.lanes|=e,$l|=e,t):(e=Ss(e,n,r),br(e,t)||(ac=!0),e)}function ws(e,t,n,r,i){var a=te.p;te.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Is(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Fs(e,t,ma(c,r),xu(e)):Fs(e,t,r,xu(e))}catch(n){Fs(e,t,{then:function(){},status:`rejected`,reason:n},xu())}finally{te.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Ts(){}function Es(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ds(e).queue;ws(e,a,t,I,n===null?Ts:function(){return Os(e),n(r)})}function Ds(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Os(e){var t=Ds(e);t.next===null&&(t=e.alternate.memoizedState),Fs(e,t.next.queue,{},xu())}function ks(){return $i(lp)}function As(){return Mo().memoizedState}function js(){return Mo().memoizedState}function Ms(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=xu();e=Va(n);var r=Ha(t,e,n);r!==null&&(Cu(r,t,n),Ua(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function Ns(e,t,n){var r=xu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ls(e)?Rs(t,n):(n=ei(e,t,n,r),n!==null&&(Cu(n,e,r),zs(n,t,r)))}function Ps(e,t,n){Fs(e,t,n,xu())}function Fs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ls(e))Rs(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,br(s,o))return $r(e,t,i,0),Ul===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return Cu(n,e,r),zs(n,t,r),!0}return!1}function Is(e,t,n,r){if(r={lane:2,revertLane:bd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ls(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&Cu(t,e,2)}function Ls(e){var t=e.alternate;return e===fo||t!==null&&t===fo}function Rs(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var Bs={readContext:$i,use:Fo,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Bs.useEffectEvent=So;var Vs={readContext:$i,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:ds,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ls(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){ls(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(_o){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(_o){Ie(!0);try{n(t)}finally{Ie(!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=Ns.bind(null,fo,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=qo(e);var t=e.queue,n=Ps.bind(null,fo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(jo(),e,t)},useTransition:function(){var e=qo(!1);return e=ws.bind(null,fo,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=fo,a=jo();if(V){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ul===null)throw Error(i(349));Gl&127||Ho(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ds(Wo.bind(null,r,o,e),[e]),r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=Ul.identifierPrefix;if(V){var n=Ti,r=wi;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ks,useFormState:ns,useActionState:ns,useOptimistic:function(e){var t=jo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Is.bind(null,fo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return jo().memoizedState=Ms.bind(null,fo)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(Hl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Hs={readContext:$i,use:Fo,useCallback:bs,useContext:$i,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Ro,useRef:cs,useState:function(){return Ro(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){return Cs(Mo(),po.memoizedState,e,t)},useTransition:function(){var e=Ro(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){return Jo(Mo(),po,e,t)},useMemoCache:Io,useCacheRefresh:js};Hs.useEffectEvent=ms;var Us={readContext:$i,use:Fo,useCallback:bs,useContext:$i,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Bo,useRef:cs,useState:function(){return Bo(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Mo();return po===null?Ss(n,e,t):Cs(n,po.memoizedState,e,t)},useTransition:function(){var e=Bo(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:os,useActionState:os,useOptimistic:function(e,t){var n=Mo();return po===null?(n.baseState=e,[e,n.queue.dispatch]):Jo(n,po,e,t)},useMemoCache:Io,useCacheRefresh:js};Us.useEffectEvent=ms;function Ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(Cu(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(Cu(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xu(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(Cu(t,e,n),Ua(t,e,n))}};function Ks(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?!xr(n,r)||!xr(i,a):!0}function qs(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&&Gs.enqueueReplaceState(t,t.state,null)}function Js(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=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ys(e){Jr(e)}function Xs(e){console.error(e)}function Zs(e){Jr(e)}function Qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function $s(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 ec(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Qs(e,t)},n}function tc(e){return e=Va(e),e.tag=3,e}function nc(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(){$s(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){$s(t,n,r),typeof i!=`function`&&(du===null?du=new Set([this]):du.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&&Xi(t,n,a,!0),n=to.current,n!==null){switch(n.tag){case 31:case 13:return no===null?Fu():n.alternate===null&&Ql===0&&(Ql=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),ed(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?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)),ed(e,r,a)),!1}throw Error(i(435,n.tag))}return ed(e,r,a),Fu(),!1}if(V)return t=to.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Hi(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=ec(e.stateNode,r,a),Wa(e,a),Ql!==4&&(Ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Hi(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),iu===null?iu=[o]:iu.push(o),Ql!==4&&(Ql=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=ec(n.stateNode,r,e),Wa(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`&&(du===null||!du.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=tc(a),nc(a,e,n,r),Wa(n,a),!1}n=n.return}while(n!==null);return!1}var ic=Error(i(461)),ac=!1;function oc(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function sc(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 Qi(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!ac?(ko(e,t,i),jc(e,t,i)):(V&&s&&Oi(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?xr:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(xr(a,r)&&e.ref===t.ref)if(ac=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(ac=!0);else return t.lanes=e.lanes,jc(e,t,i)}return _c(e,t,n,r,i)}function uc(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 fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?$a():Qa(t,a),ao(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),$a(),oo(t)):(va(t,a.cachePool),Qa(t,a),oo(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),$a(),ao(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return Ia(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,so(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(io(t),(e=Mi)?(e=hf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(io(t),a)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ac||Xi(e,t,n,!1),a=(n&e.childLanes)!==0,ac||a){if(r=Ul,r!==null&&(s=et(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),Cu(r,e,s),ic;Fu(),t=mc(e,t,n)}else e=o.treeContext,Mi=yf(s.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=pc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(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 _c(e,t,n,r,i){return Qi(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!ac?(ko(e,t,i),jc(e,t,i)):(V&&r&&Oi(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!ac?(ko(e,t,a),jc(e,t,a)):(V&&r&&Oi(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Gs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ws(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&&Gs.enqueueReplaceState(a,a.state,null),qa(t,r,a,i),Ka(),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=Js(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=$i(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)&&qs(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,qa(t,r,a,i),Ka(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(Ws(t,n,d,r),l=t.memoizedState),(c=Ra||Ks(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,Ba(e,t),o=t.memoizedProps,u=Js(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=$i(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)&&qs(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,qa(t,r,a,i),Ka();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(Ws(t,n,s,r),p=t.memoizedState),(u=Ra||Ks(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(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,gc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ia(t,e.child,null,i),t.child=Ia(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return Bi(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:ya()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=nu),e}function wc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(co.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(V){if(a?ro(t):oo(t),(e=Mi)?(e=hf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return _f(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(oo(t),a=t.mode,c=Ec({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(null,r)):(ro(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ro(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(oo(t),c=r.fallback,a=t.mode,r=Ec({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(oo(t),t.child=e.child,t.flags|=128,t=null);else if(ro(t),_f(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(ac||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,ac||s){if(s=Ul,s!==null&&(r=et(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),Cu(s,e,r),ic;gf(c)||Fu(),t=Dc(e,t,n)}else gf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=yf(c.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return a?(oo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(a=c.cachePool,a===null?a=ya():(l=aa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(ro(t),n=e.child,e=n.sibling,n=ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return Ia(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function kc(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 Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=co.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,R(co,o),oc(e,t,r,n),r=V?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(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`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&lo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$l|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Xi(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=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Zi(e))):!0}function Nc(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:de(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,io(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ro(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(ro(t),t.flags|=128,null);ro(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(co,co.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:Ki(t,aa,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ac=!0;else{if(!Mc(e,n)&&!(t.flags&128))return ac=!1,Nc(e,t,n);ac=!!(e.flags&131072)}else ac=!1,V&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=Js(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=sc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Js(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ba(e,t),qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,aa,r),r!==o.cache&&Yi(t,[aa],n,!0),Ka(),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=bc(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Hi(a),t=bc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Mi=yf(e.firstChild),ji=t,V=!0,Ni=null,Pi=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===a){t=jc(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=Bf(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(n=t.type,e=t.pendingProps,r=Zd(se.current).createElement(n),r[ot]=t,r[z]=e,Gd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=Bf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return de(t),e===null&&V&&(r=t.stateNode=Cf(t.type,t.pendingProps,se.current),ji=t,Pi=!0,a=Mi,lf(t.type)?(bf=a,Mi=yf(r.firstChild)):Mi=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((a=r=Mi)&&(r=pf(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,ji=t,Mi=yf(r.firstChild),Pi=!1,a=!0)),a||Ii(t)),de(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,ef(a,o)?r=null:s!==null&&ef(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=wo(e,t,Do,null,null,n),lp._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=Mi)&&(n=mf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Ii(t)),null;case 13:return wc(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Qi(t),a=$i(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return Qi(t),r=$i(aa),e===null?(a=_a(),a===null&&(a=Ul,o=oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},za(t),Ki(t,aa,a)):((e.lanes&n)!==0&&(Ba(e,t),qa(t,null,null,n),Ka()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ki(t,aa,r),r!==a.cache&&Yi(t,[aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ki(t,aa,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fc(e){e.flags|=4}function Ic(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Mu())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!tp(t))if(Mu())e.flags|=8192;else throw Da=Ca,xa}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Je(),e.lanes|=t,ru|=t)}function zc(e,t){if(!V)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var 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}}function Bc(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&65011712,r|=i.flags&65011712,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 Vc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bc(t),null;case 1:return Bc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(aa),ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),Bc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Fc(t),o===null?(Bc(t),Ic(t,a,null,r,n)):(Bc(t),Lc(t,o))):o?o===e.memoizedState?(Bc(t),t.flags&=-16777217):(Fc(t),Bc(t),Lc(t,o)):(e=e.memoizedProps,e!==r&&Fc(t),Bc(t),Ic(t,a,e,r,n)),null;case 27:if(fe(t),n=se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}e=ae.current,zi(t)?Li(t,e):(e=Cf(a,r,n),t.stateNode=e,Fc(t))}return Bc(t),null;case 5:if(fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}if(o=ae.current,zi(t))Li(t,o);else{var s=Zd(se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ot]=t,o[z]=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(Gd(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&&Fc(t)}}return Bc(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=se.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Hd(e.nodeValue,n)),e||Ii(t,!0)}else e=Zd(e).createTextNode(r),e[ot]=t,t.stateNode=e}return Bc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(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[ot]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(so(t),t):(so(t),null);if(t.flags&128)throw Error(i(558))}return Bc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=zi(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[ot]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),a=!1}else a=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(so(t),t):(so(t),null)}return so(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),Rc(t,t.updateQueue),Bc(t),null);case 4:return ue(),e===null&&Md(t.stateNode.containerInfo),Bc(t),null;case 10:return qi(t.type),Bc(t),null;case 19:if(ie(co),r=t.memoizedState,r===null)return Bc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)zc(r,!1);else{if(Ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=lo(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return R(co,co.current&1|2),V&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>lu&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}else{if(!a)if(e=lo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!V)return Bc(t),null}else 2*Te()-r.renderingStartTime>lu&&n!==536870912&&(t.flags|=128,a=!0,zc(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)}return r.tail===null?(Bc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=co.current,R(co,a?n&1|2:n&1),V&&Ei(t,r.treeForkCount),e);case 22:case 23:return so(t),eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Bc(t),t.subtreeFlags&6&&(t.flags|=8192)):Bc(t),n=t.updateQueue,n!==null&&Rc(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&&ie(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),Bc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Hc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(so(t),t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(so(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(co),null;case 4:return ue(),null;case 10:return qi(t.type),null;case 22:case 23:return so(t),eo(),e!==null&&ie(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function Uc(e,t){switch(ki(t),t.tag){case 3:qi(aa),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&so(t);break;case 13:so(t);break;case 19:ie(co);break;case 10:qi(t.type);break;case 22:case 23:so(t),eo(),e!==null&&ie(ga);break;case 24:qi(aa)}}function Wc(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){$u(t,t.return,e)}}function Gc(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){$u(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){$u(t,t.return,e)}}function Kc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ya(t,n)}catch(t){$u(e,e.return,t)}}}function qc(e,t,n){n.props=Js(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){$u(e,t,n)}}function H(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:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){$u(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){$u(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){$u(e,t,n)}else n.current=null}function Yc(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){$u(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Kd(r,e.type,n,t),r[z]=t}catch(t){$u(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&lf(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(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&&lf(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 $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zt));else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Gd(t,r,n),t[ot]=e,t[z]=n}catch(t){$u(e,e.return,t)}}var nl=!1,rl=!1,il=!1,al=typeof WeakSet==`function`?WeakSet:Set,ol=null;function sl(e,t){if(e=e.containerInfo,Yd=vp,e=Tr(e),Er(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Xd={focusedElem:e,selectionRange:n},vp=!1,ol=t;ol!==null;)if(t=ol,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ol=e;else for(;ol!==null;){switch(t=ol,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Js(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){$u(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ff(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ff(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ol=e;break}ol=t.return}}function cl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Cl(e,n),r&4&&Wc(5,n);break;case 1:if(Cl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){$u(n,n.return,e)}else{var i=Js(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){$u(n,n.return,e)}}r&64&&Kc(n),r&512&&H(n,n.return);break;case 3:if(Cl(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{Ya(e,t)}catch(e){$u(n,n.return,e)}}break;case 27:t===null&&r&4&&tl(n);case 26:case 5:Cl(e,n),t===null&&r&4&&Yc(n),r&512&&H(n,n.return);break;case 12:Cl(e,n);break;case 31:Cl(e,n),r&4&&ml(e,n);break;case 13:Cl(e,n),r&4&&hl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=rd.bind(null,n),vf(e,n))));break;case 22:if(r=n.memoizedState!==null||nl,!r){t=t!==null&&t.memoizedState!==null||rl,i=nl;var a=rl;nl=r,(rl=t)&&!a?Tl(e,n,(n.subtreeFlags&8772)!=0):Cl(e,n),nl=i,rl=a}break;case 30:break;default:Cl(e,n)}}function ll(e){var t=e.alternate;t!==null&&(e.alternate=null,ll(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ft(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 ul=null,dl=!1;function fl(e,t,n){for(n=n.child;n!==null;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(Fe&&typeof Fe.onCommitFiberUnmount==`function`)try{Fe.onCommitFiberUnmount(Pe,n)}catch{}switch(n.tag){case 26:rl||Jc(n,t),fl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:rl||Jc(n,t);var r=ul,i=dl;lf(n.type)&&(ul=n.stateNode,dl=!1),fl(e,t,n),wf(n.stateNode),ul=r,dl=i;break;case 5:rl||Jc(n,t);case 6:if(r=ul,i=dl,ul=null,fl(e,t,n),ul=r,dl=i,ul!==null)if(dl)try{(ul.nodeType===9?ul.body:ul.nodeName===`HTML`?ul.ownerDocument.body:ul).removeChild(n.stateNode)}catch(e){$u(n,t,e)}else try{ul.removeChild(n.stateNode)}catch(e){$u(n,t,e)}break;case 18:ul!==null&&(dl?(e=ul,uf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wp(e)):uf(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,fl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:Gc(2,n,t),rl||Gc(4,n,t),fl(e,t,n);break;case 1:rl||(Jc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&qc(n,t,r)),fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:rl=(r=rl)||n.memoizedState!==null,fl(e,t,n),rl=r;break;default:fl(e,t,n)}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wp(e)}catch(e){$u(t,t.return,e)}}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wp(e)}catch(e){$u(t,t.return,e)}}function gl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new al),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new al),t;default:throw Error(i(435,e.tag))}}function _l(e,t){var n=gl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=id.bind(null,e,t);t.then(r,r)}})}function vl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(lf(c.type)){ul=c.stateNode,dl=!1;break a}break;case 5:ul=c.stateNode,dl=!1;break a;case 3:case 4:ul=c.stateNode.containerInfo,dl=!0;break a}c=c.return}if(ul===null)throw Error(i(160));pl(o,s,a),ul=null,dl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bl(t,e),t=t.sibling}var yl=null;function bl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vl(t,e),xl(e),r&4&&(Gc(3,e,e.return),Wc(3,e),Gc(5,e,e.return));break;case 1:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&64&&nl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=yl;if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[B]||o[ot]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Gd(o,r,n),o[ot]=e,_t(o),r=o;break a;case`link`:var s=Qf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Gd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Qf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Gd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ot]=e,_t(o),r=o}e.stateNode=r}else $f(a,e.type,e.stateNode);else e.stateNode=qf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?$f(a,e.type,e.stateNode):qf(a,r,e.memoizedProps))}break;case 27:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),n!==null&&r&4&&Xc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),e.flags&32){a=e.stateNode;try{Ut(a,``)}catch(t){$u(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Xc(e,a,n===null?a:n.memoizedProps)),r&1024&&(il=!0);break;case 6:if(vl(t,e),xl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){$u(e,e.return,t)}}break;case 3:if(Zf=null,a=yl,yl=Df(t.containerInfo),vl(t,e),yl=a,xl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wp(t.containerInfo)}catch(t){$u(e,e.return,t)}il&&(il=!1,Sl(e));break;case 4:r=yl,yl=Df(e.stateNode.containerInfo),vl(t,e),xl(e),yl=r;break;case 12:vl(t,e),xl(e);break;case 31:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 13:vl(t,e),xl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(su=Te()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=nl,d=rl;if(nl=u||a,rl=d||l,vl(t,e),rl=d,nl=u,xl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||nl||rl||wl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){$u(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){$u(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?df(m,!0):df(l.stateNode,!1)}catch(e){$u(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,_l(e,n))));break;case 19:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 30:break;case 21:break;default:vl(t,e),xl(e)}}function xl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Zc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;el(e,Qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ut(o,``),n.flags&=-33),el(e,Qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;$c(e,Qc(e),s);break;default:throw Error(i(161))}}catch(t){$u(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Cl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)cl(e,t.alternate,t),t=t.sibling}function wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gc(4,t,t.return),wl(t);break;case 1:Jc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&qc(t,t.return,n),wl(t);break;case 27:wf(t.stateNode);case 26:case 5:Jc(t,t.return),wl(t);break;case 22:t.memoizedState===null&&wl(t);break;case 30:wl(t);break;default:wl(t)}e=e.sibling}}function Tl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Tl(i,a,n),Wc(4,a);break;case 1:if(Tl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){$u(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ja(c[i],s)}catch(e){$u(r,r.return,e)}}n&&o&64&&Kc(a),H(a,a.return);break;case 27:tl(a);case 26:case 5:Tl(i,a,n),n&&r===null&&o&4&&Yc(a),H(a,a.return);break;case 12:Tl(i,a,n);break;case 31:Tl(i,a,n),n&&o&4&&ml(i,a);break;case 13:Tl(i,a,n),n&&o&4&&hl(i,a);break;case 22:a.memoizedState===null&&Tl(i,a,n),H(a,a.return);break;case 30:break;default:Tl(i,a,n)}t=t.sibling}}function El(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&&sa(n))}function Dl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function Ol(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kl(e,t,n,r),t=t.sibling}function kl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ol(e,t,n,r),i&2048&&Wc(9,t);break;case 1:Ol(e,t,n,r);break;case 3:Ol(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e)));break;case 12:if(i&2048){Ol(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){$u(t,t.return,e)}}else Ol(e,t,n,r);break;case 31:Ol(e,t,n,r);break;case 13:Ol(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ol(e,t,n,r):(a._visibility|=2,Al(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Ol(e,t,n,r):jl(e,t),i&2048&&El(o,t);break;case 24:Ol(e,t,n,r),i&2048&&Dl(t.alternate,t);break;default:Ol(e,t,n,r)}}function Al(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!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:Al(a,o,s,c,i),Wc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Al(a,o,s,c,i)):u._visibility&2?Al(a,o,s,c,i):jl(a,o),i&&l&2048&&El(o.alternate,o);break;case 24:Al(a,o,s,c,i),i&&l&2048&&Dl(o.alternate,o);break;default:Al(a,o,s,c,i)}t=t.sibling}}function jl(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:jl(n,r),i&2048&&El(r.alternate,r);break;case 24:jl(n,r),i&2048&&Dl(r.alternate,r);break;default:jl(n,r)}t=t.sibling}}var Ml=8192;function Nl(e,t,n){if(e.subtreeFlags&Ml)for(e=e.child;e!==null;)Pl(e,t,n),e=e.sibling}function Pl(e,t,n){switch(e.tag){case 26:Nl(e,t,n),e.flags&Ml&&e.memoizedState!==null&&np(n,yl,e.memoizedState,e.memoizedProps);break;case 5:Nl(e,t,n);break;case 3:case 4:var r=yl;yl=Df(e.stateNode.containerInfo),Nl(e,t,n),yl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ml,Ml=16777216,Nl(e,t,n),Ml=r):Nl(e,t,n));break;default:Nl(e,t,n)}}function Fl(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 Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ll(e),e=e.sibling}function Ll(e){switch(e.tag){case 0:case 11:case 15:Il(e),e.flags&2048&&Gc(9,e,e.return);break;case 3:Il(e);break;case 12:Il(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Rl(e)):Il(e);break;default:Il(e)}}function Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gc(8,t,t.return),Rl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Rl(t));break;default:Rl(t)}e=e.sibling}}function zl(e,t){for(;ol!==null;){var n=ol;switch(n.tag){case 0:case 11:case 15:Gc(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:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ol=r;else a:for(n=e;ol!==null;){r=ol;var i=r.sibling,a=r.return;if(ll(r),r===n){ol=null;break a}if(i!==null){i.return=a,ol=i;break a}ol=a}}}var Bl={getCacheForType:function(e){var t=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).controller.signal}},Vl=typeof WeakMap==`function`?WeakMap:Map,Hl=0,Ul=null,Wl=null,Gl=0,Kl=0,ql=null,Jl=!1,Yl=!1,Xl=!1,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=null,au=null,ou=!1,su=0,cu=0,lu=1/0,uu=null,du=null,fu=0,pu=null,mu=null,hu=0,gu=0,_u=null,vu=null,yu=0,bu=null;function xu(){return Hl&2&&Gl!==0?Gl&-Gl:F.T===null?rt():bd()}function Su(){if(nu===0)if(!(Gl&536870912)||V){var e=He;He<<=1,!(He&3932160)&&(He=262144),nu=e}else nu=536870912;return e=to.current,e!==null&&(e.flags|=32),nu}function Cu(e,t,n){(e===Ul&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)&&(Au(e,0),Du(e,Gl,nu,!1)),Xe(e,n),(!(Hl&2)||e!==Ul)&&(e===Ul&&(!(Hl&2)&&(eu|=n),Ql===4&&Du(e,Gl,nu,!1)),fd(e))}function wu(e,t,n){if(Hl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ke(e,t),a=r?Ru(e,t):Iu(e,t,!0),o=r;do{if(a===0){Yl&&!r&&Du(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Eu(n)){a=Iu(e,t,!1),o=!1;continue}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=iu;var l=c.current.memoizedState.isDehydrated;if(l&&(Au(c,s).flags|=256),s=Iu(c,s,!1),s!==2){if(Xl&&!l){c.errorRecoveryDisabledLanes|=o,eu|=o,a=4;break a}o=au,au=a,o!==null&&(au===null?au=o:au.push.apply(au,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Au(e,0),Du(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)break;case 6:Du(r,t,nu,!Jl);break a;case 2:au=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=su+300-Te(),10<a)){if(Du(r,t,nu,!Jl),Ge(r,0,!0)!==0)break a;hu=t,r.timeoutHandle=rf(Tu.bind(null,r,n,au,uu,ou,t,nu,eu,ru,Jl,o,`Throttled`,-0,0),a);break a}Tu(r,n,au,uu,ou,t,nu,eu,ru,Jl,o,null,-0,0)}}break}while(1);fd(e)}function Tu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},Pl(t,a,d);var m=(a&62914560)===a?su-Te():(a&4194048)===a?cu-Te():0;if(m=ip(d,m),m!==null){hu=a,e.cancelPendingCommit=m(Gu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Du(e,a,o,!l);return}}Gu(e,t,a,n,r,i,o,s,c)}function Eu(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(!br(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 Du(e,t,n,r){t&=~tu,t&=~eu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Le(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Qe(e,n,t)}function Ou(){return Hl&6?!0:(pd(0,!1),!1)}function ku(){if(Wl!==null){if(Kl===0)var e=Wl.return;else e=Wl,Gi=Wi=null,Ao(e),Aa=null,ja=0,e=Wl;for(;e!==null;)Uc(e.alternate,e),e=e.return;Wl=null}}function Au(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,af(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),hu=0,ku(),Ul=e,Wl=n=ci(e.current,null),Gl=t,Kl=0,ql=null,Jl=!1,Yl=Ke(e,t),Xl=!1,ru=nu=tu=eu=$l=Ql=0,au=iu=null,ou=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Le(r),a=1<<i;t|=e[i],r&=~a}return Zl=t,Qr(),n}function ju(e,t){fo=null,F.H=Bs,t===ba||t===Sa?(t=Oa(),Kl=3):t===xa?(t=Oa(),Kl=4):Kl=t===ic?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ql=t,Wl===null&&(Ql=1,Qs(e,gi(t,e.current)))}function Mu(){var e=to.current;return e===null?!0:(Gl&4194048)===Gl?no===null:(Gl&62914560)===Gl||Gl&536870912?e===no:!1}function Nu(){var e=F.H;return F.H=Bs,e===null?Bs:e}function Pu(){var e=F.A;return F.A=Bl,e}function Fu(){Ql=4,Jl||(Gl&4194048)!==Gl&&to.current!==null||(Yl=!0),!($l&134217727)&&!(eu&134217727)||Ul===null||Du(Ul,Gl,nu,!1)}function Iu(e,t,n){var r=Hl;Hl|=2;var i=Nu(),a=Pu();(Ul!==e||Gl!==t)&&(uu=null,Au(e,t)),t=!1;var o=Ql;a:do try{if(Kl!==0&&Wl!==null){var s=Wl,c=ql;switch(Kl){case 8:ku(),o=6;break a;case 3:case 2:case 9:case 6:to.current===null&&(t=!0);var l=Kl;if(Kl=0,ql=null,Hu(e,s,c,l),n&&Yl){o=0;break a}break;default:l=Kl,Kl=0,ql=null,Hu(e,s,c,l)}}Lu(),o=Ql;break}catch(t){ju(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,Hl=r,F.H=i,F.A=a,Wl===null&&(Ul=null,Gl=0,Qr()),o}function Lu(){for(;Wl!==null;)Bu(Wl)}function Ru(e,t){var n=Hl;Hl|=2;var r=Nu(),a=Pu();Ul!==e||Gl!==t?(uu=null,lu=Te()+500,Au(e,t)):Yl=Ke(e,t);a:do try{if(Kl!==0&&Wl!==null){t=Wl;var o=ql;b:switch(Kl){case 1:Kl=0,ql=null,Hu(e,t,o,1);break;case 2:case 9:if(wa(o)){Kl=0,ql=null,Vu(t);break}t=function(){Kl!==2&&Kl!==9||Ul!==e||(Kl=7),fd(e)},o.then(t,t);break a;case 3:Kl=7;break a;case 4:Kl=5;break a;case 7:wa(o)?(Kl=0,ql=null,Vu(t)):(Kl=0,ql=null,Hu(e,t,o,7));break;case 5:var s=null;switch(Wl.tag){case 26:s=Wl.memoizedState;case 5:case 27:var c=Wl;if(s?tp(s):c.stateNode.complete){Kl=0,ql=null;var l=c.sibling;if(l!==null)Wl=l;else{var u=c.return;u===null?Wl=null:(Wl=u,Uu(u))}break b}}Kl=0,ql=null,Hu(e,t,o,5);break;case 6:Kl=0,ql=null,Hu(e,t,o,6);break;case 8:ku(),Ql=6;break a;default:throw Error(i(462))}}zu();break}catch(t){ju(e,t)}while(1);return Gi=Wi=null,F.H=r,F.A=a,Hl=n,Wl===null?(Ul=null,Gl=0,Qr(),Ql):0}function zu(){for(;Wl!==null&&!Ce();)Bu(Wl)}function Bu(e){var t=Pc(e.alternate,e,Zl);e.memoizedProps=e.pendingProps,t===null?Uu(e):Wl=t}function Vu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,Gl);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,Gl);break;case 5:Ao(t);default:Uc(n,t),t=Wl=li(t,Zl),t=Pc(n,t,Zl)}e.memoizedProps=e.pendingProps,t===null?Uu(e):Wl=t}function Hu(e,t,n,r){Gi=Wi=null,Ao(t),Aa=null,ja=0;var i=t.return;try{if(rc(e,i,t,n,Gl)){Ql=1,Qs(e,gi(n,e.current)),Wl=null;return}}catch(t){if(i!==null)throw Wl=i,t;Ql=1,Qs(e,gi(n,e.current)),Wl=null;return}t.flags&32768?(V||r===1?e=!0:Yl||Gl&536870912?e=!1:(Jl=e=!0,(r===2||r===9||r===3||r===6)&&(r=to.current,r!==null&&r.tag===13&&(r.flags|=16384))),Wu(t,e)):Uu(t)}function Uu(e){var t=e;do{if(t.flags&32768){Wu(t,Jl);return}e=t.return;var n=Vc(t.alternate,t,Zl);if(n!==null){Wl=n;return}if(t=t.sibling,t!==null){Wl=t;return}Wl=t=e}while(t!==null);Ql===0&&(Ql=5)}function Wu(e,t){do{var n=Hc(e.alternate,e);if(n!==null){n.flags&=32767,Wl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Wl=e;return}Wl=e=n}while(e!==null);Ql=6,Wl=null}function Gu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Xu();while(fu!==0);if(Hl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,Ze(e,n,o,s,c,l),e===Ul&&(Wl=Ul=null,Gl=0),mu=t,pu=e,hu=n,gu=o,_u=a,vu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ad(ke,function(){return Zu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=te.p,te.p=2,s=Hl,Hl|=4;try{sl(e,t,n)}finally{Hl=s,te.p=a,F.T=r}}fu=1,Ku(),qu(),Ju()}}function Ku(){if(fu===1){fu=0;var e=pu,t=mu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=te.p;te.p=2;var i=Hl;Hl|=4;try{bl(t,e);var a=Xd,o=Tr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&wr(s.ownerDocument.documentElement,s)){if(c!==null&&Er(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 _=Cr(s,h),v=Cr(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}}vp=!!Yd,Xd=Yd=null}finally{Hl=i,te.p=r,F.T=n}}e.current=t,fu=2}}function qu(){if(fu===2){fu=0;var e=pu,t=mu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=te.p;te.p=2;var i=Hl;Hl|=4;try{cl(e,t.alternate,t)}finally{Hl=i,te.p=r,F.T=n}}fu=3}}function Ju(){if(fu===4||fu===3){fu=0,we();var e=pu,t=mu,n=hu,r=vu;t.subtreeFlags&10256||t.flags&10256?fu=5:(fu=0,mu=pu=null,Yu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(du=null),nt(n),t=t.stateNode,Fe&&typeof Fe.onCommitFiberRoot==`function`)try{Fe.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=te.p,te.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{F.T=t,te.p=i}}hu&3&&Xu(),fd(e),i=e.pendingLanes,n&261930&&i&42?e===bu?yu++:(yu=0,bu=e):yu=0,pd(0,!1)}}function Yu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Xu(){return Ku(),qu(),Ju(),Zu()}function Zu(){if(fu!==5)return!1;var e=pu,t=gu;gu=0;var n=nt(hu),r=F.T,a=te.p;try{te.p=32>n?32:n,F.T=null,n=_u,_u=null;var o=pu,s=hu;if(fu=0,mu=pu=null,hu=0,Hl&6)throw Error(i(331));var c=Hl;if(Hl|=4,Ll(o.current),kl(o,o.current,s,n),Hl=c,pd(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{te.p=a,F.T=r,Yu(e,t)}}function Qu(e,t,n){t=gi(n,t),t=ec(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Xe(e,2),fd(e))}function $u(e,t,n){if(e.tag===3)Qu(e,e,n);else for(;t!==null;){if(t.tag===3){Qu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(du===null||!du.has(r))){e=gi(n,e),n=tc(2),r=Ha(t,n,2),r!==null&&(nc(n,r,t,e),Xe(r,2),fd(r));break}}t=t.return}}function ed(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vl;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)||(Xl=!0,i.add(n),e=td.bind(null,e,t,n),t.then(e,e))}function td(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ul===e&&(Gl&n)===n&&(Ql===4||Ql===3&&(Gl&62914560)===Gl&&300>Te()-su?!(Hl&2)&&Au(e,0):tu|=n,ru===Gl&&(ru=0)),fd(e)}function nd(e,t){t===0&&(t=Je()),e=ti(e,t),e!==null&&(Xe(e,t),fd(e))}function rd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nd(e,n)}function id(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),nd(e,n)}function ad(e,t){return xe(e,t)}var od=null,sd=null,cd=!1,ld=!1,ud=!1,dd=0;function fd(e){e!==sd&&e.next===null&&(sd===null?od=sd=e:sd=sd.next=e),ld=!0,cd||(cd=!0,yd())}function pd(e,t){if(!ud&&ld){ud=!0;do for(var n=!1,r=od;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-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,vd(r,a))}else a=Gl,a=Ge(r,r===Ul?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,vd(r,a));r=r.next}while(n);ud=!1}}function md(){hd()}function hd(){ld=cd=!1;var e=0;dd!==0&&nf()&&(e=dd);for(var t=Te(),n=null,r=od;r!==null;){var i=r.next,a=gd(r,t);a===0?(r.next=null,n===null?od=i:n.next=i,i===null&&(sd=n)):(n=r,(e!==0||a&3)&&(ld=!0)),r=i}fu!==0&&fu!==5||pd(e,!1),dd!==0&&(dd=0)}function gd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Le(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ul,n=Gl,n=Ge(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ke(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),nt(n)){case 2:case 8:n=Oe;break;case 32:n=ke;break;case 268435456:n=je;break;default:n=ke}return r=_d.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(r),e.callbackPriority=2,e.callbackNode=null,2}function _d(e,t){if(fu!==0&&fu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Xu()&&e.callbackNode!==n)return null;var r=Gl;return r=Ge(e,e===Ul?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wu(e,r,t),gd(e,Te()),e.callbackNode!=null&&e.callbackNode===n?_d.bind(null,e):null)}function vd(e,t){if(Xu())return null;wu(e,t,!0)}function yd(){sf(function(){Hl&6?xe(De,md):hd()})}function bd(){if(dd===0){var e=ua;e===0&&(e=Ve,Ve<<=1,!(Ve&261888)&&(Ve=256)),dd=e}return dd}function xd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Xt(``+e)}function Sd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Cd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=xd((i[z]||null).action),o=r.submitter;o&&(t=(t=o[z]||null)?xd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new yn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(dd!==0){var e=o?Sd(i,o):new FormData(i);Es(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Sd(i,o):new FormData(i),Es(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var wd=0;wd<Kr.length;wd++){var Td=Kr[wd];qr(Td.toLowerCase(),`on`+(Td[0].toUpperCase()+Td.slice(1)))}qr(Rr,`onAnimationEnd`),qr(zr,`onAnimationIteration`),qr(Br,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Vr,`onTransitionRun`),qr(Hr,`onTransitionStart`),qr(Ur,`onTransitionCancel`),qr(Wr,`onTransitionEnd`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Ed=`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(` `),Dd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Ed));function Od(e,t){t=(t&4)!=0;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){Jr(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){Jr(e)}i.currentTarget=null,a=c}}}}function kd(e,t){var n=t[ct];n===void 0&&(n=t[ct]=new Set);var r=e+`__bubble`;n.has(r)||(Nd(t,e,2,!1),n.add(r))}function Ad(e,t,n){var r=0;t&&(r|=4),Nd(n,e,r,t)}var jd=`_reactListening`+Math.random().toString(36).slice(2);function Md(e){if(!e[jd]){e[jd]=!0,vt.forEach(function(t){t!==`selectionchange`&&(Dd.has(t)||Ad(t,!1,e),Ad(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jd]||(t[jd]=!0,Ad(`selectionchange`,!1,t))}}function Nd(e,t,n,r){switch(Tp(t)){case 2:var i=yp;break;case 8:i=bp;break;default:i=xp}n=i.bind(null,t,n,e),i=void 0,!cn||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 Pd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=pt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}an(function(){var r=a,i=$t(n),s=[];a:{var c=Gr.get(e);if(c!==void 0){var l=yn,u=e;switch(e){case`keypress`:if(mn(n)===0)break a;case`keydown`:case`keyup`:l=Ln;break;case`focusin`:u=`focus`,l=On;break;case`focusout`:u=`blur`,l=On;break;case`beforeblur`:case`afterblur`:l=On;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=En;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Dn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=zn;break;case Rr:case zr:case Br:l=kn;break;case Wr:l=Bn;break;case`scroll`:case`scrollend`:l=xn;break;case`wheel`:l=Vn;break;case`copy`:case`cut`:case`paste`:l=An;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Rn;break;case`toggle`:case`beforetoggle`:l=Hn}var d=(t&4)!=0,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=on(m,p),g!=null&&d.push(Fd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Qt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[st]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?pt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=En,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Rn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ld,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Rd(s,c,l,d,!1),u!==null&&f!==null&&Rd(s,f,u,d,!0)}}a:{if(c=r?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=cr;else if(nr(c))if(lr)v=vr;else{v=gr;var y=hr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&qt(r.elementType)&&(v=cr):v=_r;if(v&&=v(e,r)){rr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&zt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(nr(y)||y.contentEditable===`true`)&&(Or=y,kr=r,Ar=null);break;case`focusout`:Ar=kr=Or=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(s,n,i);break;case`selectionchange`:if(Dr)break;case`keydown`:case`keyup`:Mr(s,n,i)}var b;if(Wn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Qn?Xn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(qn&&n.locale!==`ko`&&(Qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Qn&&(b=pn()):(un=i,dn=`value`in un?un.value:un.textContent,Qn=!0)),y=Id(r,x),0<y.length&&(x=new jn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Zn(n),b!==null&&(x.data=b)))),(b=Kn?$n(e,n):er(e,n))&&(x=Id(r,`onBeforeInput`),0<x.length&&(y=new jn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Cd(s,e,r,n,i)}Od(s,t)})}function Fd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(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=on(e,n),i!=null&&r.unshift(Fd(e,i,a)),i=on(e,t),i!=null&&r.push(Fd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ld(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rd(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=on(n,a),l!=null&&o.unshift(Fd(n,l,c))):i||(l=on(n,a),l!=null&&o.push(Fd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var zd=/\r\n?/g,Bd=/\u0000|\uFFFD/g;function Vd(e){return(typeof e==`string`?e:``+e).replace(zd,`
10
+ `).replace(Bd,``)}function Hd(e,t){return t=Vd(t),Vd(e)===t}function Ud(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ut(e,``+r);break;case`className`:Dt(e,`class`,r);break;case`tabIndex`:Dt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Dt(e,n,r);break;case`style`:Kt(e,r,o);break;case`data`:if(t!==`object`){Dt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+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}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Ud(e,t,`name`,a.name,a,null),Ud(e,t,`formEncType`,a.formEncType,a,null),Ud(e,t,`formMethod`,a.formMethod,a,null),Ud(e,t,`formTarget`,a.formTarget,a,null)):(Ud(e,t,`encType`,a.encType,a,null),Ud(e,t,`method`,a.method,a,null),Ud(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`onScroll`:r!=null&&kd(`scroll`,e);break;case`onScrollEnd`:r!=null&&kd(`scrollend`,e);break;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));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=Xt(``+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`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`:kd(`beforetoggle`,e),kd(`toggle`,e),Et(e,`popover`,r);break;case`xlinkActuate`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Jt.get(n)||n,Et(e,n,r))}}function Wd(e,t,n,r,a,o){switch(n){case`style`:Kt(e,r,o);break;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));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ut(e,``+r);break;case`onScroll`:r!=null&&kd(`scroll`,e);break;case`onScrollEnd`:r!=null&&kd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[z]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Et(e,n,r)}}}function Gd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:kd(`error`,e),kd(`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:Ud(e,t,o,s,n,null)}}a&&Ud(e,t,`srcSet`,n.srcSet,n,null),r&&Ud(e,t,`src`,n.src,n,null);return;case`input`:kd(`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:Ud(e,t,r,d,n,null)}}Rt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in kd(`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:Ud(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Bt(e,!!r,n,!0):Bt(e,!!r,t,!1);return;case`textarea`:for(s in kd(`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:Ud(e,t,s,c,n,null)}Ht(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:Ud(e,t,l,r,n,null)}return;case`dialog`:kd(`beforetoggle`,e),kd(`toggle`,e),kd(`cancel`,e),kd(`close`,e);break;case`iframe`:case`object`:kd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Ed.length;r++)kd(Ed[r],e);break;case`image`:kd(`error`,e),kd(`load`,e);break;case`details`:kd(`toggle`,e);break;case`embed`:case`source`:case`link`:kd(`error`,e),kd(`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:Ud(e,t,u,r,n,null)}return;default:if(qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Wd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ud(e,t,c,r,n,null))}function Kd(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)||Ud(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`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Ud(e,t,p,m,r,f)}}Lt(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)||Ud(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`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ud(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Bt(e,!!n,n?[]:``,!1):Bt(e,!!n,t,!0)):Bt(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:Ud(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`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Ud(e,t,s,a,r,o)}Vt(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:Ud(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`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ud(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)&&Ud(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:Ud(e,t,u,p,r,m)}return;default:if(qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Wd(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||Wd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ud(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||Ud(e,t,f,p,r,m)}function qd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Jd(){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&&qd(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&&qd(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 Yd=null,Xd=null;function Zd(e){return e.nodeType===9?e:e.ownerDocument}function Qd(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 $d(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 ef(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 tf=null;function nf(){var e=window.event;return e&&e.type===`popstate`?e===tf?!1:(tf=e,!0):(tf=null,!1)}var rf=typeof setTimeout==`function`?setTimeout:void 0,af=typeof clearTimeout==`function`?clearTimeout:void 0,of=typeof Promise==`function`?Promise:void 0,sf=typeof queueMicrotask==`function`?queueMicrotask:of===void 0?rf:function(e){return of.resolve(null).then(e).catch(cf)};function cf(e){setTimeout(function(){throw e})}function lf(e){return e===`head`}function uf(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),Wp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)wf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,wf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[B]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&wf(e.ownerDocument.body);n=i}while(n);Wp(t)}function df(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 ff(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`:ff(n),ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function pf(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[B])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=yf(e.nextSibling),e===null)break}return null}function mf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=yf(e.nextSibling),e===null))return null;return e}function hf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=yf(e.nextSibling),e===null))return null;return e}function gf(e){return e.data===`$?`||e.data===`$~`}function _f(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function vf(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 yf(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 bf=null;function xf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return yf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Sf(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 Cf(e,t,n){switch(t=Zd(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 wf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ft(e)}var Tf=new Map,Ef=new Set;function Df(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Of=te.d;te.d={f:kf,r:Af,D:Nf,C:Pf,L:Ff,m:If,X:Rf,S:Lf,M:zf};function kf(){var e=Of.f(),t=Ou();return e||t}function Af(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?Os(t):Of.r(e)}var jf=typeof document>`u`?null:document;function Mf(e,t,n){var r=jf;if(r&&typeof t==`string`&&t){var i=It(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Gd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Nf(e){Of.D(e),Mf(`dns-prefetch`,e,null)}function Pf(e,t){Of.C(e,t),Mf(`preconnect`,e,t)}function Ff(e,t,n){Of.L(e,t,n);var r=jf;if(r&&e&&t){var i=`link[rel="preload"][as="`+It(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+It(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+It(n.imageSizes)+`"]`)):i+=`[href="`+It(e)+`"]`;var a=i;switch(t){case`style`:a=Vf(e);break;case`script`:a=Gf(e)}Tf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Tf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hf(a))||t===`script`&&r.querySelector(Kf(a))||(t=r.createElement(`link`),Gd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function If(e,t){Of.m(e,t);var n=jf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+It(r)+`"][href="`+It(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gf(e)}if(!Tf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Tf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Kf(a)))return}r=n.createElement(`link`),Gd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function Lf(e,t,n){Of.S(e,t,n);var r=jf;if(r&&e){var i=gt(r).hoistableStyles,a=Vf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Tf.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);_t(c),Gd(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,Jf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Rf(e,t){Of.X(e,t);var n=jf;if(n&&e){var r=gt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=m({src:e,async:!0},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),_t(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t){Of.M(e,t);var n=jf;if(n&&e){var r=gt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),_t(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t,n,r){var a=(a=se.current)?Df(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`?(t=Vf(n.href),n=gt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,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=Vf(n.href);var o=gt(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(Hf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Tf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Tf.set(e,n),o||Wf(a,e,n,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`?(t=Gf(n),n=gt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Vf(e){return`href="`+It(e)+`"`}function Hf(e){return`link[rel="stylesheet"][`+e+`]`}function Uf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Wf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Gd(t,`link`,n),_t(t),e.head.appendChild(t))}function Gf(e){return`[src="`+It(e)+`"]`}function Kf(e){return`script[async]`+e}function qf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+It(n.href)+`"]`);if(r)return t.instance=r,_t(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),_t(r),Gd(r,`style`,a),Jf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Vf(n.href);var o=e.querySelector(Hf(a));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=Uf(n),(a=Tf.get(a))&&Yf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Gd(o,`link`,r),t.state.loading|=4,Jf(o,n.precedence,e),t.instance=o;case`script`:return o=Gf(n.src),(a=e.querySelector(Kf(o)))?(t.instance=a,_t(a),a):(r=n,(a=Tf.get(o))&&(r=m({},n),Xf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(a),Gd(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,Jf(r,n.precedence,e));return t.instance}function Jf(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 Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Zf=null;function Qf(e,t,n){if(Zf===null){var r=new Map,i=Zf=new Map;i.set(n,r)}else i=Zf,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[B]||a[ot]||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 $f(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ep(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 tp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function np(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=Vf(r.href),a=t.querySelector(Hf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ap.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=Uf(r),(i=Tf.get(i))&&Yf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Gd(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=ap.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rp=0;function ip(e,t){return e.stylesheets&&e.count===0&&sp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rp===0&&(rp=62500*Jd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ap(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var op=null;function sp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,op=new Map,t.forEach(cp,e),op=null,ap.call(e))}function cp(e,t){if(!(t.state.loading&4)){var n=op.get(e);if(n)var r=n.get(null);else{n=new Map,op.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=ap.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 lp={$$typeof:C,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function up(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=Ye(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ye(0),this.hiddenUpdates=Ye(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function dp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new up(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function fp(e){return e?(e=ii,e):ii}function pp(e,t,n,r,i,a){i=fp(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(Cu(n,e,t),Ua(n,e,t))}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hp(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function gp(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&Cu(t,e,67108864),hp(e,67108864)}}function _p(e){if(e.tag===13||e.tag===31){var t=xu();t=tt(t);var n=ti(e,t);n!==null&&Cu(n,e,t),hp(e,t)}}var vp=!0;function yp(e,t,n,r){var i=F.T;F.T=null;var a=te.p;try{te.p=2,xp(e,t,n,r)}finally{te.p=a,F.T=i}}function bp(e,t,n,r){var i=F.T;F.T=null;var a=te.p;try{te.p=8,xp(e,t,n,r)}finally{te.p=a,F.T=i}}function xp(e,t,n,r){if(vp){var i=Sp(r);if(i===null)Pd(e,t,r,Cp,n),Pp(e,r);else if(Ip(i,e,t,n,r))r.stopPropagation();else if(Pp(e,r),t&4&&-1<Np.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=We(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Le(o);s.entanglements[1]|=c,o&=~c}fd(a),!(Hl&6)&&(lu=Te()+500,pd(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&Cu(s,a,2),Ou(),hp(a,2)}if(a=Sp(r),a===null&&Pd(e,t,r,Cp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Pd(e,t,r,null,n)}}function Sp(e){return e=$t(e),wp(e)}var Cp=null;function wp(e){if(Cp=null,e=pt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cp=e,null}function Tp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ee()){case De:return 2;case Oe:return 8;case ke:case Ae:return 32;case je:return 268435456;default:return 32}default:return 32}}var Ep=!1,Dp=null,Op=null,kp=null,Ap=new Map,jp=new Map,Mp=[],Np=`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 Pp(e,t){switch(e){case`focusin`:case`focusout`:Dp=null;break;case`dragenter`:case`dragleave`:Op=null;break;case`mouseover`:case`mouseout`:kp=null;break;case`pointerover`:case`pointerout`:Ap.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jp.delete(t.pointerId)}}function Fp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=mt(t),t!==null&&gp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ip(e,t,n,r,i){switch(t){case`focusin`:return Dp=Fp(Dp,e,t,n,r,i),!0;case`dragenter`:return Op=Fp(Op,e,t,n,r,i),!0;case`mouseover`:return kp=Fp(kp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ap.set(a,Fp(Ap.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jp.set(a,Fp(jp.get(a)||null,e,t,n,r,i)),!0}return!1}function Lp(e){var t=pt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,it(e.priority,function(){_p(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,it(e.priority,function(){_p(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 Rp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qt=r,n.target.dispatchEvent(r),Qt=null}else return t=mt(n),t!==null&&gp(t),e.blockedOn=n,!1;t.shift()}return!0}function zp(e,t,n){Rp(e)&&n.delete(t)}function Bp(){Ep=!1,Dp!==null&&Rp(Dp)&&(Dp=null),Op!==null&&Rp(Op)&&(Op=null),kp!==null&&Rp(kp)&&(kp=null),Ap.forEach(zp),jp.forEach(zp)}function Vp(e,n){e.blockedOn===n&&(e.blockedOn=null,Ep||(Ep=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bp)))}var Hp=null;function Up(e){Hp!==e&&(Hp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hp===e&&(Hp=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(wp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,Es(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wp(e){function t(t){return Vp(t,e)}Dp!==null&&Vp(Dp,e),Op!==null&&Vp(Op,e),kp!==null&&Vp(kp,e),Ap.forEach(t),jp.forEach(t);for(var n=0;n<Mp.length;n++){var r=Mp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mp.length&&(n=Mp[0],n.blockedOn===null);)Lp(n),n.blockedOn===null&&Mp.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[z]||null;if(typeof a==`function`)o||Up(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[z]||null)s=o.formAction;else if(wp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Up(n)}}}function Gp(){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 Kp(e){this._internalRoot=e}qp.prototype.render=Kp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;pp(n,xu(),e,t,null,null)},qp.prototype.unmount=Kp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pp(e.current,2,null,e,null,null),Ou(),t[st]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=rt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mp.length&&t!==0&&t<Mp[n].priority;n++);Mp.splice(n,0,e),n===0&&Lp(e)}};var Jp=n.version;if(Jp!==`19.2.7`)throw Error(i(527,Jp,`19.2.7`));te.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Pe=Xp.inject(Yp),Fe=Xp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ys,s=Xs,c=Zs;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=dp(e,1,!1,null,null,n,r,null,o,s,c,Gp),e[st]=t.current,Md(e),new Kp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),y=o(((e,t)=>{t.exports=v()}));function b(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=b(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function x(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=b(e))&&(r&&(r+=` `),r+=t);return r}var S=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},C=(e,t)=>({classGroupId:e,validator:t}),w=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),T=`-`,E=[],D=`arbitrary..`,O=e=>{let t=j(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return A(e);let n=e.split(T);return k(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?S(i,t):t:i||E}return n[e]||E}}},k=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=k(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(T):e.slice(t).join(T),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},A=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?D+r:void 0})(),j=e=>{let{theme:t,classGroups:n}=e;return M(n,t)},M=(e,t)=>{let n=w();for(let r in e){let i=e[r];N(i,n,r,t)}return n},N=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];P(i,t,n,r)}},P=(e,t,n,r)=>{if(typeof e==`string`){ee(e,t,n);return}if(typeof e==`function`){F(e,t,n,r);return}te(e,t,n,r)},ee=(e,t,n)=>{let r=e===``?t:I(t,e);r.classGroupId=n},F=(e,t,n,r)=>{if(ne(e)){N(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(C(n,e))},te=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];N(o,I(t,a),n,r)}},I=(e,t)=>{let n=e,r=t.split(T),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=w(),n.nextPart.set(t,i)),n=i}return n},ne=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,re=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},L=`!`,ie=`:`,R=[],ae=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),oe=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ie){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(L)?(c=s.slice(0,-1),l=!0):s.startsWith(L)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ae(t,l,c,u)};if(t){let e=t+ie,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ae(R,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},se=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},ce=e=>({cache:re(e.cacheSize),parseClassName:oe(e),sortModifiers:se(e),...O(e)}),le=/\s+/,ue=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(le),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+L:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},de=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=fe(n))&&(i&&(i+=` `),i+=r);return i},fe=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=fe(e[r]))&&(n&&(n+=` `),n+=t);return n},pe=(e,...t)=>{let n,r,i,a,o=o=>(n=ce(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=ue(e,n);return i(e,a),a};return a=o,(...e)=>a(de(...e))},me=[],he=e=>{let t=t=>t[e]||me;return t.isThemeGetter=!0,t},ge=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_e=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ve=/^\d+\/\d+$/,ye=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,be=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Se=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ce=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,we=e=>ve.test(e),Te=e=>!!e&&!Number.isNaN(Number(e)),Ee=e=>!!e&&Number.isInteger(Number(e)),De=e=>e.endsWith(`%`)&&Te(e.slice(0,-1)),Oe=e=>ye.test(e),ke=()=>!0,Ae=e=>be.test(e)&&!xe.test(e),je=()=>!1,Me=e=>Se.test(e),Ne=e=>Ce.test(e),Pe=e=>!Ie(e)&&!He(e),Fe=e=>Ye(e,$e,je),Ie=e=>ge.test(e),Le=e=>Ye(e,et,Ae),Re=e=>Ye(e,tt,Te),ze=e=>Ye(e,Ze,je),Be=e=>Ye(e,Qe,Ne),Ve=e=>Ye(e,rt,Me),He=e=>_e.test(e),Ue=e=>Xe(e,et),We=e=>Xe(e,nt),Ge=e=>Xe(e,Ze),Ke=e=>Xe(e,$e),qe=e=>Xe(e,Qe),Je=e=>Xe(e,rt,!0),Ye=(e,t,n)=>{let r=ge.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Xe=(e,t,n=!1)=>{let r=_e.exec(e);return r?r[1]?t(r[1]):n:!1},Ze=e=>e===`position`||e===`percentage`,Qe=e=>e===`image`||e===`url`,$e=e=>e===`length`||e===`size`||e===`bg-size`,et=e=>e===`length`,tt=e=>e===`number`,nt=e=>e===`family-name`,rt=e=>e===`shadow`,it=pe(()=>{let e=he(`color`),t=he(`font`),n=he(`text`),r=he(`font-weight`),i=he(`tracking`),a=he(`leading`),o=he(`breakpoint`),s=he(`container`),c=he(`spacing`),l=he(`radius`),u=he(`shadow`),d=he(`inset-shadow`),f=he(`text-shadow`),p=he(`drop-shadow`),m=he(`blur`),h=he(`perspective`),g=he(`aspect`),_=he(`ease`),v=he(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),He,Ie],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[He,Ie,c],T=()=>[we,`full`,`auto`,...w()],E=()=>[Ee,`none`,`subgrid`,He,Ie],D=()=>[`auto`,{span:[`full`,Ee,He,Ie]},Ee,He,Ie],O=()=>[Ee,`auto`,He,Ie],k=()=>[`auto`,`min`,`max`,`fr`,He,Ie],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[we,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,He,Ie],ee=()=>[...b(),Ge,ze,{position:[He,Ie]}],F=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,Ke,Fe,{size:[He,Ie]}],I=()=>[De,Ue,Le],ne=()=>[``,`none`,`full`,l,He,Ie],re=()=>[``,Te,Ue,Le],L=()=>[`solid`,`dashed`,`dotted`,`double`],ie=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[Te,De,Ge,ze],ae=()=>[``,`none`,m,He,Ie],oe=()=>[`none`,Te,He,Ie],se=()=>[`none`,Te,He,Ie],ce=()=>[Te,He,Ie],le=()=>[we,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Oe],breakpoint:[Oe],color:[ke],container:[Oe],"drop-shadow":[Oe],ease:[`in`,`out`,`in-out`],font:[Pe],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Oe],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Oe],shadow:[Oe],spacing:[`px`,Te],text:[Oe],"text-shadow":[Oe],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,we,Ie,He,g]}],container:[`container`],columns:[{columns:[Te,Ie,He,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Ee,`auto`,He,Ie]}],basis:[{basis:[we,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Te,we,`auto`,`initial`,`none`,Ie]}],grow:[{grow:[``,Te,He,Ie]}],shrink:[{shrink:[``,Te,He,Ie]}],order:[{order:[Ee,`first`,`last`,`none`,He,Ie]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Ue,Le]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,He,Re]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,De,Ie]}],"font-family":[{font:[We,Ie,t]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,He,Ie]}],"line-clamp":[{"line-clamp":[Te,`none`,He,Re]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,He,Ie]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,He,Ie]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[Te,`from-font`,`auto`,He,Le]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Te,`auto`,He,Ie]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,He,Ie]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,He,Ie]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ee,He,Ie],radial:[``,He,Ie],conic:[Ee,He,Ie]},qe,Be]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":re()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Te,He,Ie]}],"outline-w":[{outline:[``,Te,Ue,Le]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,Je,Ve]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,Je,Ve]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:re()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Te,Le]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,Je,Ve]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Te,He,Ie]}],"mix-blend":[{"mix-blend":[...ie(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[He,Ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,He,Ie]}],filter:[{filter:[``,`none`,He,Ie]}],blur:[{blur:ae()}],brightness:[{brightness:[Te,He,Ie]}],contrast:[{contrast:[Te,He,Ie]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Je,Ve]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,Te,He,Ie]}],"hue-rotate":[{"hue-rotate":[Te,He,Ie]}],invert:[{invert:[``,Te,He,Ie]}],saturate:[{saturate:[Te,He,Ie]}],sepia:[{sepia:[``,Te,He,Ie]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,He,Ie]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[Te,He,Ie]}],"backdrop-contrast":[{"backdrop-contrast":[Te,He,Ie]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Te,He,Ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,He,Ie]}],"backdrop-invert":[{"backdrop-invert":[``,Te,He,Ie]}],"backdrop-opacity":[{"backdrop-opacity":[Te,He,Ie]}],"backdrop-saturate":[{"backdrop-saturate":[Te,He,Ie]}],"backdrop-sepia":[{"backdrop-sepia":[``,Te,He,Ie]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,He,Ie]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Te,`initial`,He,Ie]}],ease:[{ease:[`linear`,`initial`,_,He,Ie]}],delay:[{delay:[Te,He,Ie]}],animate:[{animate:[`none`,v,He,Ie]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,He,Ie]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[He,Ie,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,He,Ie]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,He,Ie]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[Te,Ue,Le,Re]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function at(...e){return it(x(e))}function ot(e,t,n){let r=e[t];return r===void 0?e[n]:r}var z=y(),st=`inline-flex w-fit flex-none shrink-0 items-center justify-self-start rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap`,ct={variant:{primary:{classes:`bg-kumo-badge-inverted text-kumo-badge-inverted`,description:`Primary badge`},secondary:{classes:`bg-kumo-fill text-kumo-badge-neutral-subtle`,description:`Secondary badge`},error:{classes:`bg-kumo-danger-tint/60 text-kumo-danger`,description:`Error badge`},warning:{classes:`bg-kumo-warning-tint/70 text-kumo-warning`,description:`Warning badge`},success:{classes:`bg-kumo-success-tint/70 text-kumo-success`,description:`Success badge`},destructive:{classes:`bg-kumo-badge-red text-white`,description:`Deprecated. Use red instead.`},info:{classes:`bg-kumo-info-tint/70 text-kumo-info`,description:`Info badge`},beta:{classes:`border border-dashed border-kumo-brand bg-transparent text-kumo-link`,description:`Indicates beta or experimental features`},outline:{classes:`border border-kumo-fill bg-transparent text-kumo-default`,description:`Bordered badge with transparent background`},red:{classes:`bg-kumo-badge-red text-white`,description:`Red badge`},green:{classes:`bg-kumo-badge-green text-white`,description:`Green badge`},neutral:{classes:`bg-kumo-badge-neutral text-white`,description:`Neutral badge`},orange:{classes:`bg-kumo-badge-orange text-black`,description:`Orange badge`},purple:{classes:`bg-kumo-badge-purple text-white`,description:`Purple badge`},teal:{classes:`bg-kumo-badge-teal text-white`,description:`Teal badge`},"teal-subtle":{classes:`bg-kumo-badge-teal-subtle text-kumo-badge-teal-subtle`,description:`Subtle teal badge`},blue:{classes:`bg-kumo-badge-blue text-white`,description:`Blue badge`}},appearance:{filled:{classes:``,description:`Filled badge with background color (default)`},dot:{classes:`gap-1.5 bg-transparent text-kumo-default ring ring-kumo-hairline`,description:`Outlined badge with a colored circle dot indicating status`}},dotColor:{none:{classes:``,description:`No dot indicator (used when appearance is not dot, or variant has no dot color)`},success:{classes:`bg-kumo-success`,description:`Green dot for success status`},warning:{classes:`bg-kumo-badge-orange`,description:`Orange dot for warning status`},error:{classes:`bg-kumo-badge-red`,description:`Red dot for error status`},neutral:{classes:`bg-kumo-badge-neutral`,description:`Neutral dot for informational status`}}},lt={variant:`primary`,appearance:`filled`,dotColor:`none`};function ut({variant:e=lt.variant,appearance:t=lt.appearance}={}){let n=ot(ct.variant,e,lt.variant).classes,r=ot(ct.appearance,t,lt.appearance).classes;return at(st,t===`dot`?``:n,r)}function dt({variant:e=lt.variant,appearance:t=lt.appearance,className:n,children:r}){let i=t===`dot`?ot(ct.dotColor,e,lt.dotColor).classes:``;return(0,z.jsxs)(`span`,{className:at(ut({variant:e,appearance:t}),n),children:[i?(0,z.jsx)(`span`,{"aria-hidden":`true`,className:at(`size-1.75 rounded-full shrink-0`,i)}):null,r]})}var B=l(p(),1),ft=(0,B.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),pt=B.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=B.useContext(ft);return B.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&B.createElement(`title`,null,n),s,c.get(a??f))});pt.displayName=`IconBase`;var mt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),ht=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:mt}));ht.displayName=`ArrowsClockwiseIcon`;var gt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]]),_t=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:gt}));_t.displayName=`CaretUpDownIcon`;var vt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M120,128a16,16,0,1,1-16-16A16,16,0,0,1,120,128Zm32-16a16,16,0,1,0,16,16A16,16,0,0,0,152,112Zm84,16A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Zm88,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58,10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56,8A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z`}))]]),yt=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:vt}));yt.displayName=`ChatCircleDotsIcon`;var bt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),xt=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:bt}));xt.displayName=`CheckIcon`;var St=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),Ct=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:St}));Ct.displayName=`CopyIcon`;var wt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z`}))]]),Tt=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:wt}));Tt.displayName=`EyeIcon`;var Et=Tt,Dt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z`}))]]),Ot=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:Dt}));Ot.displayName=`EyeSlashIcon`;var kt=Ot,At=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z`}))]]),jt=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:At}));jt.displayName=`GearIcon`;var Mt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),Nt=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:Mt}));Nt.displayName=`InfoIcon`;var Pt=Nt,Ft=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),It=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:Ft}));It.displayName=`MoonIcon`;var Lt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M233.86,110.48,65.8,14.58A20,20,0,0,0,37.15,38.64L67.33,128,37.15,217.36A20,20,0,0,0,56,244a20.1,20.1,0,0,0,9.81-2.58l.09-.06,168-96.07a20,20,0,0,0,0-34.81ZM63.19,215.26,88.61,140H144a12,12,0,0,0,0-24H88.61L63.18,40.72l152.76,87.17Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M227.91,134.86,59.93,231a8,8,0,0,1-11.44-9.67L80,128,48.49,34.72a8,8,0,0,1,11.44-9.67l168,95.85A8,8,0,0,1,227.91,134.86Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M231.87,114l-168-95.89A16,16,0,0,0,40.92,37.34L71.55,128,40.92,218.67A16,16,0,0,0,56,240a16.15,16.15,0,0,0,7.93-2.1l167.92-96.05a16,16,0,0,0,.05-27.89ZM56,224a.56.56,0,0,0,0-.12L85.74,136H144a8,8,0,0,0,0-16H85.74L56.06,32.16A.46.46,0,0,0,56,32l168,95.83Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M240,127.89a16,16,0,0,1-8.18,14L63.9,237.9A16.15,16.15,0,0,1,56,240a16,16,0,0,1-15-21.33l27-79.95A4,4,0,0,1,71.72,136H144a8,8,0,0,0,8-8.53,8.19,8.19,0,0,0-8.26-7.47h-72a4,4,0,0,1-3.79-2.72l-27-79.94A16,16,0,0,1,63.84,18.07l168,95.89A16,16,0,0,1,240,127.89Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M230.88,115.69l-168-95.88a14,14,0,0,0-20,16.87L73.66,128,42.81,219.33A14,14,0,0,0,56,238a14.15,14.15,0,0,0,6.93-1.83L230.84,140.1a14,14,0,0,0,0-24.41Zm-5.95,14L57,225.73a2,2,0,0,1-2.86-2.42.42.42,0,0,0,0-.1L84.3,134H144a6,6,0,0,0,0-12H84.3L54.17,32.8a.3.3,0,0,0,0-.1,1.87,1.87,0,0,1,.6-2.2A1.85,1.85,0,0,1,57,30.25l168,95.89a1.93,1.93,0,0,1,1,1.74A2,2,0,0,1,224.93,129.66Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M231.87,114l-168-95.89A16,16,0,0,0,40.92,37.34L71.55,128,40.92,218.67A16,16,0,0,0,56,240a16.15,16.15,0,0,0,7.93-2.1l167.92-96.05a16,16,0,0,0,.05-27.89ZM56,224a.56.56,0,0,0,0-.12L85.74,136H144a8,8,0,0,0,0-16H85.74L56.06,32.16A.46.46,0,0,0,56,32l168,95.83Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M229.89,117.43l-168-95.88A12,12,0,0,0,44.7,36l31.08,92L44.71,220A12,12,0,0,0,56,236a12.13,12.13,0,0,0,5.93-1.57l167.94-96.08a12,12,0,0,0,0-20.92Zm-4,14L58,227.47a4,4,0,0,1-5.72-4.83l0-.07L82.87,132H144a4,4,0,0,0,0-8H82.87L52.26,33.37A3.89,3.89,0,0,1,53.44,29,4.13,4.13,0,0,1,56,28a3.88,3.88,0,0,1,1.93.54l168,95.87a4,4,0,0,1,0,7Z`}))]]),Rt=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:Lt}));Rt.displayName=`PaperPlaneRightIcon`;var zt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M137,168l11.52-11.51a12,12,0,0,0-17-17L120,151l-15-15,11.52-11.51a12,12,0,0,0-17-17L88,119,72.49,103.51a12,12,0,0,0-17,17L59,124,38.54,144.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l25.57-25.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L132,197l3.51,3.52a12,12,0,0,0,17-17ZM94.54,200.49a12,12,0,0,1-17,0L55.51,178.43a12,12,0,0,1,0-17L76,141l39,39Zm146-185a12,12,0,0,0-17,0L197.94,41.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L124,59l-3.51-3.52a12,12,0,0,0-17,17l80,80a12,12,0,0,0,17-17L197,132l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,25.58-25.57A12,12,0,0,0,240.49,15.51Zm-40,79L180,115,141,76l20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M76,124l56,56-29,29a24,24,0,0,1-33.94,0L47,186.91A24,24,0,0,1,47,153ZM209,69.09,186.91,47A24,24,0,0,0,153,47L124,76l56,56,29-29A24,24,0,0,0,209,69.09Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M149.66,149.66,131.31,168l18.35,18.34a8,8,0,0,1-11.32,11.32L132,191.31l-23.31,23.32a32.06,32.06,0,0,1-45.26,0l-5.37-5.38-28.4,28.41a8,8,0,0,1-11.32-11.32l28.41-28.4-5.38-5.37a32,32,0,0,1,0-45.26L64.69,124l-6.35-6.34a8,8,0,0,1,11.32-11.32L88,124.69l18.34-18.35a8,8,0,0,1,11.32,11.32L99.31,136,120,156.69l18.34-18.35a8,8,0,0,1,11.32,11.32Zm88-131.32a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M148.24,139.76a6,6,0,0,0-8.48,0L120,159.51,96.49,136l19.75-19.76a6,6,0,0,0-8.48-8.48L88,127.51,68.24,107.76a6,6,0,0,0-8.48,8.48L67.51,124,42.79,148.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l29.82-29.81,6.79,6.78a30,30,0,0,0,42.42,0L132,188.49l7.76,7.75a6,6,0,0,0,8.48-8.48L128.49,168l19.75-19.76A6,6,0,0,0,148.24,139.76Zm-49.45,65a18,18,0,0,1-25.46,0L51.27,182.67a18,18,0,0,1,0-25.46L76,132.49,123.51,180Zm137.45-185a6,6,0,0,0-8.48,0L197.94,49.57l-6.79-6.78a30,30,0,0,0-42.42,0L124,67.51l-7.76-7.75a6,6,0,0,0-8.48,8.48l80,80a6,6,0,0,0,8.48-8.48L188.49,132l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,29.81-29.82A6,6,0,0,0,236.24,19.76Zm-31.51,79L180,123.51,132.49,76l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z`}))]]),Bt=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:zt}));Bt.displayName=`PlugsIcon`;var Vt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M240.49,15.51a12,12,0,0,0-17,0L173.94,65.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L100,83l-3.51-3.52a12,12,0,0,0-17,17L83,100,62.54,120.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l49.57-49.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L156,173l3.51,3.52a12,12,0,0,0,17-17L173,156l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,49.58-49.57A12,12,0,0,0,240.49,15.51Zm-121.95,161a12,12,0,0,1-17,0L79.51,154.43a12,12,0,0,1,0-17L100,117l39,39Zm58-57.95h0L156,139l-39-39,20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17ZM85.27,33.37a12,12,0,0,1,21.46-10.74l8,16A12,12,0,1,1,93.27,49.37Zm-68,57.26a12,12,0,0,1,16.1-5.36l16,8a12,12,0,1,1-10.74,21.46l-16-8A12,12,0,0,1,17.27,90.63Zm221.46,74.74a12,12,0,0,1-16.1,5.36l-16-8a12,12,0,0,1,10.74-21.46l16,8A12,12,0,0,1,238.73,165.37Zm-68,57.26a12,12,0,1,1-21.46,10.74l-8-16a12,12,0,0,1,21.46-10.74Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M185,127,127,185a24,24,0,0,1-33.94,0L71,162.91A24,24,0,0,1,71,129L129,71a24,24,0,0,1,33.94,0L185,93.09A24,24,0,0,1,185,127Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32.06,32.06,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94h0L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22a16,16,0,0,1,0,22.63ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM29,103.43l20,8A8,8,0,1,0,55,96.57l-20-8A8,8,0,0,0,29,103.43ZM227,152.57l-20-8A8,8,0,1,0,201,159.43l20,8A8,8,0,0,0,227,152.57ZM159.43,201A8,8,0,0,0,144.57,207l8,20A8,8,0,1,0,167.43,221ZM237.91,18.52a8,8,0,0,0-11.5-.18L174,70.75l-5.38-5.38a32,32,0,0,0-45.28,0L106.14,82.54a4,4,0,0,0,0,5.66l61.7,61.66a4,4,0,0,0,5.66,0l16.74-16.74a32.76,32.76,0,0,0,9.81-22.52,31.82,31.82,0,0,0-9.37-23.17l-5.38-5.37,52.2-52.17A8.22,8.22,0,0,0,237.91,18.52ZM85.64,90.34a8,8,0,0,0-11.49.18,8.22,8.22,0,0,0,.41,11.37L80.67,108,65.34,123.31A31.82,31.82,0,0,0,56,146.47,32.75,32.75,0,0,0,65.77,169l5,4.94L18.49,226.13a8.21,8.21,0,0,0-.61,11.1,8,8,0,0,0,11.72.43L82,185.25l5.37,5.38a32.1,32.1,0,0,0,45.29,0L148,175.31l6.34,6.35a8,8,0,0,0,11.32-11.32Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M236.24,19.76a6,6,0,0,0-8.48,0L173.94,73.57l-6.79-6.78a30,30,0,0,0-42.42,0L100,91.51l-7.76-7.75a6,6,0,0,0-8.48,8.48L91.51,100,66.79,124.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l53.82-53.81,6.79,6.78a30,30,0,0,0,42.42,0L156,164.49l7.76,7.75a6,6,0,0,0,8.48-8.48L164.49,156l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,53.81-53.82A6,6,0,0,0,236.24,19.76Zm-113.45,161a18,18,0,0,1-25.46,0L75.27,158.67a18,18,0,0,1,0-25.46L100,108.49,147.51,156Zm57.94-57.94L156,147.51,108.49,100l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46ZM90.43,34.23a6,6,0,0,1,11.14-4.46l8,20a6,6,0,1,1-11.14,4.46Zm-64,59.54a6,6,0,0,1,7.8-3.34l20,8a6,6,0,1,1-4.46,11.14l-20-8A6,6,0,0,1,26.43,93.77Zm203.14,68.46a6,6,0,0,1-7.8,3.34l-20-8a6,6,0,0,1,4.46-11.14l20,8A6,6,0,0,1,229.57,162.23Zm-64,59.54a6,6,0,1,1-11.14,4.46l-8-20a6,6,0,0,1,11.14-4.46Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32,32,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,179.31,121.37ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z`}))]]),Ht=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:Vt}));Ht.displayName=`PlugsConnectedIcon`;var Ut=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),Wt=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:Ut}));Wt.displayName=`SunIcon`;var Gt=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),Kt=B.forwardRef((e,t)=>B.createElement(pt,{ref:t,...e,weights:Gt}));Kt.displayName=`TrashIcon`;var qt={size:{sm:{value:16,description:`Small loader for inline use`},base:{value:24,description:`Default loader size`},lg:{value:32,description:`Large loader for prominent loading states`}}},Jt={size:`base`};function Yt({size:e=Jt.size}={}){return typeof e==`number`?e:ot(qt.size,e,Jt.size).value}var Xt=({className:e,size:t=Jt.size,"aria-label":n=`Loading`})=>{let r=Yt({size:t});return(0,z.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,stroke:`currentColor`,className:e,style:{height:r,width:r},role:`status`,"aria-label":n,children:[(0,z.jsxs)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,strokeWidth:`2`,strokeLinecap:`round`,children:[(0,z.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 12 12`,to:`360 12 12`,dur:`2s`,repeatCount:`indefinite`}),(0,z.jsx)(`animate`,{attributeName:`stroke-dasharray`,values:`0 150;42 150;42 150`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`}),(0,z.jsx)(`animate`,{attributeName:`stroke-dashoffset`,values:`0;-16;-59`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`})]}),(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,opacity:.1,strokeWidth:`2`,strokeLinecap:`round`})]})},Zt=(0,B.createContext)(null);function Qt(){return(0,B.useContext)(Zt)}var $t=l(h(),1);function en(){return typeof window<`u`}function tn(e){return an(e)?(e.nodeName||``).toLowerCase():`#document`}function nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rn(e){return((an(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function an(e){return en()?e instanceof Node||e instanceof nn(e).Node:!1}function on(e){return en()?e instanceof Element||e instanceof nn(e).Element:!1}function sn(e){return en()?e instanceof HTMLElement||e instanceof nn(e).HTMLElement:!1}function cn(e){return!en()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof nn(e).ShadowRoot}function ln(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=bn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function un(e){return/^(table|td|th)$/.test(tn(e))}function dn(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var fn=/transform|translate|scale|rotate|perspective|filter/,pn=/paint|layout|strict|content/,mn=e=>!!e&&e!==`none`,hn;function gn(e){let t=on(e)?bn(e):e;return mn(t.transform)||mn(t.translate)||mn(t.scale)||mn(t.rotate)||mn(t.perspective)||!vn()&&(mn(t.backdropFilter)||mn(t.filter))||fn.test(t.willChange||``)||pn.test(t.contain||``)}function _n(e){let t=Sn(e);for(;sn(t)&&!yn(t);){if(gn(t))return t;if(dn(t))return null;t=Sn(t)}return null}function vn(){return hn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),hn}function yn(e){return/^(html|body|#document)$/.test(tn(e))}function bn(e){return nn(e).getComputedStyle(e)}function xn(e){return on(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sn(e){if(tn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||cn(e)&&e.host||rn(e);return cn(t)?t.host:t}function Cn(e){let t=Sn(e);return yn(t)?e.ownerDocument?e.ownerDocument.body:e.body:sn(t)&&ln(t)?t:Cn(t)}function wn(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Cn(e),i=r===e.ownerDocument?.body,a=nn(r);if(i){let e=Tn(a);return t.concat(a,a.visualViewport||[],ln(r)?r:[],e&&n?wn(e):[])}else return t.concat(r,wn(r,[],n))}function Tn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var En=[`top`,`right`,`bottom`,`left`],Dn=Math.min,On=Math.max,kn=Math.round,An=Math.floor,jn=e=>({x:e,y:e}),Mn={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Nn(e,t,n){return On(e,Dn(t,n))}function Pn(e,t){return typeof e==`function`?e(t):e}function Fn(e){return e.split(`-`)[0]}function In(e){return e.split(`-`)[1]}function Ln(e){return e===`x`?`y`:`x`}function Rn(e){return e===`y`?`height`:`width`}function zn(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Bn(e){return Ln(zn(e))}function Vn(e,t,n){n===void 0&&(n=!1);let r=In(e),i=Bn(e),a=Rn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Xn(o)),[o,Xn(o)]}function Hn(e){let t=Xn(e);return[Un(e),t,Un(t)]}function Un(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Wn=[`left`,`right`],Gn=[`right`,`left`],Kn=[`top`,`bottom`],qn=[`bottom`,`top`];function Jn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Gn:Wn:t?Wn:Gn;case`left`:case`right`:return t?Kn:qn;default:return[]}}function Yn(e,t,n,r){let i=In(e),a=Jn(Fn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Un)))),a}function Xn(e){let t=Fn(e);return Mn[t]+e.slice(t.length)}function Zn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Zn(e)}function $n(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function er(e,t,n){let{reference:r,floating:i}=e,a=zn(t),o=Bn(t),s=Rn(o),c=Fn(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(In(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function tr(e,t){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=Pn(t,e),m=Qn(p),h=s[f?d===`floating`?`reference`:`floating`:d],g=$n(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),_=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},b=$n(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:v,strategy:c}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}var nr=50,rr=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:tr},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=er(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<nr&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=er(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ir=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Pn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Fn(r),_=zn(o),v=Fn(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Xn(o)]:Hn(o)),x=p!==`none`;!d&&x&&b.push(...Yn(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Vn(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==zn(t))||T.every(e=>zn(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=zn(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ar(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function or(e){return En.some(t=>e[t]>=0)}var sr=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Pn(e,t);switch(i){case`referenceHidden`:{let e=ar(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:or(e)}}}case`escaped`:{let e=ar(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:or(e)}}}default:return{}}}}},cr=new Set([`left`,`top`]);async function lr(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Fn(n),s=In(n),c=zn(n)===`y`,l=cr.has(o)?-1:1,u=a&&c?-1:1,d=Pn(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ur=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await lr(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},dr=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Pn(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=zn(Fn(i)),p=Ln(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Nn(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Nn(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},fr=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Pn(e,t),u={x:n,y:r},d=zn(i),f=Ln(d),p=u[f],m=u[d],h=Pn(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=cr.has(Fn(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},pr=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Pn(e,t),u=await o.detectOverflow(t,l),d=Fn(i),f=In(i),p=zn(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Dn(h-u[g],v),x=Dn(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=On(u.left,0),t=On(u.right,0),n=On(u.top,0),r=On(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:On(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:On(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function mr(e){let t=bn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=sn(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=kn(n)!==a||kn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function hr(e){return on(e)?e:e.contextElement}function gr(e){let t=hr(e);if(!sn(t))return jn(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=mr(t),o=(a?kn(n.width):n.width)/r,s=(a?kn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var _r=jn(0);function vr(e){let t=nn(e);return!vn()||!t.visualViewport?_r:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nn(e)?!1:t}function br(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=hr(e),o=jn(1);t&&(r?on(r)&&(o=gr(r)):o=gr(e));let s=yr(a,n,r)?vr(a):jn(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=nn(a),t=r&&on(r)?nn(r):r,n=e,i=Tn(n);for(;i&&r&&t!==n;){let e=gr(i),t=i.getBoundingClientRect(),r=bn(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=nn(i),i=Tn(n)}}return $n({width:u,height:d,x:c,y:l})}function xr(e,t){let n=xn(e).scrollLeft;return t?t.left+n:br(rn(e)).left+n}function Sr(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-xr(e,n),y:n.top+t.scrollTop}}function Cr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=rn(r),s=t?dn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=jn(1),u=jn(0),d=sn(r);if((d||!d&&!a)&&((tn(r)!==`body`||ln(o))&&(c=xn(r)),d)){let e=br(r);l=gr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Sr(o,c):jn(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function wr(e){return Array.from(e.getClientRects())}function Tr(e){let t=rn(e),n=xn(e),r=e.ownerDocument.body,i=On(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=On(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+xr(e),s=-n.scrollTop;return bn(r).direction===`rtl`&&(o+=On(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Er=25;function Dr(e,t){let n=nn(e),r=rn(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=vn();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=xr(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Er&&(a-=o)}else l<=Er&&(a+=l);return{width:a,height:o,x:s,y:c}}function Or(e,t){let n=br(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=sn(e)?gr(e):jn(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function kr(e,t,n){let r;if(t===`viewport`)r=Dr(e,n);else if(t===`document`)r=Tr(rn(e));else if(on(t))r=Or(t,n);else{let n=vr(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return $n(r)}function Ar(e,t){let n=Sn(e);return n===t||!on(n)||yn(n)?!1:bn(n).position===`fixed`||Ar(n,t)}function jr(e,t){let n=t.get(e);if(n)return n;let r=wn(e,[],!1).filter(e=>on(e)&&tn(e)!==`body`),i=null,a=bn(e).position===`fixed`,o=a?Sn(e):e;for(;on(o)&&!yn(o);){let t=bn(o),n=gn(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||ln(o)&&!n&&Ar(e,o))?r=r.filter(e=>e!==o):i=t,o=Sn(o)}return t.set(e,r),r}function Mr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?dn(t)?[]:jr(t,this._c):[].concat(n),r],o=kr(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=kr(t,a[e],i);s=On(n.top,s),c=Dn(n.right,c),l=Dn(n.bottom,l),u=On(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Nr(e){let{width:t,height:n}=mr(e);return{width:t,height:n}}function Pr(e,t,n){let r=sn(t),i=rn(t),a=n===`fixed`,o=br(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=jn(0);function l(){c.x=xr(i)}if(r||!r&&!a)if((tn(t)!==`body`||ln(i))&&(s=xn(t)),r){let e=br(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Sr(i,s):jn(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Fr(e){return bn(e).position===`static`}function Ir(e,t){if(!sn(e)||bn(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return rn(e)===n&&(n=n.ownerDocument.body),n}function Lr(e,t){let n=nn(e);if(dn(e))return n;if(!sn(e)){let t=Sn(e);for(;t&&!yn(t);){if(on(t)&&!Fr(t))return t;t=Sn(t)}return n}let r=Ir(e,t);for(;r&&un(r)&&Fr(r);)r=Ir(r,t);return r&&yn(r)&&Fr(r)&&!gn(r)?n:r||_n(e)||n}var Rr=async function(e){let t=this.getOffsetParent||Lr,n=this.getDimensions,r=await n(e.floating);return{reference:Pr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zr(e){return bn(e).direction===`rtl`}var Br={convertOffsetParentRelativeRectToViewportRelativeRect:Cr,getDocumentElement:rn,getClippingRect:Mr,getOffsetParent:Lr,getElementRects:Rr,getClientRects:wr,getDimensions:Nr,getScale:gr,isElement:on,isRTL:zr};function Vr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hr(e,t){let n=null,r,i=rn(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=An(d),h=An(i.clientWidth-(u+f)),g=An(i.clientHeight-(d+p)),_=An(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:On(0,Dn(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Vr(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Ur(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=hr(e),u=i||a?[...l?wn(l):[],...t?wn(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Hr(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?br(e):null;c&&g();function g(){let t=br(e);h&&!Vr(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Wr=ur,Gr=dr,Kr=ir,qr=pr,Jr=sr,Yr=fr,Xr=(e,t,n)=>{let r=new Map,i={platform:Br,...n},a={...i.platform,_c:r};return rr(e,t,{...i,platform:a})},Zr=typeof document<`u`?B.useLayoutEffect:function(){};function Qr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Qr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Qr(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function $r(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ei(e,t){let n=$r(e);return Math.round(t*n)/n}function ti(e){let t=B.useRef(e);return Zr(()=>{t.current=e}),t}function ni(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=B.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=B.useState(r);Qr(f,r)||p(r);let[m,h]=B.useState(null),[g,_]=B.useState(null),v=B.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=B.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=B.useRef(null),C=B.useRef(null),w=B.useRef(u),T=c!=null,E=ti(c),D=ti(i),O=ti(l),k=B.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Xr(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Qr(w.current,t)&&(w.current=t,$t.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Zr(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=B.useRef(!1);Zr(()=>(A.current=!0,()=>{A.current=!1}),[]),Zr(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=B.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=B.useMemo(()=>({reference:b,floating:x}),[b,x]),N=B.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=ei(M.floating,u.x),r=ei(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...$r(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return B.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var ri=(e,t)=>{let n=Wr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ii=(e,t)=>{let n=Gr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ai=(e,t)=>({fn:Yr(e).fn,options:[e,t]}),oi=(e,t)=>{let n=Kr(e);return{name:n.name,fn:n.fn,options:[e,t]}},si=(e,t)=>{let n=qr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ci=(e,t)=>{let n=Jr(e);return{name:n.name,fn:n.fn,options:[e,t]}},li={exports:{}},ui={},di;function fi(){if(di)return ui;di=1;var e=B.default;function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var n=typeof Object.is==`function`?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(e,t){var n=t(),s=r({inst:{value:n,getSnapshot:t}}),l=s[0].inst,u=s[1];return a(function(){l.value=n,l.getSnapshot=t,c(l)&&u({inst:l})},[e,n,t]),i(function(){return c(l)&&u({inst:l}),e(function(){c(l)&&u({inst:l})})},[e]),o(n),n}function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch{return!0}}function l(e,t){return t()}var u=typeof window>`u`||typeof window.document>`u`||typeof window.document.createElement>`u`?l:s;return ui.useSyncExternalStore=e.useSyncExternalStore===void 0?u:e.useSyncExternalStore,ui}var pi;function mi(){return pi||(pi=1,li.exports=fi()),li.exports}var hi=mi(),gi={exports:{}},_i={},vi;function yi(){if(vi)return _i;vi=1;var e=B.default,t=mi();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,c=e.useDebugValue;return _i.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=a(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,a=e,e=l(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(a,e))return t;var n=l(e);return u!==void 0&&u(t,n)?(a=e,t):(a=e,o=n)}var i=!1,a,o,s=n===void 0?null:n;return[function(){return e(t())},s===null?void 0:function(){return e(s())}]},[t,n,l,u]);var p=i(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),c(p),p},_i}var bi;function xi(){return bi||(bi=1,gi.exports=yi()),gi.exports}var Si=xi(),Ci={};function wi(e,t){let n=B.useRef(Ci);return n.current===Ci&&(n.current=e(t)),n}var Ti=[],Ei;function Di(){return Ei}function Oi(e){Ti.push(e)}function ki(e){let t=(t,n)=>{let r=wi(ji).current,i;try{Ei=r;for(let e of Ti)e.before(r);i=e(t,n);for(let e of Ti)e.after(r);r.didInitialize=!0}finally{Ei=void 0}return i};return t.displayName=e.displayName||e.name,t}function Ai(e){return B.forwardRef(ki(e))}function ji(){return{didInitialize:!1}}function Mi(e){let t=B.useRef(!0);t.current&&(t.current=!1,e())}var V=typeof document<`u`?B.useLayoutEffect:()=>{};function Ni(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Pi=Ni(`https://base-ui.com/production-error`,`Base UI`),Fi=B.createContext(void 0);function Ii(e){let t=B.useContext(Fi);if(t===void 0&&!e)throw Error(Pi(72));return t}var Li=[];function Ri(e){B.useEffect(e,Li)}var zi=0,Bi=class e{static create(){return new e}currentId=zi;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=zi,t()},e)}isStarted(){return this.currentId!==zi}clear=()=>{this.currentId!==zi&&(clearTimeout(this.currentId),this.currentId=zi)};disposeEffect=()=>this.clear};function Vi(){let e=wi(Bi.create).current;return Ri(e.disposeEffect),e}var Hi=typeof navigator<`u`,Ui=Qi(),Wi=ea(),Gi=$i(),Ki=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),qi=Ui.platform===`MacIntel`&&Ui.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Ui.platform);Hi&&/firefox/i.test(Gi);var Ji=Hi&&/apple/i.test(navigator.vendor),Yi=Hi&&/android/i.test(Wi)||/android/i.test(Gi),Xi=Hi&&Wi.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,Zi=Gi.includes(`jsdom/`);function Qi(){if(!Hi)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function $i(){if(!Hi)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function ea(){if(!Hi)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}function ta(e){e.preventDefault(),e.stopPropagation()}function na(e){return`nativeEvent`in e}function ra(e){return e.pointerType===``&&e.isTrusted?!0:Yi&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function ia(e){return Zi?!1:!Yi&&e.width===0&&e.height===0||Yi&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function aa(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function oa(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var sa=`data-base-ui-focusable`,ca=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,la=`ArrowLeft`,ua=`ArrowRight`,da=`ArrowUp`,fa=`ArrowDown`;function pa(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ma(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&cn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ha(e){return`composedPath`in e?e.composedPath()[0]:e.target}function ga(e,t){if(!on(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(ma(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function _a(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function va(e){return e.matches(`html,body`)}function ya(e){return sn(e)&&e.matches(ca)}function ba(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${ca}`)!=null}function xa(e){return e?e.getAttribute(`role`)===`combobox`&&ya(e):!1}function Sa(e){if(!e||Zi)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ca(e){return e?e.hasAttribute(sa)?e:e.querySelector(`[${sa}]`)||e:null}function wa(e,t){return t!=null&&!aa(t)?0:typeof e==`function`?e():e}function Ta(e,t,n){let r=wa(e,n);return typeof r==`number`?r:r?.[t]}function Ea(e){return typeof e==`function`?e():e}function Da(e,t){return t||e===`click`||e===`mousedown`}function Oa(e){return e?.includes(`mouse`)&&e!==`mousedown`}function ka(){}var Aa=Object.freeze([]),ja=Object.freeze({}),Ma=`none`,Na=`trigger-press`,Pa=`trigger-hover`,Fa=`trigger-focus`,Ia=`outside-press`,La=`item-press`,Ra=`focus-out`,za=`escape-key`,Ba=`list-navigation`,Va=`cancel-open`,Ha=`sibling-open`,Ua=`disabled`,Wa=`imperative-action`,Ga=`window-resize`;function Ka(e,t,n,r){let i=!1,a=!1,o=r??ja;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var qa=B.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Bi,currentIdRef:{current:null},currentContextRef:{current:null}});function Ja(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=B.useContext(qa),[f,p]=B.useState(!1);return V(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),V(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:Ta(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Ka(Ma))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),V(()=>()=>{l.current=null},[l]),B.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function Ya(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Xa(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Za(e,t,n,r){let i=wi($a).current;return eo(i,e,t,n,r)&&no(i,[e,t,n,r]),i.callback}function Qa(e){let t=wi($a).current;return to(t,e)&&no(t,e),t.callback}function $a(){return{callback:null,cleanup:null,refs:[]}}function eo(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function to(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function no(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break}}}}}}function ro(e){let t=wi(io,e).current;return t.next=e,V(t.effect),t}function io(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var ao={...B},oo=ao.useInsertionEffect,so=oo&&oo!==ao.useLayoutEffect?oo:e=>e();function co(e){let t=wi(lo).current;return t.next=e,so(t.effect),t.trampoline}function lo(){let e={next:void 0,callback:uo,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function uo(){}var fo=null;globalThis.requestAnimationFrame;var po=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},mo=class e{static create(){return new e}static request(e){return po.request(e)}static cancel(e){return po.cancel(e)}currentId=fo;request(e){this.cancel(),this.currentId=po.request(()=>{this.currentId=fo,e()})}cancel=()=>{this.currentId!==fo&&(po.cancel(this.currentId),this.currentId=fo)};disposeEffect=()=>this.cancel};function ho(){let e=wi(mo.create).current;return Ri(e.disposeEffect),e}function go(e){return e?.ownerDocument||document}var _o={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},vo={..._o,position:`fixed`,top:0,left:0},yo={..._o,position:`absolute`},bo=B.forwardRef(function(e,t){let[n,r]=B.useState();return V(()=>{Ji&&r(`button`)},[]),(0,z.jsx)(`span`,{...e,ref:t,style:vo,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":``})});function xo(e,t,n){return Math.floor(e/t)!==n}function So(e,t){return t<0||t>=e.length}function Co(e,t){return To(e.current,{disabledIndices:t})}function wo(e,t){return To(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function To(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Ao(e,a,r));return a}function Eo(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===da?p=`up`:t.key===fa&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Ao(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=An(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Ao(e,r,s))return r}};d&&ta(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=To(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=To(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}So(e,f)&&(f=u)}if(n===`both`){let n=An(u/o);t.key===(a?la:ua)&&(d&&ta(t),u%o===o-1?r&&(f=To(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=To(e,{startingIndex:u,disabledIndices:s}),r&&xo(f,o,n)&&(f=To(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),xo(f,o,n)&&(f=u)),t.key===(a?ua:la)&&(d&&ta(t),u%o===0?r&&(f=To(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=To(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&xo(f,o,n)&&(f=To(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),xo(f,o,n)&&(f=u));let c=An(l/o)===n;So(e,f)&&(r&&c?(f=t.key===(a?ua:la)?l:To(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function Do(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function Oo(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function ko(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Ao(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?Mo(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function jo(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Mo(e,t=e?bn(e):null){return!e||!e.isConnected||!t||jo(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var No=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Po(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return cn(n)?n.host:null}function Fo(e){for(let t of Array.from(e.children))if(tn(t)===`summary`)return t;return null}function Io(e,t){let n=Fo(t);return!!n&&(e===n||ma(n,e))}function Lo(e){let t=e?tn(e):``;return e!=null&&e.matches(No)&&(t!==`summary`||e.parentElement!=null&&tn(e.parentElement)===`details`&&Fo(e.parentElement)===e)&&(t!==`details`||Fo(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Ro(e){if(!Lo(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Po(t)){let n=t!==e,r=tn(t)===`slot`;if(t.hasAttribute(`inert`)||n&&tn(t)===`details`&&!t.open&&!Io(e,t)||t.hasAttribute(`hidden`)||!r&&!zo(t,n))return!1}return!0}function zo(e,t){let n=bn(e);return t?n.display!==`none`:Mo(e,n)}function Bo(e){let t=e.tabIndex;if(t<0){let t=tn(e);if(t===`details`||t===`audio`||t===`video`||sn(e)&&e.isContentEditable)return 0}return t}function Vo(e){if(tn(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Ho(e,t){let n=Vo(e);if(!n)return!0;let r=t.find(e=>{let t=Vo(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Vo(e);return t?.name===n.name&&t.form===n.form})===n}function Uo(e){if(sn(e)&&tn(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return sn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Wo(e,t){Uo(e).forEach(e=>{Lo(e)&&t.push(e),Wo(e,t)})}function Go(e,t,n){Uo(e).forEach(e=>{sn(e)&&e.matches(t)&&n.push(e),Go(e,t,n)})}function Ko(e){return Ro(e)&&Bo(e)>=0}function qo(e){let t=[];return Wo(e,t),t.filter(Ro)}function Jo(e){let t=qo(e);return t.filter(e=>Bo(e)>=0&&Ho(e,t))}function Yo(e,t){let n=Jo(e),r=n.length;if(r===0)return;let i=pa(go(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Xo(e){return Yo(go(e).body,1)||e}function Zo(e){return Yo(go(e).body,-1)||e}function Qo(e,t){if(!e)return null;let n=Jo(go(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function $o(e){return Qo(e,1)}function es(e){return Qo(e,-1)}function ts(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!ma(n,r)}function ns(e){Jo(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function rs(e){let t=[];Go(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function is(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...is(e,t.id,n)])}function as(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function os(e){return`data-base-ui-${e}`}var ss=0;function cs(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(ss);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),ka;let o=requestAnimationFrame(a);return ss=o,()=>{ss===o&&(cancelAnimationFrame(o),ss=0)}}var ls={inert:new WeakMap,"aria-hidden":new WeakMap},us=`data-base-ui-inert`,ds={inert:new WeakSet,"aria-hidden":new WeakSet},fs=new WeakMap,ps=0;function ms(e){return ds[e]}function hs(e){return e?cn(e)?e.host:hs(e.parentNode):null}var gs=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=hs(t);return e.contains(n)?n:null}).filter(e=>e!=null),_s=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},vs=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{tn(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function ys(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=gs(t,e),u=i?gs(t,a):[],d=new Set(u),f=i?vs(t,_s(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=ls[o],n=ms(o);c=n,s=e;let r=gs(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);vs(t,_s(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(fs.get(e)||0)+1;fs.set(e,t),m.push(e),t===1&&e.setAttribute(us,``)}),ps+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(fs.get(e)||0)-1;fs.set(e,t),t||e.removeAttribute(us)}),--ps,ps||(ls.inert=new WeakMap,ls[`aria-hidden`]=new WeakMap,ds.inert=new WeakSet,ds[`aria-hidden`]=new WeakSet,fs=new WeakMap)}}function bs(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=go(e[0]).body;return ys(e,o,n,r,{mark:i,markerIgnoreElements:a})}var xs=0;function Ss(e,t=`mui`){let[n,r]=B.useState(e),i=e||n;return B.useEffect(()=>{n??(xs+=1,r(`${t}-${xs}`))},[n,t]),i}var Cs=ao.useId;function ws(e,t){if(Cs!==void 0){let n=Cs();return e??(t?`${t}-${n}`:n)}return Ss(e,t)}var Ts=19;function Es(e){return Ts>=e}function Ds(e){if(!B.isValidElement(e))return null;let t=e,n=t.props;return(Es(19)?n?.ref:t.ref)??null}function Os(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ks(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function As(e,t){return typeof e==`function`?e(t):e}function js(e,t){return typeof e==`function`?e(t):e}var Ms={};function Ns(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Fs(t);let a=Fs(e);return t&&(a=Is(a,t)),n&&(a=Is(a,n)),r&&(a=Is(a,r)),i&&(a=Is(a,i)),a}function Ps(e){if(e.length===0)return Ms;if(e.length===1)return Fs(e[0]);let t=Fs(e[0]);for(let n=1;n<e.length;n+=1)t=Is(t,e[n]);return t}function Fs(e){return Bs(e)?{...Vs(e,Ms)}:Ls(e)}function Is(e,t){return Bs(t)?Vs(t,e):Rs(e,t)}function Ls(e){let t={...e};for(let e in t){let n=t[e];zs(e,n)&&(t[e]=Us(n))}return t}function Rs(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Os(e.style,r);break;case`className`:e[n]=Gs(e.className,r);break;default:zs(n,r)?e[n]=Hs(e[n],r):e[n]=r}}return e}function zs(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||typeof t>`u`)}function Bs(e){return typeof e==`function`}function Vs(e,t){return Bs(e)?e(t):e??Ms}function Hs(e,t){return t?e?(...n)=>{let r=n[0];if(Ks(r)){let i=r;Ws(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Us(t):e}function Us(e){return e&&((...t)=>{let n=t[0];return Ks(n)&&Ws(n),e(...t)})}function Ws(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Gs(e,t){return t?e?t+` `+e:t:e}function Ks(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function qs(e,t,n={}){let r=t.render,i=Js(t,n);return n.enabled===!1?null:Zs(e,r,i,n.state??ja)}function Js(e,t={}){let{className:n,style:r,render:i}=e,{state:a=ja,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?As(n,a):void 0,d=l?js(r,a):void 0,f=l?ks(a,c):ja,p=l&&s?Ys(s):void 0,m=l?Os(f,p)??{}:ja;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=Qa([m.ref,Ds(i),...o]):m.ref=Za(m.ref,Ds(i),o):Za(null,null)),l?(u!==void 0&&(m.className=Gs(m.className,u)),d!==void 0&&(m.style=Os(m.style,d)),m):ja}function Ys(e){return Array.isArray(e)?Ps(e):Ns(void 0,e)}var Xs=Symbol.for(`react.lazy`);function Zs(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Ns(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===Xs&&(i=B.Children.toArray(t)[0]),B.cloneElement(i,e)}if(e&&typeof e==`string`)return Qs(e,n);throw Error(Pi(8))}function Qs(e,t){return e===`button`?(0,B.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,B.createElement)(`img`,{alt:``,...t,key:t.key}):B.createElement(e,t)}var $s=500,ec=500,tc={style:{transition:`none`}},nc=`data-base-ui-click-trigger`,rc=`data-base-ui-swipe-ignore`,ic=`data-swipe-ignore`,ac=`[${rc}]`,oc=`[${ic}]`,sc={fallbackAxisSide:`none`},cc={fallbackAxisSide:`end`},lc={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},uc=B.createContext(null),dc=()=>B.useContext(uc),fc=os(`portal`);function pc(e={}){let{ref:t,container:n,componentProps:r=ja,elementProps:i}=e,a=ws(),o=dc()?.portalNode,[s,c]=B.useState(null),[l,u]=B.useState(null),d=co(e=>{e!==null&&u(e)}),f=B.useRef(null);V(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(an(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=qs(`div`,r,{ref:[t,d],props:[{id:a,[fc]:``},i]});return{portalNode:l,portalSubtree:s&&p?$t.createPortal(p,s):null}}var mc=B.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=pc({container:o,ref:t,componentProps:e,elementProps:c}),d=B.useRef(null),f=B.useRef(null),p=B.useRef(null),m=B.useRef(null),[h,g]=B.useState(null),_=B.useRef(!1),v=h?.modal,y=h?.open,b=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;B.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&ts(e)&&(e.type===`focusin`?_.current&&=(rs(l),!1):(ns(l),_.current=!0))}return Xa(Ya(l,`focusin`,e,!0),Ya(l,`focusout`,e,!0))},[l,v]),B.useEffect(()=>{!l||y!==!1||(rs(l),_.current=!1)},[y,l]);let x=B.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,z.jsxs)(B.Fragment,{children:[u,(0,z.jsxs)(uc.Provider,{value:x,children:[b&&l&&(0,z.jsx)(bo,{"data-type":`outside`,ref:d,onFocus:e=>{ts(e,l)?p.current?.focus():Zo(h?h.domReference:null)?.focus()}}),b&&l&&(0,z.jsx)(`span`,{"aria-owns":l.id,style:lc}),l&&$t.createPortal(a,l),b&&l&&(0,z.jsx)(bo,{"data-type":`outside`,ref:f,onFocus:e=>{ts(e,l)?m.current?.focus():(Xo(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Ka(Ra,e.nativeEvent)))}})]})]})});function hc(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var gc=class{nodesRef={current:[]};events=hc();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},_c=B.createContext(null),vc=B.createContext(null),yc=()=>B.useContext(_c)?.id||null,bc=e=>{let t=B.useContext(vc);return e??t};function xc(e){let t=ws(),n=bc(e),r=yc();return V(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Sc(e){let{children:t,externalTree:n}=e,r=wi(()=>n??new gc).current;return(0,z.jsx)(vc.Provider,{value:r,children:t})}function Cc(e){return e==null?e:`current`in e?e.current:e}function wc(e,t){let n=nn(ha(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Tc=20,Ec=[];function Dc(){Ec=Ec.filter(e=>e.deref()?.isConnected)}function Oc(e){Dc(),e&&tn(e)!==`body`&&(Ec.push(new WeakRef(e)),Ec.length>Tc&&(Ec=Ec.slice(-20)))}function kc(){return Dc(),Ec[Ec.length-1]?.deref()}function Ac(e){return e?Ko(e)?e:Jo(e)[0]||e:null}function jc(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=qo(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ko(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Mc(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=co(()=>b.current.floatingContext?.nodeId),S=i===!1,C=xa(_)&&S,w=B.useRef([`content`]),T=ro(i),E=ro(a),D=ro(l),O=bc(p),k=dc(),A=B.useRef(!1),j=B.useRef(!1),M=B.useRef(!1),N=B.useRef(null),P=B.useRef(``),ee=B.useRef(``),F=B.useRef(null),te=B.useRef(null),I=Za(F,f,k?.beforeInsideRef),ne=Za(te,k?.afterInsideRef),re=Vi(),L=Vi(),ie=ho(),R=k!=null,ae=Ca(v),oe=co((e=ae)=>e?Jo(e):[]),se=co(()=>m?.().filter(e=>e!=null)??[]);B.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&ma(ae,pa(go(ae)))&&oe().length===0&&!C&&ta(e)}return Ya(go(ae),`keydown`,e)},[r,ae,s,C,oe]),B.useEffect(()=>{if(r||!g)return;let e=go(ae);function t(){M.current=!1}function n(e){let t=ha(e),n=se();M.current=!(ma(v,t)||ma(_,t)||ma(k?.portalNode,t)||n.some(e=>e===t||ma(e,t))),ee.current=e.pointerType||`keyboard`,t?.closest(`[${nc}]`)&&(j.current=!0)}function i(){ee.current=`keyboard`}return Xa(Ya(e,`pointerdown`,n,!0),Ya(e,`pointerup`,t,!0),Ya(e,`pointercancel`,t,!0),Ya(e,`keydown`,i,!0))},[r,v,_,ae,g,k,se]),B.useEffect(()=>{if(r||!c)return;let e=go(ae);function t(){j.current=!0,L.start(0,()=>{j.current=!1})}function n(e){let t=ha(e);Ko(t)&&(N.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=ha(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=se(),f=n?.hasAttribute(os(`focus-guard`))&&[F.current,te.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,Cc(d),Cc(u)].includes(n),p=!(ma(_,n)||ma(v,n)||ma(n,v)||ma(k?.portalNode,n)||l.some(e=>e===n||ma(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>ma(e,n))||f||O&&(is(O.nodesRef.current,a).find(e=>ma(e.context?.elements.floating,n)||ma(e.context?.elements.domReference,n))||as(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,Ca(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&ae&&jc(ae,w),o&&r!==_&&!Mo(i)&&pa(e)===e.body){if(sn(ae)&&(ae.focus(),o===`popup`)){ie.request(()=>{ae.focus()});return}let e=oe(),t=N.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||ae;sn(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!j.current&&(C||n!==kc())&&(A.current=!0,h.setOpen(!1,Ka(Ra,t)))})}function a(){M.current||(b.current.insideReactTree=!0,re.start(0,()=>{b.current.insideReactTree=!1}))}let l=sn(_)?_:null;if(!(!v&&!l))return Xa(l&&Ya(l,`focusout`,i),l&&Ya(l,`pointerdown`,t),v&&Ya(v,`focusin`,n),v&&Ya(v,`focusout`,i),v&&k&&Ya(v,`focusout`,a,!0))},[r,_,v,ae,s,O,k,h,c,o,oe,C,x,w,b,re,L,ie,u,d,se]),B.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${os(`portal`)}]`)||[]),t=(O?as(O.nodesRef.current,x()):[]).find(e=>xa(e.context?.elements.domReference||null))?.context?.elements.domReference,n=bs([v,...e,F.current,te.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...se(),t,Cc(d),Cc(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=bs([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,se]),V(()=>{if(!g||r||!sn(ae))return;let e=go(ae),t=pa(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||ma(ae,t))return;let i=null,a=()=>(i??=oe(ae),i[0]||ae),o;o=r===!0||r===null?a():Cc(r),o||=a();let s=ma(ae,pa(e));cs(o,{preventScroll:o===ae,shouldFocus(){if(s)return!0;let t=pa(e);return!(t!==o&&ma(ae,t))}})})},[r,g,ae,oe,T,D]),V(()=>{if(r||!ae)return;let e=go(ae);Oc(pa(e));function t(e){if(e.open||(P.current=wc(e.nativeEvent,ee.current)),e.reason===Pa&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===Ia)if(e.nested)A.current=!1;else if(ra(e.nativeEvent)||ia(e.nativeEvent))A.current=!1;else{let e=!1;go(ae).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(P.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`)return _?.isConnected?_:kc()||null;let n=_?.isConnected?_:kc();return Cc(t)||n||null}return()=>{y.off(`openchange`,t);let r=pa(e),i=se(),a=ma(v,r)||i.some(e=>e===r||ma(e,r))||O&&is(O.nodesRef.current,x(),!1).some(e=>ma(e.context?.elements.floating,r)),o=E.current,s=n();queueMicrotask(()=>{let t=Ac(s),n=typeof o!=`boolean`;o&&!A.current&&sn(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),A.current=!1})}},[r,v,ae,E,y,O,_,x,se]),V(()=>{if(!Ki||g||!v)return;let e=pa(go(v));!sn(e)||!ya(e)||ma(v,e)&&e.blur()},[g,v]),V(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),V(()=>{if(!(r||!ae))return jc(ae,w),()=>{queueMicrotask(Dc)}},[r,ae,w]);let ce=!r&&(s?!C:!0)&&(R||s);return(0,z.jsxs)(B.Fragment,{children:[ce&&(0,z.jsx)(bo,{"data-type":`inside`,ref:I,onFocus:e=>{if(s){let e=oe();cs(e[e.length-1])}else k?.portalNode&&(A.current=!1,ts(e,k.portalNode)?Xo(_)?.focus():Cc(d??k.beforeOutsideRef)?.focus())}}),n,ce&&(0,z.jsx)(bo,{"data-type":`inside`,ref:ne,onFocus:e=>{s?cs(oe()[0]):k?.portalNode&&(c&&(A.current=!0),ts(e,k.portalNode)?Zo(_)?.focus():Cc(u??k.afterOutsideRef)?.focus())}})]})}function Nc(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Na}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=B.useRef(void 0),f=ho(),p=Vi(),m=B.useMemo(()=>{function e(e,t,n,r){let i=Ka(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||aa(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=ha(o);if(ya(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;if(r===`mousedown`&&i){d.current=void 0;return}aa(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return B.useMemo(()=>n?{reference:m}:ja,[n,m])}function Pc(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Fc(e){return e!=null&&e.clientX!=null}function Ic(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=B.useRef(!1),u=B.useRef(null),[d,f]=B.useState(),[p,m]=B.useState([]),h=co(e=>{i.set(`positionReference`,e)}),g=co((e,t,n)=>{l.current||c.current.openEvent&&!Fc(c.current.openEvent)||i.set(`positionReference`,Pc(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=co(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=aa(d)?o:a;B.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=nn(o);function r(t){ma(o,ha(t))?e():g(t.clientX,t.clientY)}return!c.current.openEvent||Fc(c.current.openEvent)?u.current=Ya(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),B.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),B.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),B.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=B.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return B.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}var Lc={intentional:`onClick`,sloppy:`onPointerDown`};function Rc(){return!1}function zc(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Bc(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Rc,referencePressEvent:s=`sloppy`,bubbles:c,externalTree:l}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=u.useState(`floatingElement`),{dataRef:p}=u.context,m=bc(l),h=co(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=co(()=>a),{escapeKey:y,outsidePress:b}=zc(c),x=B.useRef(!1),S=B.useRef(!1),C=B.useRef(!1),w=B.useRef(!1),T=B.useRef(``),E=B.useRef(null),D=Vi(),O=Vi(),k=co(()=>{O.clear(),p.current.insideReactTree=!1}),A=co(e=>{let t=p.current.floatingContext?.nodeId;return(m?is(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),j=co(e=>_a(e,u.select(`floatingElement`))||_a(e,u.select(`domReferenceElement`))),M=co(e=>{o()&&u.setOpen(!1,Ka(Na,e.nativeEvent))}),N=co(e=>{if(!d||!n||!r||e.key!==`Escape`||w.current||!y&&A(`__escapeKeyBubbles`))return;let t=Ka(za,na(e)?e.nativeEvent:e);u.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),P=co(()=>{p.current.insideReactTree=!0,O.start(0,k)}),ee=co(e=>{if(!d||!n||e.button!==0)return;let t=ha(e.nativeEvent);ma(u.select(`floatingElement`),t)&&(x.current||(x.current=!0,S.current=!1))}),F=co(e=>{!d||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});B.useEffect(()=>{if(!d||!n)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=b;let e=new Bi,t=new Bi;function i(){e.clear(),w.current=!0}function a(){e.start(vn()?5:0,()=>{w.current=!1})}function o(){C.current=!0,t.start(0,()=>{C.current=!1})}function s(){x.current=!1,S.current=!1}function c(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function l(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=p.current.floatingContext?.nodeId,n=m&&is(m.nodesRef.current,t).some(t=>_a(e,t.context?.elements.floating));return j(e)||n}function O(e){if(l(e)){e.type!==`click`&&!j(e)&&(t.clear(),C.current=!1),k();return}if(p.current.insideReactTree){k();return}let n=ha(e),r=`[${os(`inert`)}]`,i=on(n)?n.getRootNode():null,a=Array.from((cn(i)?i:go(u.select(`floatingElement`))).querySelectorAll(r)),o=u.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>ma(e,n))))return;let s=on(n)?n:null;for(;s&&!yn(s);){let e=Sn(s);if(yn(e)||!on(e))break;s=e}if(!(a.length&&on(n)&&!va(n)&&!ma(n,u.select(`floatingElement`))&&a.every(e=>!ma(s,e)))){if(sn(n)&&!(`touches`in e)){let t=yn(n),r=bn(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!h(e)){if(c()===`intentional`&&C.current){t.clear(),C.current=!1;return}typeof g==`function`&&!g(e)||A(`__outsidePressBubbles`)||(u.setOpen(!1,Ka(Ia,e)),k())}}}function M(e){c()!==`sloppy`||e.pointerType===`touch`||!u.select(`open`)||!n||j(e)||O(e)}function P(e){if(c()!==`sloppy`||!u.select(`open`)||!n||j(e))return;let t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function ee(e,t){let n=ha(e);if(!n)return;let r=Ya(n,e.type,()=>{t(e),r()})}function F(e){T.current=`touch`,ee(e,P)}function te(e){D.clear(),e.type===`pointerdown`&&(T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&ee(e,e=>{e.type===`pointerdown`?M(e):O(e)})}function I(e){if(!x.current)return;let n=S.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!h(e)){if(n){o();return}typeof g==`function`&&!g(e)||(t.clear(),C.current=!0,k())}}}function ne(e){if(c()!==`sloppy`||!E.current||j(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(O(e),D.clear(),E.current=null)}function re(e){ee(e,ne)}function L(e){c()!==`sloppy`||!E.current||j(e)||(E.current.dismissOnTouchEnd&&O(e),D.clear(),E.current=null)}function ie(e){ee(e,L)}let R=go(f),ae=Xa(r&&Xa(Ya(R,`keydown`,N),Ya(R,`compositionstart`,i),Ya(R,`compositionend`,a)),_&&Xa(Ya(R,`click`,te,!0),Ya(R,`pointerdown`,te,!0),Ya(R,`pointerup`,I,!0),Ya(R,`pointercancel`,I,!0),Ya(R,`mousedown`,te,!0),Ya(R,`mouseup`,I,!0),Ya(R,`touchstart`,F,!0),Ya(R,`touchmove`,re,!0),Ya(R,`touchend`,ie,!0)));return()=>{ae(),e.clear(),t.clear(),s(),C.current=!1}},[p,f,r,_,g,d,n,y,b,N,k,v,A,j,m,u,D]),B.useEffect(k,[g,k]);let te=B.useMemo(()=>({onKeyDown:N,[Lc[s]]:M,...s!==`intentional`&&{onClick:M}}),[N,M,s]),I=B.useMemo(()=>({onKeyDown:N,onPointerDown:F,onMouseDown:F,onClickCapture:P,onMouseDownCapture(e){P(),ee(e)},onPointerDownCapture(e){P(),ee(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[N,P,ee,F]);return B.useMemo(()=>n?{reference:te,floating:I,trigger:te}:{},[n,te,I])}function Vc(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function Hc(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function Uc(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(Hc(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:Vc(r,i,a,o)}}function Wc(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function Gc(e,t,n){let{lines:r}=Uc(e.getClientRects());if(r.length<2)return;let i=Wc(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function Kc(e,t){function n(t){qc(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:n,onMouseMove:r}}function qc(e,t,n,r){let i=Gc(t,n,r);return e.current=i,i}var H=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(Pi(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},Jc=Es(19)?Zc:Qc;function Yc(e,t,n,r,i){return Jc(e,t,n,r,i)}function Xc(e,t,n,r,i){let a=B.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return hi.useSyncExternalStore(e.subscribe,a,a)}Oi({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),hi.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Zc(e,t,n,r,i){let a=Di();if(!a)return Xc(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Qc(e,t,n,r,i){return Si.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var $c=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Yc(this,e,t,n,r)}},el=class extends $c{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){B.useDebugValue(e);let n=this;V(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;V(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;V(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){B.useDebugValue(e);let n=this,r=t!==void 0;V(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return B.useDebugValue(e),Yc(this,this.selectors[e],t,n,r)}useContextCallback(e,t){B.useDebugValue(e);let n=co(t??ka);this.context[e]=n}useStateSetter(e){let t=B.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},tl={open:H(e=>e.open),transitionStatus:H(e=>e.transitionStatus),domReferenceElement:H(e=>e.domReferenceElement),referenceElement:H(e=>e.positionReference??e.referenceElement),floatingElement:H(e=>e.floatingElement),floatingId:H(e=>e.floatingId)},nl=class extends el{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:hc(),nested:n,triggerElements:i},tl),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&oa(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function rl(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=B.useRef(null);r===void 0&&f.current===null&&(f.current=new nl({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),V(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};on(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function il(e,t=!1,n=!1){let[r,i]=B.useState(e&&t?`idle`:void 0),[a,o]=B.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),V(()=>{if(!e&&a&&r!==`ending`&&n){let e=mo.request(()=>{i(`ending`)});return()=>{mo.cancel(e)}}},[e,a,r,n]),V(()=>{if(!e||t)return;let n=mo.request(()=>{i(void 0)});return()=>{mo.cancel(n)}},[t,e]),V(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=mo.request(()=>{i(`idle`)});return()=>{mo.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}var al=(function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e})({}),ol={[al.startingStyle]:``},sl={[al.endingStyle]:``},cl={transitionStatus(e){return e===`starting`?ol:e===`ending`?sl:null}};function ll(e,t=!1,n=!0){let r=ho();return co((i,a=null)=>{r.cancel();let o=Cc(e);if(o==null)return;let s=o,c=()=>{$t.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=al.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function ul(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=co(i),o=ll(r,n,!1);B.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}var dl={tabIndex:-1,[sa]:``};function fl(e,t,n=!1){let r=ws(),i=yc()!=null,a=B.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return rl({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function pl(e,t){let n=B.useRef(null),r=B.useRef(null);return B.useCallback(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function ml(e,t,n){let r=n?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=n??null)}function hl(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=pl(e,n),o=co(t=>{if(a(t),!t)return;let i=n.select(`open`),o=n.select(`activeTriggerId`);if(o===e){n.update({activeTriggerElement:t,...i?r:null});return}o==null&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return V(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function gl(e){let t=e.useState(`open`);V(()=>{if(!t){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let n=e.context.triggerElements.size,r={};if(e.state.triggerCount!==n&&(r.triggerCount=n),!e.select(`activeTriggerId`)&&n===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;r.activeTriggerId=e,r.activeTriggerElement=n}}(r.triggerCount!==void 0||r.activeTriggerId!==void 0)&&e.update(r)},[t,e,e.useState(`triggerCount`)])}function _l(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=il(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=co(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),s=t.useState(`preventUnmountingOnClose`);return ul({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}function vl(e,t){e.useSyncedValues(t),V(()=>()=>{e.update({activeTriggerProps:ja,inactiveTriggerProps:ja,popupProps:ja})},[e])}var yl=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function bl(){return new nl({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new yl,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function xl(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:bl(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ja,inactiveTriggerProps:ja,popupProps:ja}}function Sl(e,t,n=!1){return new nl({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var Cl=H(e=>e.triggerIdProp??e.activeTriggerId),wl=H(e=>e.openProp??e.open),Tl=H(e=>(e.popupElement?.id??e.floatingId)||void 0);function El(e,t){return t!==void 0&&wl(e)&&Cl(e)===t}function Dl(e,t){return El(e,t)?!0:t!==void 0&&wl(e)&&Cl(e)==null&&e.triggerCount===1}var Ol={open:wl,mounted:H(e=>e.mounted),transitionStatus:H(e=>e.transitionStatus),floatingRootContext:H(e=>e.floatingRootContext),triggerCount:H(e=>e.triggerCount),preventUnmountingOnClose:H(e=>e.preventUnmountingOnClose),payload:H(e=>e.payload),activeTriggerId:Cl,activeTriggerElement:H(e=>e.mounted?e.activeTriggerElement:null),popupId:Tl,isTriggerActive:H((e,t)=>t!==void 0&&Cl(e)===t),isOpenedByTrigger:H((e,t)=>El(e,t)),isMountedByTrigger:H((e,t)=>t!==void 0&&Cl(e)===t&&e.mounted),triggerProps:H((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:H((e,t)=>Dl(e,t)?Tl(e):void 0),popupProps:H(e=>e.popupProps),popupElement:H(e=>e.popupElement),positionerElement:H(e=>e.positionerElement)};function kl(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ws(),a=yc()!=null,o=wi(()=>new nl({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new yl,floatingId:i,syncOnly:!1,nested:a})).current;return V(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=on(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function Al(e={}){let{nodeId:t,externalTree:n}=e,r=kl(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=B.useState(null),[f,p]=B.useState(void 0),[m,h]=B.useState(void 0),g=B.useRef(null),_=bc(n),v=B.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=ni({...e,elements:{...v,...u&&{reference:u}}}),b=on(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=B.useCallback(e=>{let t=on(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=B.useCallback(e=>{(on(e)||e===null)&&(g.current=e,p(e)),(on(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!on(e))&&y.refs.setReference(e)},[y.refs,p]),w=B.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=B.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=B.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),D=B.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return V(()=>{s&&(g.current=s)},[s]),V(()=>{i.context.dataRef.current.floatingContext=D;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),B.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}var jl=Xi&&Ji;function Ml(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=B.useRef(!1),c=B.useRef(null),l=B.useRef(!0),u=Vi();B.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=nn(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&sn(e)&&e===pa(go(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return Xa(Ya(t,`blur`,r),jl&&Ya(t,`keydown`,a,!0),jl&&Ya(t,`pointerdown`,o,!0))},[i,n]),B.useEffect(()=>{if(!n)return;function e(e){if(e.reason===Na||e.reason===za){let e=i.select(`domReferenceElement`);on(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=B.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=ha(t.nativeEvent);if(on(a)){if(jl&&!t.relatedTarget){if(!l.current&&!ya(a))return}else if(!Sa(a))return}let o=ga(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,Ka(Fa,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,Ka(Fa,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=on(n)&&n.hasAttribute(os(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=pa(go(e));!n&&t===e||ma(o.current.floatingContext?.refs.floating.current,t)||ma(e,t)||a||ga(n??t,i.context.triggerElements)||i.setOpen(!1,Ka(Fa,r))})}}},[o,r,i,u]);return B.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var Nl=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Bi,this.restTimeout=new Bi,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Pl=new WeakMap;function Fl(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Pl.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Pl.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Il(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Pl.get(n);a&&a!==e&&Fl(a),Fl(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Pl.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Ll(e){let t=e.context.dataRef.current,n=wi(()=>t.hoverInteractionState??Nl.create()).current;return t.hoverInteractionState||=n,Ri(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Rl(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=bc(),d=yc(),f=Ll(a),p=Vi(),m=co(()=>Da(l.current.openEvent?.type,f.interactedInside)),h=co(()=>Oa(l.current.openEvent?.type)),g=co(()=>{Fl(f)});V(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),B.useEffect(()=>g,[g]),V(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&on(c)&&s){let e=c,t=s,n=go(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r;return Il(f,{scopeElement:f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),B.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&is(u.nodesRef.current,d).length>0)}function t(e){let t=Ta(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,Ka(Pa,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=ha(e);if(!ba(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,_),g()}function h(n){if(e()&&u){u.events.on(`floating.closed`,_);return}if(ga(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&on(o)&&is(u.nodesRef.current,r,!1).some(e=>ma(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),m()||t(n)}}function _(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,_),a.setOpen(!1,Ka(Pa,t)),u.events.emit(`floating.closed`,t)})}let v=s;return Xa(v&&Ya(v,`mouseenter`,c),v&&Ya(v,`mouseleave`,h),v&&Ya(v,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,_)})},[n,s,a,l,r,i,m,g,f,u,d,p])}var zl={current:null};function Bl(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=zl,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=bc(l),v=Ll(m),y=B.useRef(!1),b=ro(i),x=ro(r),S=ro(o),C=ro(n),w=ro(p),T=ro(f),E=co(()=>Da(h.current.openEvent?.type,v.interactedInside)),D=co(()=>w.current?.()!==!1),O=co((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!ma(e,t);if(!on(n))return!1;let i=n;return r.hasMatchingElement(e=>ma(e,i))&&(!e||!ma(e,i))}),k=co(()=>{v.handler&&=(go(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=co(()=>{Fl(v)});return u&&(v.handleCloseOptions=b.current?.__options),B.useEffect(()=>k,[k]),B.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===Pa,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),B.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=Ta(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,Ka(Pa,e)),_?.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,Ka(Pa,e)),_?.events.emit(`floating.closed`,e))}let t=c.current??(u?m.select(`domReferenceElement`):null);if(!on(t))return;function r(e){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!aa(v.pointerType))return;let t=Ea(S.current),n=Ta(x.current,`open`,v.pointerType),r=ha(e),i=e.currentTarget??null,o=m.select(`domReferenceElement`),s=i;if(on(r)&&!m.context.triggerElements.hasElement(r)){for(let e of m.context.triggerElements.elements())if(ma(e,r)){s=e;break}}on(i)&&on(o)&&!m.context.triggerElements.hasElement(i)&&ma(i,o)&&(s=o);let c=s==null?!1:O(o,s,r),l=m.select(`open`),u=T.current?.()??m.select(`transitionStatus`)===`ending`,d=!l&&u&&y.current,f=!c&&on(s)&&on(o)&&ma(o,s)&&d,p=t>0&&!n,h=c&&(l||d)||f,g=!l||c;if(h){D()&&m.setOpen(!0,Ka(Pa,e,s));return}p||(n?v.openChangeTimeout.start(n,()=>{g&&D()&&m.setOpen(!0,Ka(Pa,e,s))}):g&&D()&&m.setOpen(!0,Ka(Pa,e,s)))}function i(t){if(E()){A();return}k();let n=go(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let r=h.current.floatingContext??d?.();if(!ga(t.relatedTarget,m.context.triggerElements)){if(b.current&&r){m.select(`open`)||v.openChangeTimeout.clear();let i=c.current;v.handler=b.current({...r,tree:_,x:t.clientX,y:t.clientY,onClose(){A(),k(),C.current&&!E()&&i===m.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,v.handler),v.handler(t);return}(v.pointerType!==`touch`||!ma(m.select(`floatingElement`),t.relatedTarget))&&e(t)}}return s?Xa(Ya(t,`mousemove`,r,{once:!0}),Ya(t,`mouseenter`,r),Ya(t,`mouseleave`,i)):Xa(Ya(t,`mouseenter`,r),Ya(t,`mouseleave`,i))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),B.useMemo(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=m.select(`domReferenceElement`),i=m.select(`open`),o=O(r,n,e.target);if(a&&!aa(v.pointerType))return;if(i&&o&&v.handleCloseOptions?.blockPointerEvents){let e=m.select(`floatingElement`);e&&Il(v,{scopeElement:v.handleCloseOptions?.getScope?.()??n.ownerDocument.body,referenceElement:n,floatingElement:e})}let s=Ea(S.current);if(i&&!o||s===0||!o&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function c(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||o)&&D()&&m.setOpen(!0,Ka(Pa,t,n))}v.pointerType===`touch`?$t.flushSync(()=>{c()}):o&&i?c():(v.restTimeoutPending=!0,v.restTimeout.start(s,c))}}},[n,v,E,O,a,m,S,D])}var Vl=`Escape`;function Hl(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Ul(e,t){return Hl(t,e===da||e===fa,e===la||e===ua)}function Wl(e,t,n){return Hl(t,e===fa,n?e===la:e===ua)||e===`Enter`||e===` `||e===``}function Gl(e,t,n){return Hl(t,n?e===la:e===ua,e===fa)}function Kl(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Vl:Hl(t,n?e===ua:e===la,e===da)}function ql(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,cols:v=1,id:y,resetOnPointerLeave:b=!0,externalTree:x}=t,S=`rootStore`in e?e.rootStore:e,C=S.useState(`open`),w=S.useState(`floatingElement`),T=S.useState(`domReferenceElement`),E=S.context.dataRef,D=Ca(w),O=xa(T),k=ro(D),A=yc(),j=bc(x),M=B.useRef(f),N=B.useRef(o??-1),P=B.useRef(null),ee=B.useRef(!0),F=co(e=>{i(N.current===-1?null:N.current,e)}),te=B.useRef(F),I=B.useRef(!!w),ne=B.useRef(C),re=B.useRef(!1),L=B.useRef(!1),ie=B.useRef(null),R=ro(h),ae=ro(C),oe=ro(o),se=ro(b),ce=ho(),le=ho(),ue=co(()=>{function e(e){d?j?.events.emit(`virtualfocus`,e):ie.current=cs(e,{sync:re.current,preventScroll:!0})}let t=n.current[N.current],r=L.current;t&&e(t),(re.current?e=>e():e=>ce.request(e))(()=>{let i=n.current[N.current]||t;i&&(t||e(i),ge&&(r||!ee.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});V(()=>{E.current.orientation=g},[E,g]),V(()=>{a&&(C&&w?(N.current=o??-1,M.current&&o!=null&&(L.current=!0,F())):I.current&&(N.current=-1,te.current()))},[a,C,w,o,F]),V(()=>{if(a){if(!C){re.current=!1;return}if(w)if(r==null){if(re.current=!1,oe.current!=null)return;if(I.current&&(N.current=-1,ue()),(!ne.current||!I.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>le.request(e):queueMicrotask)(t),e+=1):(N.current=P.current==null||Wl(P.current,g,u)||l?Co(n):wo(n),P.current=null,F())};t()}}else So(n.current,r)||(N.current=r,ue(),L.current=!1)}},[a,C,w,r,oe,l,n,g,u,F,ue,le]),V(()=>{if(!a||w||!j||d||!I.current)return;let e=j.nodesRef.current,t=e.find(e=>e.id===A)?.context?.elements.floating,n=pa(go(w)),r=e.some(e=>e.context&&ma(e.context.elements.floating,n));t&&!r&&ee.current&&t.focus({preventScroll:!0})},[a,w,j,A,d]),V(()=>{te.current=F,ne.current=C,I.current=!!w}),V(()=>{C||(P.current=null,M.current=f)},[C,f]);let de=r!=null,fe=co(e=>{if(!ae.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(N.current!==t||r!==t)&&(N.current=t,F(e))}),pe=co(()=>_??j?.nodesRef.current.find(e=>e.id===A)?.context?.dataRef?.current.orientation),me=co(()=>Co(n,R.current)),he=co(e=>{if(ee.current=!1,re.current=!0,e.which===229||!ae.current&&e.currentTarget===k.current)return;if(l&&Kl(e.key,g,u,v)){Ul(e.key,pe())||ta(e),S.setOpen(!1,Ka(Ba,e.nativeEvent)),sn(T)&&(d?j?.events.emit(`virtualfocus`,T):T.focus());return}let t=N.current,r=Co(n,h),i=wo(n,h);if(O||(e.key===`Home`&&(ta(e),N.current=r,F(e)),e.key===`End`&&(ta(e),N.current=i,F(e))),v>1){let t=Array.from({length:n.current.length},()=>({width:1,height:1})),a=Do(t,v,!1),o=a.findIndex(e=>e!=null&&!Ao(n.current,e,h)),s=a.reduce((e,t,r)=>t!=null&&!Ao(n.current,t,h)?r:e,-1),l=a[Eo(a.map(e=>e==null?null:n.current[e]),{event:e,orientation:g,loopFocus:c,rtl:u,cols:v,disabledIndices:ko([...(typeof h==`function`?null:h)||n.current.map((e,t)=>Ao(n.current,t,h)?t:void 0),void 0],a),minIndex:o,maxIndex:s,prevIndex:Oo(N.current>i?r:N.current,t,a,v,e.key===fa?`bl`:e.key===(u?la:ua)?`tr`:`tl`),stopEvent:!0})];if(l!=null&&(N.current=l,F(e)),g===`both`)return}if(Ul(e.key,g)){if(ta(e),C&&!d&&pa(e.currentTarget.ownerDocument)===e.currentTarget){N.current=Wl(e.key,g,u)?r:i,F(e);return}Wl(e.key,g,u)?c?t>=i?s&&t!==n.current.length?N.current=-1:(re.current=!1,N.current=r):N.current=To(n.current,{startingIndex:t,disabledIndices:h}):N.current=Math.min(i,To(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?N.current=n.current.length:(re.current=!1,N.current=i):N.current=To(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):N.current=Math.max(r,To(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),So(n.current,N.current)&&(N.current=-1),F(e)}}),ge=B.useMemo(()=>({onFocus(e){re.current=!0,fe(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){re.current=!0,L.current=!1,p&&fe(e)},onPointerLeave(e){if(!ae.current||!ee.current||e.pointerType===`touch`)return;re.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&se.current&&(ie.current?.(),ie.current=null,N.current=-1,F(e),!d)){let e=k.current,t=pa(go(e));e&&ma(e,t)&&e.focus({preventScroll:!0})}}}),[fe,ae,k,p,n,F,se,d]),_e=B.useMemo(()=>d&&C&&de&&{"aria-activedescendant":`${y}-${r}`},[d,C,de,y,r]),ve=B.useMemo(()=>({"aria-orientation":g===`both`?void 0:g,...O?{}:_e,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&C&&!d){let t=ha(e.nativeEvent);if(t&&!ma(k.current,t))return;ta(e),S.setOpen(!1,Ka(Ra,e.nativeEvent)),sn(T)&&T.focus();return}he(e)},onPointerMove(){ee.current=!0}}),[_e,he,k,g,O,S,C,d,T]),ye=B.useMemo(()=>{function e(e){S.setOpen(!0,Ka(Ba,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&ra(e.nativeEvent)&&(M.current=!d)}function n(e){M.current=f,f===`auto`&&ia(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(t){let n=S.select(`open`);ee.current=!1;let r=t.key.startsWith(`Arrow`),i=Gl(t.key,pe(),u),a=Ul(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return he(t);if(!(!n&&!m&&r)){if(o){let e=Ul(t.key,pe());P.current=l&&e?null:t.key}if(l){i&&(ta(t),n?(N.current=me(),F(t)):e(t));return}a&&(oe.current!=null&&(N.current=oe.current),ta(t),!n&&m?e(t):he(t),n&&F(t))}},onFocus(e){S.select(`open`)&&!d&&(N.current=-1,F(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[he,f,me,l,F,S,m,g,pe,u,oe,d]),be=B.useMemo(()=>({..._e,...ye}),[_e,ye]);return B.useMemo(()=>a?{reference:be,floating:ve,item:ge,trigger:ye}:{},[a,be,ve,ye,ge])}function Jl(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,onTyping:o,enabled:s=!0,resetMs:c=750,selectedIndex:l=null}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=Vi(),p=B.useRef(``),m=B.useRef(l??i??-1),h=B.useRef(null),g=co(e=>{function t(e){let t=r?.current[e];return!t||Mo(t)}function s(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let u=n.current;if(p.current.length>0&&e.key===` `&&(ta(e),o?.(!0)),p.current.length>0&&p.current[0]!==` `&&s(u,p.current)===-1&&e.key!==` `&&o?.(!1),u==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;d&&e.key!==` `&&(ta(e),o?.(!0));let g=p.current===``;g&&(m.current=l??i??-1),u.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&p.current===e.key&&(p.current=``,m.current=h.current),p.current+=e.key,f.start(c,()=>{p.current=``,m.current=h.current,o?.(!1)});let _=((g?l??i??-1:m.current)??0)+1,v=s(u,p.current,_);v===-1?e.key!==` `&&(p.current=``,o?.(!1)):(a?.(v),h.current=v)}),_=co(e=>{let t=e.relatedTarget,n=u.select(`domReferenceElement`),r=u.select(`floatingElement`);ma(n,t)||ma(r,t)||(f.clear(),p.current=``,m.current=h.current,o?.(!1))});V(()=>{!d&&l!==null||(f.clear(),h.current=null,p.current!==``&&(p.current=``))},[d,l,f]),V(()=>{d&&p.current===``&&(m.current=l??i??-1)},[d,l,i]);let v=B.useMemo(()=>({onKeyDown:g,onBlur:_}),[g,_]);return B.useMemo(()=>s?{reference:v,floating:v}:{},[s,v])}var Yl=.1,Xl=Yl*Yl,Zl=.5;function Ql(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function $l(e,t,n,r,i,a,o,s,c,l){let u=!1;return Ql(e,t,n,r,i,a)&&(u=!u),Ql(e,t,i,a,o,s)&&(u=!u),Ql(e,t,o,s,c,l)&&(u=!u),Ql(e,t,c,l,n,r)&&(u=!u),u}function eu(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function tu(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function nu(e={}){let{blockPointerEvents:t=!1}=e,n=new Bi,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Xl;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=ha(r),g=r.type===`mouseleave`,_=ma(u,h),v=ma(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&on(r.relatedTarget)&&ma(u,r.relatedTarget))return;function y(){return!!(s&&is(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=tu(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=tu(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=tu(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=tu(d,f,x.right-1,A,S.left+1,k);break}if(j)return;if(l&&!eu(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Zl/2:Zl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Zl+1,o=C||T?S.bottom-Zl:S.top,s=C?T?S.bottom-Zl:S.top:S.bottom-Zl;M=$l(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Zl/2:Zl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Zl,o=C||T?S.top+Zl:S.bottom,s=C?T?S.top+Zl:S.bottom:S.top+Zl;M=$l(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Zl/2:Zl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Zl+1,o=w||E?S.right-Zl:S.left,s=w?E?S.right-Zl:S.left:S.right-Zl;M=$l(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Zl/2:Zl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Zl,o=w||E?S.left+Zl:S.right,s=w?E?S.left+Zl:S.right:S.left+Zl;M=$l(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var ru={...Ol,disabled:H(e=>e.disabled),instantType:H(e=>e.instantType),isInstantPhase:H(e=>e.isInstantPhase),trackCursorAxis:H(e=>e.trackCursorAxis),disableHoverablePopup:H(e=>e.disableHoverablePopup),lastOpenChangeReason:H(e=>e.openChangeReason),closeOnClick:H(e=>e.closeOnClick),closeDelay:H(e=>e.closeDelay),hasViewport:H(e=>e.hasViewport)},iu=class e extends el{constructor(e,t,n=!1){let r=new yl,i={...au(),...e};i.floatingRootContext=Sl(r,t,n),super(i,{popupRef:B.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},ru)}setOpen=(e,t)=>{let n=t.reason,r=n===Pa,i=e&&n===Fa,a=!e&&(n===Na||n===za);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===Pa&&(r.instantType=void 0),ml(r,e,t.trigger),this.update(r)};r?$t.flushSync(o):o()};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Ka(Na,e))}static useStore(t,n){return fl(t,(t,r)=>new e(n,t,r)).store}};function au(){return{...xl(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var ou=ki(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=iu.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});Mi(()=>{r===void 0&&p.state.open===!1&&n===!0&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),p.useSyncedValue(`disabled`,t),gl(p);let{forceUnmount:y,transitionStatus:b}=_l(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=B.useRef(null);V(()=>{m&&t&&p.setOpen(!1,Ka(Ua))},[m,t,p]),V(()=>{b===`ending`&&C===Ma||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),V(()=>{h&&g==null&&p.set(`payload`,void 0)},[p,g,h]);let T=B.useCallback(()=>{p.setOpen(!1,Ka(Wa))},[p]);B.useImperativeHandle(o,()=>({unmount:y,close:T}),[y,T]);let E=h||_||!t&&a!==`none`;return(0,z.jsxs)(Fi.Provider,{value:p,children:[E&&(0,z.jsx)(su,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function su({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=Bc(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Ic(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n});return vl(e,{activeTriggerProps:B.useMemo(()=>Ns(a.reference,i.reference),[a.reference,i.reference]),inactiveTriggerProps:B.useMemo(()=>Ns(a.trigger,i.trigger),[a.trigger,i.trigger]),popupProps:B.useMemo(()=>Ns(dl,a.floating,i.floating),[a.floating,i.floating])}),null}var cu=(function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=al.startingStyle]=`startingStyle`,e[e.endingStyle=al.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e})({}),lu=(function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e})({}),uu={[lu.popupOpen]:``},du={[lu.popupOpen]:``,[lu.pressed]:``},fu={[cu.open]:``},pu={[cu.closed]:``},mu={[cu.anchorHidden]:``},hu={open(e){return e?uu:null}},gu={open(e){return e?du:null}},_u={open(e){return e?fu:pu},anchorHidden(e){return e?mu:null}};function vu(e){return ws(e,`base-ui`)}var yu=B.createContext(void 0);function bu(){return B.useContext(yu)}var xu=(function(e){return e[e.popupOpen=lu.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e})({}),Su=600,Cu=`data-base-ui-tooltip-trigger`;function wu(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let n=t[e];if(on(n))return n}}let t=e.target;return on(t)?t:null}function Tu(e){let t=e;for(;t;){if(t.hasAttribute(Cu))return t;let e=t.parentElement;if(e){t=e;continue}let n=t.getRootNode();t=`host`in n&&on(n.host)?n.host:null}return null}var Eu=Ai(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=Ii(!0),m=a?.store??p;if(!m)throw Error(Pi(82));let h=vu(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=B.useRef(null),b=c??Su,x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=hl(h,y,m,{payload:o,closeOnClick:l,closeDelay:x}),w=bu(),{delayRef:T,isInstantPhase:E,hasProvider:D}=Ja(v,{open:_}),O=Ll(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=ro(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),P=B.useRef(!1),ee=Vi(),F=B.useRef(void 0);function te(){let e=w?.delay,t=typeof T.current==`object`?T.current.open:void 0,n=b;return D&&(n=t===0?0:c??e??b),n}function I(e){let t=y.current;if(!t||!e)return!1;let n=Tu(e);return n!==null&&n!==t&&ma(t,n)}function ne(e){let t=I(e);return P.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,ee.clear()),t}let re=Bl(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?nu():null,restMs:te,delay(){let e=typeof T.current==`object`?T.current.close:void 0,t=x;return u==null&&D&&(t=e),{close:t}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),L=Ml(v,{enabled:!A}).reference,ie=e=>{let t=P.current,n=wu(e),r=ne(n),i=y.current,a=i&&n&&ma(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===Pa){m.setOpen(!1,Ka(Pa,e));return}if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&aa(F.current)){let t=()=>{!P.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,Ka(Pa,e,i))},n=te();n===0?(ee.clear(),t()):ee.start(n,t)}},R=m.useState(`triggerProps`,C);return qs(`button`,e,{state:{open:_},ref:[t,S,y],props:[re,L,C||M!==`none`?R:void 0,{onMouseOver(e){ie(e.nativeEvent)},onFocus(e){I(wu(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){P.current=!1,ee.clear(),F.current=void 0},onPointerEnter(e){F.current=e.pointerType},onPointerDown(e){F.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[xu.triggerDisabled]:A?``:void 0,[Cu]:A?void 0:``},f],stateAttributesMapping:hu})}),Du=B.createContext(void 0);function Ou(){let e=B.useContext(Du);if(e===void 0)throw Error(Pi(70));return e}var ku=B.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=pc({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,z.jsxs)(B.Fragment,{children:[l,c&&$t.createPortal(n,c)]})}),Au=B.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Ii().useState(`mounted`)||n?(0,z.jsx)(Du.Provider,{value:n,children:(0,z.jsx)(ku,{ref:t,...r})}):null}),ju=B.createContext(void 0);function Mu(){let e=B.useContext(ju);if(e===void 0)throw Error(Pi(71));return e}var Nu=B.createContext(void 0);function Pu(){return B.useContext(Nu)?.direction??`ltr`}var Fu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Pn(e,t)||{};if(l==null)return{};let f=Qn(u),p={x:n,y:r},m=Bn(i),h=Rn(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Nn(k,j,A),N=!c.arrow&&In(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),Iu=(e,t)=>({...Fu(e),options:[e,t]}),Lu={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await ci().fn(e)).data?.referenceHidden||a}}}},Ru={sideX:`left`,sideY:`top`},zu={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=nn(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:Ru};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=go(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=Fn(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:Ru.sideX,g=f===`top`?`bottom`:Ru.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function Bu(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Vu(e,t,n){let{rects:r,placement:i}=e;return{side:Bu(t,Fn(i),n),align:In(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Hu(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=B.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=co(D),k=D?O:t,A=ro(t),j=ro(h),M=Pu()===`rtl`,N=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],P=a===`center`?N:`${N}-${a}`,ee=c,F=+(r===`bottom`),te=+(r===`top`),I=+(r===`right`),ne=+(r===`left`);typeof ee==`number`?ee={top:ee+F,right:ee+ne,bottom:ee+te,left:ee+I}:ee&&={top:(ee.top||0)+F,right:(ee.right||0)+ne,bottom:(ee.bottom||0)+te,left:(ee.left||0)+I};let re={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:ee},L=B.useRef(null),ie=ro(i),R=ro(o),ae=typeof i==`function`?0:i,oe=typeof o==`function`?0:o,se=[];f&&se.push(f),se.push(ri(e=>{let t=Vu(e,r,M),n=typeof ie.current==`function`?ie.current(t):ie.current,i=typeof R.current==`function`?R.current(t):R.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[ae,oe,M,r]));let ce=T===`none`&&w!==`shift`,le=!ce&&(l||_||w===`shift`),ue=w===`none`?null:oi({...re,padding:{top:ee.top+1,right:ee.right+1,bottom:ee.bottom+1,left:ee.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),de=ce?null:ii(e=>{let t=go(e.elements.floating).documentElement;return{...re,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:le,limiter:l||_?void 0:ai(e=>{if(!L.current)return{};let{width:t,height:n}=L.current.getBoundingClientRect(),r=zn(Fn(e.placement)),i=r===`y`?t:n,a=r===`y`?ee.left+ee.right:ee.top+ee.bottom;return{offset:i/2+a/2}})}},[re,l,_,ee,T]);w===`shift`||T===`shift`||a===`center`?se.push(de,ue):se.push(ue,de),se.push(si({...re,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=nn(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),Iu(e=>({element:L.current||go(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=Fn(a),l=zn(c),u=L.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(Vu(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,le&&l===`y`&&b?S:x),{}}},Lu,y),V(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let fe=B.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:pe,elements:me,x:he,y:ge,middlewareData:_e,update:ve,placement:ye,context:be,isPositioned:xe,floatingStyles:Se}=Al({rootContext:m,open:p?h:void 0,placement:P,middleware:se,strategy:n,whileElementsMounted:p?void 0:(...e)=>Ur(...e,fe),nodeId:v,externalTree:x}),{sideX:Ce,sideY:we}=_e.adaptiveOrigin||Ru,Te=xe?n:`fixed`,Ee=B.useMemo(()=>{let e=y?{position:Te,[Ce]:he,[we]:ge}:{position:Te,...Se};return xe||(e.opacity=0),e},[y,Te,Ce,he,we,ge,Se,xe]),De=B.useRef(null);V(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(Uu(t)?t.current:t)||null;n!==De.current&&(pe.setPositionReference(n),De.current=n)},[h,pe,k,A]),B.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&Uu(e)&&e.current!==De.current&&(pe.setPositionReference(e.current),De.current=e.current)},[h,pe,k,A]),B.useEffect(()=>{if(p&&h&&me.domReference&&me.floating)return Ur(me.domReference,me.floating,ve,fe)},[p,h,me,ve,fe]);let Oe=Fn(ye),ke=Bu(r,Oe,M),Ae=In(ye)||`center`,je=!!_e.hide?.referenceHidden;V(()=>{b&&h&&xe&&C(Oe)},[b,h,xe,Oe]);let Me=B.useMemo(()=>({position:`absolute`,top:_e.arrow?.y,left:_e.arrow?.x}),[_e.arrow]),Ne=_e.arrow?.centerOffset!==0;return B.useMemo(()=>({positionerStyles:Ee,arrowStyles:Me,arrowRef:L,arrowUncentered:Ne,side:ke,align:Ae,physicalSide:Oe,anchorHidden:je,refs:pe,context:be,isPositioned:xe,update:ve}),[Ee,Me,L,Ne,ke,Ae,Oe,je,pe,be,xe,ve])}function Uu(e){return e!=null&&`current`in e}function Wu(e){return e===`starting`?tc:ja}function Gu(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),qs(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Wu(r),i],stateAttributesMapping:_u})}var Ku=B.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=cc,style:g,..._}=e,v=Ii(),y=Ou(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Hu({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?zu:void 0}),O=Gu(e,B.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,z.jsx)(ju.Provider,{value:D,children:O})}),qu={..._u,...cl},Ju=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Ii(),{side:s,align:c}=Mu(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);ul({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Rl(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return qs(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[f,Wu(d),a],stateAttributesMapping:qu})}),Yu=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Ii(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Mu();return qs(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:_u})});function Xu(e){return Es(19)?e:e?`true`:void 0}function Zu(e){let[t,n]=B.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}var Qu=B.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function $u(e=!1){let t=B.useContext(Qu);if(!t&&!e)throw Error(Pi(86));return t}var ed=(function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e})({}),td={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},nd={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},rd={disabled:!1,...nd},id={valid(e){return e===null?null:e?{[ed.valid]:``}:{[ed.invalid]:``}}},ad={invalid:void 0,name:void 0,validityData:{state:td,errors:[],error:``,value:``,initialValue:null},setValidityData:ka,disabled:void 0,touched:nd.touched,setTouched:ka,dirty:nd.dirty,setDirty:ka,filled:nd.filled,setFilled:ka,focused:nd.focused,setFocused:ka,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:rd,markedDirtyRef:{current:!1},registerFieldControl:ka,validation:{getValidationProps:(e=ja)=>e,getInputValidationProps:(e=ja)=>e,inputRef:{current:null},commit:async()=>{}}},od=B.createContext(ad);function sd(e=!0){let t=B.useContext(od);if(t.setValidityData===ka&&!e)throw Error(Pi(28));return t}var cd=B.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ka,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function ld(){return B.useContext(cd)}var ud=B.createContext({controlId:void 0,registerControlId:ka,labelId:void 0,setLabelId:ka,messageIds:[],setMessageIds:ka,getDescriptionProps:e=>e});function dd(){return B.useContext(ud)}var fd=function(e){let t=vu(),n=e.controlId===void 0?t:e.controlId,[r,i]=B.useState(n),[a,o]=B.useState(e.labelId),[s,c]=B.useState([]),l=wi(()=>new Map),{messageIds:u}=dd(),d=co((e,t)=>{let n=l.current;if(t===void 0){n.delete(e);return}n.set(e,t),i(e=>{if(n.size===0)return;let t;for(let r of n.values()){if(e!==void 0&&r===e)return e;t===void 0&&(t=r)}return t})}),f=B.useCallback(e=>Ns({"aria-describedby":u.concat(s).join(` `)||void 0},e),[u,s]),p=B.useMemo(()=>({controlId:r,registerControlId:d,labelId:a,setLabelId:o,messageIds:s,setMessageIds:c,getDescriptionProps:f}),[r,d,a,o,s,c,f]);return(0,z.jsx)(ud.Provider,{value:p,children:e.children})};function pd(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=dd(),o=vu(t),s=n?i:void 0,c=wi(()=>Symbol(`labelable-control`)),l=B.useRef(!1),u=B.useRef(t!=null),d=co(()=>{!l.current||a===ka||(l.current=!1,a(c.current,void 0))});return V(()=>{if(a===ka)return;let e;if(n){let n=r?.current;e=on(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),B.useEffect(()=>d,[d]),i??o}function md(e,t){let n=vu(e);return V(()=>(t(n),()=>{t(void 0)}),[n,t]),n}function hd(e={}){let{id:t,fallbackControlId:n,native:r=!1,setLabelId:i,focusControl:a}=e,{controlId:o,setLabelId:s}=dd(),c=md(t,co(e=>{s(e),i?.(e)})),l=o??n;function u(e){if(a){a(e,l);return}if(!l)return;let t=go(e.currentTarget).getElementById(l);sn(t)&&gd(t)}function d(e){ha(e.nativeEvent)?.closest(`button,input,select,textarea`)||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),!r&&u(e))}return r?{id:c,htmlFor:l??void 0,onMouseDown:d}:{id:c,onClick:d,onPointerDown(e){e.preventDefault()}}}function gd(e){e.focus({focusVisible:!0})}function _d(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var vd=Object.keys(td);function yd(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let n of vd)n!==`valid`&&(n===`valueMissing`&&(t=e[n]),e[n]&&(t=!1));return t}function bd(e){let{formRef:t,clearErrors:n}=ld(),{setValidityData:r,validate:i,validityData:a,validationDebounceTime:o,invalid:s,markedDirtyRef:c,state:l,name:u,shouldValidateOnChange:d,getRegisteredFieldId:f}=e,{controlId:p,getDescriptionProps:m}=dd(),h=Vi(),g=B.useRef(null),_=co(async(e,n=!1)=>{let o=g.current;if(!o)return;function u(e,n=s){let r=f()??p;if(r==null)return;let i=t.current.fields.get(r);if(!i)return;let a=_d(e,n);t.current.fields.set(r,{...i,validityData:a})}if(n){if(l.valid!==!1)return;let t=o.validity;if(!t.valueMissing){let t={value:e,state:{...td,valid:!0},error:``,errors:[],initialValue:a.initialValue};o.setCustomValidity(``),u(t,!1),r(t);return}let n=vd.reduce((e,n)=>(e[n]=t[n],e),{});if(!n.valid&&!yd(n))return}function m(e){let t=vd.reduce((t,n)=>(t[n]=e.validity[n],t),{}),n=!1;for(let e of vd)if(e!==`valid`){if(e===`valueMissing`&&t[e])n=!0;else if(t[e])return t}return n&&!c.current&&(t.valid=!0,t.valueMissing=!1),t}h.clear();let _=null,v=[],y=m(o),b,x=d();if(o.validationMessage&&!x)b=o.validationMessage,v=[o.validationMessage];else{let n=i(e,Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));_=typeof n==`object`&&n&&`then`in n?await n:n,_===null?x&&(o.setCustomValidity(``),y.customError=!1,o.validationMessage?(b=o.validationMessage,v=[o.validationMessage]):o.validity.valid&&!y.valid&&(y.valid=!0)):(y.valid=!1,y.customError=!0,Array.isArray(_)?(v=_,o.setCustomValidity(_.join(`
11
+ `))):_&&(v=[_],o.setCustomValidity(_)))}let S={value:e,state:y,error:b??(Array.isArray(_)?_[0]:_??``),errors:v,initialValue:a.initialValue};u(S),r(S)}),v=B.useCallback((e={})=>Ns(m,l.valid===!1?{"aria-invalid":!0}:ja,e),[m,l.valid]),y=B.useCallback((e={})=>Ns({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(n(u),!d()){_(e.currentTarget.value,!0);return}let t=e.currentTarget;if(t.value===``){_(t.value);return}h.clear(),o?h.start(o,()=>{_(t.value)}):_(t.value)}},v(e)),[v,n,u,h,_,o,d]);return B.useMemo(()=>({getValidationProps:v,getInputValidationProps:y,inputRef:g,commit:_}),[v,y,_])}function xd(e){let{commit:t,invalid:n,markedDirtyRef:r,name:i,setRegisteredFieldId:a,setValidityData:o,validityData:s}=e,{formRef:c}=ld(),l=B.useRef(null),u=B.useRef(null),d=B.useRef(null),f=co(()=>{let e=u.current;if(e)return e.getValue?e.getValue():e.value}),p=co(()=>{let e=u.current;if(!e)return;let n=e.value;n===void 0&&(n=f()),r.current=!0,t(n)});function m(){let e=u.current;!e||!e.id||c.current.fields.set(e.id,{getValue:f,name:i,controlRef:e.controlRef??d,validityData:_d(s,n),validate:p})}function h(e=u.current?.id){e&&c.current.fields.delete(e)}function g(){let e=u.current;if(!e)return;let t=e.value;t===void 0&&(t=f()),s.initialValue===null&&t!==null&&o(e=>({...e,initialValue:t}))}return V(()=>{let e=u.current;!e||!e.id||c.current.fields.set(e.id,{getValue:f,name:i,controlRef:e.controlRef??d,validityData:_d(s,n),validate:p})},[c,f,n,i,p,s]),V(()=>{let e=c.current.fields;return()=>{let t=u.current?.id;t&&e.delete(t)}},[c]),co((e,t)=>{if(!t){l.current===e&&(l.current=null,h(),u.current=null,a(void 0));return}let n=u.current?.id;l.current=e,u.current=t,a(t.id),n&&n!==t.id&&h(n),g(),m()})}var Sd=B.forwardRef(function(e,t){let{errors:n,validationMode:r,submitAttemptedRef:i}=ld(),{render:a,className:o,validate:s,validationDebounceTime:c=0,validationMode:l=r,name:u,disabled:d=!1,invalid:f,dirty:p,touched:m,actionsRef:h,style:g,..._}=e,{disabled:v}=$u(),y=co(s||(()=>null)),b=v||d,[x,S]=B.useState(!1),[C,w]=B.useState(!1),[T,E]=B.useState(!1),[D,O]=B.useState(!1),k=p??C,A=m??x,j=B.useRef(!1),M=B.useRef(void 0),N=B.useCallback(()=>M.current,[]),P=B.useCallback(e=>{M.current=e},[]),ee=co(e=>{p===void 0&&(e&&(j.current=!0),w(e))}),F=co(e=>{m===void 0&&S(e)}),te=co(()=>l===`onChange`||l===`onSubmit`&&i.current),I=!!u&&Object.hasOwn(n,u)&&n[u]!==void 0,ne=f===!0||I,[re,L]=B.useState({state:td,error:``,errors:[],value:null,initialValue:null}),ie=!ne&&re.state.valid,R=B.useMemo(()=>({disabled:b,touched:A,dirty:k,valid:ie,filled:T,focused:D}),[b,A,k,ie,T,D]),ae=bd({setValidityData:L,validate:y,validityData:re,validationDebounceTime:c,invalid:ne,markedDirtyRef:j,state:R,name:u,shouldValidateOnChange:te,getRegisteredFieldId:N}),oe=re.value,se=B.useCallback(()=>{j.current=!0,ae.commit(oe)},[ae,oe]),ce=xd({commit:ae.commit,invalid:ne,markedDirtyRef:j,name:u,setRegisteredFieldId:P,setValidityData:L,validityData:re});B.useImperativeHandle(h,()=>({validate:se}),[se]);let le=B.useMemo(()=>({invalid:ne,name:u,validityData:re,setValidityData:L,disabled:b,touched:A,setTouched:F,dirty:k,setDirty:ee,filled:T,setFilled:E,focused:D,setFocused:O,validate:y,validationMode:l,validationDebounceTime:c,shouldValidateOnChange:te,state:R,markedDirtyRef:j,registerFieldControl:ce,validation:ae}),[ne,u,re,b,A,F,k,ee,T,E,D,O,y,l,c,te,R,ce,ae]),ue=qs(`div`,e,{ref:t,state:R,props:_,stateAttributesMapping:id});return(0,z.jsx)(od.Provider,{value:le,children:ue})}),Cd=B.forwardRef(function(e,t){return(0,z.jsx)(fd,{children:(0,z.jsx)(Sd,{...e,ref:t})})}),wd=B.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,nativeLabel:o=!0,...s}=e,c=sd(!1),{labelId:l}=dd(),u=B.useRef(null),d=hd({id:l??a,native:o});return qs(`label`,e,{ref:[t,u],state:c.state,props:[d,s],stateAttributesMapping:id})}),Td={...id,...cl},Ed=B.forwardRef(function(e,t){let{render:n,id:r,className:i,match:a,style:o,...s}=e,c=vu(r),{validityData:l,state:u,name:d}=sd(!1),{setMessageIds:f}=dd(),{errors:p}=ld(),m=d?p[d]:null,h=typeof a==`string`,g=!1;g=a===!0?!0:h?!!l.state[a]:!!m||l.state.valid===!1;let{mounted:_,transitionStatus:v,setMounted:y}=il(g);V(()=>{if(!(!g||!c))return f(e=>e.concat(c)),()=>{f(e=>e.filter(e=>e!==c))}},[g,c,f]);let b=B.useRef(null),[x,S]=B.useState(null),[C,w]=B.useState(null),T=l.errors.length>1?(0,z.jsx)(`ul`,{children:l.errors.map(e=>(0,z.jsx)(`li`,{children:e},e))}):l.error,E=h?T:m||T,D=l.error;m==null?l.errors.length>1&&(D=JSON.stringify(l.errors)):D=Array.isArray(m)?JSON.stringify(m):m,g&&D!==C&&(w(D),S(E)),ul({open:g,ref:b,onComplete(){g||y(!1)}});let O={...u,transitionStatus:v},k=qs(`div`,e,{ref:[t,b],state:O,props:[{id:c,children:g?E:x},s],stateAttributesMapping:Td,enabled:_});return _?k:null}),Dd=B.forwardRef(function(e,t){let{render:n,id:r,className:i,style:a,...o}=e,s=vu(r),c=sd(!1),{setMessageIds:l}=dd();return V(()=>{if(s)return l(e=>e.concat(s)),()=>{l(e=>e.filter(e=>e!==s))}},[s,l]),qs(`p`,e,{ref:t,state:c.state,props:[{id:s},o],stateAttributesMapping:id})});function Od({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=B.useRef(e!==void 0),[a,o]=B.useState(t);return[i?e:a,B.useCallback(e=>{i||o(e)},[])]}function kd(e,t,n,r,i=!0){let{registerFieldControl:a}=sd(),o=B.useRef(null);o.current||=Symbol(),V(()=>{let s=o.current;return!s||!i?void 0:(a(s,{controlRef:e,getValue:r,id:t,value:n}),()=>{a(s,void 0)})},[e,i,r,t,a,n])}var Ad=B.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=sd(),C=h||s,w=m??a,T={...p,disabled:C},{labelId:E}=dd(),D=pd({id:i});V(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let O=B.useRef(null);V(()=>{u&&O.current===pa(go(O.current))&&y(!0)},[u,y]);let[k]=Od({controlled:o,default:l,name:`FieldControl`,state:`value`}),A=o!==void 0,j=A?k:void 0,M=co(()=>S.inputRef.current?.value);return kd(S.inputRef,D,j,M),qs(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...A?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,Ka(Ma,e.nativeEvent)),_(t!==v.initialValue),b(t!==``)},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),f],stateAttributesMapping:id})}),jd=B.createContext(void 0);function Md(e=!1){let t=B.useContext(jd);if(t===void 0&&!e)throw Error(Pi(16));return t}function Nd(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:B.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Pd(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=B.useRef(null),s=Md(!0),c=a??s!==void 0,{props:l}=Nd({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=B.useCallback(()=>{let e=o.current;Fd(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return V(u,[u]),{getButtonProps:B.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return Ns({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Ws(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=Fd(a),l=!i&&Id(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(Ws(e),a?.(e),e.target===e.currentTarget&&i&&c&&Fd(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:co(e=>{o.current=e,u()})}}function Fd(e){return sn(e)&&e.tagName===`BUTTON`}function Id(e){return!!(e?.tagName===`A`&&e?.href)}function Ld(e,t){let n=B.useRef(e),r=co(t);V(()=>{n.current!==e&&r(n.current)},[e,r]),V(()=>{n.current=e},[e])}var Rd=e=>e.toastMetadata;H(e=>e.toasts),H(e=>e.toasts.length===0),H(Rd,(e,t)=>e.get(t)?.value),H(Rd,(e,t)=>e.get(t)?.domIndex??-1),H(Rd,(e,t)=>e.get(t)?.offsetY??0),H(Rd,(e,t)=>e.get(t)?.visibleIndex??-1),H(e=>e.hovering),H(e=>e.focused),H(e=>e.hovering||e.focused),H(e=>e.hovering||e.focused||!e.isWindowFocused),H(e=>e.prevFocusElement);function zd(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}({...cl}),`${ac}${oc}`;var Bd=B.forwardRef(function(e,t){return(0,z.jsx)(Ad,{ref:t,...e})}),Vd=(e,t)=>Object.is(e,t);function Hd(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Ud(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:Hd(t,e,n))}function Wd(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:Hd(e,t,n))}function Gd(e,t,n){return e.filter(e=>!Hd(t,e,n))}function Kd(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function qd(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Jd(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(qd(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Yd(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Kd(e)}function Xd(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Kd(e.value):Kd(e)}function Zd(e,t,n){function r(){return Yd(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=qd(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Qd(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,z.jsx)(B.Fragment,{children:Zd(r,t,n)},i)),e),[])}H(e=>e.id),H(e=>e.labelId),H(e=>e.items),H(e=>e.selectedValue),H(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),H(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),H((e,t)=>t?Jd(e.items):!1),H(e=>e.open),H(e=>e.mounted),H(e=>e.forceMounted),H(e=>e.inline),H(e=>e.activeIndex),H(e=>e.selectedIndex),H((e,t)=>e.activeIndex===t),H((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>Hd(t,e,n)):Hd(t,r,n)}),H(e=>e.transitionStatus),H(e=>e.popupProps),H(e=>e.inputProps),H(e=>e.triggerProps),H(e=>e.itemProps),H(e=>e.positionerElement),H(e=>e.listElement),H(e=>e.triggerElement),H(e=>e.inputElement),H(e=>e.inputGroupElement),H(e=>e.popupSide),H(e=>e.openMethod),H(e=>e.inputInsidePopup),H(e=>e.inputOwnsFormValue),H(e=>e.selectionMode),H(e=>e.name),H(e=>e.form),H(e=>e.disabled),H(e=>e.readOnly),H(e=>e.required),H(e=>e.grid),H(e=>e.virtualized),H(e=>e.itemToStringLabel),H(e=>e.isItemEqualToValue),H(e=>e.modal),H(e=>e.autoHighlight),H(e=>e.submitOnItemClick);function $d(e){return Array.isArray(e)?e.map(e=>$d(e)).join(`,`):e==null?``:String(e)}function ef(e){let t=B.useRef(``),n=B.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:B.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function tf(e,t){let{onClick:n,onPointerDown:r}=ef(co((n,r)=>{(typeof e==`function`?e():e)||t(r||(qi?`touch`:``))}));return B.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function nf(e){let[t,n]=B.useState(null),r=tf(e,n);return Ld(e,t=>{t&&!e&&n(null)}),B.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function rf(e){return e==null?void 0:`${e}-label`}function af(e,t){return e??t}({...gu,...id});function of(e){let t=e.getBoundingClientRect(),n=nn(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var sf=B.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function cf(){return B.useContext(sf)}function lf(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=co(i),o=B.useRef(0),s=wi(df).current,c=wi(uf).current,[l,u]=B.useState(0),d=B.useRef(l),f=co((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=co(e=>{c.delete(e),d.current+=1,u(d.current)}),m=B.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(ff).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);V(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),V(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),V(()=>()=>{n.current=[]},[n]),V(()=>()=>{r&&(r.current=[])},[r]);let h=co(e=>(s.add(e),()=>{s.delete(e)}));V(()=>{s.forEach(e=>e(m))},[s,m]);let g=B.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,z.jsx)(sf.Provider,{value:g,children:t})}function uf(){return new Map}function df(){return new Set}function ff(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}({..._u,...cl});var pf=B.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,z.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),mf={},hf={},gf=``;function _f(e){if(typeof document>`u`)return!1;let t=go(e);return nn(t).innerWidth-t.documentElement.clientWidth>0}function vf(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=go(e),n=t.documentElement,r=t.body,i=ln(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function yf(e){let t=go(e),n=t.documentElement,r=t.body,i=ln(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function bf(e){let t=go(e),n=t.documentElement,r=t.body,i=nn(n),a=0,o=0,s=!1,c=mo.create();if(Ki&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,mf={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},gf=n.style.scrollBehavior,hf={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=ln(n)?n:r;if(s=vf(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,mf),Object.assign(r.style,hf),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=gf)}function d(){u(),c.request(l)}l();let f=Ya(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var xf=new class{lockCount=0;restore=null;timeoutLock=Bi.create();timeoutUnlock=Bi.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=go(e).documentElement,n=nn(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=ka;return}let r=qi||!_f(e);this.restore=r?yf(e):bf(e)}};function Sf(e=!0,t=null){V(()=>{if(e)return xf.acquire(t)},[e,t])}var Cf=20;function wf(e,t,n,r){let[i,a]=B.useState(!1);V(()=>{if(!e||!t||n==null){a(!1);return}let r=go(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Cf)},[e,t,n]),Sf(e&&(!t||i),r)}({..._u,...cl});var Tf=(function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e})({});function Ef(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=cf(),f=B.useRef(-1),[p,m]=B.useState(a??(i===Tf.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=B.useRef(null),g=B.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return V(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),V(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),B.useMemo(()=>({ref:g,index:p}),[p,g])}({...cl,...hu});var Df=B.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return qs(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),Of=B.createContext(void 0);function kf(e){let t=B.useContext(Of);if(t===void 0&&!e)throw Error(Pi(69));return t}var Af=`ArrowUp`,jf=`ArrowDown`,Mf=`ArrowLeft`,Nf=`ArrowRight`,Pf=`Home`,Ff=`End`,If=new Set([Mf,Nf]),Lf=new Set([Af,jf]),Rf=new Set([...If,...Lf]),zf=new Set([...Rf,Pf,Ff]);function Bf(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Md(),{ref:i,index:a}=Ef(e),o=n===a,s=B.useRef(null),c=Za(i,s);return{compositeProps:B.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}function Vf(e){let{render:t,className:n,style:r,state:i=ja,props:a=Aa,refs:o=Aa,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=Bf({metadata:s});return qs(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}({..._u,...cl}),(function(e){return e[e.open=cu.open]=`open`,e[e.closed=cu.closed]=`closed`,e[e.startingStyle=cu.startingStyle]=`startingStyle`,e[e.endingStyle=cu.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e})({}),{..._u,...cl},{...Ol},H(e=>e.modal),H(e=>e.nested),H(e=>e.nestedOpenDialogCount),H(e=>e.nestedOpenDrawerCount),H(e=>e.disablePointerDismissal),H(e=>e.openMethod),H(e=>e.descriptionElementId),H(e=>e.titleElementId),H(e=>e.viewportElement),H(e=>e.role),(function(e){return e[e.open=cu.open]=`open`,e[e.closed=cu.closed]=`closed`,e[e.startingStyle=cu.startingStyle]=`startingStyle`,e[e.endingStyle=cu.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e})({}),{..._u,...cl};function Hf(e){return qs(e.defaultTagName??`div`,e,e)}var Uf=B.createContext(void 0);function Wf(e){let t=B.useContext(Uf);if(t===void 0&&!e)throw Error(Pi(36));return t}var Gf=B.createContext(void 0);function Kf(e=!0){let t=B.useContext(Gf);if(t===void 0&&!e)throw Error(Pi(25));return t}({..._u,...cl}),{...cl},{..._u,...cl};var qf=B.createContext(null);function Jf(e){let t=B.useContext(qf);if(t===null&&!e)throw Error(Pi(5));return t}var Yf={...Ol,disabled:H(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:H(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:H(e=>e.openMethod),allowMouseEnter:H(e=>e.allowMouseEnter),stickIfOpen:H(e=>e.stickIfOpen),parent:H(e=>e.parent),rootId:H(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:H(e=>e.activeIndex),isActive:H((e,t)=>e.activeIndex===t),hoverEnabled:H(e=>e.hoverEnabled),instantType:H(e=>e.instantType),lastOpenChangeReason:H(e=>e.openChangeReason),floatingTreeRoot:H(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:H(e=>e.floatingNodeId),floatingParentNodeId:H(e=>e.floatingParentNodeId),itemProps:H(e=>e.itemProps),closeDelay:H(e=>e.closeDelay),hasViewport:H(e=>e.hasViewport),keyboardEventRelay:H(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},Xf=class e extends el{constructor(e){super({...Zf(),...e},{positionerRef:B.createRef(),popupRef:B.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:B.createRef(),beforeContentFocusGuardRef:B.createRef(),onOpenChangeComplete:void 0,triggerElements:new yl},Yf),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=wi(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function Zf(){return{...xl(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new gc,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ja,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var Qf=B.createContext(void 0);function $f(){return B.useContext(Qf)}ki(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:c=!0,orientation:l=`vertical`,actionsRef:u,closeParentOnEsc:d=!1,handle:f,triggerId:p,defaultTriggerId:m=null,highlightItemOnHover:h=!0}=e,g=Kf(!0),_=Wf(!0),v=Jf(!0),y=$f(),b=B.useMemo(()=>y&&_?{type:`menu`,store:_.store}:v?{type:`menubar`,context:v}:g&&!_?{type:`context-menu`,context:g}:{type:void 0},[g,_,v,y]),x=Xf.useStore(f?.store,{open:a,openProp:n,activeTriggerId:m,triggerIdProp:p,parent:b});Mi(()=>{n===void 0&&x.state.open===!1&&a===!0&&x.update({open:!0,activeTriggerId:m})}),x.useControlledProp(`openProp`,n),x.useControlledProp(`triggerIdProp`,p),x.useContextCallback(`onOpenChangeComplete`,i);let S=ws(),C=ws(),w=x.useState(`floatingTreeRoot`),T=xc(w),E=yc(),D=x.useState(`open`),O=x.useState(`activeTriggerElement`),k=x.useState(`positionerElement`),A=x.useState(`hoverEnabled`),j=x.useState(`disabled`),M=x.useState(`lastOpenChangeReason`),N=x.useState(`parent`),P=x.useState(`activeIndex`),ee=x.useState(`payload`),F=x.useState(`floatingParentNodeId`),te=B.useRef(null),I=B.useRef(N.type!==`context-menu`),ne=Vi(),re=B.useRef(!0),L=Vi(),ie=F!=null,{openMethod:R,triggerProps:ae}=nf(D);x.useSyncedValues({disabled:o,modal:N.type===void 0?s:void 0,openMethod:R,rootId:S}),gl(x);let{forceUnmount:oe}=_l(D,x,()=>{x.update({allowMouseEnter:!1,stickIfOpen:!0})});V(()=>{g&&!_?x.update({parent:{type:`context-menu`,context:g},floatingNodeId:T,floatingParentNodeId:E}):_&&x.update({floatingNodeId:T,floatingParentNodeId:E})},[g,_,T,E,x]),B.useEffect(()=>{if(D||(te.current=null),N.type===`context-menu`){if(!D){ne.clear(),I.current=!1;return}ne.start(500,()=>{I.current=!0})}},[ne,D,N.type]),V(()=>{!D&&!A&&x.set(`hoverEnabled`,!0)},[D,A,x]);let se=co((e,t)=>{let n=t.reason;if(D===e&&t.trigger===O&&M===n||(t.preventUnmountOnClose=()=>{x.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=O??void 0),r?.(e,t),t.isCanceled))return;x.state.floatingRootContext.dispatchOpenChange(e,t);let i=t.event;if(e===!1&&i?.type===`click`&&i.pointerType===`touch`&&!re.current)return;if(!e&&P!==null){let e=x.context.itemDomElements.current[P];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===Fa?(re.current=!1,L.start(300,()=>{re.current=!0})):(re.current=!0,L.clear());let a=(n===Na||n===La)&&i.detail===0&&i?.isTrusted,o=!e&&(n===za||n==null),s={open:e,openChangeReason:n};te.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),x.update(s),N.type===`menubar`&&(n===Fa||n===Ra||n===Pa||n===Ba||n===Ha)?x.set(`instantType`,`group`):a||o?x.set(`instantType`,a?`click`:`dismiss`):x.set(`instantType`,void 0)}),ce=rl({popupStore:x,floatingId:C,nested:E!=null,onOpenChange:se}),le=ce.context.events;B.useEffect(()=>{let e=({open:e,eventDetails:t})=>se(e,t);return le.on(`setOpen`,e),()=>{le?.off(`setOpen`,e)}},[le,se]);let ue=B.useCallback(()=>{x.setOpen(!1,Ka(Wa))},[x]);B.useImperativeHandle(u,()=>({unmount:oe,close:ue}),[oe,ue]);let de;N.type===`context-menu`&&(de=N.context),B.useImperativeHandle(de?.positionerRef,()=>k,[k]),B.useImperativeHandle(de?.actionsRef,()=>({setOpen:se}),[se]);let fe=Bc(ce,{enabled:!j,bubbles:{escapeKey:d&&N.type===`menu`},outsidePress(){return N.type!==`context-menu`||te.current?.type===`contextmenu`?!0:I.current},externalTree:ie?w:void 0}),pe=Pu(),me=B.useCallback(e=>{x.select(`activeIndex`)!==e&&x.set(`activeIndex`,e)},[x]),he=ql(ce,{enabled:!j,listRef:x.context.itemDomElements,activeIndex:P,nested:N.type!==void 0,loopFocus:c,orientation:l,parentOrientation:N.type===`menubar`?N.context.orientation:void 0,rtl:pe===`rtl`,disabledIndices:Aa,onNavigate:me,openOnArrowKeyDown:N.type!==`context-menu`,externalTree:ie?w:void 0,focusItemOnHover:h}),ge=B.useCallback(e=>{x.context.typingRef.current=e},[x]),_e=Jl(ce,{listRef:x.context.itemLabels,elementsRef:x.context.itemDomElements,activeIndex:P,resetMs:$s,onMatch:e=>{D&&e!==P&&x.set(`activeIndex`,e)},onTyping:ge});vl(x,{floatingRootContext:ce,activeTriggerProps:B.useMemo(()=>{let e=Ns(_e.reference,he.reference,fe.reference,{onMouseMove(){x.set(`allowMouseEnter`,!0)}},ae);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=D,e},[x,_e.reference,he.reference,fe.reference,ae,D]),inactiveTriggerProps:B.useMemo(()=>{let e=Ns(he.trigger,fe.trigger,ae);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[he.trigger,fe.trigger,ae]),popupProps:B.useMemo(()=>Ns(dl,{id:C,role:`menu`,"aria-labelledby":O?.id,onMouseMove(){x.set(`allowMouseEnter`,!0),N.type===`menu`&&x.set(`hoverEnabled`,!1)},onClick(){x.select(`hoverEnabled`)&&x.set(`hoverEnabled`,!1)},onKeyDown(e){let t=x.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},_e.floating,he.floating,fe.floating),[O,C,N.type,x,_e.floating,he.floating,fe.floating]),itemProps:he.item??ja});let ve=B.useMemo(()=>({store:x,parent:b}),[x,b]),ye=(0,z.jsx)(Uf.Provider,{value:ve,children:typeof t==`function`?t({payload:ee}):t});return N.type===void 0||N.type===`context-menu`?(0,z.jsx)(Sc,{externalTree:w,children:ye}):ye});function ep(e){if(sn(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!yn(e))return ep(Sn(e))}function tp(e,t){let n=B.useRef(null);function r(t){$t.flushSync(()=>{e.setOpen(!1,Ka(Ra,t.nativeEvent,t.currentTarget))}),es(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&ts(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{$t.flushSync(()=>{e.setOpen(!1,Ka(Ra,n.nativeEvent,n.currentTarget))});let i=$o(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&ma(r,i);){let e=i;if(i=Xo(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function np(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=B.useRef(!1);return B.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,go(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:ja,[t,n,r])}var rp=2;Ai(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=Wf(!0),h=d?.store??m?.store;if(!h)throw Error(Pi(85));let g=vu(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=B.useRef(null),S=ap(),C=Md(!0),w=bc(),T=B.useMemo(()=>w??new gc,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=hl(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:xc(T),floatingParentNodeId:yc(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=Pd({disabled:A,native:o});B.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=B.useRef(null),P=Vi(),ee=co(e=>{if(!N.current)return;P.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(ma(N.current,t)||ma(h.select(`positionerElement`),t)||t===N.current||t!=null&&ep(t)===h.select(`rootId`))return;let n=of(N.current);e.clientX>=n.left-rp&&e.clientX<=n.right+rp&&e.clientY>=n.top-rp&&e.clientY<=n.bottom+rp||T.events.emit(`close`,{domEvent:e,reason:Va})});B.useEffect(()=>{y&&h.select(`lastOpenChangeReason`)===Pa&&go(N.current).addEventListener(`mouseup`,ee,{once:!0})},[y,ee,h]);let F=O&&S.context.hasSubmenuOpen,te=Bl(v,{enabled:(c??F)&&!A&&S.type!==`context-menu`&&(!O||F&&!D),handleClose:nu({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:S.type===void 0?l:void 0,delay:{close:u},triggerElementRef:x,externalTree:T,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),I=ip(y,h.select(`lastOpenChangeReason`)),ne=Nc(v,{enabled:!A&&S.type!==`context-menu`,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0?I:!1}),re=Ml(v,{enabled:!A&&F}),L=np({open:y,enabled:O,mouseDownAction:`open`}),ie=B.useMemo(()=>Ns(re.reference,ne.reference),[re.reference,ne.reference]),R=h.useState(`triggerProps`,D),{preFocusGuardRef:ae,handlePreFocusGuardFocus:oe,handleFocusTargetFocus:se}=tp(h,x),ce={disabled:A,open:y},le=[N,t,M,E,x],ue=[ie,te??ja,R,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(P.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),go(e.currentTarget).addEventListener(`mouseup`,ee,{once:!0}))}},O?{role:`menuitem`}:{},L,p,j],de=qs(`button`,e,{enabled:!O,stateAttributesMapping:gu,state:ce,ref:le,props:ue});return O?(0,z.jsx)(Vf,{tag:`button`,render:n,className:r,style:i,state:ce,refs:le,props:ue,stateAttributesMapping:gu}):y?(0,z.jsxs)(B.Fragment,{children:[(0,z.jsx)(bo,{ref:ae,onFocus:oe},`${g}-pre-focus-guard`),(0,z.jsx)(B.Fragment,{children:de},g),(0,z.jsx)(bo,{ref:h.context.triggerFocusTargetRef,onFocus:se},`${g}-post-focus-guard`)]}):(0,z.jsx)(B.Fragment,{children:de},g)});function ip(e,t){let n=Vi(),[r,i]=B.useState(!1);return V(()=>{e&&t===`trigger-hover`?(i(!0),n.start(ec,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function ap(){let e=Kf(!0),t=Wf(!0),n=Jf(!0);return B.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var op=(function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=al.startingStyle]=`startingStyle`,e[e.endingStyle=al.endingStyle]=`endingStyle`,e})({}),sp=(function(e){return e.panelOpen=`data-panel-open`,e})({}),cp={[op.open]:``},lp={[op.closed]:``},up={open(e){return e?{[sp.panelOpen]:``}:null}},dp={open(e){return e?cp:lp}};({...dp,...cl}),{...up,...cl};var fp=B.createContext(null),pp=B.createContext(null);function mp(){let e=B.useContext(fp);if(e===null)throw Error(Pi(60));return e}function hp(){let e=B.useContext(pp);if(e===null)throw Error(Pi(61));return e}var gp={id:H(e=>e.id),labelId:H(e=>e.labelId),modal:H(e=>e.modal),multiple:H(e=>e.multiple),items:H(e=>e.items),itemToStringLabel:H(e=>e.itemToStringLabel),itemToStringValue:H(e=>e.itemToStringValue),isItemEqualToValue:H(e=>e.isItemEqualToValue),value:H(e=>e.value),hasSelectedValue:H(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Xd(t,r)!==``}),hasNullItemLabel:H((e,t)=>t?Jd(e.items):!1),open:H(e=>e.open),mounted:H(e=>e.mounted),forceMount:H(e=>e.forceMount),transitionStatus:H(e=>e.transitionStatus),openMethod:H(e=>e.openMethod),activeIndex:H(e=>e.activeIndex),selectedIndex:H(e=>e.selectedIndex),isActive:H((e,t)=>e.activeIndex===t),isSelected:H((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>Hd(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Hd(n,i,r)}),isSelectedByFocus:H((e,t)=>e.selectedIndex===t),popupProps:H(e=>e.popupProps),triggerProps:H(e=>e.triggerProps),triggerElement:H(e=>e.triggerElement),positionerElement:H(e=>e.positionerElement),listElement:H(e=>e.listElement),popupSide:H(e=>e.popupSide),scrollUpArrowVisible:H(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:H(e=>e.scrollDownArrowVisible),hasScrollArrows:H(e=>e.hasScrollArrows)},_p=1;function vp(e,t){return Math.max(0,e-t)}function yp(e,t){if(t<=0)return 0;let n=zd(e,0,t),r=n,i=t-n,a=r<=_p,o=i<=_p;return a&&o?r<=i?0:t:a?0:o?t:n}function bp(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=Vd,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=ld(),{setDirty:E,setTouched:D,setFocused:O,shouldValidateOnChange:k,validityData:A,setFilled:j,name:M,disabled:N,validation:P,validationMode:ee}=sd(),F=pd({id:t}),te=N||d,I=M??c,[ne,re]=Od({controlled:n,default:y?r??Aa:r,name:`Select`,state:`value`}),[L,ie]=Od({controlled:a,default:o,name:`Select`,state:`open`}),R=B.useRef([]),ae=B.useRef([]),oe=B.useRef(null),se=B.useRef(null),ce=B.useRef(0),le=B.useRef(null),ue=B.useRef([]),de=B.useRef(!1),fe=B.useRef(!1),pe=B.useRef(null),me=B.useRef(null),he=B.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ge=B.useRef(!1),{mounted:_e,setMounted:ve,transitionStatus:ye}=il(L),{openMethod:be,triggerProps:xe}=nf(L),Se=wi(()=>new $c({id:F,labelId:void 0,modal:m,multiple:y,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:ne,open:L,mounted:_e,transitionStatus:ye,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Ce=Yc(Se,gp.activeIndex),we=Yc(Se,gp.selectedIndex),Te=Yc(Se,gp.triggerElement),Ee=Yc(Se,gp.positionerElement),De=Zu(be),Oe=be??De,ke=B.useMemo(()=>y&&Array.isArray(ne)&&ne.length===0?``:Xd(ne,x),[y,ne,x]),Ae=B.useMemo(()=>y&&Array.isArray(ne)?ne.map(e=>Xd(e,x)):Xd(ne,x),[y,ne,x]);kd(ro(Se.state.triggerElement),F,ne,co(()=>Ae));let je=B.useRef(ne),Me=y?Array.isArray(ne)&&ne.length>0:ne!=null;V(()=>{ne!==je.current&&Se.set(`forceMount`,!0)},[Se,ne]),V(()=>{j(Me)},[Me,j]),V(function(){let e=ue.current,t;if(y){let n=Array.isArray(ne)?ne:[];if(n.length===0)t=null;else{let r=n[n.length-1],i=Wd(e,r,S);t=i===-1?null:i}}else{let n=Wd(e,ne,S);t=n===-1?null:n}t===null&&(me.current=null),!L&&Se.set(`selectedIndex`,t)},[Me,y,L,ne,ue,S,Se,me]),Ld(ne,()=>{T(I),E(ne!==A.initialValue),k()?P.commit(ne):P.commit(ne,!0)});let Ne=co((e,t)=>{if(s?.(e,t),!t.isCanceled&&(ie(e),!e&&(t.reason===Ra||t.reason===Ia)&&(D(!0),O(!1),ee===`onBlur`&&P.commit(ne)),!e&&Se.state.activeIndex!==null)){let e=R.current[Se.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),Pe=co(()=>{ve(!1),Se.update({activeIndex:null,openMethod:null}),_?.(!1)});ul({enabled:!h,open:L,ref:oe,onComplete(){L||Pe()}}),B.useImperativeHandle(h,()=>({unmount:Pe}),[Pe]);let Fe=co((e,t)=>{i?.(e,t),!t.isCanceled&&re(e)}),Ie=co(()=>{let e=Se.state.listElement||oe.current;if(!e)return;let t=vp(e.scrollHeight,e.clientHeight),n=yp(e.scrollTop,t),r=n>0,i=n<t;Se.state.scrollUpArrowVisible!==r&&Se.set(`scrollUpArrowVisible`,r),Se.state.scrollDownArrowVisible!==i&&Se.set(`scrollDownArrowVisible`,i)}),Le=kl({open:L,onOpenChange:Ne,elements:{reference:Te,floating:Ee}}),Re=Nc(Le,{enabled:!f&&!te,event:`mousedown`}),ze=Bc(Le),Be=ql(Le,{enabled:!f&&!te,listRef:R,activeIndex:Ce,selectedIndex:we,disabledIndices:Aa,onNavigate(e){e===null&&!L||Se.set(`activeIndex`,e)},focusItemOnHover:C}),Ve=Jl(Le,{enabled:!f&&!te&&(L||!y),listRef:ae,activeIndex:Ce,selectedIndex:we,onMatch(e){L?Se.set(`activeIndex`,e):Fe(ue.current[e],Ka(`none`))},onTyping(e){de.current=e}}),He=B.useMemo(()=>{let e=Ns(Ve.reference,Be.reference,ze.reference,Re.reference,xe);return F&&(e.id=F),e},[Re.reference,Ve.reference,Be.reference,ze.reference,xe,F]),Ue=B.useMemo(()=>Ns(dl,Ve.floating,Be.floating,ze.floating),[Ve.floating,Be.floating,ze.floating]),We=Be.item??ja;Mi(()=>{Se.update({popupProps:Ue,triggerProps:He})}),V(()=>{Se.update({id:F,modal:m,multiple:y,value:ne,open:L,mounted:_e,transitionStatus:ye,popupProps:Ue,triggerProps:He,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:Oe})},[Se,F,m,y,ne,L,_e,ye,Ue,He,v,b,x,S,Oe]);let Ge=B.useMemo(()=>({store:Se,name:I,required:p,disabled:te,readOnly:f,multiple:y,highlightItemOnHover:C,setValue:Fe,setOpen:Ne,listRef:R,popupRef:oe,scrollHandlerRef:se,handleScrollArrowVisibility:Ie,scrollArrowsMountedCountRef:ce,itemProps:We,events:Le.context.events,valueRef:le,valuesRef:ue,labelsRef:ae,typingRef:de,selectionRef:he,firstItemTextRef:pe,selectedItemTextRef:me,validation:P,onOpenChangeComplete:_,keyboardActiveRef:fe,alignItemWithTriggerActiveRef:ge,initialValueRef:je}),[Se,I,p,te,f,y,C,Fe,Ne,We,Le.context.events,P,_,Ie]),Ke=Za(g,P.inputRef),qe=y&&Array.isArray(ne)&&ne.length>0,Je=y?void 0:I,Ye=B.useMemo(()=>!y||!Array.isArray(ne)||!I?null:ne.map(e=>{let t=Xd(e,x);return(0,z.jsx)(`input`,{type:`hidden`,form:l,name:I,value:t},t)}),[y,ne,l,I,x]);return(0,z.jsx)(fp.Provider,{value:Ge,children:(0,z.jsxs)(pp.Provider,{value:Le,children:[w,(0,z.jsx)(`input`,{...P.getInputValidationProps({onFocus(){Se.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||te||f){e.preventBaseUIHandler?.();return}let t=e.currentTarget.value,n=Ka(Ma,e.nativeEvent);function r(){if(y)return;let e=ue.current.find(e=>Xd(e,x).toLowerCase()===t.toLowerCase()||Yd(e,b).toLowerCase()===t.toLowerCase());e!=null&&(E(e!==A.initialValue),Fe(e,n),k()&&P.commit(e))}Se.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&Je==null?`${F}-hidden-input`:void 0,form:l,name:Je,autoComplete:u,value:ke,disabled:te,required:p&&!qe,readOnly:f,ref:Ke,style:I?yo:vo,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ye]})})}var xp=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=a;delete o.id;let s=sd(),{store:c}=mp(),l=Yc(c,gp.triggerElement),u=Yc(c,gp.id),d=hd({id:rf(u),fallbackControlId:l?.id??u,setLabelId(e){c.set(`labelId`,e)}});return qs(`div`,e,{ref:t,state:s.state,props:[d,a],stateAttributesMapping:id})}),Sp=2,Cp=400,wp={...gu,...id,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},Tp=B.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,setFocused:u,validationMode:d,state:f,disabled:p}=sd(),{labelId:m}=dd(),{store:h,setOpen:g,selectionRef:_,validation:v,readOnly:y,required:b,alignItemWithTriggerActiveRef:x,disabled:S,keyboardActiveRef:C}=mp(),w=p||S||a,T=Yc(h,gp.open),E=Yc(h,gp.mounted),D=Yc(h,gp.value),O=Yc(h,gp.triggerProps),k=Yc(h,gp.positionerElement),A=Yc(h,gp.listElement),j=Yc(h,gp.popupSide),M=Yc(h,gp.id),N=Yc(h,gp.labelId),P=Yc(h,gp.hasSelectedValue),ee=E&&k?j:null,F=i??M,te=af(m,N);pd({id:F});let I=ro(k),ne=B.useRef(null),{getButtonProps:re,buttonRef:L}=Pd({disabled:w,native:o}),ie=Za(t,ne,L,co(e=>{h.set(`triggerElement`,e)})),R=Vi(),ae=Vi(),oe=Vi();B.useEffect(()=>{if(T)return oe.start(Cp,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}),()=>{oe.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ae.clear()},[T,_,ae,oe]);let se=Ns(O,{id:F,role:`combobox`,"aria-expanded":T?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":T?A?.id??Ca(k)?.id:void 0,"aria-labelledby":te,"aria-readonly":y||void 0,"aria-required":b||void 0,tabIndex:w?-1:0,ref:ie,onFocus(e){u(!0),T&&x.current&&g(!1,Ka(Ma,e.nativeEvent)),R.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){ma(k,e.relatedTarget)||(l(!0),u(!1),d===`onBlur`&&v.commit(D))},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(e){if(T)return;let t=go(e.currentTarget);function n(e){if(!ne.current)return;let t=e.target;if(ma(ne.current,t)||ma(I.current,t)||t===ne.current)return;let n=of(ne.current);e.clientX>=n.left-Sp&&e.clientX<=n.right+Sp&&e.clientY>=n.top-Sp&&e.clientY<=n.bottom+Sp||g(!1,Ka(Va,e))}ae.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},v.getValidationProps,c,re);se.role=`combobox`;let ce={...f,open:T,disabled:w,value:D,readOnly:y,popupSide:ee,placeholder:!P};return qs(`button`,e,{ref:[t,ne],state:ce,stateAttributesMapping:wp,props:se})}),Ep={value:()=>null},Dp=B.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=mp(),u=Yc(c,gp.value),d=Yc(c,gp.items),f=Yc(c,gp.itemToStringLabel),p=Yc(c,gp.hasSelectedValue),m=!p&&a!=null&&i==null,h=Yc(c,gp.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(!p&&a!=null&&!h?a:Array.isArray(u)?Qd(u,d,f):Zd(u,d,f)),qs(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:Ep})}),Op=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=mp();return qs(`span`,e,{state:{open:Yc(o,gp.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:hu})}),kp=B.createContext(void 0),Ap=B.forwardRef(function(e,t){let{store:n}=mp(),r=Yc(n,gp.mounted),i=Yc(n,gp.forceMount);return r||i?(0,z.jsx)(kp.Provider,{value:!0,children:(0,z.jsx)(mc,{ref:t,...e})}):null});({..._u,...cl});var jp=B.createContext(void 0);function Mp(){let e=B.useContext(jp);if(!e)throw Error(Pi(59));return e}function Np(e,t){e&&Object.assign(e.style,t)}var Pp={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Fp={position:`fixed`},Ip=B.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=sc,style:_,...v}=e,{store:y,listRef:b,labelsRef:x,alignItemWithTriggerActiveRef:S,selectedItemTextRef:C,valuesRef:w,initialValueRef:T,popupRef:E,setValue:D}=mp(),O=hp(),k=Yc(y,gp.open),A=Yc(y,gp.mounted),j=Yc(y,gp.modal),M=Yc(y,gp.value),N=Yc(y,gp.openMethod),P=Yc(y,gp.positionerElement),ee=Yc(y,gp.triggerElement),F=Yc(y,gp.isItemEqualToValue),te=Yc(y,gp.transitionStatus),I=B.useRef(null),ne=B.useRef(null),[re,L]=B.useState(h),ie=A&&re&&N!==`touch`;!A&&re!==h&&L(h),V(()=>{A||(gp.scrollUpArrowVisible(y.state)&&y.set(`scrollUpArrowVisible`,!1),gp.scrollDownArrowVisible(y.state)&&y.set(`scrollDownArrowVisible`,!1))},[y,A]),B.useImperativeHandle(S,()=>ie),wf((ie||j)&&k,N===`touch`,P,ee);let R=Hu({anchor:n,floatingRootContext:O,positionMethod:r,mounted:A,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??ie,collisionAvoidance:g,keepMounted:!0}),ae=ie?`none`:R.side,oe=ie?Fp:R.positionerStyles,se={open:k,side:ae,align:R.align,anchorHidden:R.anchorHidden};V(()=>{y.set(`popupSide`,R.side)},[y,R.side]);let ce=Gu(e,se,{styles:oe,transitionStatus:te,props:v,refs:[t,co(e=>{y.set(`positionerElement`,e)})],hidden:!A,inert:!k}),le=B.useRef(0),ue=co(e=>{if(e.size===0&&le.current===0||w.current.length===0)return;let t=le.current;if(le.current=e.size,e.size===t)return;let n=Ka(Ma);if(t!==0&&!y.state.multiple&&M!==null&&Wd(w.current,M,F)===-1){let e=T.current,t=e!=null&&Wd(w.current,e,F)!==-1?e:null;D(t,n),t===null&&(y.set(`selectedIndex`,null),C.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(M)){let e=e=>Wd(w.current,e,F)!==-1,t=M.filter(t=>e(t));(t.length!==M.length||t.some(e=>!Ud(M,e,F)))&&(D(t,n),t.length===0&&(y.set(`selectedIndex`,null),C.current=null))}if(k&&ie){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Np(P,e),Np(E.current,e)}}),de=B.useMemo(()=>({...R,side:ae,alignItemWithTriggerActive:ie,setControlledAlignItemWithTrigger:L,scrollUpArrowRef:I,scrollDownArrowRef:ne}),[R,ae,ie,L]);return(0,z.jsx)(lf,{elementsRef:b,labelsRef:x,onMapChange:ue,children:(0,z.jsxs)(jp.Provider,{value:de,children:[A&&j&&(0,z.jsx)(pf,{inert:Xu(!k),cutout:ee}),ce]})})}),Lp=`base-ui-disable-scrollbar`,Rp={className:Lp,getElement(e){return(0,z.jsx)(`style`,{nonce:e,href:Lp,precedence:`base-ui:low`,children:`.${Lp}{scrollbar-width:none}.${Lp}::-webkit-scrollbar{display:none}`})}},zp=B.createContext(void 0),Bp={disableStyleElements:!1};function Vp(){return B.useContext(zp)??Bp}var Hp={..._u,...cl},Up=B.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:c,onOpenChangeComplete:l,setOpen:u,valueRef:d,firstItemTextRef:f,selectedItemTextRef:p,keyboardActiveRef:m,multiple:h,handleScrollArrowVisibility:g,scrollHandlerRef:_,listRef:v,highlightItemOnHover:y}=mp(),{side:b,align:x,alignItemWithTriggerActive:S,isPositioned:C,setControlledAlignItemWithTrigger:w,scrollDownArrowRef:T,scrollUpArrowRef:E}=Mp(),D=kf(!0)!=null,O=hp(),k=Pu(),{nonce:A,disableStyleElements:j}=Vp(),M=Yc(s,gp.id),N=Yc(s,gp.open),P=Yc(s,gp.mounted),ee=Yc(s,gp.popupProps),F=Yc(s,gp.transitionStatus),te=Yc(s,gp.triggerElement),I=Yc(s,gp.positionerElement),ne=Yc(s,gp.listElement),re=B.useRef(!1),L=B.useRef(!1),ie=B.useRef({}),R=ho(),ae=co(e=>{if(!I||!c.current||!L.current)return;if(re.current||!S){g();return}let t=I.style.top===`0px`,n=I.style.bottom===`0px`;if(!t&&!n){g();return}let r=Kp(I),i=qp(I.getBoundingClientRect().height,`y`,r),a=go(I),o=getComputedStyle(I),s=parseFloat(o.marginTop),l=parseFloat(o.marginBottom),u=Wp(getComputedStyle(c.current)),d=Math.min(a.documentElement.clientHeight-s-l,u),f=e.scrollTop,p=Gp(e),m=0,h=null,_=!1,v=!1,y=e=>{I.style.height=`${e}px`},b=(t,n)=>{let r=zd(t,0,d-i);r>0&&y(i+r),e.scrollTop=n,d-(i+r)<=_p&&(re.current=!0),g()},x=t?p-f:f,C=Math.min(i+x,d);if(m=C,x<=_p){b(x,t?p:0);return}if(d-C>_p?t?v=!0:h=0:(_=!0,n&&f<p&&(h=f-(x-(i+x-d)))),m=Math.ceil(m),m!==0&&y(m),v||h!=null){let t=Gp(e),n=v?t:zd(h,0,t);Math.abs(e.scrollTop-n)>_p&&(e.scrollTop=n)}(_||m>=d-_p)&&(re.current=!0),g()});B.useImperativeHandle(_,()=>ae,[ae]),ul({open:N,ref:c,onComplete(){N&&l?.(!0)}});let oe={open:N,transitionStatus:F,side:b,align:x};V(()=>{!I||!c.current||Object.keys(ie.current).length||(ie.current={top:I.style.top||`0`,left:I.style.left||`0`,right:I.style.right,height:I.style.height,bottom:I.style.bottom,minHeight:I.style.minHeight,maxHeight:I.style.maxHeight,marginTop:I.style.marginTop,marginBottom:I.style.marginBottom})},[c,I]),V(()=>{N||S||(L.current=!1,re.current=!1,Np(I,ie.current))},[N,S,I,c]),V(()=>{let e=c.current;if(!N||!te||!I||!e||S&&!C||s.state.transitionStatus===`ending`)return;if(!S){L.current=!0,R.request(g),e.style.removeProperty(`--transform-origin`);return}let t=Xp(e);e.style.removeProperty(`--transform-origin`);try{let t=p.current;t?.isConnected||(t=!gp.hasSelectedValue(s.state)&&f.current?.isConnected?f.current:null);let n=d.current,r=getComputedStyle(I),i=getComputedStyle(e),a=go(te),o=nn(I),c=Kp(te),l=Jp(te.getBoundingClientRect(),c),u=Jp(I.getBoundingClientRect(),c),m=l.height,h=ne||e,_=h.scrollHeight,b=parseFloat(i.borderBottomWidth),x=parseFloat(r.marginTop)||10,S=parseFloat(r.marginBottom)||10,C=parseFloat(r.minHeight)||100,T=Wp(i),E=a.documentElement.clientHeight-x-S,D=a.documentElement.clientWidth,O=E-l.bottom+m,A,j=k===`rtl`?l.right-u.width:l.left,M=0;if(t&&n){let e=Jp(n.getBoundingClientRect(),c);A=Jp(t.getBoundingClientRect(),c),j=u.left+(k===`rtl`?e.right-A.right:e.left-A.left);let r=e.top-l.top+e.height/2;M=A.top-u.top+A.height/2-r}let N=O+M+S+b,P=Math.min(E,N),ee=E-x-S,F=N-P,R=D-5;I.style.left=`${zd(j,5,R-u.width)}px`,I.style.height=`${P}px`,I.style.maxHeight=`auto`,I.style.marginTop=`${x}px`,I.style.marginBottom=`${S}px`,e.style.height=`100%`;let ae=Gp(h),oe=F>=ae-_p;oe&&(P=Math.min(E,u.height)-(F-ae));let se=l.top<20||l.bottom>E-20||Math.ceil(P)+_p<Math.min(_,C),ce=(o.visualViewport?.scale??1)!==1&&Ki;if(se||ce){L.current=!0,Np(I,ie.current),w(!1);return}let le=Math.max(C,P);if(oe){let e=Math.max(0,E-N);I.style.top=u.height>=ee?`0`:`${e}px`,I.style.height=`${P}px`,h.scrollTop=Gp(h)}else I.style.bottom=`0`,h.scrollTop=F;if(A){let t=u.top,n=u.height,r=A.top+A.height/2,i=zd(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(le===E||P>=T)&&(re.current=!0),g(),y&&s.state.selectedIndex===null&&s.state.activeIndex===null&&v.current[0]!=null&&s.set(`activeIndex`,0),L.current=!0}finally{t()}},[s,N,I,te,d,f,p,c,g,S,w,R,T,E,ne,v,y,k,C]),B.useEffect(()=>{if(!S||!I||!N)return;let e=nn(I);function t(e){u(!1,Ka(Ga,e))}return Ya(e,`resize`,t)},[u,S,I,N]);let se={...ne?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":h||void 0,id:`${M}-list`},onKeyDown(e){m.current=!0,D&&zf.has(e.key)&&e.stopPropagation()},onMouseMove(){m.current=!1},onScroll(e){ne||ae(e.currentTarget)},...S&&{style:ne?{height:`100%`}:Pp}},ce=qs(`div`,e,{ref:[t,c],state:oe,stateAttributesMapping:Hp,props:[ee,se,Wu(F),{className:!ne&&S?Rp.className:void 0},o]});return(0,z.jsxs)(B.Fragment,{children:[!j&&Rp.getElement(A),(0,z.jsx)(Mc,{context:O,modal:!1,disabled:!P,returnFocus:a,restoreFocus:!0,children:ce})]})});function Wp(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function Gp(e){return vp(e.scrollHeight,e.clientHeight)}function Kp(e){return Br.getScale(e)}function qp(e,t,n){return e/n[t]}function Jp(e,t){return $n({x:qp(e.x,`x`,t),y:qp(e.y,`y`,t),width:qp(e.width,`x`,t),height:qp(e.height,`y`,t)})}var Yp=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Xp(e){let{style:t}=e,n={};for(let[e,r]of Yp)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Yp){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Zp=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=mp(),{alignItemWithTriggerActive:c}=Mp(),l=Yc(o,gp.hasScrollArrows),u=Yc(o,gp.openMethod),d=Yc(o,gp.multiple),f={id:`${Yc(o,gp.id)}-list`,role:`listbox`,"aria-multiselectable":d||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:Pp},className:l&&u!==`touch`?Rp.className:void 0};return qs(`div`,e,{ref:[t,co(e=>{o.set(`listElement`,e)})],props:[f,a]})}),Qp=B.createContext(void 0);function $p(){let e=B.useContext(Qp);if(!e)throw Error(Pi(57));return e}var em=B.memo(B.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=B.useRef(null),d=Ef({label:o,textRef:u,indexGuessBehavior:Tf.GuessFromOrder}),{store:f,itemProps:p,setOpen:m,setValue:h,selectionRef:g,typingRef:_,valuesRef:v,multiple:y,selectedItemTextRef:b}=mp(),x=Yc(f,gp.isActive,d.index),S=Yc(f,gp.isSelected,d.index,a),C=Yc(f,gp.isSelectedByFocus,d.index),w=Yc(f,gp.isItemEqualToValue),T=d.index,E=T!==-1,D=B.useRef(null);V(()=>{if(!E)return;let e=v.current;return e[T]=a,()=>{delete e[T]}},[E,T,a,v]),V(()=>{if(!E)return;let e=f.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&Hd(a,t,w)&&(f.set(`selectedIndex`,T),u.current&&(b.current=u.current))},[E,T,y,w,f,a,b]);let O=B.useRef(null),k=B.useRef(`mouse`),A=B.useRef(!1),{getButtonProps:j,buttonRef:M}=Pd({disabled:s,focusableWhenDisabled:!0,native:c,composite:!0}),N={disabled:s,selected:S,highlighted:x};function P(e){let t=f.state.value;if(y){let n=Array.isArray(t)?t:[];h(S?Gd(n,a,w):[...n,a],Ka(La,e))}else h(a,Ka(La,e)),m(!1,Ka(La,e))}function ee(){g.current.dragY=0}let F={role:`option`,"aria-selected":S,tabIndex:x?0:-1,onKeyDown(e){O.current=e.key,f.set(`activeIndex`,T),e.key===` `&&_.current&&e.preventDefault()},onClick(e){let t=e.type===`click`&&k.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&ra(e.nativeEvent)&&(n!==void 0||x),i=t&&!r&&!A.current;A.current=!1,!(e.type===`keydown`&&O.current===null)&&(s||e.type===`keydown`&&O.current===` `&&_.current||i||(O.current=null,P(e.nativeEvent)))},onPointerEnter(e){k.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=g.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){k.current=e.pointerType,A.current=!0,ee()},onMouseUp(){if(ee(),s||k.current===`touch`||A.current)return;let e=!g.current.allowSelectedMouseUp&&S,t=!g.current.allowUnselectedMouseUp&&!S;e||t||(A.current=!0,D.current?.click(),A.current=!1)}},te=qs(`div`,e,{ref:[M,t,d.ref,D],state:N,props:[p,F,l,j]}),I=B.useMemo(()=>({selected:S,index:T,textRef:u,selectedByFocus:C,hasRegistered:E}),[S,T,u,C,E]);return(0,z.jsx)(Qp.Provider,{value:I,children:te})})),tm=B.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=$p();return n||r?(0,z.jsx)(nm,{...e,ref:t}):null}),nm=B.memo(B.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=$p(),c=B.useRef(null),{transitionStatus:l,setMounted:u}=il(s),d=qs(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:cl});return ul({open:s,ref:c,onComplete(){s||u(!1)}}),d})),rm=B.memo(B.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i,hasRegistered:a}=$p(),{firstItemTextRef:o,selectedItemTextRef:s}=mp(),{render:c,className:l,style:u,...d}=e;return qs(`div`,e,{ref:[B.useCallback(e=>{e&&(a&&n===0&&(o.current=e),a&&i&&(s.current=e))},[o,s,n,i,a]),t,r],props:d})}));({..._u,...cl});var im=B.createContext(void 0);function am(){let e=B.useContext(im);if(e===void 0)throw Error(Pi(56));return e}var om=B.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=B.useState(),c=B.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=qs(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,z.jsx)(im.Provider,{value:c,children:l})}),sm=B.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=am(),c=vu(a);return V(()=>{s(c)},[c,s]),qs(`div`,e,{ref:t,props:[{id:c},o]})});({...id});var cm=(function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e})({}),lm={tabActivationDirection:e=>({[cm.activationDirection]:e})};({...lm}),(function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=al.startingStyle]=`startingStyle`,e[e.endingStyle=al.endingStyle]=`endingStyle`,e})({}),{...lm,...cl},{...Ol},H(e=>e.disabled),H(e=>e.instantType),H(e=>e.openMethod),H(e=>e.openChangeReason),H(e=>e.modal),H(e=>e.focusManagerModal),H(e=>e.stickIfOpen),H(e=>e.titleElementId),H(e=>e.descriptionElementId),H(e=>e.openOnHover),H(e=>e.closeDelay),H(e=>e.hasViewport),{..._u,...cl},{..._u,...cl},{...cl,...id},{...dp},{...cl},{...cl},{..._u,...cl};var um=`data-drawer-content`;(function(e){return e[e.open=cu.open]=`open`,e[e.closed=cu.closed]=`closed`,e[e.startingStyle=cu.startingStyle]=`startingStyle`,e[e.endingStyle=cu.endingStyle]=`endingStyle`,e.expanded=`data-expanded`,e.nestedDrawerOpen=`data-nested-drawer-open`,e.nestedDrawerSwiping=`data-nested-drawer-swiping`,e.swipeDismiss=`data-swipe-dismiss`,e.swipeDirection=`data-swipe-direction`,e.swiping=`data-swiping`,e})({}),{..._u,...cl};var dm=(function(e){return e[e.open=cu.open]=`open`,e[e.closed=cu.closed]=`closed`,e.disabled=`data-disabled`,e.swipeDirection=`data-swipe-direction`,e.swiping=`data-swiping`,e})({});dm.open,dm.closed,dm.swiping,dm.disabled,`${um}`,{..._u,...cl},bl(),bl(),{..._u,...cl},{..._u,...cl};var fm={inputValue:()=>null,value:()=>null,...id},pm=[`零`,`〇`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],mm=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],hm=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`],gm=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],_m=[`%`,`٪`,`%`,`﹪`],vm=[`‰`,`؉`],ym=[`−`,`-`,`‒`,`–`,`—`,`﹣`],bm=[`+`,`﹢`];RegExp(`[${mm.join(``)}]`,`g`),RegExp(`[${hm.join(``)}]`,`g`),RegExp(`[${gm.join(``)}]`,`g`),RegExp(`[${pm.join(``)}]`,`g`),RegExp(`[${_m.join(``)}]`),RegExp(`[${vm.join(``)}]`),RegExp(`[${gm.join(``)}]`),[...bm],[...ym];var xm=e=>e.replace(/[-\\\]^]/g,e=>`\\${e}`),Sm=e=>`[${e.map(xm).join(``)}]`,Cm=Sm([`-`].concat(ym)),wm=Sm([`+`].concat(bm));new RegExp(Cm,`gu`),new RegExp(wm,`gu`),new RegExp(Cm),new RegExp(wm),{...id,...fm},{...id},{...id};var Tm=B.createContext(void 0);function Em(e){let t=B.useContext(Tm);if(t===void 0&&!e)throw Error(Pi(50));return t}var Dm=600,Om=300,km={...Ol,instantType:H(e=>e.instantType),hasViewport:H(e=>e.hasViewport)},Am=class e extends el{constructor(e,t,n=!1){let r=new yl,i={...jm(),...e};i.floatingRootContext=Sl(r,t,n),super(i,{popupRef:B.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r,closeDelayRef:{current:Om},inlineRectCoordsRef:{current:void 0}},km)}setOpen=(e,t)=>{let n=t.reason,r=n===Pa,i=e&&n===Fa,a=!e&&(n===Na||n===za);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let o=t.event;e&&r&&t.trigger&&`clientX`in o&&`clientY`in o&&this.context.inlineRectCoordsRef.current?.element!==t.trigger&&qc(this.context.inlineRectCoordsRef,t.trigger,o.clientX,o.clientY),this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let r={open:e};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===Pa&&(r.instantType=void 0),ml(r,e,t.trigger),this.update(r)};r?$t.flushSync(s):s()};static useStore(t,n){return fl(t,(t,r)=>new e(n,t,r)).store}};function jm(){return{...xl(),instantType:void 0,hasViewport:!1}}function Mm(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:c=null,children:l}=e,u=Am.useStore(o?.store,{open:n,openProp:t,activeTriggerId:c,triggerIdProp:s});Mi(()=>{t===void 0&&u.state.open===!1&&n===!0&&u.update({open:!0,activeTriggerId:c})}),u.useControlledProp(`openProp`,t),u.useControlledProp(`triggerIdProp`,s),u.useContextCallback(`onOpenChange`,r),u.useContextCallback(`onOpenChangeComplete`,i);let d=u.useState(`open`),f=u.useState(`activeTriggerId`),p=u.useState(`mounted`),m=u.useState(`payload`);gl(u);let{forceUnmount:h}=_l(d,u,()=>{u.context.inlineRectCoordsRef.current=void 0});V(()=>{d&&f==null&&u.set(`payload`,void 0)},[u,f,d]);let g=B.useCallback(()=>{u.setOpen(!1,Ka(Wa))},[u]);B.useImperativeHandle(a,()=>({unmount:h,close:g}),[h,g]);let _=d||p;return(0,z.jsxs)(Tm.Provider,{value:u,children:[_&&(0,z.jsx)(Nm,{store:u}),typeof l==`function`?l({payload:m}):l]})}function Nm({store:e}){let t=Bc(e.useState(`floatingRootContext`));return vl(e,{activeTriggerProps:t.reference??ja,inactiveTriggerProps:t.trigger??ja,popupProps:B.useMemo(()=>Ns(dl,t.floating),[t.floating])}),null}ki(function(e){return Em(!0)?(0,z.jsx)(Mm,{...e}):(0,z.jsx)(Sc,{children:(0,z.jsx)(Mm,{...e})})}),Ai(function(e,t){let{render:n,className:r,delay:i,closeDelay:a,id:o,payload:s,handle:c,style:l,...u}=e,d=Em(!0),f=c?.store??d;if(!f)throw Error(Pi(89));let p=vu(o),m=f.useState(`isTriggerActive`,p),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`floatingRootContext`),_=f.context.inlineRectCoordsRef,v=B.useRef(null),y=i??Dm,b=a??Om,{registerTrigger:x,isMountedByThisTrigger:S}=hl(p,v,f,{payload:s});V(()=>{S&&(f.context.closeDelayRef.current=b)},[f,S,b]);let C=Bl(g,{mouseOnly:!0,move:!1,handleClose:nu(),delay:()=>({open:y,close:b}),triggerElementRef:v,isActiveTrigger:m,isClosing:()=>f.select(`transitionStatus`)===`ending`}),w=Ml(g,{delay:y}),T={open:h},E=f.useState(`triggerProps`,S),D=Kc(_,h);return qs(`a`,e,{state:T,ref:[t,x,v],props:[C,w.reference,E,D,{id:p},u],stateAttributesMapping:hu})}),{..._u,...cl},{..._u,...cl},{...id},[...zf];function Pm({content:e,children:t,align:n,asChild:r,render:i,side:a,className:o,container:s,closeDelay:c,delay:l,...u}){let d=Qt(),f=s??d??void 0,p=i??(r?t:void 0);return(0,z.jsxs)(ou,{...u,children:[(0,z.jsx)(Eu,{closeDelay:c,delay:l,className:at(p===void 0&&`inline-flex items-center bg-transparent border-none shadow-none p-0 m-0 h-auto min-h-0 leading-[0]`,`cursor-default`,o),render:p,children:r?void 0:t}),(0,z.jsx)(Au,{container:f,children:(0,z.jsx)(Ku,{align:n,side:a,sideOffset:10,className:`max-w-[var(--available-width)]`,children:(0,z.jsxs)(Ju,{className:at(`flex origin-[var(--transform-origin)] flex-col rounded-md bg-kumo-base px-2.5 py-1.5 text-sm text-kumo-default`,`shadow-lg shadow-kumo-tip-shadow outline outline-kumo-fill`,`transition-[transform,scale,opacity] duration-150`,`data-[starting-style]:scale-90 data-[starting-style]:opacity-0`,`data-[ending-style]:scale-90 data-[ending-style]:opacity-0`,`data-[instant]:duration-0`,`kumo-tooltip-popup`),children:[(0,z.jsx)(Yu,{className:at(`flex`,`data-[side=bottom]:top-[-8px]`,`data-[side=left]:right-[-13px] data-[side=left]:rotate-90`,`data-[side=right]:left-[-13px] data-[side=right]:-rotate-90`,`data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`),children:(0,z.jsx)(Fm,{})}),e]})})})]})}function Fm(e){return(0,z.jsxs)(`svg`,{width:`20`,height:`10`,viewBox:`0 0 20 10`,fill:`none`,...e,children:[(0,z.jsx)(`path`,{d:`M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z`,className:`fill-kumo-base`}),(0,z.jsx)(`path`,{d:`M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z`,className:`fill-kumo-tip-shadow`}),(0,z.jsx)(`path`,{d:`M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z`,className:`fill-kumo-tip-stroke`})]})}var Im=(0,B.forwardRef)(function({to:e,href:t,...n},r){return(0,z.jsx)(`a`,{ref:r,href:t??e??void 0,...n})}),Lm=(0,B.createContext)(Im);function Rm(){return(0,B.useContext)(Lm)}function zm({component:e,children:t}){return(0,z.jsx)(Lm.Provider,{value:e??Im,children:t})}var Bm={shape:{base:{classes:``,description:`Default rectangular button shape`},square:{classes:`items-center justify-center p-0`,description:`Square button for icon-only actions`},circle:{classes:`items-center justify-center p-0 rounded-full`,description:`Circular button for icon-only actions`}},size:{xs:{classes:`h-5 gap-1 rounded-sm px-1.5 text-xs`,description:`Extra small button for compact UIs`},sm:{classes:`h-6.5 gap-1 rounded-md px-2 text-xs`,description:`Small button for secondary actions`},base:{classes:`h-9 gap-1.5 rounded-lg px-3 text-base`,description:`Default button size`},lg:{classes:`h-10 gap-2 rounded-lg px-4 text-base`,description:`Large button for primary CTAs`}},compactSize:{xs:{classes:`size-3.5`},sm:{classes:`size-6.5`},base:{classes:`size-9`},lg:{classes:`size-10`}},variant:{primary:{classes:`relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) disabled:opacity-50`,description:`High-emphasis button for primary actions`},secondary:{classes:`bg-kumo-base !text-kumo-default ring not-disabled:hover:bg-kumo-tint disabled:bg-kumo-base/50 disabled:!text-kumo-default/70 ring-kumo-line data-[state=open]:bg-kumo-base`,description:`Default button style for most actions`},ghost:{classes:`text-kumo-default hover:bg-kumo-tint shadow-none bg-inherit`,description:`Minimal button with no background`},destructive:{classes:`relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) disabled:opacity-50`,description:`Danger button for destructive actions like delete`},"secondary-destructive":{classes:`bg-kumo-base !text-kumo-danger ring not-disabled:hover:!text-kumo-danger not-disabled:hover:ring-kumo-danger/30 disabled:bg-kumo-base/50 disabled:!text-kumo-danger/70 ring-kumo-line data-[state=open]:bg-kumo-base`,description:`Secondary button with destructive text for less prominent dangerous actions`},outline:{classes:`bg-transparent text-kumo-default ring ring-kumo-line transition-colors not-disabled:hover:text-kumo-strong not-disabled:hover:ring-kumo-focus/25`,description:`Bordered button with transparent background`}}},Vm={shape:`base`,size:`base`,variant:`secondary`};function Hm({variant:e=Vm.variant,size:t=Vm.size,shape:n=Vm.shape}={}){let r=n===`square`||n===`circle`;return at(`group flex w-max shrink-0 items-center font-medium select-none`,`border-0 shadow-xs`,`focus:outline-none focus:ring-kumo-focus/50 focus-visible:ring-2 focus-visible:ring-kumo-brand`,`cursor-pointer`,`disabled:cursor-not-allowed disabled:text-kumo-subtle`,ot(Bm.size,t,Vm.size).classes,ot(Bm.shape,n,Vm.shape).classes,r&&ot(Bm.compactSize,t,Vm.size).classes,ot(Bm.variant,e,Vm.variant).classes)}var Um=e=>e?B.isValidElement(e)?e:(0,z.jsx)(e,{}):null,Wm=e=>{if(e===`primary`)return`var(--color-kumo-brand)`;if(e===`destructive`)return`var(--color-kumo-danger)`},Gm=e=>{let t=Wm(e);if(t)return{"--kumo-button-emphasis-ring":`color-mix(in oklch, ${t}, black 10%)`,"--kumo-button-emphasis-bg":`color-mix(in oklch, ${t}, white 30%)`,"--kumo-button-emphasis-gradient-start":`color-mix(in oklch, ${t}, white 15%)`,"--kumo-button-emphasis-gradient-end":t}},Km=(e,t,n)=>{let r=n==null?null:(0,z.jsx)(`span`,{className:`contents`,children:n});return Wm(e)?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-0 rounded-[inherit] bg-linear-to-b from-(--kumo-button-emphasis-gradient-start) to-(--kumo-button-emphasis-gradient-end) translate-y-px group-hover:from-(--kumo-button-emphasis-bg)`}),(0,z.jsxs)(`span`,{className:`relative flex items-center gap-1.5`,children:[t,r]})]}):(0,z.jsxs)(z.Fragment,{children:[t,r]})},qm=B.forwardRef(({children:e,className:t,disabled:n,loading:r,shape:i=`base`,size:a=`base`,variant:o=`secondary`,icon:s,style:c,title:l,...u},d)=>{let{type:f,...p}=u,m=Gm(o),h=r?(0,z.jsx)(Xt,{size:a===`lg`?16:14}):Um(s),g=(0,z.jsx)(`button`,{ref:d,"data-kumo-component":`Button`,className:at(Hm({variant:o,size:a,shape:i}),n&&`cursor-not-allowed opacity-50`,t),disabled:r||n,style:m?{...m,...c}:c,type:f??`button`,...p,children:Km(o,h,e)});return l?(0,z.jsx)(Pm,{content:l,render:g}):g});qm.displayName=`Button`;var Jm=B.forwardRef(({children:e,className:t,external:n,href:r,shape:i=`base`,size:a=`base`,variant:o=`ghost`,icon:s,style:c,...l},u)=>{let d=Rm(),f=Gm(o),p=n?{target:`_blank`,rel:`noopener noreferrer`}:{};return(0,z.jsx)(d,{ref:u,"data-kumo-component":`LinkButton`,className:at(Hm({variant:o,size:a,shape:i}),`flex items-center no-underline!`,t),href:r,style:f?{...f,...c}:c,to:typeof r==`string`?r:void 0,...p,...l,children:Km(o,Um(s),e)})});Jm.displayName=`LinkButton`;function Ym(e={}){return at(`m-0 text-base font-medium text-kumo-default`)}function Xm(){return at(`inline-flex items-center gap-1`)}function Zm({children:e,showOptional:t=!1,tooltip:n,className:r,htmlFor:i,asContent:a=!1}){let o=(0,z.jsxs)(z.Fragment,{children:[e,t&&(0,z.jsx)(`span`,{className:`font-normal text-kumo-subtle`,children:`(optional)`}),n&&(0,z.jsx)(Pm,{content:n,render:(0,z.jsx)(qm,{variant:`ghost`,size:`xs`,shape:`square`,"aria-label":`More information`,children:(0,z.jsx)(Pt,{className:`size-4`})})})]});return a?(0,z.jsx)(`span`,{className:at(Xm(),r),children:o}):(0,z.jsx)(`label`,{htmlFor:i,className:at(Ym(),Xm(),r),children:o})}Zm.displayName=`Label`;function Qm(e){if(e)return typeof e==`string`?{message:e,match:!0}:e}function $m({controlFirst:e=!1}={}){return at(`grid gap-2`,`has-[input[type=checkbox]]:grid-cols-[auto_1fr] has-[input[type=checkbox]]:items-center`,`has-[[role=switch]]:grid-cols-[auto_1fr] has-[[role=switch]]:items-center`,e&&[`has-[input[type=checkbox]]:flex has-[input[type=checkbox]]:flex-row-reverse has-[input[type=checkbox]]:flex-wrap has-[input[type=checkbox]]:items-center`,`has-[[role=switch]]:flex has-[[role=switch]]:flex-row-reverse has-[[role=switch]]:flex-wrap has-[[role=switch]]:items-center`,`[&>label]:flex-1`])}function eh({children:e,label:t,required:n,labelTooltip:r,error:i,description:a,controlFirst:o=!1,hideLabel:s=!1}){let c=n===!1;return(0,z.jsxs)(Cd,{className:$m({controlFirst:o}),children:[!s&&(0,z.jsx)(wd,{className:`m-0 select-none text-base font-medium text-kumo-default`,children:(0,z.jsx)(Zm,{showOptional:c,tooltip:r,asContent:!0,children:t})}),e,i?(0,z.jsx)(Ed,{className:at(`text-sm leading-snug text-kumo-danger`,`col-span-full`),match:i.match,children:i.message}):a&&(0,z.jsx)(Dd,{className:at(`text-sm leading-snug text-kumo-subtle`,`col-span-full`),children:a})]})}var th={size:{xs:{classes:`h-5 gap-1 rounded-sm px-1.5 text-xs`,description:`Extra small input for compact UIs`},sm:{classes:`h-6.5 gap-1 rounded-md px-2 text-xs`,description:`Small input for secondary fields`},base:{classes:`h-9 gap-1.5 rounded-lg px-3 text-base`,description:`Default input size`},lg:{classes:`h-10 gap-2 rounded-lg px-4 text-base`,description:`Large input for prominent fields`}},variant:{default:{classes:`focus:ring-kumo-focus/50 focus:ring-[1.5px]`,description:`Default input appearance`},error:{classes:`!ring-kumo-danger focus:ring-kumo-danger/50 focus:ring-[1.5px]`,description:`Error state for validation failures`}}},nh={size:`base`,variant:`default`};function rh({variant:e=nh.variant,size:t=nh.size,parentFocusIndicator:n=!1,focusIndicator:r=!1}={}){return at(`border-0 bg-kumo-control text-kumo-default ring ring-kumo-line outline-none focus:outline-none`,`kumo-input-placeholder disabled:text-kumo-disabled`,ot(th.size,t,nh.size).classes,ot(th.variant,e,nh.variant).classes,n&&(e===`error`?`focus-within:ring-kumo-danger/50 focus-within:ring-[1.5px]`:`focus-within:ring-kumo-focus/50 focus-within:ring-[1.5px]`),r&&(e===`error`?`focus:ring-kumo-danger/50 focus:ring-[1.5px]`:`focus:ring-kumo-focus/50 focus:ring-[1.5px]`))}var ih=(0,B.forwardRef)((e,t)=>{let{className:n,size:r=`base`,variant:i,label:a,labelTooltip:o,description:s,error:c,passwordManagerIgnore:l=!1,...u}=e,d=i??(c?`error`:`default`),{required:f}=u,p=(0,z.jsx)(Bd,{ref:t,className:at(rh({size:r,variant:d,focusIndicator:!0}),l&&`keeper-ignore`,n),...l?{"data-1p-ignore":`true`,"data-bwignore":`true`,"data-form-type":`other`,"data-lpignore":`true`}:{},...u});return a||c||s?(0,z.jsx)(eh,{label:a,required:f,labelTooltip:o,description:s,error:Qm(c),children:p}):p});ih.displayName=`Input`;var ah=B.forwardRef((e,t)=>{let{className:n,onValueChange:r,size:i=`base`,variant:a,onChange:o,label:s,labelTooltip:c,description:l,error:u,...d}=e,f=a??(u?`error`:`default`),{required:p}=d,m=(0,B.useCallback)(e=>{o?.(e),r?.(e.target.value)},[o,r]),h=at(rh({size:i,variant:f,focusIndicator:!0}),`h-auto py-2`,n);return s||u||l?(0,z.jsx)(eh,{label:s,required:p,labelTooltip:c,description:l,error:Qm(u),children:(0,z.jsx)(Ad,{render:e=>(0,z.jsx)(`textarea`,{...e,ref:t,className:h,onChange:m,...d})})}):(0,z.jsx)(`textarea`,{ref:t,className:h,onChange:m,...d})});ah.displayName=`InputArea`;var oh=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),sh=(e,t)=>(Math.random()*(t-e)+e).toFixed(2),ch=({minWidth:e=30,maxWidth:t=100,minDuration:n=1.3,maxDuration:r=1.7,minDelay:i=0,maxDelay:a=.5,blockHeight:o,className:s})=>{let{width:c,duration:l,delay:u}=(0,B.useMemo)(()=>({width:oh(e,t),duration:sh(n,r),delay:sh(i,a)}),[e,t,n,r,i,a]),d={"--skeleton-width":`${c}%`,"--shimmer-duration":`${l}s`,"--shimmer-delay":`${u}s`},f=(0,z.jsx)(`div`,{className:at(`skeleton-line`,s),style:d});return o===void 0?f:(0,z.jsx)(`div`,{className:`flex items-center`,style:{height:typeof o==`number`?`${o}px`:o},children:f})};th.size;var lh={size:`base`};function uh({size:e=lh.size}={}){return at(Hm({size:e}),`justify-between font-normal`,`focus:opacity-100 focus:ring-kumo-focus/50 focus-visible:ring-inset *:in-focus:opacity-100`)}var dh={xs:{iconSize:12,className:`text-kumo-subtle`},sm:{iconSize:14,className:`text-kumo-subtle`},base:{iconSize:16,className:`text-kumo-subtle`},lg:{iconSize:18,className:`text-kumo-subtle`}};function fh(e){if(typeof e!=`object`||!e||Array.isArray(e)||`$$typeof`in e||e instanceof Promise)return!1;let t=e;return`label`in t&&t.label!==void 0}function ph(e){return Array.isArray(e)?e:Object.entries(e).map(([e,t])=>({value:e,label:fh(t)?t.label:t}))}function mh(e){let t=ph(e),n=new Map;if(!Array.isArray(e))for(let[t,r]of Object.entries(e))fh(r)&&n.set(t,{disabled:r.disabled});return t.filter(e=>e.value!==null).map((e,t)=>{let r=typeof e.value==`string`?e.value:`option-${t}`,i=typeof e.value==`string`?n.get(e.value):void 0;return(0,z.jsx)(gh,{value:e.value,disabled:i?.disabled,children:e.label},r)})}function hh({children:e,className:t,renderValue:n,label:r,hideLabel:i,placeholder:a,loading:o,size:s=lh.size,labelTooltip:c,description:l,error:u,required:d,container:f,...p}){let m=(0,B.useId)(),h=Qt(),g=f??h??void 0,_=p,v=_[`aria-label`],y=_[`aria-labelledby`],b=typeof r==`string`?r:a,x=r&&i!==!0,S=x?void 0:y??(r?m:void 0),C=v??(S?void 0:b),w=p.items?ph(p.items):void 0,T=e||(p.items?mh(p.items):null),E=n?e=>{let t=a==null?null:(0,z.jsx)(`span`,{className:`text-kumo-placeholder`,children:a});return e==null||e===``?t:n(e)??t}:void 0,{items:D,...O}=p,k=r?(0,z.jsx)(xp,{className:`m-0 select-none text-base font-medium text-kumo-default`,children:(0,z.jsx)(Zm,{showOptional:d===!1,tooltip:i?void 0:c,asContent:!0,children:r})}):null,A=(0,z.jsxs)(bp,{...O,items:w,disabled:o||p.disabled,children:[k,(0,z.jsxs)(Tp,{"data-kumo-component":`Select`,"data-kumo-part":`trigger`,className:at(uh({size:s}),p.disabled&&`cursor-not-allowed opacity-50`,u&&`!ring-kumo-danger focus:ring-kumo-danger/50 focus:ring-[1.5px]`,t),"aria-label":C,"aria-labelledby":S,children:[o?(0,z.jsx)(ch,{className:`w-32`}):(0,z.jsx)(Dp,{placeholder:a,className:`min-w-0 truncate data-[placeholder]:text-kumo-placeholder`,children:E}),(0,z.jsx)(Op,{className:at(`flex shrink-0 items-center`,dh[s].className),children:(0,z.jsx)(_t,{size:dh[s].iconSize,className:`fill-current`})})]}),(0,z.jsx)(Ap,{container:g,children:(0,z.jsx)(Ip,{children:(0,z.jsx)(Up,{className:at(`flex flex-col`,`max-h-[var(--available-height)] bg-kumo-base text-kumo-default`,`rounded-lg shadow-lg ring ring-kumo-line`,`min-w-[calc(var(--anchor-width)+3px)] py-1.5`),children:(0,z.jsx)(Zp,{className:at(`min-h-0 flex-1 overflow-y-auto overscroll-none scroll-pt-2 scroll-pb-2`),children:T})})})})]});if(x)return(0,z.jsx)(eh,{label:r,required:d,labelTooltip:c,description:l,error:u?typeof u==`string`?{message:u,match:!0}:u:void 0,hideLabel:!0,children:A});let j=u?typeof u==`string`?{message:u}:u:void 0;return(0,z.jsxs)(`div`,{className:`grid gap-2`,children:[r&&(0,z.jsx)(`span`,{id:m,className:`sr-only`,children:r}),A,j?(0,z.jsx)(`span`,{className:`text-sm text-kumo-danger`,children:j.message}):l&&(0,z.jsx)(`span`,{className:`text-sm leading-snug text-kumo-subtle`,children:l})]})}function gh({children:e,value:t,disabled:n,className:r}){return(0,z.jsxs)(em,{"data-kumo-component":`Select`,"data-kumo-part":`option`,value:t,disabled:n,className:at(`group mx-1.5 flex cursor-pointer items-center justify-between gap-2 rounded px-2 py-1.5 text-base outline-none`,`focus-visible:z-50 focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset`,`data-highlighted:bg-kumo-tint`,`data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,r),children:[(0,z.jsx)(rm,{children:e}),(0,z.jsx)(tm,{children:(0,z.jsx)(xt,{})})]})}var _h=(0,B.forwardRef)(({children:e,className:t},n)=>(0,z.jsx)(om,{ref:n,className:at(t),children:e}));_h.displayName=`Select.Group`;var vh=(0,B.forwardRef)(({children:e,className:t},n)=>(0,z.jsx)(sm,{ref:n,className:at(`px-3.5 py-1.5 text-sm font-semibold text-kumo-subtle`,t),children:e}));vh.displayName=`Select.GroupLabel`;var yh=(0,B.forwardRef)(({className:e},t)=>(0,z.jsx)(Df,{ref:t,className:at(`-mx-1 my-1 h-px bg-kumo-hairline`,e)}));yh.displayName=`Select.Separator`,hh.Option=gh,hh.Group=_h,hh.GroupLabel=vh,hh.Separator=yh,hh.Option.displayName=`Select.Option`;var bh=`overflow-hidden rounded-lg bg-kumo-base shadow-xs ring ring-kumo-line`,xh=`flex w-full flex-col overflow-hidden rounded-lg bg-kumo-elevated text-base ring ring-kumo-hairline`,Sh=`-my-2 flex items-center gap-2 bg-kumo-elevated p-4 text-base font-medium text-kumo-subtle`,Ch=`relative flex flex-col gap-2 overflow-hidden rounded-lg bg-kumo-base p-4 pr-3 text-inherit no-underline ring ring-kumo-fill`;function wh(e={}){return at(bh)}function Th(e){return B.Children.toArray(e).some(e=>(0,B.isValidElement)(e)?e.type===Oh||e.type===Dh?!0:e.type===B.Fragment?Th(e.props.children):!1:!1)}var Eh=(0,B.forwardRef)(function({children:e,className:t,render:n,...r},i){return Hf({defaultTagName:`div`,render:n,ref:i,props:Ns({className:at(Th(e)?xh:wh(),t)},r,{children:e})})});function Dh({children:e,className:t,...n}){return(0,z.jsx)(`div`,{className:at(Sh,t),...n,children:e})}function Oh({children:e,className:t,...n}){return(0,z.jsx)(`div`,{className:at(Ch,t),...n,children:e})}Eh.displayName=`LayerCard`,Dh.displayName=`LayerCard.Secondary`,Oh.displayName=`LayerCard.Primary`;var kh=Object.assign(Eh,{Primary:Oh,Secondary:Dh}),Ah=function({color:e=`primary`,className:t,render:n,as:r,...i}){let a=n??(r?(0,B.createElement)(r):void 0);return(0,z.jsx)(kh,{className:at(`overflow-visible rounded-none`,t),render:a,...i,"data-surface-color":e,"data-deprecated":`surface`})};Ah.displayName=`Surface`;var jh={variant:{heading1:{classes:`text-3xl font-semibold`,description:`Large heading for page titles`},heading2:{classes:`text-2xl font-semibold`,description:`Medium heading for section titles`},heading3:{classes:`text-lg font-semibold`,description:`Small heading for subsections`},body:{classes:`text-kumo-default`,description:`Default body text`},secondary:{classes:`text-kumo-subtle`,description:`Muted text for secondary information`},success:{classes:`text-kumo-link`,description:`Success state text`},error:{classes:`text-kumo-danger`,description:`Error state text`},mono:{classes:`font-mono`,description:`Monospace text for code`},"mono-secondary":{classes:`font-mono text-kumo-subtle`,description:`Muted monospace text`}},size:{xs:{classes:`text-xs`,description:`Extra small text`},sm:{classes:`text-sm`,description:`Small text`},base:{classes:`text-base`,description:`Default text size`},lg:{classes:`text-lg`,description:`Large text`}}},Mh={variant:`body`,size:`base`};function Nh({variant:e=`body`,bold:t=!1,size:n=`base`,truncate:r=!1,children:i,DANGEROUS_className:a,DANGEROUS_style:o,as:s,...c},l){let u=[`body`,`secondary`,`success`,`error`].includes(e),d=[`mono`,`mono-secondary`].includes(e);return(0,z.jsx)((0,B.useMemo)(()=>s||([`mono`,`mono-secondary`].includes(e)||[`heading1`,`heading2`,`heading3`].includes(e)?`span`:`p`),[e,s]),{ref:l,className:at(`text-kumo-default`,ot(jh.variant,e,Mh.variant).classes,u?ot(jh.size,n,Mh.size).classes:``,u&&t?`font-medium`:``,d&&(n===`lg`?jh.size.base.classes:jh.size.sm.classes),r&&`truncate min-w-0`,a),style:o,...c,children:i})}var Ph=(0,B.forwardRef)(Nh),Fh={size:`base`,variant:`default`},Ih=(0,B.forwardRef)(({value:e,defaultValue:t=``,onChange:n,onValueChange:r,onCopy:i,size:a=Fh.size,variant:o,disabled:s=!1,readOnly:c=!1,id:l,autoComplete:u=`off`,className:d,label:f,labelTooltip:p,description:m,error:h,required:g,..._},v)=>{let y=o??(h?`error`:`default`),b=typeof f==`string`?f:`Sensitive value`,x=e!==void 0,[S,C]=(0,B.useState)(t),w=x?e:S,T=w.length>0,[E,D]=(0,B.useState)(()=>T?`masked`:`empty`),[O,k]=(0,B.useState)(!1),A=(0,B.useRef)(null),j=(0,B.useRef)(null),M=(0,B.useId)(),N=(0,B.useId)(),P=l??N,ee=(0,B.useId)(),F=(0,B.useCallback)(e=>{A.current=e,typeof v==`function`?v(e):v&&(v.current=e)},[v]);(0,B.useEffect)(()=>{if(O){let e=setTimeout(()=>k(!1),2e3);return()=>clearTimeout(e)}},[O]);let te=(0,B.useCallback)(async e=>{e.stopPropagation();try{if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`){await navigator.clipboard.writeText(w),k(!0),i?.();return}}catch{}if(typeof document<`u`){let e=document.createElement(`textarea`);e.value=w,e.setAttribute(`readonly`,``),e.style.position=`absolute`,e.style.left=`-9999px`,document.body.appendChild(e);let t=document.getSelection(),n=t?.rangeCount?t.getRangeAt(0):null;e.select();try{document.execCommand(`copy`),k(!0),i?.()}catch(e){console.warn(`Clipboard copy failed`,e)}finally{document.body.removeChild(e),n&&(t?.removeAllRanges(),t?.addRange(n))}}},[w,i]),I=(0,B.useRef)(T);I.current!==T&&(I.current=T,!T&&E===`masked`&&D(`empty`));let ne=(0,B.useCallback)(e=>{if(!s){if(j.current){let t=j.current.getBoundingClientRect();if(!(e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom))return}E===`masked`&&T&&(D(`revealed`),c||setTimeout(()=>A.current?.focus(),0))}},[E,T,s,c]),re=(0,B.useCallback)(e=>{e.stopPropagation(),E===`revealed`?D(`masked`):E===`empty`&&T&&D(`revealed`)},[E,T]),L=(0,B.useCallback)(e=>{let t=e.target.value;x||C(t),E===`empty`&&t.length>0&&D(`revealed`),n?.(e),r?.(t)},[x,n,r,E]),ie=(0,B.useCallback)(e=>{j.current&&e.relatedTarget instanceof Node&&j.current.contains(e.relatedTarget)||T&&D(`masked`)},[T]),R=(0,B.useCallback)(e=>{s||E===`masked`&&T&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),D(`revealed`),c||setTimeout(()=>A.current?.focus(),0))},[E,T,s,c]),ae=(0,B.useCallback)(e=>{E===`revealed`&&e.key===`Escape`&&(D(`masked`),setTimeout(()=>j.current?.focus(),0))},[E]),oe=E===`masked`&&T,se=!s&&(E===`revealed`||E===`empty`&&T),ce=a===`xs`||a===`sm`?`size-3`:`size-4`,le=at(rh({size:a,variant:y,parentFocusIndicator:!0}),`group/container relative flex w-full items-center`,`focus-within:outline focus-within:outline-2 focus-within:outline-kumo-focus`,oe&&!s&&`cursor-pointer`,s&&`cursor-not-allowed`,d),ue=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Bd,{ref:F,id:P,type:E===`revealed`?`text`:`password`,value:w,onChange:L,onBlur:ie,onKeyDown:ae,disabled:s,readOnly:c||oe,autoComplete:u,tabIndex:oe?-1:0,className:at(`w-full border-0 bg-transparent p-0 text-kumo-default ring-0 outline-none kumo-input-placeholder disabled:cursor-not-allowed disabled:text-kumo-subtle`,a===`xs`&&`pr-5`,a===`sm`&&`pr-6`,a===`base`&&`pr-8`,a===`lg`&&`pr-10`,oe&&`pointer-events-none text-transparent`),"aria-hidden":oe,..._}),(0,z.jsx)(`span`,{className:at(`pointer-events-none absolute inset-y-0 left-0 flex items-center overflow-hidden select-none`,a===`xs`&&`right-5`,a===`sm`&&`right-6`,a===`base`&&`right-8`,a===`lg`&&`right-10`,a===`xs`&&`px-1.5`,a===`sm`&&`px-2`,a===`base`&&`px-3`,a===`lg`&&`px-4`,!oe&&`invisible`,oe&&`pointer-events-auto`,`text-kumo-default`,`group/mask`),"aria-hidden":`true`,children:(0,z.jsxs)(`span`,{className:`relative`,children:[(0,z.jsx)(`span`,{className:at(oe&&!s&&`group-focus-within/container:invisible group-hover/mask:invisible`),children:`••••••••`}),oe&&!s&&(0,z.jsx)(`span`,{className:`invisible absolute left-0 top-0 whitespace-nowrap text-kumo-subtle group-focus-within/container:visible group-hover/mask:visible`,children:`Click to reveal`})]})}),(0,z.jsx)(`button`,{type:`button`,"data-kumo-component":`SensitiveInput`,"data-kumo-part":`toggle-visibility`,onClick:re,onKeyDown:e=>e.stopPropagation(),"aria-label":E===`revealed`?`Hide value`:`Reveal value`,tabIndex:se?0:-1,className:at(`absolute top-1/2 right-0 -translate-y-1/2 cursor-pointer text-kumo-subtle hover:text-kumo-default focus:text-kumo-default focus:ring-kumo-focus/50 focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:rounded-sm`,`bg-transparent border-none shadow-none p-0 m-0 h-auto min-h-0 inline-flex items-center justify-center`,a===`xs`&&`right-1.5`,a===`sm`&&`right-2`,a===`base`&&`right-3`,a===`lg`&&`right-4`,ce,!se&&`pointer-events-none opacity-0`),children:E===`revealed`?(0,z.jsx)(kt,{className:`size-full`}):(0,z.jsx)(Et,{className:`size-full`})}),T&&!s&&(0,z.jsx)(`button`,{type:`button`,"data-kumo-component":`SensitiveInput`,"data-kumo-part":`copy`,onClick:te,onKeyDown:e=>e.stopPropagation(),"aria-label":O?`Copied`:`Copy to clipboard`,className:at(`absolute -top-px right-2 -translate-y-full cursor-pointer rounded-t-md bg-kumo-brand px-2 py-0.5 text-xs text-white opacity-0 transition-opacity group-focus-within/container:opacity-100 group-hover/container:opacity-100 hover:brightness-120 focus:outline-none focus:ring-kumo-focus/50 focus-visible:ring-2 focus-visible:ring-kumo-brand`,`border-none shadow-none m-0 h-auto min-h-0`),children:O?`Copied`:`Copy`})]}),de=(0,z.jsxs)(`div`,{children:[oe?(0,z.jsx)(`div`,{ref:j,role:`button`,"data-kumo-component":`SensitiveInput`,"data-kumo-part":`masked-container`,tabIndex:s?-1:0,className:le,onClick:ne,onKeyDown:R,"aria-label":`${b}, masked.`,"aria-describedby":`${ee} ${M}`,"aria-disabled":s,children:ue}):(0,z.jsx)(`div`,{ref:j,className:le,children:ue}),oe&&(0,z.jsx)(`span`,{id:ee,className:`sr-only`,children:`Click or press Enter to reveal.`}),(0,z.jsxs)(`span`,{id:M,className:`sr-only`,"aria-live":`polite`,children:[E===`masked`&&T&&`Value hidden`,O&&`Copied to clipboard`]})]});return f?(0,z.jsx)(eh,{label:f,required:g,labelTooltip:p,description:m,error:h?typeof h==`string`?{message:h,match:!0}:h:void 0,children:de}):de});Ih.displayName=`SensitiveInput`;var Lh={size:{sm:{classes:`px-6 py-8 gap-4`,description:`Compact empty state for smaller containers`},base:{classes:`px-10 py-16 gap-6`,description:`Default empty state size`},lg:{classes:`px-12 py-20 gap-8`,description:`Large empty state for prominent placement`}}},Rh={size:`base`};function zh({size:e=Rh.size}={}){return at(`flex w-full flex-col items-center rounded-xl border border-kumo-fill bg-kumo-control text-kumo-default`,ot(Lh.size,e,Rh.size).classes)}function Bh({icon:e,title:t,description:n,commandLine:r,contents:i,size:a=`base`,className:o}){let[s,c]=(0,B.useState)(!1);return(0,z.jsxs)(`div`,{className:at(zh({size:a}),o),children:[e,(0,z.jsx)(`h2`,{className:`text-2xl font-semibold`,children:t}),n&&(0,z.jsx)(`p`,{className:`max-w-140 text-center text-kumo-subtle`,children:n}),r&&(0,z.jsxs)(`div`,{className:at(`group/cmd relative inline-flex h-10 max-w-8/10 transform-gpu items-center gap-2 rounded-lg font-mono shadow-sm`,`bg-kumo-overlay pr-2 pl-3`,`transition-all duration-300 hover:border-kumo-interact/80 hover:shadow-md`,`border border-kumo-fill/60`),children:[(0,z.jsx)(`span`,{className:`text-xs text-kumo-inactive select-none`,children:`$`}),(0,z.jsx)(`span`,{className:`no-scrollbar overflow-scroll text-base whitespace-nowrap text-kumo-brand`,children:r}),(0,z.jsx)(qm,{className:`group`,size:`sm`,variant:`ghost`,shape:`square`,"aria-label":`Copy command`,onClick:async()=>{c(!0),setTimeout(()=>{c(!1)},1e3),await navigator.clipboard.writeText(r)},children:s?(0,z.jsx)(xt,{size:16,className:`animate-bounce-in text-kumo-success`}):(0,z.jsx)(Ct,{size:16,className:`text-kumo-inactive group-hover:text-kumo-brand`})})]}),i]})}var Vh=_(),Hh={target:{},agents:[]};async function Uh(){try{let e=await fetch(`/__studio/config.json`);if(!e.ok)return Hh;let t=await e.json();return{target:t.target??{},agents:Array.isArray(t.agents)?t.agents:[]}}catch{return Hh}}function Wh(){return typeof document>`u`?`light`:document.documentElement.getAttribute(`data-mode`)===`dark`?`dark`:`light`}function Gh(){let[e,t]=(0,B.useState)(Wh);return(0,z.jsx)(qm,{variant:`ghost`,shape:`square`,size:`sm`,"aria-label":e===`dark`?`Switch to light theme`:`Switch to dark theme`,onClick:()=>{let n=e===`dark`?`light`:`dark`;document.documentElement.setAttribute(`data-mode`,n),document.documentElement.style.colorScheme=n;try{localStorage.setItem(`theme`,n)}catch{}t(n)},icon:e===`dark`?(0,z.jsx)(Wt,{size:16}):(0,z.jsx)(It,{size:16})})}var Kh=`__other__`;function qh({config:e,onConnect:t}){let n=e.agents.length>0,[r,i]=(0,B.useState)(e.target.url?`remote`:`local`),[a,o]=(0,B.useState)(e.target.host??`localhost:5173`),[s,c]=(0,B.useState)(e.target.url??`https://`),[l,u]=(0,B.useState)(e.target.token??``),[d,f]=(0,B.useState)(e.target.instance??`default`),p=(0,B.useMemo)(()=>e.target.agent?e.agents.some(t=>t.id===e.target.agent)?e.target.agent:Kh:n?e.agents[0].id:Kh,[e,n]),[m,h]=(0,B.useState)(p),[g,_]=(0,B.useState)(p===Kh?e.target.agent??``:``),v=m===Kh?g.trim():m,y=m!==Kh&&e.agents.some(e=>e.id===m),[b,x]=(0,B.useState)(null),S=()=>{if(!v){x(`Enter an agent id.`);return}if(r===`remote`&&!/^https?:\/\/.+/.test(s.trim())){x(`Enter a full remote URL (https://…).`);return}if(r===`local`&&!a.trim()){x(`Enter a host (e.g. localhost:5173).`);return}x(null),t({url:r===`remote`?s.trim():void 0,host:r===`local`?a.trim():void 0,protocol:e.target.protocol,token:l.trim()||void 0,agent:v,instance:d.trim()||`default`,routePrefix:e.target.routePrefix,canonicalAgent:y})};return(0,z.jsx)(`div`,{className:`flex h-full items-center justify-center p-6`,children:(0,z.jsxs)(Ah,{className:`w-full max-w-md rounded-2xl p-6 ring ring-kumo-line`,children:[(0,z.jsxs)(`div`,{className:`mb-5 flex items-center justify-between gap-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Ht,{size:22,className:`text-kumo-accent`}),(0,z.jsx)(Ph,{size:`lg`,bold:!0,children:`Connect to a Think instance`})]}),(0,z.jsx)(Gh,{})]}),(0,z.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>{e.preventDefault(),S()},children:[(0,z.jsxs)(hh,{label:`Connection`,value:r,onValueChange:e=>i(e),children:[(0,z.jsx)(hh.Option,{value:`local`,children:`Local dev server`}),(0,z.jsx)(hh.Option,{value:`remote`,children:`Remote (deployed)`})]}),r===`local`?(0,z.jsx)(ih,{label:`Host`,placeholder:`localhost:5173`,value:a,onChange:e=>o(e.target.value)}):(0,z.jsx)(ih,{label:`URL`,placeholder:`https://app.example.com`,value:s,onChange:e=>c(e.target.value)}),n?(0,z.jsxs)(hh,{label:`Agent`,value:m,onValueChange:e=>h(e),children:[e.agents.map(e=>(0,z.jsx)(hh.Option,{value:e.id,children:e.label},e.id)),(0,z.jsx)(hh.Option,{value:Kh,children:`Other…`})]}):null,m===Kh?(0,z.jsx)(ih,{label:`Agent id`,placeholder:`support`,value:g,onChange:e=>_(e.target.value)}):null,(0,z.jsx)(ih,{label:`Instance`,placeholder:`default`,value:d,onChange:e=>f(e.target.value)}),(0,z.jsx)(Ih,{label:`Token (optional)`,placeholder:`Sent as the token query param`,value:l,onValueChange:u}),b?(0,z.jsx)(`p`,{className:`text-sm text-kumo-danger`,children:b}):null,(0,z.jsx)(qm,{type:`submit`,variant:`primary`,className:`w-full`,children:`Connect`})]})]})})}var Jh=new Set([`toJSON`,`then`,`catch`,`finally`,`valueOf`,`toString`,`constructor`,`prototype`,`$$typeof`,`@@toStringTag`,`asymmetricMatch`,`nodeType`]);function Yh(e){return typeof e==`symbol`||Jh.has(e)}function Xh(e){if(e===e.toUpperCase()&&e!==e.toLowerCase())return e.toLowerCase().replace(/_/g,`-`);let t=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);return t=t.startsWith(`-`)?t.slice(1):t,t.replace(/_/g,`-`).replace(/-$/,``)}(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
12
+ PartySocket requires a global 'EventTarget' class to be available!
13
+ You can polyfill this global by adding this to your code before any partysocket imports:
14
+
15
+ \`\`\`
16
+ import 'partysocket/event-target-polyfill';
17
+ \`\`\`
18
+ Please file an issue at https://github.com/partykit/partykit if you're still having trouble.
19
+ `);var Zh=class extends Event{message;error;constructor(e,t){super(`error`,t),this.message=e.message,this.error=e}},Qh=class extends Event{code;reason;wasClean=!0;constructor(e=1e3,t=``,n){super(`close`,n),this.code=e,this.reason=t}},$h={Event,ErrorEvent:Zh,CloseEvent:Qh};function eg(e,t){if(!e)throw Error(t)}function tg(e){return new e.constructor(e.type,e)}function ng(e){return`data`in e?new MessageEvent(e.type,e):`code`in e||`reason`in e?new Qh(e.code||1999,e.reason||`unknown reason`,e):`error`in e?new Zh(e.error,e):new Event(e.type,e)}var rg=typeof process<`u`&&process.versions?.node!==void 0,ig=typeof navigator<`u`&&navigator.product===`ReactNative`,ag=rg||ig?ng:tg,og={maxReconnectionDelay:1e4,minReconnectionDelay:3e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},sg=!1;function cg(){}var lg=class e extends EventTarget{_ws;_retryCount=-1;_uptimeTimeout;_connectTimeout;_shouldReconnect=!0;_connectLock=!1;_binaryType=`blob`;_closeCalled=!1;_didWarnAboutClosedSend=!1;_messageQueue=[];_debugLogger=console.log.bind(console);_url;_protocols;_options;constructor(e,t,n={}){super(),this._url=e,this._protocols=t,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._options.debugLogger&&(this._debugLogger=this._options.debugLogger),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return e.CONNECTING}get OPEN(){return e.OPEN}get CLOSING(){return e.CLOSING}get CLOSED(){return e.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((e,t)=>(typeof t==`string`?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:``}get protocol(){return this._ws?this._ws.protocol:``}get readyState(){return this._closeCalled?e.CLOSED:this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING}get url(){return this._ws?this._ws.url:``}get shouldReconnect(){return this._shouldReconnect}onclose=null;onerror=null;onmessage=null;onopen=null;close(e=1e3,t){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug(`close enqueued: no ws instance`);return}if(this._ws.readyState===this.CLOSED||this._ws.readyState===this.CLOSING){this._debug(`close: already closing or closed`);return}this._disconnect(e,t)}reconnect(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._didWarnAboutClosedSend=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED||this._ws.readyState===this.CLOSING||this._disconnect(e,t),this._connect()}send(e){if(this._ws&&this._ws.readyState===this.OPEN)return this._debug(`send`,e),this._ws.send(e),!0;this._closeCalled&&!this._didWarnAboutClosedSend&&(this._didWarnAboutClosedSend=!0,console.warn(`ReconnectingWebSocket: send() was called after close(). The message has been buffered, but it will only be delivered if reconnect() is called on this socket. If this socket has been discarded, the message is lost — this usually means a stale socket reference is being used.`));let{maxEnqueuedMessages:t=og.maxEnqueuedMessages}=this._options;return this._messageQueue.length<t&&(this._debug(`enqueue`,e),this._messageQueue.push(e)),!1}drainQueuedMessages(){let e=this._messageQueue;return this._messageQueue=[],e}_debug(...e){this._options.debug&&this._debugLogger(`RWS>`,...e)}_getNextDelay(){let{reconnectionDelayGrowFactor:e=og.reconnectionDelayGrowFactor,minReconnectionDelay:t=og.minReconnectionDelay,maxReconnectionDelay:n=og.maxReconnectionDelay}=this._options,r=0;return this._retryCount>0&&(r=t*e**(this._retryCount-1),r>n&&(r=n)),this._debug(`next delay`,r),r}_wait(){return new Promise(e=>{setTimeout(e,this._getNextDelay())})}_getNextProtocols(e){if(!e)return Promise.resolve(null);if(typeof e==`string`||Array.isArray(e))return Promise.resolve(e);if(typeof e==`function`){let t=e();if(!t)return Promise.resolve(null);if(typeof t==`string`||Array.isArray(t))return Promise.resolve(t);if(t.then)return t}throw Error(`Invalid protocols`)}_getNextUrl(e){if(typeof e==`string`)return Promise.resolve(e);if(typeof e==`function`){let t=e();if(typeof t==`string`)return Promise.resolve(t);if(t.then)return t}throw Error(`Invalid URL`)}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;let{maxRetries:e=og.maxRetries,connectionTimeout:t=og.connectionTimeout}=this._options;if(this._retryCount>=e){this._debug(`max retries reached`,this._retryCount,`>=`,e),this._connectLock=!1;return}this._retryCount++,this._debug(`connect`,this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([e,n])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>`u`&&!sg&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket.
20
+
21
+ For example, if you're using node.js, run \`npm install ws\`, and then in your code:
22
+
23
+ import PartySocket from 'partysocket';
24
+ import WS from 'ws';
25
+
26
+ const partysocket = new PartySocket({
27
+ host: "127.0.0.1:1999",
28
+ room: "test-room",
29
+ WebSocket: WS
30
+ });
31
+
32
+ `),sg=!0);let r=this._options.WebSocket||WebSocket;this._debug(`connect`,{url:e,protocols:n}),this._ws=n?new r(e,n):new r(e),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),t)}).catch(e=>{this._connectLock=!1,this._handleError(new $h.ErrorEvent(Error(e.message),this))})}_handleTimeout(){this._debug(`timeout event`),this._handleError(new $h.ErrorEvent(Error(`TIMEOUT`),this))}_disconnect(e=1e3,t){if(this._clearTimeouts(),this._ws){this._removeListeners();try{(this._ws.readyState===this.OPEN||this._ws.readyState===this.CONNECTING)&&this._ws.close(e,t),this._handleClose(new $h.CloseEvent(e,t,this))}catch{}}}_acceptOpen(){this._debug(`accept open`),this._retryCount=0}_handleOpen=e=>{this._debug(`open event`);let{minUptime:t=og.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),t),eg(this._ws,`WebSocket is not defined`),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(e=>{this._ws?.send(e)}),this._messageQueue=[],this.onopen&&this.onopen(e),this.dispatchEvent(ag(e))};_handleMessage=e=>{this._debug(`message event`),this.onmessage&&this.onmessage(e),this.dispatchEvent(ag(e))};_handleError=e=>{this._debug(`error event`,e.message),this._disconnect(void 0,e.message===`TIMEOUT`?`timeout`:void 0),this.onerror&&this.onerror(e),this._debug(`exec error listeners`),this.dispatchEvent(ag(e)),this._connect()};_handleClose=e=>{this._debug(`close event`),this._clearTimeouts(),this._options.shouldReconnectOnClose&&!this._options.shouldReconnectOnClose(e)&&(this._shouldReconnect=!1),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(e),this.dispatchEvent(ag(e))};_removeListeners(){this._ws&&(this._debug(`removeListeners`),this._ws.removeEventListener(`open`,this._handleOpen),this._ws.removeEventListener(`close`,this._handleClose),this._ws.removeEventListener(`message`,this._handleMessage),this._ws.removeEventListener(`error`,this._handleError),this._ws.addEventListener(`error`,cg))}_addListeners(){this._ws&&(this._debug(`addListeners`),this._ws.addEventListener(`open`,this._handleOpen),this._ws.addEventListener(`close`,this._handleClose),this._ws.addEventListener(`message`,this._handleMessage),this._ws.addEventListener(`error`,this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}},ug=e=>e[1]!==null&&e[1]!==void 0;function dg(){if(crypto?.randomUUID)return crypto.randomUUID();let e=Date.now(),t=performance?.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(n){let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n===`x`?r:r&3|8).toString(16)})}function fg(e,t,n={}){let{host:r,path:i,protocol:a,room:o,party:s,basePath:c,prefix:l,query:u}=e,d=r.replace(/^(http|https|ws|wss):\/\//,``);if(d.endsWith(`/`)&&(d=d.slice(0,-1)),i?.startsWith(`/`))throw Error(`path must not start with a slash`);let f=s??`main`,p=i?`/${i}`:``,m=a||(d.startsWith(`localhost:`)||d.startsWith(`127.0.0.1:`)||d.startsWith(`192.168.`)||d.startsWith(`10.`)||d.startsWith(`172.`)&&d.split(`.`)[1]>=`16`&&d.split(`.`)[1]<=`31`||d.startsWith(`[::ffff:7f00:1]:`)?t:`${t}s`),h=`${m}://${d}/${c||`${l||`parties`}/${f}/${o}`}${p}`,g=(e={})=>`${h}?${new URLSearchParams([...Object.entries(n),...Object.entries(e).filter(ug)])}`,_=typeof u==`function`?async()=>g(await u()):g(u);return{host:d,path:p,room:o,name:f,protocol:m,partyUrl:h,urlProvider:_}}var pg=class extends lg{_pk;_pkurl;name;room;host;path;basePath;constructor(e){let t=mg(e);if(super(t.urlProvider,t.protocols,t.socketOptions),this.partySocketOptions=e,this.setWSProperties(t),!e.startClosed&&!this.room&&!this.basePath)throw this.close(),Error(`Either room or basePath must be provided to connect. Use startClosed: true to create a socket and set them via updateProperties before calling reconnect().`);e.disableNameValidation||(e.party?.includes(`/`)&&console.warn(`PartySocket: party name "${e.party}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`),e.room?.includes(`/`)&&console.warn(`PartySocket: room name "${e.room}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`))}updateProperties(e){let t=mg({...this.partySocketOptions,...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path,basePath:e.basePath??this.basePath});this._url=t.urlProvider,this._protocols=t.protocols,this._options=t.socketOptions,this.setWSProperties(t)}setWSProperties(e){let{_pk:t,_pkurl:n,name:r,room:i,host:a,path:o,basePath:s}=e;this._pk=t,this._pkurl=n,this.name=r,this.room=i,this.host=a,this.path=o,this.basePath=s}reconnect(e,t){if(!this.host)throw Error("The host must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");if(!this.room&&!this.basePath)throw Error("The room (or basePath) must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");super.reconnect(e,t)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,t){let n=fg(e,`http`),r=typeof n.urlProvider==`string`?n.urlProvider:await n.urlProvider();return(e.fetch??fetch)(r,t)}};function mg(e){let{id:t,host:n,path:r,party:i,room:a,protocol:o,query:s,protocols:c,...l}=e,u=t||dg(),d=fg(e,`ws`,{_pk:u});return{_pk:u,_pkurl:d.partyUrl,name:d.name,room:d.room,host:d.host,path:d.path,basePath:e.basePath,protocols:c,socketOptions:l,urlProvider:d.urlProvider}}var hg=class extends Error{constructor(e){let t=e.reason||`WebSocket closed with code ${e.code}`;super(`Agent connection closed: ${t}`),this.name=`AgentConnectionError`,this.code=e.code,this.reason=e.reason,this.wasClean=e.wasClean}};function gg(e){return e.code===1008||e.code>=4e3&&e.code<=4999}function _g(e){return new Proxy({},{get:(t,n)=>{if(!Yh(n))return(...t)=>e(n,t)}})}function vg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yg(e){if(vg(e))return{input:e,changed:!1};if(typeof e==`string`&&e.trim().startsWith(`{`))try{let t=JSON.parse(e);if(vg(t))return{input:t,changed:!0}}catch{}return{input:{},changed:!0}}function bg(e,t){switch(t.type){case`text-start`:return e.push({type:`text`,text:``,state:`streaming`}),!0;case`text-delta`:{let n=xg(e,`text`);return n&&n.type===`text`?n.text+=t.delta??``:e.push({type:`text`,text:t.delta??``,state:`streaming`}),!0}case`text-end`:{let t=xg(e,`text`);return t&&`state`in t&&(t.state=`done`),!0}case`reasoning-start`:return e.push({type:`reasoning`,text:``,state:`streaming`}),!0;case`reasoning-delta`:{let n=xg(e,`reasoning`);return n&&n.type===`reasoning`?(n.text+=t.delta??``,Cg(n,t.providerMetadata)):e.push({type:`reasoning`,text:t.delta??``,state:`streaming`,...t.providerMetadata==null?{}:{providerMetadata:t.providerMetadata}}),!0}case`reasoning-end`:{let n=xg(e,`reasoning`);return n&&`state`in n&&(n.state=`done`,Cg(n,t.providerMetadata)),!0}case`file`:return e.push({type:`file`,mediaType:t.mediaType,url:t.url}),!0;case`source-url`:return e.push({type:`source-url`,sourceId:t.sourceId,url:t.url,title:t.title,providerMetadata:t.providerMetadata}),!0;case`source-document`:return e.push({type:`source-document`,sourceId:t.sourceId,mediaType:t.mediaType,title:t.title,filename:t.filename,providerMetadata:t.providerMetadata}),!0;case`tool-input-start`:return Sg(e,t.toolCallId)||e.push({type:`tool-${t.toolName}`,toolCallId:t.toolCallId,toolName:t.toolName,state:`input-streaming`,input:void 0,...t.providerExecuted==null?{}:{providerExecuted:t.providerExecuted},...t.providerMetadata==null?{}:{callProviderMetadata:t.providerMetadata},...t.title==null?{}:{title:t.title}}),!0;case`tool-input-delta`:{let n=Sg(e,t.toolCallId);return n&&n.state===`input-streaming`&&(n.input=t.input),!0}case`tool-input-available`:{let n=Sg(e,t.toolCallId);if(n){let e=n;return e.state===`input-streaming`&&(e.state=`input-available`,e.input=yg(t.input).input,t.providerExecuted!=null&&(e.providerExecuted=t.providerExecuted),t.providerMetadata!=null&&(e.callProviderMetadata=t.providerMetadata),t.title!=null&&(e.title=t.title)),!0}return e.push({type:`tool-${t.toolName}`,toolCallId:t.toolCallId,toolName:t.toolName,state:`input-available`,input:yg(t.input).input,...t.providerExecuted==null?{}:{providerExecuted:t.providerExecuted},...t.providerMetadata==null?{}:{callProviderMetadata:t.providerMetadata},...t.title==null?{}:{title:t.title}}),!0}case`tool-input-error`:{let n=Sg(e,t.toolCallId);if(n){let e=n;if(e.state===`output-available`||e.state===`output-error`||e.state===`output-denied`)return!0;e.state=`output-error`,e.errorText=t.errorText,e.input=yg(t.input).input,t.providerExecuted!=null&&(e.providerExecuted=t.providerExecuted),t.providerMetadata!=null&&(e.callProviderMetadata=t.providerMetadata)}else e.push({type:`tool-${t.toolName}`,toolCallId:t.toolCallId,toolName:t.toolName,state:`output-error`,input:yg(t.input).input,errorText:t.errorText,...t.providerExecuted==null?{}:{providerExecuted:t.providerExecuted},...t.providerMetadata==null?{}:{callProviderMetadata:t.providerMetadata}});return!0}case`tool-approval-request`:{let n=Sg(e,t.toolCallId);if(n){let e=n;if(e.state===`approval-responded`||e.state===`output-available`||e.state===`output-error`||e.state===`output-denied`)return!0;e.state=`approval-requested`,e.approval={id:t.approvalId,...t.approvalDescriptor!==void 0&&{descriptor:t.approvalDescriptor}}}return!0}case`tool-output-denied`:{let n=Sg(e,t.toolCallId);if(n){let e=n;if(e.state===`output-available`||e.state===`output-error`||e.state===`output-denied`||e.state===`approval-responded`)return!0;e.state=`output-denied`}return!0}case`tool-output-available`:{let n=Sg(e,t.toolCallId);if(n){let e=n;e.state=`output-available`,e.output=t.output,t.preliminary!==void 0&&(e.preliminary=t.preliminary)}return!0}case`tool-output-error`:{let n=Sg(e,t.toolCallId);if(n){let e=n;e.state=`output-error`,e.errorText=t.errorText}return!0}case`step-start`:case`start-step`:return e.push({type:`step-start`}),!0;default:if(t.type.startsWith(`data-`)){if(t.transient)return!0;if(t.id!=null){let n=wg(e,t.type,t.id);if(n)return n.data=t.data,!0}return e.push({type:t.type,...t.id!=null&&{id:t.id},data:t.data}),!0}return!1}}function xg(e,t){for(let n=e.length-1;n>=0;n--)if(e[n].type===t)return e[n]}function Sg(e,t){if(t)for(let n=e.length-1;n>=0;n--){let r=e[n];if(`toolCallId`in r&&r.toolCallId===t)return r}}function Cg(e,t){if(t==null)return;let n=e;n.providerMetadata={...n.providerMetadata,...t}}function wg(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];if(i.type===t&&`id`in i&&i.id===n)return i}}var Tg=(e,t)=>{let n=(0,B.useRef)(t);n.current=t,(0,B.useEffect)(()=>{let t=e=>n.current?.onOpen?.(e),r=e=>n.current?.onMessage?.(e),i=e=>n.current?.onClose?.(e),a=e=>n.current?.onError?.(e);return e.addEventListener(`open`,t),e.addEventListener(`close`,i),e.addEventListener(`error`,a),e.addEventListener(`message`,r),()=>{e.removeEventListener(`open`,t),e.removeEventListener(`close`,i),e.removeEventListener(`error`,a),e.removeEventListener(`message`,r)}},[e])},Eg=e=>[e.startClosed,e.minUptime,e.maxRetries,e.connectionTimeout,e.maxEnqueuedMessages,e.maxReconnectionDelay,e.minReconnectionDelay,e.reconnectionDelayGrowFactor,e.debug];function Dg({options:e,createSocket:t,createSocketMemoKey:n,createSocketDestinationKey:r}){let{enabled:i=!0}=e,a=(0,B.useMemo)(()=>e,[n(e)]),[o,s]=(0,B.useState)(()=>t({...a,startClosed:!0})),c=(0,B.useRef)(null),l=(0,B.useRef)(t);l.current=t;let u=(0,B.useRef)(i),d=(0,B.useRef)(a),f=(0,B.useRef)(!1),p=(0,B.useRef)(a),m=e=>{let t=l.current({...a,startClosed:!0}),n=e.drainQueuedMessages();if(n.length>0){let e=r?r(p.current)===r(a):!1;if(a.transferEnqueuedMessages??e)for(let e of n)t.send(e);else console.warn(`PartySocket: discarded ${n.length} buffered message(s) while replacing the socket, because the connection destination changed. Pass transferEnqueuedMessages: true to deliver buffered messages to the new destination instead.`)}return p.current=a,t},h=(0,B.useRef)(m);return h.current=m,(0,B.useEffect)(()=>{let e=d.current!==a;if(d.current=a,!i)return o.close(),u.current=i,e&&(f.current=!0),()=>{o.close()};if(!u.current&&i){u.current=i;let t=e||f.current;if(f.current=!1,!t)return o.reconnect(),()=>{o.close()};let n=h.current(o);return s(n),()=>{n.close()}}if(u.current=i,c.current===o)if(e){let e=h.current(o);return s(e),()=>{e.close()}}else return a.startClosed!==!0&&o.reconnect(),()=>{o.close()};else return c.current?c.current!==o&&o.reconnect():a.startClosed!==!0&&o.reconnect(),c.current=o,()=>{o.close()}},[o,a,i]),o}function Og(e){let{host:t,...n}=e,r=Dg({options:{host:t||(typeof window<`u`?window.location.host:`dummy-domain.com`),...n},createSocket:e=>new pg(e),createSocketMemoKey:e=>JSON.stringify([e.query,e.id,e.host,e.room,e.party,e.path,e.protocol,e.protocols,e.basePath,e.prefix,...Eg(e)]),createSocketDestinationKey:e=>JSON.stringify([e.host,e.room,e.party,e.path,e.protocol,e.protocols,e.basePath,e.prefix])});return Tg(r,e),r}var kg=new Map;function Ag(e,t,n,r){if(r===void 0)return JSON.stringify([e,t||`default`,...n]);let i=n;return i.length===0?JSON.stringify([e,t||`default`,...r]):JSON.stringify([e,t||`default`,i.map(e=>[e.agent,e.name]),...r])}function jg(e,t){if(e.length===0)return t??``;let n=e.flatMap(e=>[`sub`,Xh(e.agent),encodeURIComponent(e.name)]).join(`/`);return t?`${n}/${t.startsWith(`/`)?t.slice(1):t}`:n}function Mg(e){let t=kg.get(e);if(t){if(Date.now()>=t.expiresAt){kg.delete(e);return}return t}}function Ng(e,t,n){let r={promise:t,expiresAt:Date.now()+n};return kg.set(e,r),r}function Pg(e){kg.delete(e)}function Fg(e){let t=Xh(e.agent),{query:n,queryDeps:r,cacheTtl:i,sub:a,path:o,defaultCallTimeout:s,onConnectionError:c,shouldReconnectOnClose:l,...u}=e,d=(0,B.useMemo)(()=>(a??[]).map(e=>({agent:e.agent,name:e.name})),[JSON.stringify(a??[])]),f=d.length>0?d[d.length-1].agent:e.agent,p=d.length>0?d[d.length-1].name:e.name||`default`,m=(0,B.useMemo)(()=>[{agent:e.agent,name:e.name||`default`},...d],[e.agent,e.name,d]),h=(0,B.useRef)(new Map),g=(0,B.useRef)(null),_=(0,B.useRef)(s??3e4);_.current=s??3e4;let v=(e,t)=>{let n=Error(t);for(let[r,i]of h.current)i.sentOn===e&&(i.timeoutId&&clearTimeout(i.timeoutId),h.current.delete(r),i.reject(n),i.stream?.onError?.(t))},y=()=>{let e=g.current;if(!(!e||e.readyState!==e.OPEN))for(let t of h.current.values())t.sentOn===null&&(e.send(t.request),t.sentOn=e)},b=e=>{let t=Error(e);for(let[n,r]of h.current)r.sentOn===null&&(r.timeoutId&&clearTimeout(r.timeoutId),h.current.delete(n),r.reject(t),r.stream?.onError?.(e))},x=(0,B.useMemo)(()=>Ag(t,e.name,d,r||[]),[t,e.name,d,r]),S=(0,B.useRef)(x);S.current=x;let C=i??300*1e3,[w,T]=(0,B.useState)(0),E=n&&typeof n==`function`,[D,O]=(0,B.useState)(!1),k=(0,B.useMemo)(()=>{if(!n||typeof n!=`function`)return null;let t=Mg(x);if(t)return t.promise;let r=n().catch(t=>{throw console.error(`[useAgent] Query failed for agent "${e.agent}":`,t),Pg(x),t});return Ng(x,r,C),r},[x,n,e.agent,C,w]);(0,B.useEffect)(()=>{if(!k||C<=0)return;let e=Mg(x);if(!e)return;let t=e.expiresAt-Date.now(),n=setTimeout(()=>{Pg(x),T(Date.now())},Math.max(0,t));return()=>clearTimeout(n)},[x,k,C]);let A;if(n)if(typeof n==`function`){let e=(0,B.use)(k);if(e){for(let[t,n]of Object.entries(e))n!=null&&typeof n!=`string`&&typeof n!=`number`&&typeof n!=`boolean`&&console.warn(`[useAgent] Query parameter "${t}" is an object and will be converted to "[object Object]". Query parameters should be string, number, boolean, or null.`);A=e}}else A=n;(0,B.useEffect)(()=>{D&&A!==void 0&&O(!1)},[D,A]);let[j,M]=(0,B.useState)(void 0),[N,P]=(0,B.useState)(null),ee=(0,B.useRef)(null),F=(0,B.useRef)(null),te=(0,B.useRef)(l);te.current=l;let I=(0,B.useCallback)(e=>(te.current?.(e)??!0)&&!gg(e),[]),[ne,re]=(0,B.useState)({name:p,agent:Xh(f),identified:!1}),L=(0,B.useRef)({name:null,agent:null}),ie=(0,B.useRef)(void 0),R=()=>{let e;ie.current={promise:new Promise(t=>{e=t}),resolve:e}};ie.current||R();let ae=(0,B.useRef)(null),oe=(0,B.useMemo)(()=>jg(d,o),[d,o]),se=e.basePath?{basePath:e.basePath,path:oe||void 0,query:A,...u,shouldReconnectOnClose:I}:{party:t,prefix:`agents`,room:e.name||`default`,path:oe||void 0,query:A,...u,shouldReconnectOnClose:I},ce=!D&&(u.enabled??!0),le=JSON.stringify([e.host??null,e.basePath??null,t,e.name||`default`,oe||null]),ue=F.current===le?N:null;ee.current=ue;let de=Og({...se,enabled:ce,onOpen:t=>{F.current=null,P(null),y(),e.onOpen?.(t)},onMessage:t=>{if(typeof t.data==`string`){let n;try{n=JSON.parse(t.data)}catch{return e.onMessage?.(t)}if(n.type===`cf_agent_identity`){let t=L.current.name,r=L.current.agent,i=n.name,a=n.agent,o=ae.current;if(o&&(o.name=i,o.agent=a,o.identified=!0),re({name:i,agent:a,identified:!0}),ie.current?.resolve(),t!==null&&r!==null&&(t!==i||r!==a))if(e.onIdentityChange)e.onIdentityChange(t,i,r,a);else{let e=r!==a,n=t!==i,o=``;o=e&&n?`agent "${r}" → "${a}", instance "${t}" → "${i}"`:e?`agent "${r}" → "${a}"`:`instance "${t}" → "${i}"`,console.warn(`[agents] Identity changed on reconnect: ${o}. This can happen with server-side routing (e.g., basePath with getAgentByName) where the instance is determined by auth/session. Provide onIdentityChange callback to handle this explicitly, or ignore if this is expected for your routing pattern.`)}L.current={name:i,agent:a},e.onIdentity?.(i,a);return}if(n.type===`cf_agent_state`){M(n.state),e.onStateUpdate?.(n.state,`server`);return}if(n.type===`cf_agent_state_error`){e.onStateUpdateError?.(n.error);return}if(n.type===`cf_agent_mcp_servers`){e.onMcpUpdate?.(n.mcp);return}if(n.type===`rpc`){let e=n,t=h.current.get(e.id);if(!t){console.warn(`[useAgent] Discarded an RPC response with no matching pending call (id "${e.id}"). The call likely timed out or was rejected when its connection closed before the response arrived.`);return}if(!e.success){t.timeoutId&&clearTimeout(t.timeoutId),t.reject(Error(e.error)),h.current.delete(e.id),t.stream?.onError?.(e.error);return}`done`in e?e.done?(t.timeoutId&&clearTimeout(t.timeoutId),t.resolve(e.result),h.current.delete(e.id),t.stream?.onDone?.(e.result)):t.stream?.onChunk?.(e.result):(t.timeoutId&&clearTimeout(t.timeoutId),t.resolve(e.result),h.current.delete(e.id));return}}e.onMessage?.(t)},onClose:t=>{let n=t.target??g.current,r=n===g.current,i=gg(t);if(n&&(v(n,`Connection closed`),r&&!n.shouldReconnect&&b(`Connection closed`)),r&&(R(),ae.current&&(ae.current.identified=!1),re(e=>({...e,identified:!1})),n?.shouldReconnect&&(E&&O(!0),Pg(S.current),T(Date.now())),!n?.shouldReconnect&&i)){let e=new hg(t);F.current=le,P(e),c?.(e)}e.onClose?.(t)}});g.current=de;let fe=(0,B.useRef)(null),pe=(0,B.useRef)(le);(0,B.useEffect)(()=>{let e=fe.current;fe.current=de;let t=pe.current;pe.current=le,t!==le&&(F.current=null,P(null),b(`Call discarded: the agent address changed before the request could be sent`)),e&&e!==de&&(v(e,`Connection closed`),R(),ae.current&&(ae.current.identified=!1),re(e=>e.identified?{...e,identified:!1}:e))},[de,le]);let me=(0,B.useCallback)((e,t=[],n)=>new Promise((r,i)=>{let a=g.current;if(a&&ee.current&&a.readyState===a.CLOSED){i(Error(`Connection closed`));return}let o=crypto.randomUUID(),s,c=n&&(`onChunk`in n||`onDone`in n||`onError`in n),l=c?n:n?.stream,u=c?void 0:n?.timeout,d=u===void 0?l?void 0:_.current:u;d&&(s=setTimeout(()=>{let t=h.current.get(o);h.current.delete(o);let n=`RPC call to ${e} timed out after ${d}ms`;t?.stream?.onError?.(n),i(Error(n))},d));let f=JSON.stringify({args:t,id:o,method:e,type:`rpc`});if(h.current.set(o,{reject:i,resolve:r,stream:l,timeoutId:s,request:f,sentOn:null}),a&&a.readyState===a.OPEN){a.send(f);let e=h.current.get(o);e&&(e.sentOn=a)}}),[]);return de.setState=t=>{(g.current??de).send(JSON.stringify({state:t,type:`cf_agent_state`})),M(t),e.onStateUpdate?.(t,`client`)},de.call=me,de.agent=ne.agent,de.name=ne.name,de.path=m,de.identified=ne.identified,de.ready=ie.current.promise,de.state=j,de.connectionError=ue,ae.current=de,de.stub=(0,B.useMemo)(()=>_g(me),[me]),de.getHttpUrl=()=>(de._url||de._pkurl||``).replace(`ws://`,`http://`).replace(`wss://`,`https://`),ne.agent!==ne.agent.toLowerCase()&&console.warn(`Agent name: `+ne.agent+` should probably be in lowercase. Received: `+ne.agent),de}function Ig(e){if(typeof e==`object`&&e&&!Array.isArray(e))return e}var Lg=class{constructor(e){this.messageId=e.messageId,this._isContinuation=e.continuation??!1,this.parts=e.existingParts?[...e.existingParts]:[],this.metadata=e.existingMetadata?{...e.existingMetadata}:void 0}applyChunk(e){let t=bg(this.parts,e);if(e.type===`tool-approval-request`&&e.toolCallId)return{handled:t,action:{type:`tool-approval-request`,toolCallId:e.toolCallId}};if((e.type===`tool-output-available`||e.type===`tool-output-error`)&&e.toolCallId&&!this.parts.some(t=>`toolCallId`in t&&t.toolCallId===e.toolCallId))return{handled:t,action:{type:`cross-message-tool-update`,updateType:e.type===`tool-output-available`?`output-available`:`output-error`,toolCallId:e.toolCallId,output:e.output,errorText:e.errorText,preliminary:e.preliminary}};if(!t)switch(e.type){case`start`:{e.messageId!=null&&!this._isContinuation&&(this.messageId=e.messageId);let t=Ig(e.messageMetadata);return t&&(this.metadata=this.metadata?{...this.metadata,...t}:{...t}),{handled:!0,action:{type:`start`,messageId:e.messageId,metadata:t}}}case`finish`:{let t=Ig(e.messageMetadata);return t&&(this.metadata=this.metadata?{...this.metadata,...t}:{...t}),{handled:!0,action:{type:`finish`,finishReason:`finishReason`in e?e.finishReason:void 0,metadata:t}}}case`message-metadata`:{let t=Ig(e.messageMetadata);return t&&(this.metadata=this.metadata?{...this.metadata,...t}:{...t}),{handled:!0,action:{type:`message-metadata`,metadata:t??{}}}}case`finish-step`:return{handled:!0};case`error`:return{handled:!0,action:{type:`error`,error:e.errorText??JSON.stringify(e)}}}return{handled:t}}toMessage(){return{id:this.messageId,role:`assistant`,parts:[...this.parts],...this.metadata!=null&&{metadata:this.metadata}}}mergeInto(e){let t=e.findIndex(e=>e.id===this.messageId);if(t<0&&this._isContinuation){for(let n=e.length-1;n>=0;n--)if(e[n].role===`assistant`){t=n;break}}let n={id:t>=0?e[t].id:this.messageId,role:`assistant`,parts:[...this.parts],...this.metadata!=null&&{metadata:this.metadata}};if(t>=0){let r=[...e];return r[t]=n,r}return[...e,n]}};function Rg(e,t){switch(t.type){case`clear`:return{state:{status:`idle`},isStreaming:!1};case`resume-fallback`:{let e=new Lg({messageId:t.messageId});return{state:{status:`observing`,streamId:t.streamId,accumulator:e},isStreaming:!0}}case`response`:{let n,r=t.replay===!0&&t.chunkData?.type===`start`;if(e.status===`idle`||e.streamId!==t.streamId||r){let e=t.messageId,r,i;if(t.continuation&&t.currentMessages){for(let n=t.currentMessages.length-1;n>=0;n--)if(t.currentMessages[n].role===`assistant`){e=t.currentMessages[n].id,r=[...t.currentMessages[n].parts],t.currentMessages[n].metadata!=null&&(i={...t.currentMessages[n].metadata});break}}n=new Lg({messageId:e,continuation:t.continuation,existingParts:r,existingMetadata:i})}else n=e.accumulator;t.chunkData&&n.applyChunk(t.chunkData);let i;return t.done?(i=e=>n.mergeInto(e),{state:{status:`idle`},messagesUpdate:i,isStreaming:!1}):((t.chunkData&&!t.replay||t.replayComplete)&&(i=e=>n.mergeInto(e)),{state:{status:`observing`,streamId:t.streamId,accumulator:n},messagesUpdate:i,isStreaming:!0})}}}var zg={IDLE:`idle`,CONTINUATION_OWNED:`continuation-owned`},Bg=`vercel.ai.error`,Vg=Symbol.for(Bg),Hg,Ug,Wg=class e extends (Ug=Error,Hg=Vg,Ug){constructor({name:e,message:t,cause:n}){super(t),this[Hg]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,Bg)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}};function Gg(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.toString():JSON.stringify(e)}var Kg=`AI_InvalidArgumentError`,qg=`vercel.ai.error.${Kg}`,Jg=Symbol.for(qg),Yg,Xg,Zg=class extends (Xg=Wg,Yg=Jg,Xg){constructor({message:e,cause:t,argument:n}){super({name:Kg,message:e,cause:t}),this[Yg]=!0,this.argument=n}static isInstance(e){return Wg.hasMarker(e,qg)}},Qg=`AI_JSONParseError`,$g=`vercel.ai.error.${Qg}`,e_=Symbol.for($g),t_,n_,r_=class extends (n_=Wg,t_=e_,n_){constructor({text:e,cause:t}){super({name:Qg,message:`JSON parsing failed: Text: ${e}.
33
+ Error message: ${Gg(t)}`,cause:t}),this[t_]=!0,this.text=e}static isInstance(e){return Wg.hasMarker(e,$g)}},i_=`AI_TypeValidationError`,a_=`vercel.ai.error.${i_}`,o_=Symbol.for(a_),s_,c_,l_=class e extends (c_=Wg,s_=o_,c_){constructor({value:e,cause:t,context:n}){let r=`Type validation failed`;if(n?.field&&(r+=` for ${n.field}`),n?.entityName||n?.entityId){r+=` (`;let e=[];n.entityName&&e.push(n.entityName),n.entityId&&e.push(`id: "${n.entityId}"`),r+=e.join(`, `),r+=`)`}super({name:i_,message:`${r}: Value: ${JSON.stringify(e)}.
34
+ Error message: ${Gg(t)}`,cause:t}),this[s_]=!0,this.value=e,this.context=n}static isInstance(e){return Wg.hasMarker(e,a_)}static wrap({value:t,cause:n,context:r}){return e.isInstance(n)&&n.value===t&&n.context?.field===r?.field&&n.context?.entityName===r?.entityName&&n.context?.entityId===r?.entityId?n:new e({value:t,cause:n,context:r})}},u_;function U(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var d_=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},f_=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(u_=globalThis).__zod_globalConfig??(u_.__zod_globalConfig={});var p_=globalThis.__zod_globalConfig;function m_(e){return e&&Object.assign(p_,e),p_}function h_(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function g_(e,t){return typeof t==`bigint`?t.toString():t}function __(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function v_(e){return e==null}function y_(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function b_(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var x_=Symbol(`evaluating`);function S_(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==x_)return r===void 0&&(r=x_,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function C_(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function w_(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function T_(e){return JSON.stringify(e)}function E_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var D_=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function O_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var k_=__(()=>{if(p_.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function A_(e){if(O_(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(O_(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function j_(e){return A_(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var M_=new Set([`string`,`number`,`symbol`]);function N_(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function P_(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function F_(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function I_(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var L_={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function R_(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return P_(e,w_(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return C_(this,`shape`,e),e},checks:[]}))}function z_(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return P_(e,w_(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return C_(this,`shape`,r),r},checks:[]}))}function B_(e,t){if(!A_(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return P_(e,w_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return C_(this,`shape`,n),n}}))}function V_(e,t){if(!A_(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return P_(e,w_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return C_(this,`shape`,n),n}}))}function H_(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return P_(e,w_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return C_(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function U_(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return P_(t,w_(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return C_(this,`shape`,i),i},checks:[]}))}function W_(e,t,n){return P_(t,w_(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return C_(this,`shape`,i),i}}))}function G_(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function K_(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function q_(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function J_(e){return typeof e==`string`?e:e?.message}function Y_(e,t,n){let r=e.message?e.message:J_(e.inst?._zod.def?.error?.(e))??J_(t?.error?.(e))??J_(n.customError?.(e))??J_(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function X_(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Z_(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Q_=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,g_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},$_=U(`$ZodError`,Q_),ev=U(`$ZodError`,Q_,{Parent:Error});function tv(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function nv(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var rv=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new d_;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Y_(e,a,m_())));throw D_(t,i?.callee),t}return o.value},iv=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Y_(e,a,m_())));throw D_(t,i?.callee),t}return o.value},av=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new d_;return a.issues.length?{success:!1,error:new(e??$_)(a.issues.map(e=>Y_(e,i,m_())))}:{success:!0,data:a.value}},ov=av(ev),sv=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Y_(e,i,m_())))}:{success:!0,data:a.value}},cv=sv(ev),lv=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return rv(e)(t,n,i)},uv=e=>(t,n,r)=>rv(e)(t,n,r),dv=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return iv(e)(t,n,i)},fv=e=>async(t,n,r)=>iv(e)(t,n,r),pv=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return av(e)(t,n,i)},mv=e=>(t,n,r)=>av(e)(t,n,r),hv=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return sv(e)(t,n,i)},gv=e=>async(t,n,r)=>sv(e)(t,n,r),_v=/^[cC][0-9a-z]{6,}$/,vv=/^[0-9a-z]+$/,yv=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,bv=/^[0-9a-vA-V]{20}$/,xv=/^[A-Za-z0-9]{27}$/,Sv=/^[a-zA-Z0-9_-]{21}$/,Cv=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,wv=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Tv=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ev=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dv=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Ov(){return new RegExp(Dv,`u`)}var kv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Av=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,jv=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Mv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Nv=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Pv=/^[A-Za-z0-9_-]*$/,Fv=/^https?$/,Iv=/^\+[1-9]\d{6,14}$/,Lv=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Rv=RegExp(`^${Lv}$`);function zv(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Bv(e){return RegExp(`^${zv(e)}$`)}function Vv(e){let t=zv({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Lv}T(?:${r})$`)}var Hv=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Uv=/^-?\d+$/,Wv=/^-?\d+(?:\.\d+)?$/,Gv=/^(?:true|false)$/i,Kv=/^null$/i,qv=/^[^A-Z]*$/,Jv=/^[^a-z]*$/,Yv=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Xv={number:`number`,bigint:`bigint`,object:`date`},Zv=U(`$ZodCheckLessThan`,(e,t)=>{Yv.init(e,t);let n=Xv[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qv=U(`$ZodCheckGreaterThan`,(e,t)=>{Yv.init(e,t);let n=Xv[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$v=U(`$ZodCheckMultipleOf`,(e,t)=>{Yv.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):b_(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ey=U(`$ZodCheckNumberFormat`,(e,t)=>{Yv.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=L_[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Uv)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ty=U(`$ZodCheckMaxLength`,(e,t)=>{var n;Yv.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!v_(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=X_(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ny=U(`$ZodCheckMinLength`,(e,t)=>{var n;Yv.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!v_(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=X_(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ry=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;Yv.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!v_(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=X_(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),iy=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Yv.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ay=U(`$ZodCheckRegex`,(e,t)=>{iy.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),oy=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=qv,iy.init(e,t)}),sy=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Jv,iy.init(e,t)}),cy=U(`$ZodCheckIncludes`,(e,t)=>{Yv.init(e,t);let n=N_(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ly=U(`$ZodCheckStartsWith`,(e,t)=>{Yv.init(e,t);let n=RegExp(`^${N_(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),uy=U(`$ZodCheckEndsWith`,(e,t)=>{Yv.init(e,t);let n=RegExp(`.*${N_(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),dy=U(`$ZodCheckOverwrite`,(e,t)=>{Yv.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),fy=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
35
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
36
+ `))}},py={major:4,minor:4,patch:3},my=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=py;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=G_(e),i;for(let a of t){if(a._zod.def.when){if(K_(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new d_;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=G_(e,t))});else{if(e.issues.length===t)continue;r||=G_(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(G_(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new d_;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new d_;return o.then(e=>t(e,r,a))}return t(o,r,a)}}S_(e,`~standard`,()=>({validate:t=>{try{let n=ov(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return cv(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),hy=U(`$ZodString`,(e,t)=>{my.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Hv(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),gy=U(`$ZodStringFormat`,(e,t)=>{iy.init(e,t),hy.init(e,t)}),_y=U(`$ZodGUID`,(e,t)=>{t.pattern??=wv,gy.init(e,t)}),vy=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Tv(e)}else t.pattern??=Tv();gy.init(e,t)}),yy=U(`$ZodEmail`,(e,t)=>{t.pattern??=Ev,gy.init(e,t)}),by=U(`$ZodURL`,(e,t)=>{gy.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Fv.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),xy=U(`$ZodEmoji`,(e,t)=>{t.pattern??=Ov(),gy.init(e,t)}),Sy=U(`$ZodNanoID`,(e,t)=>{t.pattern??=Sv,gy.init(e,t)}),Cy=U(`$ZodCUID`,(e,t)=>{t.pattern??=_v,gy.init(e,t)}),wy=U(`$ZodCUID2`,(e,t)=>{t.pattern??=vv,gy.init(e,t)}),Ty=U(`$ZodULID`,(e,t)=>{t.pattern??=yv,gy.init(e,t)}),Ey=U(`$ZodXID`,(e,t)=>{t.pattern??=bv,gy.init(e,t)}),Dy=U(`$ZodKSUID`,(e,t)=>{t.pattern??=xv,gy.init(e,t)}),Oy=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=Vv(t),gy.init(e,t)}),ky=U(`$ZodISODate`,(e,t)=>{t.pattern??=Rv,gy.init(e,t)}),Ay=U(`$ZodISOTime`,(e,t)=>{t.pattern??=Bv(t),gy.init(e,t)}),jy=U(`$ZodISODuration`,(e,t)=>{t.pattern??=Cv,gy.init(e,t)}),My=U(`$ZodIPv4`,(e,t)=>{t.pattern??=kv,gy.init(e,t),e._zod.bag.format=`ipv4`}),Ny=U(`$ZodIPv6`,(e,t)=>{t.pattern??=Av,gy.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Py=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=jv,gy.init(e,t)}),Fy=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Mv,gy.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Iy(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Ly=U(`$ZodBase64`,(e,t)=>{t.pattern??=Nv,gy.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Iy(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Ry(e){if(!Pv.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Iy(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var zy=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=Pv,gy.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Ry(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),By=U(`$ZodE164`,(e,t)=>{t.pattern??=Iv,gy.init(e,t)});function Vy(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Hy=U(`$ZodJWT`,(e,t)=>{gy.init(e,t),e._zod.check=n=>{Vy(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Uy=U(`$ZodNumber`,(e,t)=>{my.init(e,t),e._zod.pattern=e._zod.bag.pattern??Wv,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Wy=U(`$ZodNumberFormat`,(e,t)=>{ey.init(e,t),Uy.init(e,t)}),Gy=U(`$ZodBoolean`,(e,t)=>{my.init(e,t),e._zod.pattern=Gv,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Ky=U(`$ZodNull`,(e,t)=>{my.init(e,t),e._zod.pattern=Kv,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),qy=U(`$ZodUnknown`,(e,t)=>{my.init(e,t),e._zod.parse=e=>e}),Jy=U(`$ZodNever`,(e,t)=>{my.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Yy(e,t,n){e.issues.length&&t.issues.push(...q_(n,e.issues)),t.value[n]=e.value}var Xy=U(`$ZodArray`,(e,t)=>{my.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Yy(t,n,e))):Yy(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Zy(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...q_(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Qy(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=I_(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function $y(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Zy(e,n,i,t,u,d))):Zy(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var eb=U(`$ZodObject`,(e,t)=>{if(my.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=__(()=>Qy(t));S_(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=O_,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Zy(n,t,e,s,r,i))):Zy(a,t,e,s,r,i)}return i?$y(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),tb=U(`$ZodObjectJIT`,(e,t)=>{eb.init(e,t);let n=e._zod.parse,r=__(()=>Qy(t)),i=e=>{let t=new fy([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=T_(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=T_(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
37
+ if (${n}.issues.length) {
38
+ if (${o} in input) {
39
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
40
+ ...iss,
41
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
42
+ })));
43
+ }
44
+ }
45
+
46
+ if (${n}.value === undefined) {
47
+ if (${o} in input) {
48
+ newResult[${o}] = undefined;
49
+ }
50
+ } else {
51
+ newResult[${o}] = ${n}.value;
52
+ }
53
+
54
+ `):c?t.write(`
55
+ if (${n}.issues.length) {
56
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
57
+ ...iss,
58
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
59
+ })));
60
+ }
61
+
62
+ if (${n}.value === undefined) {
63
+ if (${o} in input) {
64
+ newResult[${o}] = undefined;
65
+ }
66
+ } else {
67
+ newResult[${o}] = ${n}.value;
68
+ }
69
+
70
+ `):t.write(`
71
+ const ${n}_present = ${o} in input;
72
+ if (${n}.issues.length) {
73
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
74
+ ...iss,
75
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
76
+ })));
77
+ }
78
+ if (!${n}_present && !${n}.issues.length) {
79
+ payload.issues.push({
80
+ code: "invalid_type",
81
+ expected: "nonoptional",
82
+ input: undefined,
83
+ path: [${o}]
84
+ });
85
+ }
86
+
87
+ if (${n}_present) {
88
+ if (${n}.value === undefined) {
89
+ newResult[${o}] = undefined;
90
+ } else {
91
+ newResult[${o}] = ${n}.value;
92
+ }
93
+ }
94
+
95
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=O_,s=!p_.jitless,c=s&&k_.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?$y([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function nb(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!G_(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Y_(e,r,m_())))}),t)}var rb=U(`$ZodUnion`,(e,t)=>{my.init(e,t),S_(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),S_(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),S_(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),S_(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>y_(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>nb(t,r,e,i)):nb(o,r,e,i)}}),ib=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,rb.init(e,t);let n=e._zod.parse;S_(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=__(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!O_(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),ab=U(`$ZodIntersection`,(e,t)=>{my.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>sb(e,t,n)):sb(e,i,a)}});function ob(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(A_(e)&&A_(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=ob(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ob(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function sb(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),G_(e))return e;let o=ob(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var cb=U(`$ZodRecord`,(e,t)=>{my.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!A_(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Y_(e,r,m_())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...q_(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...q_(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Wv.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Y_(e,r,m_())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...q_(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...q_(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),lb=U(`$ZodEnum`,(e,t)=>{my.init(e,t);let n=h_(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>M_.has(typeof e)).map(e=>typeof e==`string`?N_(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),ub=U(`$ZodLiteral`,(e,t)=>{if(my.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?N_(e):e?N_(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),db=U(`$ZodTransform`,(e,t)=>{my.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new f_(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new d_;return n.value=i,n.fallback=!0,n}});function fb(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var pb=U(`$ZodOptional`,(e,t)=>{my.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,S_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),S_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${y_(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>fb(e,r)):fb(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),mb=U(`$ZodExactOptional`,(e,t)=>{pb.init(e,t),S_(e._zod,`values`,()=>t.innerType._zod.values),S_(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),hb=U(`$ZodNullable`,(e,t)=>{my.init(e,t),S_(e._zod,`optin`,()=>t.innerType._zod.optin),S_(e._zod,`optout`,()=>t.innerType._zod.optout),S_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${y_(e.source)}|null)$`):void 0}),S_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),gb=U(`$ZodDefault`,(e,t)=>{my.init(e,t),e._zod.optin=`optional`,S_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>_b(e,t)):_b(r,t)}});function _b(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var vb=U(`$ZodPrefault`,(e,t)=>{my.init(e,t),e._zod.optin=`optional`,S_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),yb=U(`$ZodNonOptional`,(e,t)=>{my.init(e,t),S_(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>bb(t,e)):bb(i,e)}});function bb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var xb=U(`$ZodCatch`,(e,t)=>{my.init(e,t),e._zod.optin=`optional`,S_(e._zod,`optout`,()=>t.innerType._zod.optout),S_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Y_(e,n,m_()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Y_(e,n,m_()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Sb=U(`$ZodPipe`,(e,t)=>{my.init(e,t),S_(e._zod,`values`,()=>t.in._zod.values),S_(e._zod,`optin`,()=>t.in._zod.optin),S_(e._zod,`optout`,()=>t.out._zod.optout),S_(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Cb(e,t.in,n)):Cb(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Cb(e,t.out,n)):Cb(r,t.out,n)}});function Cb(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var wb=U(`$ZodReadonly`,(e,t)=>{my.init(e,t),S_(e._zod,`propValues`,()=>t.innerType._zod.propValues),S_(e._zod,`values`,()=>t.innerType._zod.values),S_(e._zod,`optin`,()=>t.innerType?._zod?.optin),S_(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Tb):Tb(r)}});function Tb(e){return e.value=Object.freeze(e.value),e}var Eb=U(`$ZodLazy`,(e,t)=>{my.init(e,t),S_(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),S_(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),S_(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),S_(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),S_(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Db=U(`$ZodCustom`,(e,t)=>{Yv.init(e,t),my.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Ob(t,n,r,e));Ob(i,n,r,e)}});function Ob(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Z_(e))}}var kb,Ab=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function jb(){return new Ab}(kb=globalThis).__zod_globalRegistry??(kb.__zod_globalRegistry=jb());var Mb=globalThis.__zod_globalRegistry;function Nb(e,t){return new e({type:`string`,...F_(t)})}function Pb(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...F_(t)})}function Fb(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...F_(t)})}function Ib(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...F_(t)})}function Lb(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...F_(t)})}function Rb(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...F_(t)})}function zb(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...F_(t)})}function Bb(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...F_(t)})}function Vb(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...F_(t)})}function Hb(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...F_(t)})}function Ub(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...F_(t)})}function Wb(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...F_(t)})}function Gb(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...F_(t)})}function Kb(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...F_(t)})}function qb(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...F_(t)})}function Jb(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...F_(t)})}function Yb(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...F_(t)})}function Xb(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...F_(t)})}function Zb(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...F_(t)})}function Qb(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...F_(t)})}function $b(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...F_(t)})}function ex(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...F_(t)})}function tx(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...F_(t)})}function nx(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...F_(t)})}function rx(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...F_(t)})}function ix(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...F_(t)})}function ax(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...F_(t)})}function ox(e,t){return new e({type:`number`,checks:[],...F_(t)})}function sx(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...F_(t)})}function cx(e,t){return new e({type:`boolean`,...F_(t)})}function lx(e,t){return new e({type:`null`,...F_(t)})}function ux(e){return new e({type:`unknown`})}function dx(e,t){return new e({type:`never`,...F_(t)})}function fx(e,t){return new Zv({check:`less_than`,...F_(t),value:e,inclusive:!1})}function px(e,t){return new Zv({check:`less_than`,...F_(t),value:e,inclusive:!0})}function mx(e,t){return new Qv({check:`greater_than`,...F_(t),value:e,inclusive:!1})}function hx(e,t){return new Qv({check:`greater_than`,...F_(t),value:e,inclusive:!0})}function gx(e,t){return new $v({check:`multiple_of`,...F_(t),value:e})}function _x(e,t){return new ty({check:`max_length`,...F_(t),maximum:e})}function vx(e,t){return new ny({check:`min_length`,...F_(t),minimum:e})}function yx(e,t){return new ry({check:`length_equals`,...F_(t),length:e})}function bx(e,t){return new ay({check:`string_format`,format:`regex`,...F_(t),pattern:e})}function xx(e){return new oy({check:`string_format`,format:`lowercase`,...F_(e)})}function Sx(e){return new sy({check:`string_format`,format:`uppercase`,...F_(e)})}function Cx(e,t){return new cy({check:`string_format`,format:`includes`,...F_(t),includes:e})}function wx(e,t){return new ly({check:`string_format`,format:`starts_with`,...F_(t),prefix:e})}function Tx(e,t){return new uy({check:`string_format`,format:`ends_with`,...F_(t),suffix:e})}function Ex(e){return new dy({check:`overwrite`,tx:e})}function Dx(e){return Ex(t=>t.normalize(e))}function Ox(){return Ex(e=>e.trim())}function kx(){return Ex(e=>e.toLowerCase())}function Ax(){return Ex(e=>e.toUpperCase())}function jx(){return Ex(e=>E_(e))}function Mx(e,t,n){return new e({type:`array`,element:t,...F_(n)})}function Nx(e,t,n){let r=F_(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Px(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...F_(n)})}function Fx(e,t){let n=Ix(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Z_(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Z_(r))}},e(t.value,t)),t);return n}function Ix(e,t){let n=new Yv({check:`custom`,...F_(t)});return n._zod.check=e,n}function Lx(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Mb,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Rx(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Rx(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&Vx(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function zx(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
96
+
97
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Bx(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Ux(t,`input`,e.processors),output:Ux(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Vx(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Vx(r.element,n);if(r.type===`set`)return Vx(r.valueType,n);if(r.type===`lazy`)return Vx(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return Vx(r.innerType,n);if(r.type===`intersection`)return Vx(r.left,n)||Vx(r.right,n);if(r.type===`record`||r.type===`map`)return Vx(r.keyType,n)||Vx(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Vx(r.in,n)||Vx(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Vx(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Vx(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Vx(e,n))return!0;return!!(r.rest&&Vx(r.rest,n))}return!1}var Hx=(e,t={})=>n=>{let r=Lx({...n,processors:t});return Rx(e,r),zx(r,e),Bx(r,e)},Ux=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Lx({...i??{},target:a,io:t,processors:n});return Rx(e,o),zx(o,e),Bx(o,e)},Wx={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Gx=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Wx[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Kx=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},qx=(e,t,n,r)=>{n.type=`boolean`},Jx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},Yx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},Xx=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Zx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},Qx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},$x=(e,t,n,r)=>{n.not={}},eS=(e,t,n,r)=>{},tS=(e,t,n,r)=>{},nS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},rS=(e,t,n,r)=>{let i=e._zod.def,a=h_(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},iS=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},aS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},oS=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},sS=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},cS=(e,t,n,r)=>{n.type=`boolean`},lS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},uS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},dS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},fS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},pS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},mS=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Rx(a.element,t,{...r,path:[...r.path,`items`]})},hS=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Rx(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Rx(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},gS=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Rx(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},_S=(e,t,n,r)=>{let i=e._zod.def,a=Rx(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Rx(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},vS=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>Rx(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?Rx(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},yS=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Rx(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Rx(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Rx(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},bS=(e,t,n,r)=>{let i=e._zod.def,a=Rx(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},xS=(e,t,n,r)=>{let i=e._zod.def;Rx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},SS=(e,t,n,r)=>{let i=e._zod.def;Rx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},CS=(e,t,n,r)=>{let i=e._zod.def;Rx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},wS=(e,t,n,r)=>{let i=e._zod.def;Rx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},TS=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Rx(o,t,r);let s=t.seen.get(e);s.ref=o},ES=(e,t,n,r)=>{let i=e._zod.def;Rx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},DS=(e,t,n,r)=>{let i=e._zod.def;Rx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},OS=(e,t,n,r)=>{let i=e._zod.def;Rx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},kS=(e,t,n,r)=>{let i=e._zod.innerType;Rx(i,t,r);let a=t.seen.get(e);a.ref=i},AS={string:Gx,number:Kx,boolean:qx,bigint:Jx,symbol:Yx,null:Xx,undefined:Zx,void:Qx,never:$x,any:eS,unknown:tS,date:nS,enum:rS,literal:iS,nan:aS,template_literal:oS,file:sS,success:cS,custom:lS,function:uS,transform:dS,map:fS,set:pS,array:mS,object:hS,union:gS,intersection:_S,tuple:vS,record:yS,nullable:bS,nonoptional:xS,default:SS,prefault:CS,catch:wS,pipe:TS,readonly:ES,promise:DS,optional:OS,lazy:kS};function jS(e,t){if(`_idmap`in e){let n=e,r=Lx({...t,processors:AS}),i={};for(let e of n._idmap.entries()){let[t,n]=e;Rx(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;zx(r,n),a[t]=Bx(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Lx({...t,processors:AS});return Rx(e,n),zx(n,e),Bx(n,e)}var MS=U(`ZodISODateTime`,(e,t)=>{Oy.init(e,t),iC.init(e,t)});function NS(e){return nx(MS,e)}var PS=U(`ZodISODate`,(e,t)=>{ky.init(e,t),iC.init(e,t)});function FS(e){return rx(PS,e)}var IS=U(`ZodISOTime`,(e,t)=>{Ay.init(e,t),iC.init(e,t)});function LS(e){return ix(IS,e)}var RS=U(`ZodISODuration`,(e,t)=>{jy.init(e,t),iC.init(e,t)});function zS(e){return ax(RS,e)}var BS=U(`ZodError`,(e,t)=>{$_.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>nv(e,t)},flatten:{value:t=>tv(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,g_,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,g_,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),VS=rv(BS),HS=iv(BS),US=av(BS),WS=sv(BS),GS=lv(BS),KS=uv(BS),qS=dv(BS),JS=fv(BS),YS=pv(BS),XS=mv(BS),ZS=hv(BS),QS=gv(BS),$S=new WeakMap;function eC(e,t,n){let r=Object.getPrototypeOf(e),i=$S.get(r);if(i||(i=new Set,$S.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var tC=U(`ZodType`,(e,t)=>(my.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Ux(e,`input`),output:Ux(e,`output`)}}),e.toJSONSchema=Hx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>VS(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>US(e,t,n),e.parseAsync=async(t,n)=>HS(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>WS(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>GS(e,t,n),e.decode=(t,n)=>KS(e,t,n),e.encodeAsync=async(t,n)=>qS(e,t,n),e.decodeAsync=async(t,n)=>JS(e,t,n),e.safeEncode=(t,n)=>YS(e,t,n),e.safeDecode=(t,n)=>XS(e,t,n),e.safeEncodeAsync=async(t,n)=>ZS(e,t,n),e.safeDecodeAsync=async(t,n)=>QS(e,t,n),eC(e,`ZodType`,{check(...e){let t=this.def;return this.clone(w_(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return P_(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Cw(e,t))},superRefine(e,t){return this.check(ww(e,t))},overwrite(e){return this.check(Ex(e))},optional(){return nw(this)},exactOptional(){return iw(this)},nullable(){return ow(this)},nullish(){return nw(ow(this))},nonoptional(e){return fw(this,e)},array(){return LC(this)},or(e){return HC([this,e])},and(e){return KC(this,e)},transform(e){return gw(this,ew(e))},default(e){return cw(this,e)},prefault(e){return uw(this,e)},catch(e){return mw(this,e)},pipe(e){return gw(this,e)},readonly(){return vw(this)},describe(e){let t=this.clone();return Mb.add(t,{description:e}),t},meta(...e){if(e.length===0)return Mb.get(this);let t=this.clone();return Mb.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Mb.get(e)?.description},configurable:!0}),e)),nC=U(`_ZodString`,(e,t)=>{hy.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gx(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,eC(e,`_ZodString`,{regex(...e){return this.check(bx(...e))},includes(...e){return this.check(Cx(...e))},startsWith(...e){return this.check(wx(...e))},endsWith(...e){return this.check(Tx(...e))},min(...e){return this.check(vx(...e))},max(...e){return this.check(_x(...e))},length(...e){return this.check(yx(...e))},nonempty(...e){return this.check(vx(1,...e))},lowercase(e){return this.check(xx(e))},uppercase(e){return this.check(Sx(e))},trim(){return this.check(Ox())},normalize(...e){return this.check(Dx(...e))},toLowerCase(){return this.check(kx())},toUpperCase(){return this.check(Ax())},slugify(){return this.check(jx())}})}),rC=U(`ZodString`,(e,t)=>{hy.init(e,t),nC.init(e,t),e.email=t=>e.check(Pb(aC,t)),e.url=t=>e.check(Bb(cC,t)),e.jwt=t=>e.check(tx(CC,t)),e.emoji=t=>e.check(Vb(lC,t)),e.guid=t=>e.check(Fb(oC,t)),e.uuid=t=>e.check(Ib(sC,t)),e.uuidv4=t=>e.check(Lb(sC,t)),e.uuidv6=t=>e.check(Rb(sC,t)),e.uuidv7=t=>e.check(zb(sC,t)),e.nanoid=t=>e.check(Hb(uC,t)),e.guid=t=>e.check(Fb(oC,t)),e.cuid=t=>e.check(Ub(dC,t)),e.cuid2=t=>e.check(Wb(fC,t)),e.ulid=t=>e.check(Gb(pC,t)),e.base64=t=>e.check(Qb(bC,t)),e.base64url=t=>e.check($b(xC,t)),e.xid=t=>e.check(Kb(mC,t)),e.ksuid=t=>e.check(qb(hC,t)),e.ipv4=t=>e.check(Jb(gC,t)),e.ipv6=t=>e.check(Yb(_C,t)),e.cidrv4=t=>e.check(Xb(vC,t)),e.cidrv6=t=>e.check(Zb(yC,t)),e.e164=t=>e.check(ex(SC,t)),e.datetime=t=>e.check(NS(t)),e.date=t=>e.check(FS(t)),e.time=t=>e.check(LS(t)),e.duration=t=>e.check(zS(t))});function W(e){return Nb(rC,e)}var iC=U(`ZodStringFormat`,(e,t)=>{gy.init(e,t),nC.init(e,t)}),aC=U(`ZodEmail`,(e,t)=>{yy.init(e,t),iC.init(e,t)}),oC=U(`ZodGUID`,(e,t)=>{_y.init(e,t),iC.init(e,t)}),sC=U(`ZodUUID`,(e,t)=>{vy.init(e,t),iC.init(e,t)}),cC=U(`ZodURL`,(e,t)=>{by.init(e,t),iC.init(e,t)}),lC=U(`ZodEmoji`,(e,t)=>{xy.init(e,t),iC.init(e,t)}),uC=U(`ZodNanoID`,(e,t)=>{Sy.init(e,t),iC.init(e,t)}),dC=U(`ZodCUID`,(e,t)=>{Cy.init(e,t),iC.init(e,t)}),fC=U(`ZodCUID2`,(e,t)=>{wy.init(e,t),iC.init(e,t)}),pC=U(`ZodULID`,(e,t)=>{Ty.init(e,t),iC.init(e,t)}),mC=U(`ZodXID`,(e,t)=>{Ey.init(e,t),iC.init(e,t)}),hC=U(`ZodKSUID`,(e,t)=>{Dy.init(e,t),iC.init(e,t)}),gC=U(`ZodIPv4`,(e,t)=>{My.init(e,t),iC.init(e,t)}),_C=U(`ZodIPv6`,(e,t)=>{Ny.init(e,t),iC.init(e,t)}),vC=U(`ZodCIDRv4`,(e,t)=>{Py.init(e,t),iC.init(e,t)}),yC=U(`ZodCIDRv6`,(e,t)=>{Fy.init(e,t),iC.init(e,t)}),bC=U(`ZodBase64`,(e,t)=>{Ly.init(e,t),iC.init(e,t)}),xC=U(`ZodBase64URL`,(e,t)=>{zy.init(e,t),iC.init(e,t)}),SC=U(`ZodE164`,(e,t)=>{By.init(e,t),iC.init(e,t)}),CC=U(`ZodJWT`,(e,t)=>{Hy.init(e,t),iC.init(e,t)}),wC=U(`ZodNumber`,(e,t)=>{Uy.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kx(e,t,n,r),eC(e,`ZodNumber`,{gt(e,t){return this.check(mx(e,t))},gte(e,t){return this.check(hx(e,t))},min(e,t){return this.check(hx(e,t))},lt(e,t){return this.check(fx(e,t))},lte(e,t){return this.check(px(e,t))},max(e,t){return this.check(px(e,t))},int(e){return this.check(DC(e))},safe(e){return this.check(DC(e))},positive(e){return this.check(mx(0,e))},nonnegative(e){return this.check(hx(0,e))},negative(e){return this.check(fx(0,e))},nonpositive(e){return this.check(px(0,e))},multipleOf(e,t){return this.check(gx(e,t))},step(e,t){return this.check(gx(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function TC(e){return ox(wC,e)}var EC=U(`ZodNumberFormat`,(e,t)=>{Wy.init(e,t),wC.init(e,t)});function DC(e){return sx(EC,e)}var OC=U(`ZodBoolean`,(e,t)=>{Gy.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qx(e,t,n,r)});function kC(e){return cx(OC,e)}var AC=U(`ZodNull`,(e,t)=>{Ky.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xx(e,t,n,r)});function jC(e){return lx(AC,e)}var MC=U(`ZodUnknown`,(e,t)=>{qy.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function NC(){return ux(MC)}var PC=U(`ZodNever`,(e,t)=>{Jy.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$x(e,t,n,r)});function FC(e){return dx(PC,e)}var IC=U(`ZodArray`,(e,t)=>{Xy.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mS(e,t,n,r),e.element=t.element,eC(e,`ZodArray`,{min(e,t){return this.check(vx(e,t))},nonempty(e){return this.check(vx(1,e))},max(e,t){return this.check(_x(e,t))},length(e,t){return this.check(yx(e,t))},unwrap(){return this.element}})});function LC(e,t){return Mx(IC,e,t)}var RC=U(`ZodObject`,(e,t)=>{tb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hS(e,t,n,r),S_(e,`shape`,()=>t.shape),eC(e,`ZodObject`,{keyof(){return XC(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:NC()})},loose(){return this.clone({...this._zod.def,catchall:NC()})},strict(){return this.clone({...this._zod.def,catchall:FC()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return B_(this,e)},safeExtend(e){return V_(this,e)},merge(e){return H_(this,e)},pick(e){return R_(this,e)},omit(e){return z_(this,e)},partial(...e){return U_(tw,this,e[0])},required(...e){return W_(dw,this,e[0])}})});function zC(e,t){return new RC({type:`object`,shape:e??{},...F_(t)})}function BC(e,t){return new RC({type:`object`,shape:e,catchall:FC(),...F_(t)})}var VC=U(`ZodUnion`,(e,t)=>{rb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gS(e,t,n,r),e.options=t.options});function HC(e,t){return new VC({type:`union`,options:e,...F_(t)})}var UC=U(`ZodDiscriminatedUnion`,(e,t)=>{VC.init(e,t),ib.init(e,t)});function WC(e,t,n){return new UC({type:`union`,options:t,discriminator:e,...F_(n)})}var GC=U(`ZodIntersection`,(e,t)=>{ab.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_S(e,t,n,r)});function KC(e,t){return new GC({type:`intersection`,left:e,right:t})}var qC=U(`ZodRecord`,(e,t)=>{cb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yS(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function JC(e,t,n){return!t||!t._zod?new qC({type:`record`,keyType:W(),valueType:e,...F_(t)}):new qC({type:`record`,keyType:e,valueType:t,...F_(n)})}var YC=U(`ZodEnum`,(e,t)=>{lb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rS(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new YC({...t,checks:[],...F_(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new YC({...t,checks:[],...F_(r),entries:i})}});function XC(e,t){return new YC({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...F_(t)})}var ZC=U(`ZodLiteral`,(e,t)=>{ub.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iS(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function QC(e,t){return new ZC({type:`literal`,values:Array.isArray(e)?e:[e],...F_(t)})}var $C=U(`ZodTransform`,(e,t)=>{db.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dS(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new f_(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Z_(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Z_(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function ew(e){return new $C({type:`transform`,transform:e})}var tw=U(`ZodOptional`,(e,t)=>{pb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nw(e){return new tw({type:`optional`,innerType:e})}var rw=U(`ZodExactOptional`,(e,t)=>{mb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iw(e){return new rw({type:`optional`,innerType:e})}var aw=U(`ZodNullable`,(e,t)=>{hb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ow(e){return new aw({type:`nullable`,innerType:e})}var sw=U(`ZodDefault`,(e,t)=>{gb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function cw(e,t){return new sw({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():j_(t)}})}var lw=U(`ZodPrefault`,(e,t)=>{vb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uw(e,t){return new lw({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():j_(t)}})}var dw=U(`ZodNonOptional`,(e,t)=>{yb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fw(e,t){return new dw({type:`nonoptional`,innerType:e,...F_(t)})}var pw=U(`ZodCatch`,(e,t)=>{xb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mw(e,t){return new pw({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var hw=U(`ZodPipe`,(e,t)=>{Sb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TS(e,t,n,r),e.in=t.in,e.out=t.out});function gw(e,t){return new hw({type:`pipe`,in:e,out:t})}var _w=U(`ZodReadonly`,(e,t)=>{wb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ES(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vw(e){return new _w({type:`readonly`,innerType:e})}var yw=U(`ZodLazy`,(e,t)=>{Eb.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kS(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function bw(e){return new yw({type:`lazy`,getter:e})}var xw=U(`ZodCustom`,(e,t)=>{Db.init(e,t),tC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lS(e,t,n,r)});function Sw(e,t){return Nx(xw,e??(()=>!0),t)}function Cw(e,t={}){return Px(xw,e,t)}function ww(e,t){return Fx(e,t)}function Tw(e,t={}){let n=new xw({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...F_(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Ew;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(Ew||={});var Dw;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Dw||={});var Ow=Ew.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),kw=e=>{switch(typeof e){case`undefined`:return Ow.undefined;case`string`:return Ow.string;case`number`:return Number.isNaN(e)?Ow.nan:Ow.number;case`boolean`:return Ow.boolean;case`function`:return Ow.function;case`bigint`:return Ow.bigint;case`symbol`:return Ow.symbol;case`object`:return Array.isArray(e)?Ow.array:e===null?Ow.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?Ow.promise:typeof Map<`u`&&e instanceof Map?Ow.map:typeof Set<`u`&&e instanceof Set?Ow.set:typeof Date<`u`&&e instanceof Date?Ow.date:Ow.object;default:return Ow.unknown}},Aw=Ew.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),jw=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ew.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t=Object.create(null),n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};jw.create=e=>new jw(e);var Mw=(e,t)=>{let n;switch(e.code){case Aw.invalid_type:n=e.received===Ow.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case Aw.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ew.jsonStringifyReplacer)}`;break;case Aw.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ew.joinValues(e.keys,`, `)}`;break;case Aw.invalid_union:n=`Invalid input`;break;case Aw.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ew.joinValues(e.options)}`;break;case Aw.invalid_enum_value:n=`Invalid enum value. Expected ${Ew.joinValues(e.options)}, received '${e.received}'`;break;case Aw.invalid_arguments:n=`Invalid function arguments`;break;case Aw.invalid_return_type:n=`Invalid function return type`;break;case Aw.invalid_date:n=`Invalid date`;break;case Aw.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ew.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case Aw.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case Aw.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case Aw.custom:n=`Invalid input`;break;case Aw.invalid_intersection_types:n=`Intersection results could not be merged`;break;case Aw.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Aw.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,Ew.assertNever(e)}return{message:n}},Nw=Mw;function Pw(){return Nw}var Fw=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function Iw(e,t){let n=Pw(),r=Fw({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Mw?void 0:Mw].filter(e=>!!e)});e.common.issues.push(r)}var Lw=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return Rw;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return Rw;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},Rw=Object.freeze({status:`aborted`}),zw=e=>({status:`dirty`,value:e}),Bw=e=>({status:`valid`,value:e}),Vw=e=>e.status===`aborted`,Hw=e=>e.status===`dirty`,Uw=e=>e.status===`valid`,Ww=e=>typeof Promise<`u`&&e instanceof Promise,Gw;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(Gw||={});var Kw=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},qw=(e,t)=>{if(Uw(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new jw(e.common.issues);return this._error=t,this._error}}};function Jw(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var Yw=class{get description(){return this._def.description}_getType(e){return kw(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:kw(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Lw,ctx:{common:e.parent.common,data:e.data,parsedType:kw(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Ww(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kw(e)};return qw(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kw(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Uw(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Uw(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kw(e)},r=this._parse({data:e,path:n.path,parent:n});return qw(n,await(Ww(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:Aw.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new QT({schema:this,typeName:sE.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return $T.create(this,this._def)}nullable(){return eE.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return NT.create(this)}promise(){return ZT.create(this,this._def)}or(e){return IT.create([this,e],this._def)}and(e){return BT.create(this,e,this._def)}transform(e){return new QT({...Jw(this._def),schema:this,typeName:sE.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new tE({...Jw(this._def),innerType:this,defaultValue:t,typeName:sE.ZodDefault})}brand(){return new iE({typeName:sE.ZodBranded,type:this,...Jw(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new nE({...Jw(this._def),innerType:this,catchValue:t,typeName:sE.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return aE.create(this,e)}readonly(){return oE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Xw=/^c[^\s-]{8,}$/i,Zw=/^[0-9a-z]+$/,Qw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,$w=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,eT=/^[a-z0-9_-]{21}$/i,tT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nT=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,rT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,iT=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,aT,oT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,sT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,cT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,lT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fT=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,pT=RegExp(`^${fT}$`);function mT(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function hT(e){return RegExp(`^${mT(e)}$`)}function gT(e){let t=`${fT}T${mT(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function _T(e,t){return!!((t===`v4`||!t)&&oT.test(e)||(t===`v6`||!t)&&cT.test(e))}function vT(e,t){if(!tT.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function yT(e,t){return!!((t===`v4`||!t)&&sT.test(e)||(t===`v6`||!t)&&lT.test(e))}var bT=class e extends Yw{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ow.string){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.string,received:t.parsedType}),Rw}let t=new Lw,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?Iw(n,{code:Aw.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&Iw(n,{code:Aw.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)rT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`email`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)aT||=new RegExp(iT,`u`),aT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`emoji`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)$w.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`uuid`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)eT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`nanoid`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)Xw.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`cuid`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)Zw.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`cuid2`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)Qw.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`ulid`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),Iw(n,{validation:`url`,code:Aw.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`regex`,code:Aw.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?gT(r).test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?pT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?hT(r).test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?nT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`duration`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?_T(e.data,r.version)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`ip`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?vT(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`jwt`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?yT(e.data,r.version)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`cidr`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?uT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`base64`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?dT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`base64url`,code:Aw.invalid_string,message:r.message}),t.dirty()):Ew.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:Aw.invalid_string,...Gw.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...Gw.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...Gw.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...Gw.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...Gw.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...Gw.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...Gw.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...Gw.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...Gw.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...Gw.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...Gw.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...Gw.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...Gw.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...Gw.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Gw.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...Gw.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...Gw.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...Gw.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...Gw.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...Gw.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...Gw.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...Gw.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...Gw.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...Gw.errToObj(t)})}nonempty(e){return this.min(1,Gw.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};bT.create=e=>new bT({checks:[],typeName:sE.ZodString,coerce:e?.coerce??!1,...Jw(e)});function xT(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var ST=class e extends Yw{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ow.number){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.number,received:t.parsedType}),Rw}let t,n=new Lw;for(let r of this._def.checks)r.kind===`int`?Ew.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?xT(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.not_finite,message:r.message}),n.dirty()):Ew.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,Gw.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Gw.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Gw.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Gw.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Gw.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:Gw.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Gw.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Gw.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Gw.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Gw.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Gw.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:Gw.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Gw.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Gw.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&Ew.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};ST.create=e=>new ST({checks:[],typeName:sE.ZodNumber,coerce:e?.coerce||!1,...Jw(e)});var CT=class e extends Yw{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ow.bigint)return this._getInvalidInput(e);let t,n=new Lw;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):Ew.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.bigint,received:t.parsedType}),Rw}gte(e,t){return this.setLimit(`min`,e,!0,Gw.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Gw.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Gw.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Gw.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Gw.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Gw.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Gw.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Gw.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Gw.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Gw.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};CT.create=e=>new CT({checks:[],typeName:sE.ZodBigInt,coerce:e?.coerce??!1,...Jw(e)});var wT=class extends Yw{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ow.boolean){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.boolean,received:t.parsedType}),Rw}return Bw(e.data)}};wT.create=e=>new wT({typeName:sE.ZodBoolean,coerce:e?.coerce||!1,...Jw(e)});var TT=class e extends Yw{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ow.date){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.date,received:t.parsedType}),Rw}if(Number.isNaN(e.data.getTime()))return Iw(this._getOrReturnCtx(e),{code:Aw.invalid_date}),Rw;let t=new Lw,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):Ew.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Gw.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Gw.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};TT.create=e=>new TT({checks:[],coerce:e?.coerce||!1,typeName:sE.ZodDate,...Jw(e)});var ET=class extends Yw{_parse(e){if(this._getType(e)!==Ow.symbol){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.symbol,received:t.parsedType}),Rw}return Bw(e.data)}};ET.create=e=>new ET({typeName:sE.ZodSymbol,...Jw(e)});var DT=class extends Yw{_parse(e){if(this._getType(e)!==Ow.undefined){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.undefined,received:t.parsedType}),Rw}return Bw(e.data)}};DT.create=e=>new DT({typeName:sE.ZodUndefined,...Jw(e)});var OT=class extends Yw{_parse(e){if(this._getType(e)!==Ow.null){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.null,received:t.parsedType}),Rw}return Bw(e.data)}};OT.create=e=>new OT({typeName:sE.ZodNull,...Jw(e)});var kT=class extends Yw{constructor(){super(...arguments),this._any=!0}_parse(e){return Bw(e.data)}};kT.create=e=>new kT({typeName:sE.ZodAny,...Jw(e)});var AT=class extends Yw{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Bw(e.data)}};AT.create=e=>new AT({typeName:sE.ZodUnknown,...Jw(e)});var jT=class extends Yw{_parse(e){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.never,received:t.parsedType}),Rw}};jT.create=e=>new jT({typeName:sE.ZodNever,...Jw(e)});var MT=class extends Yw{_parse(e){if(this._getType(e)!==Ow.undefined){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.void,received:t.parsedType}),Rw}return Bw(e.data)}};MT.create=e=>new MT({typeName:sE.ZodVoid,...Jw(e)});var NT=class e extends Yw{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==Ow.array)return Iw(t,{code:Aw.invalid_type,expected:Ow.array,received:t.parsedType}),Rw;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(Iw(t,{code:e?Aw.too_big:Aw.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(Iw(t,{code:Aw.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(Iw(t,{code:Aw.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new Kw(t,e,t.path,n)))).then(e=>Lw.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new Kw(t,e,t.path,n)));return Lw.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Gw.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Gw.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Gw.toString(n)}})}nonempty(e){return this.min(1,e)}};NT.create=(e,t)=>new NT({type:e,minLength:null,maxLength:null,exactLength:null,typeName:sE.ZodArray,...Jw(t)});function PT(e){if(e instanceof FT){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=$T.create(PT(r))}return new FT({...e._def,shape:()=>t})}else if(e instanceof NT)return new NT({...e._def,type:PT(e.element)});else if(e instanceof $T)return $T.create(PT(e.unwrap()));else if(e instanceof eE)return eE.create(PT(e.unwrap()));else if(e instanceof VT)return VT.create(e.items.map(e=>PT(e)));else return e}var FT=class e extends Yw{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Ew.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==Ow.object){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.object,received:t.parsedType}),Rw}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof jT&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new Kw(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof jT){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(Iw(n,{code:Aw.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new Kw(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Lw.mergeObjectSync(t,e)):Lw.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return Gw.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:Gw.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:sE.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of Ew.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of Ew.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return PT(this)}partial(t){let n={};for(let e of Ew.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of Ew.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof $T;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return JT(Ew.objectKeys(this.shape))}};FT.create=(e,t)=>new FT({shape:()=>e,unknownKeys:`strip`,catchall:jT.create(),typeName:sE.ZodObject,...Jw(t)}),FT.strictCreate=(e,t)=>new FT({shape:()=>e,unknownKeys:`strict`,catchall:jT.create(),typeName:sE.ZodObject,...Jw(t)}),FT.lazycreate=(e,t)=>new FT({shape:e,unknownKeys:`strip`,catchall:jT.create(),typeName:sE.ZodObject,...Jw(t)});var IT=class extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new jw(e.ctx.common.issues));return Iw(t,{code:Aw.invalid_union,unionErrors:n}),Rw}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new jw(e));return Iw(t,{code:Aw.invalid_union,unionErrors:i}),Rw}}get options(){return this._def.options}};IT.create=(e,t)=>new IT({options:e,typeName:sE.ZodUnion,...Jw(t)});var LT=e=>e instanceof KT?LT(e.schema):e instanceof QT?LT(e.innerType()):e instanceof qT?[e.value]:e instanceof YT?e.options:e instanceof XT?Ew.objectValues(e.enum):e instanceof tE?LT(e._def.innerType):e instanceof DT?[void 0]:e instanceof OT?[null]:e instanceof $T?[void 0,...LT(e.unwrap())]:e instanceof eE?[null,...LT(e.unwrap())]:e instanceof iE||e instanceof oE?LT(e.unwrap()):e instanceof nE?LT(e._def.innerType):[],RT=class e extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ow.object)return Iw(t,{code:Aw.invalid_type,expected:Ow.object,received:t.parsedType}),Rw;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Iw(t,{code:Aw.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Rw)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=LT(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:sE.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Jw(r)})}};function zT(e,t){let n=kw(e),r=kw(t);if(e===t)return{valid:!0,data:e};if(n===Ow.object&&r===Ow.object){let n=Ew.objectKeys(t),r=Ew.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=zT(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===Ow.array&&r===Ow.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=zT(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===Ow.date&&r===Ow.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var BT=class extends Yw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Vw(e)||Vw(r))return Rw;let i=zT(e.value,r.value);return i.valid?((Hw(e)||Hw(r))&&t.dirty(),{status:t.value,value:i.data}):(Iw(n,{code:Aw.invalid_intersection_types}),Rw)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};BT.create=(e,t,n)=>new BT({left:e,right:t,typeName:sE.ZodIntersection,...Jw(n)});var VT=class e extends Yw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ow.array)return Iw(n,{code:Aw.invalid_type,expected:Ow.array,received:n.parsedType}),Rw;if(n.data.length<this._def.items.length)return Iw(n,{code:Aw.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),Rw;!this._def.rest&&n.data.length>this._def.items.length&&(Iw(n,{code:Aw.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new Kw(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Lw.mergeArray(t,e)):Lw.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};VT.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new VT({items:e,typeName:sE.ZodTuple,rest:null,...Jw(t)})};var HT=class e extends Yw{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ow.object)return Iw(n,{code:Aw.invalid_type,expected:Ow.object,received:n.parsedType}),Rw;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new Kw(n,e,n.path,e)),value:a._parse(new Kw(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Lw.mergeObjectAsync(t,r):Lw.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Yw?new e({keyType:t,valueType:n,typeName:sE.ZodRecord,...Jw(r)}):new e({keyType:bT.create(),valueType:t,typeName:sE.ZodRecord,...Jw(n)})}},UT=class extends Yw{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ow.map)return Iw(n,{code:Aw.invalid_type,expected:Ow.map,received:n.parsedType}),Rw;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new Kw(n,e,n.path,[a,`key`])),value:i._parse(new Kw(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return Rw;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return Rw;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};UT.create=(e,t,n)=>new UT({valueType:t,keyType:e,typeName:sE.ZodMap,...Jw(n)});var WT=class e extends Yw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ow.set)return Iw(n,{code:Aw.invalid_type,expected:Ow.set,received:n.parsedType}),Rw;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(Iw(n,{code:Aw.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(Iw(n,{code:Aw.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return Rw;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new Kw(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:Gw.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Gw.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};WT.create=(e,t)=>new WT({valueType:e,minSize:null,maxSize:null,typeName:sE.ZodSet,...Jw(t)});var GT=class e extends Yw{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ow.function)return Iw(t,{code:Aw.invalid_type,expected:Ow.function,received:t.parsedType}),Rw;function n(e,n){return Fw({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Pw(),Mw].filter(e=>!!e),issueData:{code:Aw.invalid_arguments,argumentsError:n}})}function r(e,n){return Fw({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Pw(),Mw].filter(e=>!!e),issueData:{code:Aw.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ZT){let e=this;return Bw(async function(...t){let o=new jw([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return Bw(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new jw([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new jw([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:VT.create(t).rest(AT.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||VT.create([]).rest(AT.create()),returns:n||AT.create(),typeName:sE.ZodFunction,...Jw(r)})}},KT=class extends Yw{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};KT.create=(e,t)=>new KT({getter:e,typeName:sE.ZodLazy,...Jw(t)});var qT=class extends Yw{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Iw(t,{received:t.data,code:Aw.invalid_literal,expected:this._def.value}),Rw}return{status:`valid`,value:e.data}}get value(){return this._def.value}};qT.create=(e,t)=>new qT({value:e,typeName:sE.ZodLiteral,...Jw(t)});function JT(e,t){return new YT({values:e,typeName:sE.ZodEnum,...Jw(t)})}var YT=class e extends Yw{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return Iw(t,{expected:Ew.joinValues(n),received:t.parsedType,code:Aw.invalid_type}),Rw}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return Iw(t,{received:t.data,code:Aw.invalid_enum_value,options:n}),Rw}return Bw(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};YT.create=JT;var XT=class extends Yw{_parse(e){let t=Ew.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ow.string&&n.parsedType!==Ow.number){let e=Ew.objectValues(t);return Iw(n,{expected:Ew.joinValues(e),received:n.parsedType,code:Aw.invalid_type}),Rw}if(this._cache||=new Set(Ew.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=Ew.objectValues(t);return Iw(n,{received:n.data,code:Aw.invalid_enum_value,options:e}),Rw}return Bw(e.data)}get enum(){return this._def.values}};XT.create=(e,t)=>new XT({values:e,typeName:sE.ZodNativeEnum,...Jw(t)});var ZT=class extends Yw{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==Ow.promise&&t.common.async===!1?(Iw(t,{code:Aw.invalid_type,expected:Ow.promise,received:t.parsedType}),Rw):Bw((t.parsedType===Ow.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};ZT.create=(e,t)=>new ZT({type:e,typeName:sE.ZodPromise,...Jw(t)});var QT=class extends Yw{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===sE.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{Iw(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return Rw;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?Rw:r.status===`dirty`||t.value===`dirty`?zw(r.value):r});{if(t.value===`aborted`)return Rw;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?Rw:r.status===`dirty`||t.value===`dirty`?zw(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?Rw:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?Rw:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Uw(e))return Rw;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Uw(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):Rw);Ew.assertNever(r)}};QT.create=(e,t,n)=>new QT({schema:e,typeName:sE.ZodEffects,effect:t,...Jw(n)}),QT.createWithPreprocess=(e,t,n)=>new QT({schema:t,effect:{type:`preprocess`,transform:e},typeName:sE.ZodEffects,...Jw(n)});var $T=class extends Yw{_parse(e){return this._getType(e)===Ow.undefined?Bw(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};$T.create=(e,t)=>new $T({innerType:e,typeName:sE.ZodOptional,...Jw(t)});var eE=class extends Yw{_parse(e){return this._getType(e)===Ow.null?Bw(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};eE.create=(e,t)=>new eE({innerType:e,typeName:sE.ZodNullable,...Jw(t)});var tE=class extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===Ow.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};tE.create=(e,t)=>new tE({innerType:e,typeName:sE.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Jw(t)});var nE=class extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ww(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new jw(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new jw(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};nE.create=(e,t)=>new nE({innerType:e,typeName:sE.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Jw(t)});var rE=class extends Yw{_parse(e){if(this._getType(e)!==Ow.nan){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.nan,received:t.parsedType}),Rw}return{status:`valid`,value:e.data}}};rE.create=e=>new rE({typeName:sE.ZodNaN,...Jw(e)});var iE=class extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},aE=class e extends Yw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Rw:e.status===`dirty`?(t.dirty(),zw(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Rw:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:sE.ZodPipeline})}},oE=class extends Yw{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Uw(e)&&(e.value=Object.freeze(e.value)),e);return Ww(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};oE.create=(e,t)=>new oE({innerType:e,typeName:sE.ZodReadonly,...Jw(t)}),FT.lazycreate;var sE;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(sE||={}),bT.create,ST.create,rE.create,CT.create,wT.create,TT.create,ET.create,DT.create,OT.create,kT.create,AT.create,jT.create,MT.create,NT.create,FT.create,FT.strictCreate,IT.create,RT.create,BT.create,VT.create,HT.create,UT.create,WT.create,GT.create,KT.create,qT.create,YT.create,XT.create,ZT.create,QT.create,$T.create,eE.create,QT.createWithPreprocess,aE.create;var cE=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},lE=10,uE=13,dE=32;function fE(e){}function pE(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=fE,onError:n=fE,onRetry:r=fE,onComment:i,maxBufferSize:a}=e,o=[],s=0,c=!0,l,u=``,d=0,f,p=!1;function m(e){if(p)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(c&&(c=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),o.length===0){let t=g(e);t!==``&&(o.push(t),s=t.length),h();return}if(e.indexOf(`
98
+ `)===-1&&e.indexOf(`\r`)===-1){o.push(e),s+=e.length,h();return}o.push(e);let t=o.join(``);o.length=0,s=0;let n=g(t);n!==``&&(o.push(n),s=n.length),h()}function h(){a!==void 0&&(s+u.length<=a||(p=!0,o.length=0,s=0,l=void 0,u=``,d=0,f=void 0,n(new cE(`Buffered data exceeded max buffer size of ${a} characters`,{type:`max-buffer-size-exceeded`}))))}function g(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(`
99
+ `,n);for(;r!==-1;){if(n===r){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0,n=r+1,r=e.indexOf(`
100
+ `,n);continue}let i=e.charCodeAt(n);if(mE(e,n,i)){let i=e.charCodeAt(n+5)===dE?n+6:n+5,a=e.slice(i,r);if(d===0&&e.charCodeAt(r+1)===lE){t({id:l,event:f,data:a}),l=void 0,u=``,f=void 0,n=r+2,r=e.indexOf(`
101
+ `,n);continue}u=d===0?a:`${u}
102
+ ${a}`,d++}else hE(e,n,i)?f=e.slice(e.charCodeAt(n+6)===dE?n+7:n+6,r)||void 0:_(e,n,r);n=r+1,r=e.indexOf(`
103
+ `,n)}return e.slice(n)}for(;n<e.length;){let t=e.indexOf(`\r`,n),r=e.indexOf(`
104
+ `,n),i=-1;if(t!==-1&&r!==-1?i=t<r?t:r:t===-1?r!==-1&&(i=r):i=t===e.length-1?-1:t,i===-1)break;_(e,n,i),n=i+1,e.charCodeAt(n-1)===uE&&e.charCodeAt(n)===lE&&n++}return e.slice(n)}function _(e,t,n){if(t===n){y();return}let r=e.charCodeAt(t);if(mE(e,t,r)){let r=e.charCodeAt(t+5)===dE?t+6:t+5,i=e.slice(r,n);u=d===0?i:`${u}
105
+ ${i}`,d++;return}if(hE(e,t,r)){f=e.slice(e.charCodeAt(t+6)===dE?t+7:t+6,n)||void 0;return}if(r===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let r=e.slice(e.charCodeAt(t+3)===dE?t+4:t+3,n);l=r.includes(`\0`)?void 0:r;return}if(r===58){i&&i(e.slice(t,n).slice(e.charCodeAt(t+1)===dE?2:1));return}let a=e.slice(t,n),o=a.indexOf(`:`);if(o===-1){v(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===dE?2:1;v(s,a.slice(o+c),a)}function v(e,t,i){switch(e){case`event`:f=t||void 0;break;case`data`:u=d===0?t:`${u}
106
+ ${t}`,d++;break;case`id`:l=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new cE(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new cE(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}));break}}function y(){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0}function b(e={}){if(e.consume&&o.length>0){let e=o.join(``);_(e,0,e.length)}c=!0,l=void 0,u=``,d=0,f=void 0,o.length=0,s=0,p=!1}return{feed:m,reset:b}}function mE(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function hE(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}var gE=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n,maxBufferSize:r}={}){let i;super({start(a){i=pE({onEvent:e=>{a.enqueue(e)},onError(t){typeof e==`function`&&e(t),(e===`terminate`||t.type===`max-buffer-size-exceeded`)&&a.error(t)},onRetry:t,onComment:n,maxBufferSize:r})},transform(e){i.feed(e)}})}},{btoa:_E,atob:vE}=globalThis,yE=({prefix:e,size:t=16,alphabet:n=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,separator:r=`-`}={})=>{let i=()=>{let e=n.length,r=Array(t);for(let i=0;i<t;i++)r[i]=n[Math.random()*e|0];return r.join(``)};if(e==null)return i;if(n.includes(r))throw new Zg({argument:`separator`,message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${i()}`},bE=yE();function xE(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((e,n)=>{t[n.toLowerCase()]=e});else{Array.isArray(e)||(e=Object.entries(e));for(let[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}function SE(e){return globalThis.Buffer?.isBuffer(e)??!1}var CE=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,wE=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function TE(e){let t=JSON.parse(e);return typeof t!=`object`||!t||CE.test(e)===!1&&wE.test(e)===!1?t:EE(t)}function EE(e){let t=[e];for(;t.length;){let e=t;t=[];for(let n of e){if(Object.prototype.hasOwnProperty.call(n,`__proto__`)||Object.prototype.hasOwnProperty.call(n,`constructor`)&&n.constructor!==null&&typeof n.constructor==`object`&&Object.prototype.hasOwnProperty.call(n.constructor,`prototype`))throw SyntaxError(`Object contains forbidden prototype property`);for(let e in n){let r=n[e];r&&typeof r==`object`&&t.push(r)}}}return e}function DE(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return TE(e)}try{return TE(e)}finally{Error.stackTraceLimit=t}}function OE(e){if(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)){e.additionalProperties=!1;let{properties:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=kE(t[e])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(kE):kE(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(kE)),e.allOf!=null&&(e.allOf=e.allOf.map(kE)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(kE));let{definitions:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=kE(t[e]);return e}function kE(e){return typeof e==`boolean`?e:OE(e)}var AE=Symbol(`Let zodToJsonSchema decide on which parser to use`),jE={name:void 0,$refStrategy:`root`,basePath:[`#`],effectStrategy:`input`,pipeStrategy:`all`,dateStrategy:`format:date-time`,mapStrategy:`entries`,removeAdditionalStrategy:`passthrough`,allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:`definitions`,strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:`escape`,applyRegexFlags:!1,emailStrategy:`format:email`,base64Strategy:`contentEncoding:base64`,nameStrategy:`ref`},ME=e=>typeof e==`string`?{...jE,name:e}:{...jE,...e};function NE(){return{}}function PE(e,t){let n={type:`array`};return e.type?._def&&e.type?._def?.typeName!==sE.ZodAny&&(n.items=TD(e.type._def,{...t,currentPath:[...t.currentPath,`items`]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}function FE(e){let t={type:`integer`,format:`int64`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value;break}return t}function IE(){return{type:`boolean`}}function LE(e,t){return TD(e.type._def,t)}var RE=(e,t)=>TD(e.innerType._def,t);function zE(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(n=>zE(e,t,n))};switch(r){case`string`:case`format:date-time`:return{type:`string`,format:`date-time`};case`format:date`:return{type:`string`,format:`date`};case`integer`:return BE(e)}}var BE=e=>{let t={type:`integer`,format:`unix-time`};for(let n of e.checks)switch(n.kind){case`min`:t.minimum=n.value;break;case`max`:t.maximum=n.value;break}return t};function VE(e,t){return{...TD(e.innerType._def,t),default:e.defaultValue()}}function HE(e,t){return t.effectStrategy===`input`?TD(e.schema._def,t):NE()}function UE(e){return{type:`string`,enum:Array.from(e.values)}}var WE=e=>`type`in e&&e.type===`string`?!1:`allOf`in e;function GE(e,t){let n=[TD(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),TD(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=[];return n.forEach(e=>{if(WE(e))r.push(...e.allOf);else{let t=e;if(`additionalProperties`in e&&e.additionalProperties===!1){let{additionalProperties:n,...r}=e;t=r}r.push(t)}}),r.length?{allOf:r}:void 0}function KE(e){let t=typeof e.value;return t!==`bigint`&&t!==`number`&&t!==`boolean`&&t!==`string`?{type:Array.isArray(e.value)?`array`:`object`}:{type:t===`bigint`?`integer`:t,const:e.value}}var qE=void 0,JE={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(qE===void 0&&(qE=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),qE),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function YE(e,t){let n={type:`string`};if(e.checks)for(let r of e.checks)switch(r.kind){case`min`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value;break;case`max`:n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`email`:switch(t.emailStrategy){case`format:email`:$E(n,`email`,r.message,t);break;case`format:idn-email`:$E(n,`idn-email`,r.message,t);break;case`pattern:zod`:eD(n,JE.email,r.message,t);break}break;case`url`:$E(n,`uri`,r.message,t);break;case`uuid`:$E(n,`uuid`,r.message,t);break;case`regex`:eD(n,r.regex,r.message,t);break;case`cuid`:eD(n,JE.cuid,r.message,t);break;case`cuid2`:eD(n,JE.cuid2,r.message,t);break;case`startsWith`:eD(n,RegExp(`^${XE(r.value,t)}`),r.message,t);break;case`endsWith`:eD(n,RegExp(`${XE(r.value,t)}$`),r.message,t);break;case`datetime`:$E(n,`date-time`,r.message,t);break;case`date`:$E(n,`date`,r.message,t);break;case`time`:$E(n,`time`,r.message,t);break;case`duration`:$E(n,`duration`,r.message,t);break;case`length`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`includes`:eD(n,RegExp(XE(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&$E(n,`ipv4`,r.message,t),r.version!==`v4`&&$E(n,`ipv6`,r.message,t);break;case`base64url`:eD(n,JE.base64url,r.message,t);break;case`jwt`:eD(n,JE.jwt,r.message,t);break;case`cidr`:r.version!==`v6`&&eD(n,JE.ipv4Cidr,r.message,t),r.version!==`v4`&&eD(n,JE.ipv6Cidr,r.message,t);break;case`emoji`:eD(n,JE.emoji(),r.message,t);break;case`ulid`:eD(n,JE.ulid,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:$E(n,`binary`,r.message,t);break;case`contentEncoding:base64`:n.contentEncoding=`base64`;break;case`pattern:zod`:eD(n,JE.base64,r.message,t);break}break;case`nanoid`:eD(n,JE.nanoid,r.message,t);case`toLowerCase`:case`toUpperCase`:case`trim`:break;default:}return n}function XE(e,t){return t.patternStrategy===`escape`?QE(e):e}var ZE=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function QE(e){let t=``;for(let n=0;n<e.length;n++)ZE.has(e[n])||(t+=`\\`),t+=e[n];return t}function $E(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||=[],e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function eD(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||=[],e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:tD(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=tD(t,r)}function tD(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes(`i`),m:e.flags.includes(`m`),s:e.flags.includes(`s`)},r=n.i?e.source.toLowerCase():e.source,i=``,a=!1,o=!1,s=!1;for(let e=0;e<r.length;e++){if(a){i+=r[e],a=!1;continue}if(n.i){if(o){if(r[e].match(/[a-z]/)){s?(i+=r[e],i+=`${r[e-2]}-${r[e]}`.toUpperCase(),s=!1):r[e+1]===`-`&&r[e+2]?.match(/[a-z]/)?(i+=r[e],s=!0):i+=`${r[e]}${r[e].toUpperCase()}`;continue}}else if(r[e].match(/[a-z]/)){i+=`[${r[e]}${r[e].toUpperCase()}]`;continue}}if(n.m){if(r[e]===`^`){i+=`(^|(?<=[\r
107
+ ]))`;continue}else if(r[e]===`$`){i+=`($|(?=[\r
108
+ ]))`;continue}}if(n.s&&r[e]===`.`){i+=o?`${r[e]}\r
109
+ `:`[${r[e]}\r
110
+ ]`;continue}i+=r[e],r[e]===`\\`?a=!0:o&&r[e]===`]`?o=!1:!o&&r[e]===`[`&&(o=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join(`/`)} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function nD(e,t){let n={type:`object`,additionalProperties:TD(e.valueType._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]})??t.allowedAdditionalProperties};if(e.keyType?._def.typeName===sE.ZodString&&e.keyType._def.checks?.length){let{type:r,...i}=YE(e.keyType._def,t);return{...n,propertyNames:i}}else if(e.keyType?._def.typeName===sE.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};else if(e.keyType?._def.typeName===sE.ZodBranded&&e.keyType._def.type._def.typeName===sE.ZodString&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=LE(e.keyType._def,t);return{...n,propertyNames:i}}return n}function rD(e,t){return t.mapStrategy===`record`?nD(e,t):{type:`array`,maxItems:125,items:{type:`array`,items:[TD(e.keyType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`0`]})||NE(),TD(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`1`]})||NE()],minItems:2,maxItems:2}}}function iD(e){let t=e.values,n=Object.keys(e.values).filter(e=>typeof t[t[e]]!=`number`).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:r.length===1?r[0]===`string`?`string`:`number`:[`string`,`number`],enum:n}}function aD(){return{not:NE()}}function oD(){return{type:`null`}}var sD={ZodString:`string`,ZodNumber:`number`,ZodBigInt:`integer`,ZodBoolean:`boolean`,ZodNull:`null`};function cD(e,t){let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in sD&&(!e._def.checks||!e._def.checks.length))){let e=n.reduce((e,t)=>{let n=sD[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}else if(n.every(e=>e._def.typeName===`ZodLiteral`&&!e.description)){let e=n.reduce((e,t)=>{let n=typeof t._def.value;switch(n){case`string`:case`number`:case`boolean`:return[...e,n];case`bigint`:return[...e,`integer`];case`object`:if(t._def.value===null)return[...e,`null`];default:return e}},[]);if(e.length===n.length){let t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>e._def.typeName===`ZodEnum`))return{type:`string`,enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return lD(e,t)}var lD=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>TD(e._def,{...t,currentPath:[...t.currentPath,`anyOf`,`${n}`]})).filter(e=>!!e&&(!t.strictUnions||typeof e==`object`&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function uD(e,t){if([`ZodString`,`ZodNumber`,`ZodBigInt`,`ZodBoolean`,`ZodNull`].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[sD[e.innerType._def.typeName],`null`]};let n=TD(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`0`]});return n&&{anyOf:[n,{type:`null`}]}}function dD(e){let t={type:`number`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`int`:t.type=`integer`;break;case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value;break}return t}function fD(e,t){let n={type:`object`,properties:{}},r=[],i=e.shape();for(let e in i){let a=i[e];if(a===void 0||a._def===void 0)continue;let o=mD(a),s=TD(a._def,{...t,currentPath:[...t.currentPath,`properties`,e],propertyPath:[...t.currentPath,`properties`,e]});s!==void 0&&(n.properties[e]=s,o||r.push(e))}r.length&&(n.required=r);let a=pD(e,t);return a!==void 0&&(n.additionalProperties=a),n}function pD(e,t){if(e.catchall._def.typeName!==`ZodNever`)return TD(e.catchall._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]});switch(e.unknownKeys){case`passthrough`:return t.allowedAdditionalProperties;case`strict`:return t.rejectedAdditionalProperties;case`strip`:return t.removeAdditionalStrategy===`strict`?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function mD(e){try{return e.isOptional()}catch{return!0}}var hD=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return TD(e.innerType._def,t);let n=TD(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`1`]});return n?{anyOf:[{not:NE()},n]}:NE()},gD=(e,t)=>{if(t.pipeStrategy===`input`)return TD(e.in._def,t);if(t.pipeStrategy===`output`)return TD(e.out._def,t);let n=TD(e.in._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]});return{allOf:[n,TD(e.out._def,{...t,currentPath:[...t.currentPath,`allOf`,n?`1`:`0`]})].filter(e=>e!==void 0)}};function _D(e,t){return TD(e.type._def,t)}function vD(e,t){let n={type:`array`,uniqueItems:!0,items:TD(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function yD(e,t){return e.rest?{type:`array`,minItems:e.items.length,items:e.items.map((e,n)=>TD(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[]),additionalItems:TD(e.rest._def,{...t,currentPath:[...t.currentPath,`additionalItems`]})}:{type:`array`,minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>TD(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[])}}function bD(){return{not:NE()}}function xD(){return NE()}var SD=(e,t)=>TD(e.innerType._def,t),CD=(e,t,n)=>{switch(t){case sE.ZodString:return YE(e,n);case sE.ZodNumber:return dD(e);case sE.ZodObject:return fD(e,n);case sE.ZodBigInt:return FE(e);case sE.ZodBoolean:return IE();case sE.ZodDate:return zE(e,n);case sE.ZodUndefined:return bD();case sE.ZodNull:return oD();case sE.ZodArray:return PE(e,n);case sE.ZodUnion:case sE.ZodDiscriminatedUnion:return cD(e,n);case sE.ZodIntersection:return GE(e,n);case sE.ZodTuple:return yD(e,n);case sE.ZodRecord:return nD(e,n);case sE.ZodLiteral:return KE(e);case sE.ZodEnum:return UE(e);case sE.ZodNativeEnum:return iD(e);case sE.ZodNullable:return uD(e,n);case sE.ZodOptional:return hD(e,n);case sE.ZodMap:return rD(e,n);case sE.ZodSet:return vD(e,n);case sE.ZodLazy:return()=>e.getter()._def;case sE.ZodPromise:return _D(e,n);case sE.ZodNaN:case sE.ZodNever:return aD();case sE.ZodEffects:return HE(e,n);case sE.ZodAny:return NE();case sE.ZodUnknown:return xD();case sE.ZodDefault:return VE(e,n);case sE.ZodBranded:return LE(e,n);case sE.ZodReadonly:return SD(e,n);case sE.ZodCatch:return RE(e,n);case sE.ZodPipeline:return gD(e,n);case sE.ZodFunction:case sE.ZodVoid:case sE.ZodSymbol:return;default:return(e=>void 0)(t)}},wD=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join(`/`)};function TD(e,t,n=!1){let r=t.seen.get(e);if(t.override){let i=t.override?.call(t,e,t,r,n);if(i!==AE)return i}if(r&&!n){let e=ED(r,t);if(e!==void 0)return e}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=CD(e,e.typeName,t),o=typeof a==`function`?TD(a(),t):a;if(o&&DD(e,t,o),t.postProcess){let n=t.postProcess(o,e,t);return i.jsonSchema=o,n}return i.jsonSchema=o,o}var ED=(e,t)=>{switch(t.$refStrategy){case`root`:return{$ref:e.path.join(`/`)};case`relative`:return{$ref:wD(t.currentPath,e.path)};case`none`:case`seen`:return e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join(`/`)}! Defaulting to any`),NE()):t.$refStrategy===`seen`?NE():void 0}},DD=(e,t,n)=>(e.description&&(n.description=e.description),n),OD=e=>{let t=ME(e),n=t.name===void 0?t.basePath:[...t.basePath,t.definitionPath,t.name];return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}},kD=(e,t)=>{let n=OD(t),r=typeof t==`object`&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:TD(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??NE()}),{}):void 0,i=typeof t==`string`?t:t?.nameStrategy===`title`?void 0:t?.name,a=TD(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??NE(),o=typeof t==`object`&&t.name!==void 0&&t.nameStrategy===`title`?t.name:void 0;o!==void 0&&(a.title=o);let s=i===void 0?r?{...a,[n.definitionPath]:r}:a:{$ref:[...n.$refStrategy===`relative`?[]:n.basePath,n.definitionPath,i].join(`/`),[n.definitionPath]:{...r,[i]:a}};return s.$schema=`http://json-schema.org/draft-07/schema#`,s},AD=Symbol.for(`vercel.ai.schema`);function jD(e){let t;return()=>(t??=e(),t)}function MD(e,{validate:t}={}){return{[AD]:!0,_type:void 0,get jsonSchema(){return typeof e==`function`&&(e=e()),e},validate:t}}function ND(e){return typeof e==`object`&&!!e&&AD in e&&e[AD]===!0&&`jsonSchema`in e&&`validate`in e}function PD(e){return e==null?MD({type:`object`,properties:{},additionalProperties:!1}):ND(e)?e:`~standard`in e?e[`~standard`].vendor===`zod`?zD(e):FD(e):e()}function FD(e){return MD(()=>OE(e[`~standard`].jsonSchema.input({target:`draft-07`})),{validate:async t=>{let n=await e[`~standard`].validate(t);return`value`in n?{success:!0,value:n.value}:{success:!1,error:new l_({value:t,cause:n.issues})}}})}function ID(e,t){let n=t?.useReferences??!1;return MD(()=>kD(e,{$refStrategy:n?`root`:`none`}),{validate:async t=>{let n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function LD(e,t){let n=t?.useReferences??!1;return MD(()=>OE(jS(e,{target:`draft-7`,io:`input`,reused:n?`ref`:`inline`})),{validate:async t=>{let n=await WS(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function RD(e){return`_zod`in e}function zD(e,t){return RD(e)?LD(e,t):ID(e,t)}async function BD({value:e,schema:t,context:n}){let r=await VD({value:e,schema:t,context:n});if(!r.success)throw l_.wrap({value:e,cause:r.error,context:n});return r.value}async function VD({value:e,schema:t,context:n}){let r=PD(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};let t=await r.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:l_.wrap({value:e,cause:t.error,context:n}),rawValue:e}}catch(t){return{success:!1,error:l_.wrap({value:e,cause:t,context:n}),rawValue:e}}}async function HD({text:e,schema:t}){try{let n=DE(e);return t==null?{success:!0,value:n,rawValue:n}:await VD({value:n,schema:t})}catch(t){return{success:!1,error:r_.isInstance(t)?t:new r_({text:e,cause:t}),rawValue:void 0}}}function UD({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new gE).pipeThrough(new TransformStream({async transform({data:e},n){e!==`[DONE]`&&n.enqueue(await HD({text:e,schema:t}))}}))}async function WD(e){return typeof e==`function`&&(e=e()),Promise.resolve(e)}new TextDecoder,new TextDecoder;var GD=Object.defineProperty,KD=(e,t)=>{for(var n in t)GD(e,n,{get:t[n],enumerable:!0})},qD=`AI_NoObjectGeneratedError`,JD=`vercel.ai.error.${qD}`,YD=Symbol.for(JD),XD,ZD=class extends Wg{constructor({message:e=`No object generated.`,cause:t,text:n,response:r,usage:i,finishReason:a}){super({name:qD,message:e,cause:t}),this[XD]=!0,this.text=n,this.response=r,this.usage=i,this.finishReason=a}static isInstance(e){return Wg.hasMarker(e,JD)}};XD=YD;var QD=`AI_UIMessageStreamError`,$D=`vercel.ai.error.${QD}`,eO=Symbol.for($D),tO,nO=class extends Wg{constructor({chunkType:e,chunkId:t,message:n}){super({name:QD,message:n}),this[tO]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return Wg.hasMarker(e,$D)}};tO=eO;var rO=bw(()=>HC([jC(),W(),TC(),kC(),JC(W(),rO.optional()),LC(rO)])),iO=JC(W(),JC(W(),rO.optional())),aO=HC([W(),Tw(Uint8Array),Tw(ArrayBuffer),Sw(SE,{message:`Must be a Buffer`})]),oO=JC(W(),W()),sO=zC({type:QC(`text`),text:W(),providerOptions:iO.optional()}),cO=zC({type:QC(`image`),image:HC([aO,Tw(URL),oO]),mediaType:W().optional(),providerOptions:iO.optional()}),lO=WC(`type`,[zC({type:QC(`data`),data:aO}),zC({type:QC(`url`),url:Tw(URL)}),zC({type:QC(`reference`),reference:oO}),zC({type:QC(`text`),text:W()})]),uO=WC(`type`,[zC({type:QC(`data`),data:aO}),zC({type:QC(`url`),url:Tw(URL)})]),dO=zC({type:QC(`file`),data:HC([lO,aO,Tw(URL),oO]),filename:W().optional(),mediaType:W(),providerOptions:iO.optional()}),fO=zC({type:QC(`reasoning`),text:W(),providerOptions:iO.optional()}),pO=zC({type:QC(`custom`),kind:W().transform(e=>e),providerOptions:iO.optional()}),mO=zC({type:QC(`reasoning-file`),data:HC([uO,aO,Tw(URL)]),mediaType:W(),providerOptions:iO.optional()}),hO=zC({type:QC(`tool-call`),toolCallId:W(),toolName:W(),input:NC(),providerOptions:iO.optional(),providerExecuted:kC().optional()}),gO=WC(`type`,[zC({type:QC(`text`),value:W(),providerOptions:iO.optional()}),zC({type:QC(`json`),value:rO,providerOptions:iO.optional()}),zC({type:QC(`execution-denied`),reason:W().optional(),providerOptions:iO.optional()}),zC({type:QC(`error-text`),value:W(),providerOptions:iO.optional()}),zC({type:QC(`error-json`),value:rO,providerOptions:iO.optional()}),zC({type:QC(`content`),value:LC(HC([zC({type:QC(`text`),text:W(),providerOptions:iO.optional()}),zC({type:QC(`file`),data:lO,mediaType:W(),filename:W().optional(),providerOptions:iO.optional()}),zC({type:QC(`file-data`),data:W(),mediaType:W(),filename:W().optional(),providerOptions:iO.optional()}),zC({type:QC(`file-url`),url:W(),mediaType:W().optional(),providerOptions:iO.optional()}),zC({type:QC(`file-id`),fileId:HC([W(),JC(W(),W())]),providerOptions:iO.optional()}),zC({type:QC(`file-reference`),providerReference:JC(W(),W()),providerOptions:iO.optional()}),zC({type:QC(`image-data`),data:W(),mediaType:W(),providerOptions:iO.optional()}),zC({type:QC(`image-url`),url:W(),providerOptions:iO.optional()}),zC({type:QC(`image-file-id`),fileId:HC([W(),JC(W(),W())]),providerOptions:iO.optional()}),zC({type:QC(`image-file-reference`),providerReference:JC(W(),W()),providerOptions:iO.optional()}),zC({type:QC(`custom`),providerOptions:iO.optional()})]))})]),_O=zC({type:QC(`tool-result`),toolCallId:W(),toolName:W(),output:gO,providerOptions:iO.optional()}),vO=zC({type:QC(`tool-approval-request`),approvalId:W(),toolCallId:W()}),yO=zC({type:QC(`tool-approval-response`),approvalId:W(),approved:kC(),reason:W().optional()});HC([zC({role:QC(`system`),content:W(),providerOptions:iO.optional()}),zC({role:QC(`user`),content:HC([W(),LC(HC([sO,cO,dO]))]),providerOptions:iO.optional()}),zC({role:QC(`assistant`),content:HC([W(),LC(HC([sO,pO,dO,fO,mO,hO,_O,vO]))]),providerOptions:iO.optional()}),zC({role:QC(`tool`),content:LC(HC([_O,yO])),providerOptions:iO.optional()})]);function bO(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let n={...e};for(let r in t)if(!(r===`__proto__`||r===`constructor`||r===`prototype`)&&Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];if(i===void 0)continue;let a=r in e?e[r]:void 0,o=typeof i==`object`&&!!i&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),s=typeof a==`object`&&!!a&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);o&&s?n[r]=bO(a,i):n[r]=i}return n}KD({},{array:()=>TO,choice:()=>EO,json:()=>DO,object:()=>wO,text:()=>CO});function xO(e){let t=[`ROOT`],n=-1,r=null,i=0;function a(e){return e>=`0`&&e<=`9`||e>=`A`&&e<=`F`||e>=`a`&&e<=`f`}function o(e,i,a){switch(e){case`"`:n=i,t.pop(),t.push(a),t.push(`INSIDE_STRING`);break;case`f`:case`t`:case`n`:n=i,r=i,t.pop(),t.push(a),t.push(`INSIDE_LITERAL`);break;case`-`:t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=i,t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`{`:n=i,t.pop(),t.push(a),t.push(`INSIDE_OBJECT_START`);break;case`[`:n=i,t.pop(),t.push(a),t.push(`INSIDE_ARRAY_START`);break}}function s(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_COMMA`);break;case`}`:n=r,t.pop();break}}function c(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=r,t.pop();break}}for(let l=0;l<e.length;l++){let u=e[l];switch(t[t.length-1]){case`ROOT`:o(u,l,`FINISH`);break;case`INSIDE_OBJECT_START`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break;case`}`:n=l,t.pop();break}break;case`INSIDE_OBJECT_AFTER_COMMA`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break}break;case`INSIDE_OBJECT_KEY`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_KEY`);break}break;case`INSIDE_OBJECT_AFTER_KEY`:switch(u){case`:`:t.pop(),t.push(`INSIDE_OBJECT_BEFORE_VALUE`);break}break;case`INSIDE_OBJECT_BEFORE_VALUE`:o(u,l,`INSIDE_OBJECT_AFTER_VALUE`);break;case`INSIDE_OBJECT_AFTER_VALUE`:s(u,l);break;case`INSIDE_STRING`:switch(u){case`"`:t.pop(),n=l;break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`);break;default:n=l}break;case`INSIDE_ARRAY_START`:switch(u){case`]`:n=l,t.pop();break;default:n=l,o(u,l,`INSIDE_ARRAY_AFTER_VALUE`);break}break;case`INSIDE_ARRAY_AFTER_VALUE`:switch(u){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=l,t.pop();break;default:n=l;break}break;case`INSIDE_ARRAY_AFTER_COMMA`:o(u,l,`INSIDE_ARRAY_AFTER_VALUE`);break;case`INSIDE_STRING_ESCAPE`:t.pop(),u===`u`?(i=0,t.push(`INSIDE_STRING_UNICODE_ESCAPE`)):n=l;break;case`INSIDE_STRING_UNICODE_ESCAPE`:a(u)&&(i++,i===4&&(t.pop(),n=l));break;case`INSIDE_NUMBER`:switch(u){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=l;break;case`e`:case`E`:case`-`:case`.`:break;case`,`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&s(u,l);break;case`}`:t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&s(u,l);break;case`]`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l);break;default:t.pop();break}break;case`INSIDE_LITERAL`:{let i=e.substring(r,l+1);!`false`.startsWith(i)&&!`true`.startsWith(i)&&!`null`.startsWith(i)?(t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`?s(u,l):t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l)):n=l;break}}}let l=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case`INSIDE_STRING`:l+=`"`;break;case`INSIDE_OBJECT_KEY`:case`INSIDE_OBJECT_AFTER_KEY`:case`INSIDE_OBJECT_AFTER_COMMA`:case`INSIDE_OBJECT_START`:case`INSIDE_OBJECT_BEFORE_VALUE`:case`INSIDE_OBJECT_AFTER_VALUE`:l+=`}`;break;case`INSIDE_ARRAY_START`:case`INSIDE_ARRAY_AFTER_COMMA`:case`INSIDE_ARRAY_AFTER_VALUE`:l+=`]`;break;case`INSIDE_LITERAL`:{let t=e.substring(r,e.length);`true`.startsWith(t)?l+=`true`.slice(t.length):`false`.startsWith(t)?l+=`false`.slice(t.length):`null`.startsWith(t)&&(l+=`null`.slice(t.length))}}return l}async function SO(e){if(e===void 0)return{value:void 0,state:`undefined-input`};let t=await HD({text:e});return t.success?{value:t.value,state:`successful-parse`}:(t=await HD({text:xO(e)}),t.success?{value:t.value,state:`repaired-parse`}:{value:void 0,state:`failed-parse`})}var CO=()=>({name:`text`,responseFormat:Promise.resolve({type:`text`}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),wO=({schema:e,name:t,description:n})=>{let r=PD(e);return{name:`object`,responseFormat:WD(r.jsonSchema).then(e=>({type:`json`,schema:e,...t!=null&&{name:t},...n!=null&&{description:n}})),async parseCompleteOutput({text:e},t){let n=await HD({text:e});if(!n.success)throw new ZD({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});let i=await VD({value:n.value,schema:r});if(!i.success)throw new ZD({message:`No object generated: response did not match schema.`,cause:i.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return i.value},async parsePartialOutput({text:e}){let t=await SO(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:return{partial:t.value}}},createElementStreamTransform(){}}},TO=({element:e,name:t,description:n})=>{let r=PD(e);return{name:`array`,responseFormat:WD(r.jsonSchema).then(e=>{let{$schema:r,...i}=e;return{type:`json`,schema:{$schema:`http://json-schema.org/draft-07/schema#`,type:`object`,properties:{elements:{type:`array`,items:i}},required:[`elements`],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}}),async parseCompleteOutput({text:e},t){let n=await HD({text:e});if(!n.success)throw new ZD({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});let i=n.value;if(typeof i!=`object`||!i||!(`elements`in i)||!Array.isArray(i.elements))throw new ZD({message:`No object generated: response did not match schema.`,cause:new l_({value:i,cause:`response must be an object with an elements array`}),text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});let a=[];for(let n of i.elements){let i=await VD({value:n,schema:r});if(!i.success)throw new ZD({message:`No object generated: response did not match schema.`,cause:i.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});a.push(i.value)}return a},async parsePartialOutput({text:e}){let t=await SO(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:{let e=t.value;if(typeof e!=`object`||!e||!(`elements`in e)||!Array.isArray(e.elements))return;let n=t.state===`repaired-parse`&&e.elements.length>0?e.elements.slice(0,-1):e.elements,i=[];for(let e of n){let t=await VD({value:e,schema:r});t.success&&i.push(t.value)}return{partial:i}}}},createElementStreamTransform(){let e=0;return new TransformStream({transform({partialOutput:t},n){if(t!=null)for(;e<t.length;e++)n.enqueue(t[e])}})}}},EO=({options:e,name:t,description:n})=>({name:`choice`,responseFormat:Promise.resolve({type:`json`,schema:{$schema:`http://json-schema.org/draft-07/schema#`,type:`object`,properties:{result:{type:`string`,enum:e}},required:[`result`],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}),async parseCompleteOutput({text:t},n){let r=await HD({text:t});if(!r.success)throw new ZD({message:`No object generated: could not parse the response.`,cause:r.error,text:t,response:n.response,usage:n.usage,finishReason:n.finishReason});let i=r.value;if(typeof i!=`object`||!i||!(`result`in i)||typeof i.result!=`string`||!e.includes(i.result))throw new ZD({message:`No object generated: response did not match schema.`,cause:new l_({value:i,cause:`response must be an object that contains a choice value.`}),text:t,response:n.response,usage:n.usage,finishReason:n.finishReason});return i.result},async parsePartialOutput({text:t}){let n=await SO(t);switch(n.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:{let t=n.value;if(typeof t!=`object`||!t||!(`result`in t)||typeof t.result!=`string`)return;let r=e.filter(e=>e.startsWith(t.result));return n.state===`successful-parse`?r.includes(t.result)?{partial:t.result}:void 0:r.length===1?{partial:r[0]}:void 0}}},createElementStreamTransform(){}}),DO=({name:e,description:t}={})=>({name:`json`,responseFormat:Promise.resolve({type:`json`,...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:e},t){let n=await HD({text:e});if(!n.success)throw new ZD({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return n.value},async parsePartialOutput({text:e}){let t=await SO(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:return t.value===void 0?void 0:{partial:t.value}}},createElementStreamTransform(){}});new TextEncoder,yE({prefix:`aitxt`,size:24}),yE({prefix:`call`,size:24}),TransformStream;var OO=JC(W(),rO.optional()),kO=jD(()=>zD(HC([BC({type:QC(`text-start`),id:W(),providerMetadata:iO.optional()}),BC({type:QC(`text-delta`),id:W(),delta:W(),providerMetadata:iO.optional()}),BC({type:QC(`text-end`),id:W(),providerMetadata:iO.optional()}),BC({type:QC(`error`),errorText:W()}),BC({type:QC(`tool-input-start`),toolCallId:W(),toolName:W(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:OO.optional(),dynamic:kC().optional(),title:W().optional()}),BC({type:QC(`tool-input-delta`),toolCallId:W(),inputTextDelta:W()}),BC({type:QC(`tool-input-available`),toolCallId:W(),toolName:W(),input:NC(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:OO.optional(),dynamic:kC().optional(),title:W().optional()}),BC({type:QC(`tool-input-error`),toolCallId:W(),toolName:W(),input:NC(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:OO.optional(),dynamic:kC().optional(),errorText:W(),title:W().optional()}),BC({type:QC(`tool-approval-request`),approvalId:W(),toolCallId:W(),isAutomatic:kC().optional(),signature:W().optional()}),BC({type:QC(`tool-approval-response`),approvalId:W(),approved:kC(),reason:W().optional(),providerExecuted:kC().optional(),providerMetadata:iO.optional()}),BC({type:QC(`tool-output-available`),toolCallId:W(),output:NC(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:OO.optional(),dynamic:kC().optional(),preliminary:kC().optional()}),BC({type:QC(`tool-output-error`),toolCallId:W(),errorText:W(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:OO.optional(),dynamic:kC().optional()}),BC({type:QC(`tool-output-denied`),toolCallId:W()}),BC({type:QC(`reasoning-start`),id:W(),providerMetadata:iO.optional()}),BC({type:QC(`reasoning-delta`),id:W(),delta:W(),providerMetadata:iO.optional()}),BC({type:QC(`reasoning-end`),id:W(),providerMetadata:iO.optional()}),BC({type:QC(`custom`),kind:W().transform(e=>e),providerMetadata:iO.optional()}),BC({type:QC(`source-url`),sourceId:W(),url:W(),title:W().optional(),providerMetadata:iO.optional()}),BC({type:QC(`source-document`),sourceId:W(),mediaType:W(),title:W(),filename:W().optional(),providerMetadata:iO.optional()}),BC({type:QC(`file`),url:W(),mediaType:W(),providerMetadata:iO.optional()}),BC({type:QC(`reasoning-file`),url:W(),mediaType:W(),providerMetadata:iO.optional()}),BC({type:Sw(e=>typeof e==`string`&&e.startsWith(`data-`),{message:`Type must start with "data-"`}),id:W().optional(),data:NC(),transient:kC().optional()}),BC({type:QC(`start-step`)}),BC({type:QC(`finish-step`)}),BC({type:QC(`start`),messageId:W().optional(),messageMetadata:NC().optional()}),BC({type:QC(`finish`),finishReason:XC([`stop`,`length`,`content-filter`,`tool-calls`,`error`,`other`]).optional(),messageMetadata:NC().optional()}),BC({type:QC(`abort`),reason:W().optional()}),BC({type:QC(`message-metadata`),messageMetadata:NC()})])));function AO(e){return e.type.startsWith(`data-`)}function jO(){return Object.create(null)}function MO(e){return e.type.startsWith(`tool-`)}function NO(e){return e.type===`dynamic-tool`}function PO(e){return MO(e)||NO(e)}function FO(e){return e.type.split(`-`).slice(1).join(`-`)}function IO(e){return NO(e)?e.toolName:FO(e)}function LO({lastMessage:e,messageId:t}){return{message:e?.role===`assistant`?e:{id:t,metadata:void 0,role:`assistant`,parts:[]},activeTextParts:jO(),activeReasoningParts:jO(),partialToolCalls:jO()}}function RO({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:i,onToolCall:a,onData:o}){return e.pipeThrough(new TransformStream({async transform(e,s){await r(async({state:r,write:c})=>{function l(e){let t=r.message.parts.filter(PO).find(t=>t.toolCallId===e);if(t==null)throw new nO({chunkType:`tool-invocation`,chunkId:e,message:`No tool invocation found for tool call ID "${e}".`});return t}function u(e){let t=r.message.parts.filter(PO).find(t=>t.approval?.id===e);if(t==null)throw new nO({chunkType:`tool-approval-response`,chunkId:e,message:`No tool invocation found for approval ID "${e}".`});return t}function d(e){let t=r.message.parts.find(t=>MO(t)&&t.toolCallId===e.toolCallId),n=e,i=t;if(t!=null){t.state=e.state,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput,i.preliminary=n.preliminary,e.title!==void 0&&(i.title=e.title),e.toolMetadata!==void 0&&(i.toolMetadata=e.toolMetadata),i.providerExecuted=n.providerExecuted??t.providerExecuted;let r=n.providerMetadata;if(r!=null)if(e.state===`output-available`||e.state===`output-error`){let e=t;e.resultProviderMetadata=r}else t.callProviderMetadata=r}else r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},input:n.input,output:n.output,rawInput:n.rawInput,errorText:n.errorText,providerExecuted:n.providerExecuted,preliminary:n.preliminary,...n.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:n.providerMetadata}:{},...n.providerMetadata!=null&&!(e.state===`output-available`||e.state===`output-error`)?{callProviderMetadata:n.providerMetadata}:{}})}function f(e){let t=r.message.parts.find(t=>t.type===`dynamic-tool`&&t.toolCallId===e.toolCallId),n=e,i=t;if(t!=null){t.state=e.state,i.toolName=e.toolName,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput??i.rawInput,i.preliminary=n.preliminary,e.title!==void 0&&(i.title=e.title),e.toolMetadata!==void 0&&(i.toolMetadata=e.toolMetadata),i.providerExecuted=n.providerExecuted??t.providerExecuted;let r=n.providerMetadata;if(r!=null)if(e.state===`output-available`||e.state===`output-error`){let e=t;e.resultProviderMetadata=r}else t.callProviderMetadata=r}else r.message.parts.push({type:`dynamic-tool`,toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:n.input,output:n.output,errorText:n.errorText,preliminary:n.preliminary,providerExecuted:n.providerExecuted,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},...n.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:n.providerMetadata}:{},...n.providerMetadata!=null&&!(e.state===`output-available`||e.state===`output-error`)?{callProviderMetadata:n.providerMetadata}:{}})}async function p(e){if(e!=null){let n=r.message.metadata==null?e:bO(r.message.metadata,e);t!=null&&await BD({value:n,schema:t,context:{field:`message.metadata`,entityId:r.message.id}}),r.message.metadata=n}}switch(e.type){case`text-start`:{let t={type:`text`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeTextParts[e.id]=t,r.message.parts.push(t),c();break}case`text-delta`:{let t=r.activeTextParts[e.id];if(t==null)throw new nO({chunkType:`text-delta`,chunkId:e.id,message:`Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`text-end`:{let t=r.activeTextParts[e.id];if(t==null)throw new nO({chunkType:`text-end`,chunkId:e.id,message:`Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});t.state=`done`,t.providerMetadata=e.providerMetadata??t.providerMetadata,delete r.activeTextParts[e.id],c();break}case`custom`:{let t={type:`custom`,kind:e.kind,providerMetadata:e.providerMetadata};r.message.parts.push(t),c();break}case`reasoning-start`:{let t={type:`reasoning`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),c();break}case`reasoning-delta`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new nO({chunkType:`reasoning-delta`,chunkId:e.id,message:`Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`reasoning-end`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new nO({chunkType:`reasoning-end`,chunkId:e.id,message:`Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});t.providerMetadata=e.providerMetadata??t.providerMetadata,t.state=`done`,delete r.activeReasoningParts[e.id],c();break}case`file`:case`reasoning-file`:r.message.parts.push({type:e.type,mediaType:e.mediaType,url:e.url,...e.providerMetadata==null?{}:{providerMetadata:e.providerMetadata}}),c();break;case`source-url`:r.message.parts.push({type:`source-url`,sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),c();break;case`source-document`:r.message.parts.push({type:`source-document`,sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),c();break;case`tool-input-start`:{let t=r.message.parts.filter(MO);r.partialToolCalls[e.toolCallId]={text:``,toolName:e.toolName,index:t.length,dynamic:e.dynamic,title:e.title,toolMetadata:e.toolMetadata},e.dynamic?f({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}):d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}),c();break}case`tool-input-delta`:{let t=r.partialToolCalls[e.toolCallId];if(t==null)throw new nO({chunkType:`tool-input-delta`,chunkId:e.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});t.text+=e.inputTextDelta;let{value:n}=await SO(t.text);t.dynamic?f({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n,title:t.title,toolMetadata:t.toolMetadata}):d({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n,title:t.title,toolMetadata:t.toolMetadata}),c();break}case`tool-input-available`:e.dynamic?f({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}):d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}),c(),a&&!e.providerExecuted&&await a({toolCall:e});break;case`tool-input-error`:{let t=r.message.parts.filter(PO).find(t=>t.toolCallId===e.toolCallId);(t==null?e.dynamic:t.type===`dynamic-tool`)?f({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}):d({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}),c();break}case`tool-approval-request`:{let t=l(e.toolCallId);t.state=`approval-requested`,t.approval={id:e.approvalId,...e.isAutomatic===!0?{isAutomatic:!0}:{},...e.signature==null?{}:{signature:e.signature}},c();break}case`tool-approval-response`:{let t=u(e.approvalId),n=t.approval==null?{id:e.approvalId}:t.approval;t.state=`approval-responded`,t.approval={id:e.approvalId,approved:e.approved,...e.reason==null?{}:{reason:e.reason},...n.isAutomatic===!0?{isAutomatic:!0}:{}},e.providerExecuted!=null&&(t.providerExecuted=e.providerExecuted),e.providerMetadata!=null&&(t.callProviderMetadata=e.providerMetadata),c();break}case`tool-output-denied`:{let t=l(e.toolCallId);t.state=`output-denied`,c();break}case`tool-output-available`:{let t=l(e.toolCallId);t.type===`dynamic-tool`?f({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-available`,input:t.input,output:e.output,preliminary:e.preliminary,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}):d({toolCallId:e.toolCallId,toolName:FO(t),state:`output-available`,input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}),c();break}case`tool-output-error`:{let t=l(e.toolCallId);t.type===`dynamic-tool`?f({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-error`,input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}):d({toolCallId:e.toolCallId,toolName:FO(t),state:`output-error`,input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}),c();break}case`start-step`:r.message.parts.push({type:`step-start`});break;case`finish-step`:r.activeTextParts=jO(),r.activeReasoningParts=jO();break;case`start`:e.messageId!=null&&(r.message.id=e.messageId),await p(e.messageMetadata),(e.messageId!=null||e.messageMetadata!=null)&&c();break;case`finish`:e.finishReason!=null&&(r.finishReason=e.finishReason),await p(e.messageMetadata),e.messageMetadata!=null&&c();break;case`message-metadata`:await p(e.messageMetadata),e.messageMetadata!=null&&c();break;case`error`:i?.(Error(e.errorText));break;default:if(AO(e)){if(n?.[e.type]!=null){let t=r.message.parts.findIndex(t=>`id`in t&&`data`in t&&t.id===e.id&&t.type===e.type),i=t>=0?t:r.message.parts.length;await BD({value:e.data,schema:n[e.type],context:{field:`message.parts[${i}].data`,entityName:e.type,entityId:e.id}})}let t=e;if(t.transient){o?.(t);break}let i=t.id==null?void 0:r.message.parts.find(e=>t.type===e.type&&t.id===e.id);i==null?r.message.parts.push(t):i.data=t.data,o?.(t),c()}}s.enqueue(e)})}}))}async function zO({stream:e,onError:t}){let n=e.getReader();try{for(;;){let{done:e}=await n.read();if(e)break}}catch(e){t?.(e)}finally{n.releaseLock()}}yE({prefix:`aitxt`,size:24}),yE({prefix:`call`,size:24}),yE({prefix:`aitxt`,size:24}),yE({prefix:`call`,size:24}),JC(W(),rO.optional()),JC(W(),W()),yE({prefix:`call`,size:24}),yE({prefix:`call`,size:24}),yE({prefix:`aiobj`,size:24});var BO=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(e){n(e)}}),this.processQueue()})}};yE({prefix:`aiobj`,size:24}),yE({prefix:`call`,size:24});async function VO(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw Error(`FileList is not supported in the current environment`);return Promise.all(Array.from(e).map(async e=>{let{name:t,type:n}=e;return{type:`file`,mediaType:n,filename:t,url:await new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result)},r.onerror=e=>n(e),r.readAsDataURL(e)})}}))}var HO=class{constructor({api:e=`/api/chat`,credentials:t,headers:n,body:r,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){let n=await WD(this.body),r=await WD(this.headers),i=await WD(this.credentials),a={...xE(r),...xE(t.headers)},o=await this.prepareSendMessagesRequest?.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...n,...t.body},headers:a,credentials:i,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId}),s=o?.api??this.api,c=o?.headers===void 0?a:xE(o.headers),l=o?.body===void 0?{...n,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId}:o.body,u=o?.credentials??i,d=await(this.fetch??globalThis.fetch)(s,{method:`POST`,headers:{"Content-Type":`application/json`,...c},body:JSON.stringify(l),credentials:u,signal:e});if(!d.ok)throw Error(await d.text()??`Failed to fetch the chat response.`);if(!d.body)throw Error(`The response body is empty.`);return this.processResponseStream(d.body)}async reconnectToStream(e){let t=await WD(this.body),n=await WD(this.headers),r=await WD(this.credentials),i={...xE(n),...xE(e.headers)},a=await this.prepareReconnectToStreamRequest?.call(this,{api:this.api,id:e.chatId,body:{...t,...e.body},headers:i,credentials:r,requestMetadata:e.metadata}),o=a?.api??`${this.api}/${e.chatId}/stream`,s=a?.headers===void 0?i:xE(a.headers),c=a?.credentials??r,l=await(this.fetch??globalThis.fetch)(o,{method:`GET`,headers:s,credentials:c});if(l.status===204)return null;if(!l.ok)throw Error(await l.text()??`Failed to fetch the chat response.`);if(!l.body)throw Error(`The response body is empty.`);return this.processResponseStream(l.body)}},UO=class extends HO{constructor(e={}){super(e)}processResponseStream(e){return UD({stream:e,schema:kO}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},WO=class{constructor({generateId:e=bE,id:t=e(),transport:n=new UO,messageMetadataSchema:r,dataPartSchemas:i,state:a,onError:o,onToolCall:s,onFinish:c,onData:l,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new BO,this.sendMessage=async(e,t)=>{if(e==null){await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...t});return}let n;if(n=`text`in e||`files`in e?{parts:[...Array.isArray(e.files)?e.files:await VO(e.files),...`text`in e&&e.text!=null?[{type:`text`,text:e.text}]:[]]}:e,e.messageId!=null){let t=this.state.messages.findIndex(t=>t.id===e.messageId);if(t===-1)throw Error(`message with id ${e.messageId} not found`);if(this.state.messages[t].role!==`user`)throw Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...n,id:e.messageId,role:n.role??`user`,metadata:e.metadata})}else this.state.pushMessage({...n,id:n.id??this.generateId(),role:n.role??`user`,metadata:e.metadata});await this.makeRequest({trigger:`submit-message`,messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{let n=e==null?this.state.messages.length-1:this.state.messages.findIndex(t=>t.id===e);if(n===-1)throw Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,this.messages[n].role===`assistant`?n:n+1),await this.makeRequest({trigger:`regenerate-message`,messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:`resume-stream`,...e})},this.clearError=()=>{this.status===`error`&&(this.state.error=void 0,this.setStatus({status:`ready`}))},this.addToolApprovalResponse=async({id:e,approved:t,reason:n,options:r})=>this.jobExecutor.run(async()=>{let i=this.state.messages,a=i[i.length-1],o=r=>PO(r)&&r.state===`approval-requested`&&r.approval.id===e?{...r,state:`approval-responded`,approval:{...r.approval,id:e,approved:t,reason:n}}:r;this.state.replaceMessage(i.length-1,{...a,parts:a.parts.map(o)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(o)),this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(e=>{e&&this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...r})})}),this.addToolOutput=async({state:e=`output-available`,toolCallId:t,output:n,errorText:r,options:i})=>this.jobExecutor.run(async()=>{let a=this.state.messages,o=a[a.length-1],s=i=>PO(i)&&i.toolCallId===t?{...i,state:e,output:n,errorText:r}:i;this.state.replaceMessage(a.length-1,{...o,parts:o.parts.map(s)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(s)),this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(e=>{e&&this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...i})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{this.status!==`streaming`&&this.status!==`submitted`||this.activeResponse?.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=a,this.onError=o,this.onToolCall=s,this.onFinish=c,this.onData=l,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;let e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e==`object`&&`then`in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:i}){var a;let o;if(e===`resume-stream`)try{let e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(e==null)return;o=e}catch(e){this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e});return}this.setStatus({status:`submitted`,error:void 0});let s=this.lastMessage,c=!1,l=!1,u=!1;try{let a={state:LO({lastMessage:this.state.snapshot(s),messageId:this.generateId()}),abortController:new AbortController};a.abortController.signal.addEventListener(`abort`,()=>{c=!0}),this.activeResponse=a;let l;l=e===`resume-stream`?o:await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:a.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:i}),await zO({stream:RO({stream:l,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:e=>this.jobExecutor.run(()=>e({state:a.state,write:()=>{this.setStatus({status:`streaming`}),a.state.message.id===this.lastMessage?.id?this.state.replaceMessage(this.state.messages.length-1,a.state.message):this.state.pushMessage(a.state.message)}})),onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:`ready`})}catch(e){if(c||e.name===`AbortError`)return c=!0,this.setStatus({status:`ready`}),null;u=!0,e instanceof TypeError&&(e.message.toLowerCase().includes(`fetch`)||e.message.toLowerCase().includes(`network`))&&(l=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e})}finally{try{(a=this.onFinish)==null||a.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:l,isError:u,finishReason:this.activeResponse?.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}!u&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,metadata:t,headers:n,body:r})}},GO=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,KO=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=GO[n[e]&63];return t},qO=l(o(((e,t)=>{function n(e,t){if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let n,r=0;return function(...i){clearTimeout(n);let a=Date.now(),o=t-(a-r);o<=0?(r=a,e.apply(this,i)):n=setTimeout(()=>{r=Date.now(),e.apply(this,i)},o)}}t.exports=n}))(),1),JO=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},YO=(e,t,n)=>(JO(e,t,`read from private field`),n?n.call(e):t.get(e)),XO=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},ZO=(e,t,n,r)=>(JO(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function QO(e,t){return t==null?e:(0,qO.default)(e,t)}var $O,ek,tk,nk,rk,ik,ak,ok,sk,ck=class{constructor(e=[]){XO(this,$O,void 0),XO(this,ek,`ready`),XO(this,tk,void 0),XO(this,nk,new Set),XO(this,rk,new Set),XO(this,ik,new Set),this.pushMessage=e=>{ZO(this,$O,YO(this,$O).concat(e)),YO(this,ak).call(this)},this.popMessage=()=>{ZO(this,$O,YO(this,$O).slice(0,-1)),YO(this,ak).call(this)},this.replaceMessage=(e,t)=>{ZO(this,$O,[...YO(this,$O).slice(0,e),this.snapshot(t),...YO(this,$O).slice(e+1)]),YO(this,ak).call(this)},this.snapshot=e=>structuredClone(e),this[`~registerMessagesCallback`]=(e,t)=>{let n=t?QO(e,t):e;return YO(this,nk).add(n),()=>{YO(this,nk).delete(n)}},this[`~registerStatusCallback`]=e=>(YO(this,rk).add(e),()=>{YO(this,rk).delete(e)}),this[`~registerErrorCallback`]=e=>(YO(this,ik).add(e),()=>{YO(this,ik).delete(e)}),XO(this,ak,()=>{YO(this,nk).forEach(e=>e())}),XO(this,ok,()=>{YO(this,rk).forEach(e=>e())}),XO(this,sk,()=>{YO(this,ik).forEach(e=>e())}),ZO(this,$O,e)}get status(){return YO(this,ek)}set status(e){ZO(this,ek,e),YO(this,ok).call(this)}get error(){return YO(this,tk)}set error(e){ZO(this,tk,e),YO(this,sk).call(this)}get messages(){return YO(this,$O)}set messages(e){ZO(this,$O,[...e]),YO(this,ak).call(this)}};$O=new WeakMap,ek=new WeakMap,tk=new WeakMap,nk=new WeakMap,rk=new WeakMap,ik=new WeakMap,ak=new WeakMap,ok=new WeakMap,sk=new WeakMap;var lk,uk=class extends WO{constructor({messages:e,...t}){let n=new ck(e);super({...t,state:n}),XO(this,lk,void 0),this[`~registerMessagesCallback`]=(e,t)=>YO(this,lk)[`~registerMessagesCallback`](e,t),this[`~registerStatusCallback`]=e=>YO(this,lk)[`~registerStatusCallback`](e),this[`~registerErrorCallback`]=e=>YO(this,lk)[`~registerErrorCallback`](e),ZO(this,lk,n)}};lk=new WeakMap;function dk({throttle:e,experimental_throttle:t,resume:n=!1,...r}={}){let i=e??t,a=(0,B.useRef)({});`chat`in r||(a.current={onToolCall:r.onToolCall,onData:r.onData,onFinish:r.onFinish,onError:r.onError,sendAutomaticallyWhen:r.sendAutomaticallyWhen,transport:r.transport});let o,s=()=>a.current.transport??(o??=new UO),c={...r,transport:{sendMessages:e=>s().sendMessages(e),reconnectToStream:e=>s().reconnectToStream(e)},onToolCall:e=>{var t;return(t=a.current).onToolCall?.call(t,e)},onData:e=>{var t;return(t=a.current).onData?.call(t,e)},onFinish:e=>{var t;return(t=a.current).onFinish?.call(t,e)},onError:e=>{var t;return(t=a.current).onError?.call(t,e)},sendAutomaticallyWhen:e=>{var t;return(t=a.current).sendAutomaticallyWhen?.call(t,e)??!1}},l=(0,B.useRef)(`chat`in r?r.chat:new uk(c));(`chat`in r&&r.chat!==l.current||`id`in r&&r.id!=null&&l.current.id!==r.id)&&(l.current=`chat`in r?r.chat:new uk(c));let u=(0,B.useSyncExternalStore)((0,B.useCallback)(e=>l.current[`~registerMessagesCallback`](e,i),[i,l.current.id]),()=>l.current.messages,()=>l.current.messages),d=(0,B.useSyncExternalStore)(l.current[`~registerStatusCallback`],()=>l.current.status,()=>l.current.status),f=(0,B.useSyncExternalStore)(l.current[`~registerErrorCallback`],()=>l.current.error,()=>l.current.error),p=(0,B.useCallback)(e=>{typeof e==`function`&&(e=e(l.current.messages)),l.current.messages=e},[l]);return(0,B.useEffect)(()=>{n&&l.current.resumeStream()},[n,l]),{id:l.current.id,messages:u,setMessages:p,sendMessage:l.current.sendMessage,regenerate:l.current.regenerate,clearError:l.current.clearError,stop:l.current.stop,error:f,resumeStream:l.current.resumeStream,status:d,addToolResult:l.current.addToolOutput,addToolOutput:l.current.addToolOutput,addToolApprovalResponse:l.current.addToolApprovalResponse}}var fk=5e3,pk=6e4,mk=class{constructor(e){this._resumeResolver=null,this._resumeNoneResolver=null,this._onStreamPending=null,this._retryResumeProbe=null,this._expectToolContinuation=!1,this._abortToolContinuation=null,this._activeServerTurnId=null,this._cancelAttachedStream=null,this._detachResumeStream=null,this.agent=e.agent,this.prepareBody=e.prepareBody,this.activeRequestIds=e.activeRequestIds,this.cancelOnClientAbort=e.cancelOnClientAbort??!1}setAgent(e){this.agent!==e&&(this.resetResumeState(),this.agent=e)}setCancelOnClientAbort(e){this.cancelOnClientAbort=e}cancelActiveServerTurn(){let e=this._activeServerTurnId,t=!1;e&&(this.sendCancelFrame(e),this._cancelAttachedStream?.(),this.clearActiveServerTurn(e),t=!0);let n=this.abortActiveToolContinuation();return t||n}sendCancelFrame(e){try{this.agent.send(JSON.stringify({id:e,type:`cf_agent_chat_request_cancel`}))}catch{}}setActiveServerTurn(e,t){this._activeServerTurnId=e,this._cancelAttachedStream=t}clearActiveServerTurn(e){this._activeServerTurnId===e&&(this._activeServerTurnId=null,this._cancelAttachedStream=null)}expectToolContinuation(){this._expectToolContinuation=!0}abortActiveToolContinuation(){return this._abortToolContinuation?.()??!1}isAwaitingResume(){return this._resumeResolver!==null||this._resumeNoneResolver!==null}cancelPendingResume(){let e=this._resumeNoneResolver;return e?e({}):!1}resetResumeState(){this._expectToolContinuation=!1,this.cancelPendingResume(),this._detachResumeStream?.()}retryPendingResume(){let e=this._retryResumeProbe;return e?(e(),!0):!1}handleStreamResuming(e){return this._resumeResolver?(this._resumeResolver(e),!0):!1}handleStreamResumeNone(e={}){return this._resumeNoneResolver?this._resumeNoneResolver(e):!1}handleStreamPending(){return this._onStreamPending?(this._onStreamPending(),!0):!1}handleServerTurnCompleted(e){this.clearActiveServerTurn(e)}observeServerTurn(e){this.setActiveServerTurn(e,null)}async sendMessages(e){let t=KO(8),n=new AbortController,r=!1,i=!1,a={};this.prepareBody&&(a=await this.prepareBody({messages:e.messages,trigger:e.trigger,messageId:e.messageId})),e.body&&(a={...a,...e.body});let o=JSON.stringify({messages:e.messages,trigger:e.trigger,...a});this.activeRequestIds?.add(t);let s=this.agent,c=this.activeRequestIds,l=(e,i=!1,a=!0)=>{if(!r){r=!0,a&&this.clearActiveServerTurn(t);try{e()}catch{}i||c?.delete(t),n.abort()}},u=Error(`Aborted`);u.name=`AbortError`,this.setActiveServerTurn(t,()=>r?!1:(l(()=>f.error(u),!0),!0));let d=()=>{r||(this.cancelOnClientAbort?(i&&this.sendCancelFrame(t),l(()=>f.error(u),i)):l(()=>f.error(u),!1,!i))},f,p=new ReadableStream({start(e){f=e,s.addEventListener(`message`,n=>{try{let r=JSON.parse(n.data);if(r.type!==`cf_agent_use_chat_response`||r.id!==t)return;if(r.error){l(()=>e.error(Error(r.body||`Stream error`)));return}if(r.body?.trim())try{let t=JSON.parse(r.body);e.enqueue(t)}catch{}r.done&&l(()=>e.close())}catch{}},{signal:n.signal}),s.addEventListener(`close`,()=>{l(()=>e.close(),!1,!1)},{signal:n.signal})},cancel(){d()}});return e.abortSignal&&(e.abortSignal.addEventListener(`abort`,d,{once:!0}),e.abortSignal.aborted&&d()),r?p:(i=!0,s.send(JSON.stringify({id:t,init:{method:`POST`,body:o},type:`cf_agent_use_chat_request`})),p)}async reconnectToStream(e){if(this.isAwaitingResume())return null;if(this._expectToolContinuation)return this._expectToolContinuation=!1,this._createToolContinuationStream();let t=this.activeRequestIds,n=KO(8);return new Promise(e=>{let r=!1,i,a=null,o=null,s=null,c=null,l=()=>{a&&this._resumeResolver===a&&(this._resumeResolver=null),o&&this._resumeNoneResolver===o&&(this._resumeNoneResolver=null),s&&this._onStreamPending===s&&(this._onStreamPending=null),c&&this._retryResumeProbe===c&&(this._retryResumeProbe=null)},u=t=>{r||(r=!0,l(),i&&clearTimeout(i),e(t))},d=e=>{i&&clearTimeout(i),i=setTimeout(()=>u(null),e)};s=()=>{r||d(pk)},o=e=>e.probeId&&e.probeId!==n?!1:(u(null),!0),a=e=>{let n=e.id;t?.add(n);let r=this._createResumeStream(n);this.agent.send(JSON.stringify({type:`cf_agent_stream_resume_ack`,id:n})),u(r)},c=()=>{if(!r){d(fk);try{this.agent.send(JSON.stringify({type:`cf_agent_stream_resume_request`,probeId:n}))}catch{}}},this._onStreamPending=s,this._resumeNoneResolver=o,this._resumeResolver=a,this._retryResumeProbe=c,c()})}_createToolContinuationStream(){let e=this.agent,t=this.activeRequestIds,n=new AbortController,r=Error(`Aborted`);r.name=`AbortError`;let i=!1,a=null,o=null,s=KO(8),c=null,l=null,u=null,d=null,f=null,p=null,m=()=>{c&&this._resumeResolver===c&&(this._resumeResolver=null),l&&this._resumeNoneResolver===l&&(this._resumeNoneResolver=null),u&&this._onStreamPending===u&&(this._onStreamPending=null),d&&this._retryResumeProbe===d&&(this._retryResumeProbe=null)},h=(e,r=!1)=>{if(!i){i=!0,this._abortToolContinuation===f&&(this._abortToolContinuation=null),this._detachResumeStream===p&&(this._detachResumeStream=null),m();try{e()}catch{}a&&!r&&t?.delete(a),n.abort()}},g=this;return f=()=>{if(i)return!1;if(a===null)return h(()=>o?.error(r)),!0;try{e.send(JSON.stringify({type:`cf_agent_chat_request_cancel`,id:a}))}catch{}return h(()=>o?.error(r),!0),!0},this._abortToolContinuation=f,p=()=>i?!1:(h(()=>o?.close()),!0),this._detachResumeStream=p,new ReadableStream({start(r){o=r;let f,p=e=>{f&&clearTimeout(f),f=setTimeout(()=>h(()=>r.close()),e)},_=e=>e.probeId&&e.probeId!==s?!1:(h(()=>r.close()),!0),v=n=>{a||(a=n.id,t?.add(a),m(),f&&clearTimeout(f),e.send(JSON.stringify({type:`cf_agent_stream_resume_ack`,id:a})))},y=()=>{i||p(pk)},b=()=>{if(!(i||a!==null)){p(fk);try{g.agent.send(JSON.stringify({type:`cf_agent_stream_resume_request`,probeId:s}))}catch{}}};c=v,l=_,u=y,d=b,g._resumeResolver=v,g._resumeNoneResolver=_,g._onStreamPending=y,g._retryResumeProbe=b,e.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data);if(t.type!==`cf_agent_use_chat_response`||a==null||t.id!==a)return;if(t.error){h(()=>r.error(Error(t.body||`Stream error`)));return}if(t.body?.trim())try{let e=JSON.parse(t.body);r.enqueue(e)}catch{}t.done&&h(()=>r.close())}catch{}},{signal:n.signal}),e.addEventListener(`close`,()=>h(()=>r.close()),{signal:n.signal}),b()},cancel(){a&&g.cancelOnClientAbort?(g.sendCancelFrame(a),h(()=>{},!0)):h(()=>{})}})}_createResumeStream(e){let t=this.agent,n=this.activeRequestIds,r=new AbortController,i=Error(`Aborted`);i.name=`AbortError`;let a=!1,o=null,s=(t,i=!1,s=!0)=>{if(!a){a=!0,s&&this.clearActiveServerTurn(e),this._detachResumeStream===o&&(this._detachResumeStream=null);try{t()}catch{}i||n?.delete(e),r.abort()}},c=null;this.setActiveServerTurn(e,()=>a?!1:(s(()=>c?.error(i),!0),!0));let l=this;return o=()=>a?!1:(s(()=>c?.close()),!0),this._detachResumeStream=o,new ReadableStream({start(n){c=n,t.addEventListener(`message`,t=>{try{let r=JSON.parse(t.data);if(r.type!==`cf_agent_use_chat_response`||r.id!==e)return;if(r.error){s(()=>n.error(Error(r.body||`Stream error`)));return}if(r.body?.trim())try{let e=JSON.parse(r.body);n.enqueue(e)}catch{}r.done&&s(()=>n.close())}catch{}},{signal:r.signal}),t.addEventListener(`close`,()=>{s(()=>n.close(),!1,!1)},{signal:r.signal})},cancel(){l.cancelOnClientAbort?(l.sendCancelFrame(e),s(()=>{},!0)):s(()=>{},!1,!1)}})}},hk=new Set;function gk(e,t){hk.has(e)||(hk.add(e),console.warn(`[agents/chat] Deprecated: ${t}`))}function _k(e){if(!e)return;let t=Object.entries(e).filter(([e,t])=>t.execute).map(([e,t])=>(t.inputSchema&&!t.parameters&&console.warn(`[useAgentChat] Tool "${e}" uses deprecated 'inputSchema'. Please migrate to 'parameters'.`),{name:e,description:t.description,parameters:t.parameters??t.inputSchema}));return t.length>0?t:void 0}function vk(e){return e.approval}var yk=new Map;function bk(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.role===`assistant`)return{index:t,message:n}}return null}function xk(e,t){let n=e.findIndex(e=>e.id===t);if(n<0||n===e.length-1)return e;let r=[...e],[i]=r.splice(n,1);return i?(r.push(i),r):e}function Sk(e,t){if(t.length===0)return e;let n=new Set(t.map(e=>e.id)),r=e.filter(e=>!n.has(e.id));return r.length===0?t:[...r,...t]}function Ck(e){let{agent:t,getInitialMessages:n,messages:r,onToolCall:i,onData:a,experimental_automaticToolResolution:o,tools:s,toolsRequiringConfirmation:c,autoContinueAfterToolResult:l=!0,autoSendAfterAllConfirmationsResolved:u=!0,resume:d=!0,cancelOnClientAbort:f=!1,syncMessagesToServer:p=!0,body:m,prepareSendMessagesRequest:h,...g}=e;c&&gk(`useAgentChat.toolsRequiringConfirmation`,`The 'toolsRequiringConfirmation' option is deprecated. Use needsApproval on server-side tools instead. Will be removed in the next major version.`),o&&gk(`useAgentChat.experimental_automaticToolResolution`,`The 'experimental_automaticToolResolution' option is deprecated. Use the onToolCall callback instead. Will be removed in the next major version.`),e.autoSendAfterAllConfirmationsResolved!==void 0&&gk(`useAgentChat.autoSendAfterAllConfirmationsResolved`,`The 'autoSendAfterAllConfirmationsResolved' option is deprecated. Use sendAutomaticallyWhen from AI SDK instead. Will be removed in the next major version.`);let _=(0,B.useMemo)(()=>c||(s?Object.entries(s).filter(([e,t])=>!t.execute).map(([e])=>e):[]),[c,s]),v=(0,B.useRef)(i);v.current=i;let y=(0,B.useRef)(a);y.current=a;let b=t.getHttpUrl(),x=b?new URL(b):null;x&&x.searchParams.delete(`_pk`);let S=x?.toString()??null,C=Array.isArray(t.path)?JSON.stringify(t.path.map(e=>[e.agent,e.name])):JSON.stringify([[t.agent??``,t.name??``]]),w=x?`${x.origin}${x.pathname}|${C}`:null,T=C,E=(0,B.useRef)(null),D=(0,B.useRef)(null),O=(0,B.useRef)(null),k=C,A=Array.isArray(t.path)&&O.current!==null&&O.current!==C;(E.current===null||D.current!==t||A)&&(E.current=w??k),D.current=t,O.current=C;let j=(0,B.useRef)(t);j.current=t;async function M({url:t}){if(!t)return[];let n=new URL(t);n.pathname+=`/get-messages`;let r=await fetch(n.toString(),{credentials:e.credentials,headers:e.headers});if(!r.ok)return console.warn(`Failed to fetch initial messages: ${r.status} ${r.statusText}`),[];let i=await r.text();if(!i.trim())return[];try{return JSON.parse(i)}catch(e){return console.warn(`Failed to parse initial messages JSON:`,e),[]}}let N=n||M;function P(e,t){if(yk.has(t))return yk.get(t);let n=N(e);return yk.set(t,n),n}let ee=n!==null&&(n||S)?P({agent:t.agent,name:t.name,url:S??void 0},T):null,F=ee?(0,B.use)(ee):r??[];(0,B.useEffect)(()=>{if(ee)return yk.set(T,ee),()=>{yk.get(T)===ee&&yk.delete(T)}},[T,ee]);let te=(0,B.useRef)(s);te.current=s;let I=(0,B.useRef)(h);I.current=h;let ne=(0,B.useRef)(m);ne.current=m;let re=(0,B.useRef)(new Set),L=(0,B.useRef)(new Set),ie=(0,B.useRef)(new Set),R=(0,B.useRef)(new Set),ae=(0,B.useRef)(null);ae.current===null&&(ae.current=new mk({agent:j.current,activeRequestIds:re.current,cancelOnClientAbort:f,prepareBody:async({messages:e,trigger:t,messageId:n})=>{let r={},i=ne.current;if(i&&(r={...typeof i==`function`?await i():i}),te.current){let e=_k(te.current);e&&(r.clientTools=e)}if(I.current){let i=await I.current({id:j.current._pk,messages:e,trigger:t,messageId:n});i.body&&Object.assign(r,i.body)}return r}})),ae.current.setAgent(j.current),ae.current.setCancelOnClientAbort(f);let oe=ae.current,se=dk({...g,onData:a,messages:F,transport:oe,id:E.current,resume:!1}),{messages:ce,setMessages:le,addToolResult:ue,addToolApprovalResponse:de,sendMessage:fe,resumeStream:pe,status:me,stop:he}=se,ge=(0,B.useRef)(me);ge.current=me;let _e=(0,B.useRef)(0),ve=(0,B.useRef)(null),ye=(0,B.useRef)(!1),be=(0,B.useRef)(null),xe=(0,B.useCallback)(()=>{_e.current++,ve.current=null},[]),Se=(0,B.useCallback)((...e)=>{let t=ve.current;if(t)return t.promise;let n={generation:_e.current,promise:Promise.resolve()};return ve.current=n,n.promise=pe(...e).finally(()=>{ve.current!==n||_e.current!==n.generation||(ve.current=null,be.current?.())}),n.promise},[pe]),Ce=(0,B.useRef)(Se);Ce.current=Se;let we=(0,B.useRef)(!1),Te=(0,B.useRef)(!1),Ee=(0,B.useRef)(null),De=(0,B.useRef)(null),Oe=(0,B.useRef)(0),[ke,Ae]=(0,B.useState)(!1),je=(0,B.useCallback)(()=>{Oe.current++,Te.current=!1,we.current=!1,Ee.current=null,De.current&&=(clearTimeout(De.current),null),Ae(!1)},[]),Me=(0,B.useCallback)(()=>{if(!Te.current||ge.current!==`ready`||De.current)return;let e=setTimeout(()=>{(async()=>{for(;ve.current;)await ve.current.promise.catch(()=>{});if(De.current===e&&(De.current=null),!Te.current||ge.current!==`ready`)return;Te.current=!1;let t=Oe.current;oe.expectToolContinuation(),await Se().catch(e=>{console.error(`[useAgentChat] Tool continuation resume failed:`,e)}).finally(()=>{Oe.current===t&&(we.current=!1,Ae(!1))})})()},0);De.current=e},[oe,Se]),Ne=(0,B.useCallback)(()=>{!l||we.current||(++Oe.current,we.current=!0,Te.current=!0,Ae(!0),Me())},[l,Me]);(0,B.useEffect)(()=>{if(me===`error`&&Te.current){je();return}Me()},[je,Me,me]);let Pe=(0,B.useCallback)(async()=>{try{oe.cancelActiveServerTurn(),await he()}finally{oe.abortActiveToolContinuation()}},[he,oe]),Fe=(0,B.useRef)(new Set),Ie=(0,B.useRef)(!1),[Le,Re]=(0,B.useState)(0),[ze,Be]=(0,B.useState)(new Map),Ve=(0,B.useRef)(ce);Ve.current=ce;let He=(0,B.useRef)(F);He.current=F;let Ue=(0,B.useRef)(null),We=(0,B.useCallback)(()=>{Ue.current=T},[T]);(0,B.useEffect)(()=>{ee&&Ue.current!==T&&(We(),le(e=>Sk(He.current,e)))},[T,ee,We,le]);let Ge=(0,B.useRef)(new Map),Ke=(0,B.useRef)(null),qe=(0,B.useCallback)(e=>{let t=Ke.current;if(!t)return[...e];let n=e.findIndex(e=>e.id===t.assistantId);if(n>=0&&e.slice(n+1).some(e=>e.role===`assistant`))return Ke.current=null,[...e];let r=Ve.current.find(e=>e.id===t.assistantId)??e.find(e=>e.id===t.assistantId);return r?[...e.filter(e=>e.id!==t.assistantId),r]:[...e]},[]),Je=(0,B.useCallback)(()=>{if(ge.current!==`streaming`)return;let e=bk(Ve.current);e&&(Ke.current?.assistantId!==e.message.id&&(Ke.current={assistantId:e.message.id,anchorMessageId:Ve.current[e.index-1]?.id??null}),le(e=>{let t=Ke.current;return t?xk(e,t.assistantId):e}))},[le]),Ye=(0,B.useCallback)(e=>{let t=Ke.current;!t||e!==void 0&&t.assistantId!==e||(Ke.current=null,le(e=>{let n=e.findIndex(e=>e.id===t.assistantId);if(n<0)return e;let r=[...e],[i]=r.splice(n,1);if(!i)return e;if(t.anchorMessageId===null)r.unshift(i);else{let e=r.findIndex(e=>e.id===t.anchorMessageId);r.splice(e>=0?e+1:n,0,i)}return r}))},[le]),Xe=(0,B.useCallback)(e=>{le(t=>{let n=t[t.length-1];if(!n||n.role!==`assistant`||n.id!==e)return t;ie.current.add(e);let r=[...t];return r[r.length-1]={...n,parts:[]},r})},[le]),Ze=(0,B.useCallback)(e=>{let t=e.parts,n=t.filter((e,n)=>e.type!==`text`||!(`text`in e)||!e.text?!0:!t.some((t,r)=>r<=n||t.type!==`text`||!(`text`in t)||!t.text?!1:t.text.startsWith(e.text)));return n.length===t.length?e:{...e,parts:n}},[]);(0,B.useEffect)(()=>{if(ie.current.size===0)return;let e=new Set(ce.filter(e=>ie.current.has(e.id)&&e.role===`assistant`&&Ze(e)!==e).map(e=>e.id));e.size!==0&&le(t=>{let n=!1,r=t.map(t=>{if(!e.has(t.id))return t;let r=Ze(t);return r!==t&&(n=!0),r});return n?r:t})},[ce,Ze,le]);let Qe=(0,B.useCallback)(()=>{We(),le([]),Be(new Map),it(new Set),je(),Fe.current.clear(),Ge.current.clear(),L.current.clear(),R.current.clear(),ie.current.clear(),Ke.current=null},[We,le,je]),$e=(0,B.useCallback)(async(e,t)=>{let n=fe(e,t);return e!==void 0&&!(typeof e==`object`&&e&&`messageId`in e&&e.messageId!=null)&&Je(),n},[fe,Je]),et=ce[ce.length-1],tt=(()=>{if(!et||et.role!==`assistant`)return{messageId:void 0,toolCallIds:new Set};let e=new Set;for(let t of et.parts??[])PO(t)&&t.state===`input-available`&&_.includes(IO(t))&&e.add(t.toolCallId);return{messageId:et.id,toolCallIds:e}})(),nt=(0,B.useRef)(tt);nt.current=tt;let[rt,it]=(0,B.useState)(()=>new Set),at=(0,B.useCallback)(e=>{it(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]);(0,B.useEffect)(()=>{if(!o||Ie.current)return;let e=ce[ce.length-1];if(!e||e.role!==`assistant`)return;let t=e.parts.filter(e=>PO(e)&&e.state===`input-available`&&!Fe.current.has(e.toolCallId));if(t.length>0){let e=te.current,n=t.filter(t=>PO(t)&&!_.includes(IO(t))&&e?.[IO(t)]?.execute);n.length>0&&(Ie.current=!0,(async()=>{try{let t=[];for(let r of n)if(PO(r)){let n=null,i=IO(r),a=e?.[i];if(a?.execute&&r.input!==void 0)try{n=await a.execute(r.input)}catch(e){n=`Error executing tool: ${e instanceof Error?e.message:String(e)}`}Fe.current.add(r.toolCallId),t.push({toolCallId:r.toolCallId,toolName:i,output:n})}if(t.length>0){let n=_k(e);for(let e of t)j.current.send(JSON.stringify({type:`cf_agent_tool_result`,toolCallId:e.toolCallId,toolName:e.toolName,output:e.output,autoContinue:l,clientTools:n}));await Promise.all(t.map(e=>ue({tool:e.toolName,toolCallId:e.toolCallId,output:e.output}))),Be(e=>{let n=new Map(e);for(let e of t)n.set(e.toolCallId,e.output);return n}),Ne()}}finally{Ie.current=!1,Re(e=>e+1)}})())}},[ce,o,ue,_,l,Ne,Le]);let ot=(0,B.useCallback)((e,t,n,r,i)=>{let a=r===`output-error`?!1:l;j.current.send(JSON.stringify({type:`cf_agent_tool_result`,toolCallId:e,toolName:t,output:n,...r?{state:r}:{},...i===void 0?{}:{errorText:i},autoContinue:a,clientTools:te.current?_k(te.current):void 0})),r!==`output-error`&&Be(t=>new Map(t).set(e,n)),a&&Ne()},[l,Ne]),z=(0,B.useCallback)((e,t)=>{j.current.send(JSON.stringify({type:`cf_agent_tool_approval`,toolCallId:e,approved:t,autoContinue:l})),l&&Ne()},[l,Ne]);(0,B.useEffect)(()=>{let e=v.current;if(!e)return;let t=ce[ce.length-1];if(!t||t.role!==`assistant`)return;let n=t.parts.filter(e=>PO(e)&&e.state===`input-available`&&!Fe.current.has(e.toolCallId));for(let t of n)if(PO(t)){let n=t.toolCallId,r=IO(t);Fe.current.add(n),it(e=>{if(e.has(n))return e;let t=new Set(e);return t.add(n),t});let i=e=>{ot(e.toolCallId,r,e.output,e.state,e.errorText),ue({tool:r,toolCallId:e.toolCallId,output:e.state===`output-error`?e.errorText??`Tool execution denied by user`:e.output})},a;try{a=e({toolCall:{toolCallId:n,toolName:r,input:t.input},addToolOutput:i})}catch(e){throw at(n),e}Promise.resolve(a).finally(()=>{at(n)})}},[ce,ot,ue,at]);let st=(0,B.useRef)({status:`idle`}),[ct,lt]=(0,B.useState)(!1),[ut,dt]=(0,B.useState)(!1);(0,B.useEffect)(()=>{let e=Ge.current;function n(t){if(typeof t.data!=`string`)return;let n;try{n=JSON.parse(t.data)}catch{return}switch(n.type){case`cf_agent_chat_clear`:st.current=Rg(st.current,{type:`clear`}).state,lt(!1),dt(!1),Qe();break;case`cf_agent_chat_recovering`:dt(!!n.recovering);break;case`cf_agent_chat_messages`:{let e=qe(n.messages),t=st.current;if(t.status===`observing`&&t.accumulator.parts.length>0){let n=e.findIndex(e=>e.id===t.accumulator.messageId),r=n>=0?e[n].parts.length:0;t.accumulator.parts.length>=r&&(e=t.accumulator.mergeInto(e))}le(e);break}case`cf_agent_message_updated`:le(e=>{let t=n.message,r=e.findIndex(e=>e.id===t.id);if(r<0){let n=new Set(t.parts.filter(e=>`toolCallId`in e&&e.toolCallId).map(e=>e.toolCallId));n.size>0&&(r=e.findIndex(e=>e.parts.some(e=>`toolCallId`in e&&n.has(e.toolCallId))))}if(r>=0){let n=[...e];return n[r]={...t,id:e[r].id},n}return e});break;case`cf_agent_stream_resume_none`:if(oe.handleStreamResumeNone(n)&&n.reason===zg.IDLE&&typeof n.probeId==`string`){let e=Rg(st.current,{type:`clear`});st.current=e.state,lt(e.isStreaming),Ee.current!==null&&je()}break;case`cf_agent_stream_pending`:oe.handleStreamPending();break;case`cf_agent_stream_resuming`:{let e=we.current&&!oe.isAwaitingResume();if(!d&&!oe.isAwaitingResume()&&!e||(we.current||L.current.add(n.id),oe.handleStreamResuming(n))||re.current.has(n.id)||R.current.has(n.id))return;e&&(Te.current=!1,Ee.current=n.id,De.current&&=(clearTimeout(De.current),null)),st.current=Rg(st.current,{type:`resume-fallback`,streamId:n.id,messageId:KO()}).state,oe.observeServerTurn(n.id),lt(!0),dt(!1),R.current.add(n.id),j.current.send(JSON.stringify({type:`cf_agent_stream_resume_ack`,id:n.id}));break}case`cf_agent_use_chat_response`:{if(re.current.has(n.id)){if(n.body?.trim())try{let t=JSON.parse(n.body);if(t.type===`start`&&typeof t.messageId==`string`){if(e.set(n.id,t.messageId),!n.continuation&&Ke.current?.assistantId!==t.messageId){let e=Ve.current,n=e.findIndex(e=>e.id===t.messageId),r=n>=0?e[n-1]?.id??null:e[e.length-1]?.id??null;Ke.current={assistantId:t.messageId,anchorMessageId:r}}n.replay&&!n.continuation&&!we.current&&Ee.current!==n.id&&(L.current.delete(n.id),Xe(t.messageId))}}catch{}(n.done||n.replayComplete)&&L.current.delete(n.id),n.done&&(st.current.status===`observing`&&st.current.streamId===n.id&&(st.current={status:`idle`},lt(!1)),oe.handleServerTurnCompleted(n.id),Ye(e.get(n.id)),e.delete(n.id),re.current.delete(n.id),R.current.delete(n.id),Ee.current===n.id&&je());return}let t;if(n.replay&&st.current.status!==`observing`&&!L.current.has(n.id))return;if(n.body?.trim())try{t=JSON.parse(n.body),n.replay&&!n.continuation&&!we.current&&Ee.current!==n.id&&typeof t.messageId==`string`&&t.type===`start`&&(L.current.delete(n.id),Xe(t.messageId)),typeof t.type==`string`&&t.type.startsWith(`data-`)&&y.current&&y.current(t)}catch(e){console.warn(`[useAgentChat] Failed to parse stream chunk:`,e instanceof Error?e.message:e,`body:`,n.body?.slice(0,100))}(n.done||n.replayComplete)&&L.current.delete(n.id),n.done&&(oe.handleServerTurnCompleted(n.id),R.current.delete(n.id),dt(!1));let r=n.done&&Ee.current===n.id,i=Rg(st.current,{type:`response`,streamId:n.id,messageId:KO(),chunkData:t,done:n.done,error:n.error,replay:n.replay,replayComplete:n.replayComplete,continuation:n.continuation,currentMessages:n.continuation?Ve.current:void 0});st.current=i.state,i.messagesUpdate&&le(i.messagesUpdate),lt(i.isStreaming),r&&je();break}}}let r=R.current,i=!1,a=!1,o=!1,s=()=>{let e=Rg(st.current,{type:`clear`});st.current=e.state,lt(e.isStreaming),Ee.current!==null&&je()},c=()=>{if(o||!i||!ye.current)return;if(!d){ye.current=!1;return}if(oe.retryPendingResume()){ye.current=!1;return}let e=Ee.current!==null;ge.current!==`ready`&&ge.current!==`error`||we.current&&!e||ve.current!==null||(ye.current=!1,Ce.current().catch(()=>{}))};be.current=c;function l(){i=!1,a=!0,r.clear(),d||s()}function u(){i=!0,a&&(a=!1,ye.current=!0,c())}return t.addEventListener(`message`,n),t.addEventListener(`close`,l),t.addEventListener(`open`,u),()=>{o=!0,be.current===c&&(be.current=null),ye.current=!1,t.removeEventListener(`message`,n),t.removeEventListener(`close`,l),t.removeEventListener(`open`,u),r.clear(),st.current={status:`idle`},lt(!1),dt(!1),Ke.current=null,e.clear(),oe.resetResumeState(),xe()}},[t,le,d,oe,qe,je,Xe,Ye,Qe,xe]),(0,B.useEffect)(()=>{d&&Se().catch(()=>{})},[d,Se]),(0,B.useEffect)(()=>{be.current?.()},[ke,me]);let ft=async e=>{let{toolCallId:t}=e,n=`tool`in e?e.tool:``,r=`output`in e?e.output:void 0;if(j.current.send(JSON.stringify({type:`cf_agent_tool_result`,toolCallId:t,toolName:n,output:r,autoContinue:l,clientTools:te.current?_k(te.current):void 0})),Be(e=>new Map(e).set(t,r)),ue(e),l&&Ne(),!l){if(!u){fe();return}let e=nt.current?.toolCallIds;if(!e){fe();return}let n=e.size===1&&e.has(t);e.has(t)&&e.delete(t),(n||e.size===0)&&fe()}},pt=e=>{let{id:t,approved:n}=e,r;for(let e of Ve.current){for(let n of e.parts)if(`toolCallId`in n&&`approval`in n&&n.approval?.id===t){r=n.toolCallId;break}if(r)break}r?z(r,n):console.warn(`[useAgentChat] addToolApprovalResponse: Could not find toolCallId for approval ID "${t}". Server will not be notified, which may cause duplicate messages.`),de(e)},mt=(0,B.useMemo)(()=>ze.size===0?ce:ce.map(e=>({...e,parts:e.parts.map(e=>!(`toolCallId`in e)||!(`state`in e)||e.state!==`input-available`||!ze.has(e.toolCallId)?e:{...e,state:`output-available`,output:ze.get(e.toolCallId)})})),[ce,ze]);(0,B.useEffect)(()=>{let e=new Set;for(let t of ce)for(let n of t.parts)`toolCallId`in n&&n.toolCallId&&e.add(n.toolCallId);Be(t=>{if(t.size===0)return t;let n=!1;for(let r of t.keys())if(!e.has(r)){n=!0;break}if(!n)return t;let r=new Map;for(let[n,i]of t)e.has(n)&&r.set(n,i);return r});for(let t of Fe.current)e.has(t)||Fe.current.delete(t)},[ce]);let ht=(0,B.useCallback)(e=>{let t=e.toolName??``;ot(e.toolCallId,t,e.output,e.state,e.errorText),ue({tool:t,toolCallId:e.toolCallId,output:e.state===`output-error`?e.errorText??`Tool execution denied by user`:e.output})},[ot,ue]),gt=mt[mt.length-1],_t=(()=>{if(rt.size===0&&!s||!gt||gt.role!==`assistant`)return!1;for(let e of gt.parts){if(!PO(e)||e.state!==`input-available`)continue;let t=IO(e);if(!_.includes(t)&&(rt.has(e.toolCallId)||s?.[t]?.execute))return!0}return!1})(),vt=ct||_t,yt=me===`streaming`||vt;return{...se,resumeStream:Se,messages:mt,isServerStreaming:vt,isStreaming:yt,isRecovering:ut,isToolContinuation:ke,connectionError:t.connectionError??null,sendMessage:$e,stop:Pe,addToolOutput:ht,addToolResult:ft,addToolApprovalResponse:pt,clearHistory:()=>{Qe(),t.send(JSON.stringify({type:`cf_agent_chat_clear`}))},setMessages:e=>{let n;n=typeof e==`function`?e(Ve.current):e,n.length===0&&We(),le(n),p&&t.send(JSON.stringify({messages:n,type:`cf_agent_chat_messages`}))}}}var wk=new Set;function Tk(){return!0}function Ek(e){let t=e.syncMessagesToServer;return!Tk()&&t&&!wk.has(`syncMessagesToServer`)&&(wk.add(`syncMessagesToServer`),console.warn("[@cloudflare/think] `syncMessagesToServer` has no effect: Think ignores client-pushed transcripts. `setMessages` updates the local view only. Use `clearHistory()` for persisted clears.")),Ck({...e,syncMessagesToServer:!1})}var Dk=(function(e){if(e==null)return Mk;if(typeof e==`function`)return jk(e);if(typeof e==`object`)return Array.isArray(e)?Ok(e):kk(e);if(typeof e==`string`)return Ak(e);throw Error(`Expected function, string, or object as test`)});function Ok(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Dk(e[n]);return jk(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function kk(e){let t=e;return jk(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Ak(e){return jk(t);function t(t){return t&&t.type===e}}function jk(e){return t;function t(t,n,r){return!!(Nk(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Mk(){return!0}function Nk(e){return typeof e==`object`&&!!e&&`type`in e}function Pk(e){return e}var Fk=[],Ik=`skip`;function Lk(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Dk(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 (`+Pk(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Fk,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Rk(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 Rk(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Fk:[e]}function zk(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),Lk(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 Bk={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function Vk({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=Bk.indicator,imageBlockPolicy:c=Bk.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=Zk(e,t,n,r,i,a,o,s,c);qk(l),zk(l,u)}}function Hk(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function Uk(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var Wk=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),Gk=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function Kk(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=Hk(e,n);if(!o||Gk.has(o.protocol)||!(Wk.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=Uk(e);return o&&t.some(e=>{let t=Hk(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function qk(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)qk(t)}}var Jk=Symbol(`node-seen`);function Yk(e,t,n){return t===Bk.remove?{type:`remove`}:t===Bk.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function Xk(e,t,n){if(t===Bk.remove)return{type:`remove`};if(t===Bk.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var Zk=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[Jk])return!0;if(u.tagName===`a`){let n=Kk(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[Jk]=!0,zk(u,l),f&&typeof d==`number`){let e=Yk(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[Ik,d];f.children[d]=e.element}return Ik}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=Kk(u.properties.src,n,e,r,!0,i);if(t===null){if(u[Jk]=!0,zk(u,l),f&&typeof d==`number`){let e=Xk(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[Ik,d];f.children[d]=e.element}return Ik}else return u.properties.src=t,!0}return!0};return l},Qk=typeof self==`object`?self:globalThis,$k=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Qk[e](t)},eA=(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)e[r(t)]=r(n);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($k(e,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)}}return n($k(a,o),i)};return r},tA=e=>eA(new Map,e)(0),nA=``,{toString:rA}={},{keys:iA}=Object,aA=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=rA.call(e).slice(8,-1);switch(n){case`Array`:return[1,nA];case`Object`:return[2,nA];case`Date`:return[3,nA];case`RegExp`:return[4,nA];case`Map`:return[5,nA];case`Set`:return[6,nA];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},oA=([e,t])=>e===0&&(t===`function`||t===`symbol`),sA=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=aA(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of iA(r))(e||!oA(aA(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(oA(aA(n))||oA(aA(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!oA(aA(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},cA=(e,{json:t,lossy:n}={})=>{let r=[];return sA(!(t||n),!!t,new Map,r)(e),r},lA=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?tA(cA(e,t)):structuredClone(e):(e,t)=>tA(cA(e,t)),uA=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};uA.prototype.normal={},uA.prototype.property={},uA.prototype.space=void 0;function dA(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new uA(n,r,t)}function fA(e){return e.toLowerCase()}var pA=class{constructor(e,t){this.attribute=t,this.property=e}};pA.prototype.attribute=``,pA.prototype.booleanish=!1,pA.prototype.boolean=!1,pA.prototype.commaOrSpaceSeparated=!1,pA.prototype.commaSeparated=!1,pA.prototype.defined=!1,pA.prototype.mustUseProperty=!1,pA.prototype.number=!1,pA.prototype.overloadedBoolean=!1,pA.prototype.property=``,pA.prototype.spaceSeparated=!1,pA.prototype.space=void 0;var mA=s({boolean:()=>gA,booleanish:()=>_A,commaOrSpaceSeparated:()=>SA,commaSeparated:()=>xA,number:()=>yA,overloadedBoolean:()=>vA,spaceSeparated:()=>bA}),hA=0,gA=CA(),_A=CA(),vA=CA(),yA=CA(),bA=CA(),xA=CA(),SA=CA();function CA(){return 2**++hA}var wA=Object.keys(mA),TA=class extends pA{constructor(e,t,n,r){let i=-1;if(super(e,t),EA(this,`space`,r),typeof n==`number`)for(;++i<wA.length;){let e=wA[i];EA(this,wA[i],(n&mA[e])===mA[e])}}};TA.prototype.defined=!0;function EA(e,t,n){n&&(e[t]=n)}function DA(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new TA(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[fA(r)]=r,n[fA(a.attribute)]=r}return new uA(t,n,e.space)}var OA=DA({properties:{ariaActiveDescendant:null,ariaAtomic:_A,ariaAutoComplete:null,ariaBusy:_A,ariaChecked:_A,ariaColCount:yA,ariaColIndex:yA,ariaColSpan:yA,ariaControls:bA,ariaCurrent:null,ariaDescribedBy:bA,ariaDetails:null,ariaDisabled:_A,ariaDropEffect:bA,ariaErrorMessage:null,ariaExpanded:_A,ariaFlowTo:bA,ariaGrabbed:_A,ariaHasPopup:null,ariaHidden:_A,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bA,ariaLevel:yA,ariaLive:null,ariaModal:_A,ariaMultiLine:_A,ariaMultiSelectable:_A,ariaOrientation:null,ariaOwns:bA,ariaPlaceholder:null,ariaPosInSet:yA,ariaPressed:_A,ariaReadOnly:_A,ariaRelevant:null,ariaRequired:_A,ariaRoleDescription:bA,ariaRowCount:yA,ariaRowIndex:yA,ariaRowSpan:yA,ariaSelected:_A,ariaSetSize:yA,ariaSort:null,ariaValueMax:yA,ariaValueMin:yA,ariaValueNow:yA,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function kA(e,t){return t in e?e[t]:t}function AA(e,t){return kA(e,t.toLowerCase())}var jA=DA({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:xA,acceptCharset:bA,accessKey:bA,action:null,allow:null,allowFullScreen:gA,allowPaymentRequest:gA,allowUserMedia:gA,alpha:gA,alt:null,as:null,async:gA,autoCapitalize:null,autoComplete:bA,autoFocus:gA,autoPlay:gA,blocking:bA,capture:null,charSet:null,checked:gA,cite:null,className:bA,closedBy:null,colorSpace:null,cols:yA,colSpan:yA,command:null,commandFor:null,content:null,contentEditable:_A,controls:gA,controlsList:bA,coords:yA|xA,crossOrigin:null,data:null,dateTime:null,decoding:null,default:gA,defer:gA,dir:null,dirName:null,disabled:gA,download:vA,draggable:_A,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:gA,formTarget:null,headers:bA,height:yA,hidden:vA,high:yA,href:null,hrefLang:null,htmlFor:bA,httpEquiv:bA,id:null,imageSizes:null,imageSrcSet:null,inert:gA,inputMode:null,integrity:null,is:null,isMap:gA,itemId:null,itemProp:bA,itemRef:bA,itemScope:gA,itemType:bA,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:gA,low:yA,manifest:null,max:null,maxLength:yA,media:null,method:null,min:null,minLength:yA,multiple:gA,muted:gA,name:null,nonce:null,noModule:gA,noValidate:gA,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:gA,optimum:yA,pattern:null,ping:bA,placeholder:null,playsInline:gA,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:gA,referrerPolicy:null,rel:bA,required:gA,reversed:gA,rows:yA,rowSpan:yA,sandbox:bA,scope:null,scoped:gA,seamless:gA,selected:gA,shadowRootClonable:gA,shadowRootCustomElementRegistry:gA,shadowRootDelegatesFocus:gA,shadowRootMode:null,shadowRootSerializable:gA,shape:null,size:yA,sizes:null,slot:null,span:yA,spellCheck:_A,src:null,srcDoc:null,srcLang:null,srcSet:null,start:yA,step:null,style:null,tabIndex:yA,target:null,title:null,translate:null,type:null,typeMustMatch:gA,useMap:null,value:_A,width:yA,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bA,axis:null,background:null,bgColor:null,border:yA,borderColor:null,bottomMargin:yA,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:gA,declare:gA,event:null,face:null,frame:null,frameBorder:null,hSpace:yA,leftMargin:yA,link:null,longDesc:null,lowSrc:null,marginHeight:yA,marginWidth:yA,noResize:gA,noHref:gA,noShade:gA,noWrap:gA,object:null,profile:null,prompt:null,rev:null,rightMargin:yA,rules:null,scheme:null,scrolling:_A,standby:null,summary:null,text:null,topMargin:yA,valueType:null,version:null,vAlign:null,vLink:null,vSpace:yA,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:gA,disablePictureInPicture:gA,disableRemotePlayback:gA,exportParts:xA,part:bA,prefix:null,property:null,results:yA,security:null,unselectable:null},space:`html`,transform:AA}),MA=DA({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:SA,accentHeight:yA,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:yA,amplitude:yA,arabicForm:null,ascent:yA,attributeName:null,attributeType:null,azimuth:yA,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:yA,by:null,calcMode:null,capHeight:yA,className:bA,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:yA,diffuseConstant:yA,direction:null,display:null,dur:null,divisor:yA,dominantBaseline:null,download:gA,dx:null,dy:null,edgeMode:null,editable:null,elevation:yA,enableBackground:null,end:null,event:null,exponent:yA,externalResourcesRequired:null,fill:null,fillOpacity:yA,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:xA,g2:xA,glyphName:xA,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:yA,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:yA,horizOriginX:yA,horizOriginY:yA,id:null,ideographic:yA,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:yA,k:yA,k1:yA,k2:yA,k3:yA,k4:yA,kernelMatrix:SA,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:yA,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:yA,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:yA,overlineThickness:yA,paintOrder:null,panose1:null,path:null,pathLength:yA,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bA,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:yA,pointsAtY:yA,pointsAtZ:yA,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:SA,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:SA,rev:SA,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:SA,requiredFeatures:SA,requiredFonts:SA,requiredFormats:SA,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:yA,specularExponent:yA,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:yA,strikethroughThickness:yA,string:null,stroke:null,strokeDashArray:SA,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:yA,strokeOpacity:yA,strokeWidth:null,style:null,surfaceScale:yA,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:SA,tabIndex:yA,tableValues:null,target:null,targetX:yA,targetY:yA,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:SA,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:yA,underlineThickness:yA,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:yA,values:null,vAlphabetic:yA,vMathematical:yA,vectorEffect:null,vHanging:yA,vIdeographic:yA,version:null,vertAdvY:yA,vertOriginX:yA,vertOriginY:yA,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:yA,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:kA}),NA=DA({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()}}),PA=DA({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:AA}),FA=DA({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),IA={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`},LA=/[A-Z]/g,RA=/-[a-z]/g,zA=/^data[-\w.:]+$/i;function BA(e,t){let n=fA(t),r=t,i=pA;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&zA.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(RA,HA);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!RA.test(e)){let n=e.replace(LA,VA);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=TA}return new i(r,t)}function VA(e){return`-`+e.toLowerCase()}function HA(e){return e.charAt(1).toUpperCase()}var UA=dA([OA,jA,NA,PA,FA],`html`),WA=dA([OA,MA,NA,PA,FA],`svg`);function GA(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function KA(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var qA=/[#.]/g;function JA(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){qA.lastIndex=i;let e=qA.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function YA(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function XA(e){return e.join(` `).trim()}function ZA(e,t,n){let r=n?rj(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=JA(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,QA(i))a.unshift(i);else for(let[t,n]of Object.entries(i))$A(e,o.properties,t,n)}for(let e of a)ej(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function QA(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function $A(e,t,n,r){let i=BA(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?YA(r):i.commaSeparated?GA(r):i.commaOrSpaceSeparated?YA(GA(r).join(` `)):tj(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?nj(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(tj(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function ej(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)ej(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?ej(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function tj(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||fA(n)===fA(t)))return!0}return n}function nj(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function rj(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var ij=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),aj=ZA(UA,`div`),oj=ZA(WA,`g`,ij);function sj(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=cj(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=cj(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function cj(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
111
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var lj={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},uj={}.hasOwnProperty,dj=Object.prototype;function fj(e,t){let n=t||{};return pj({file:n.file||void 0,location:!1,schema:n.space===`svg`?WA:UA,verbose:n.verbose||!1},e)}function pj(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},gj(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:mj(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=sj(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},gj(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},gj(e,r,n),n}default:return n=hj(e,t),n}}function mj(e,t){let n=-1,r=[];for(;++n<t.length;){let i=pj(e,t[n]);r.push(i)}return r}function hj(e,t){let n=e.schema;e.schema=t.namespaceURI===lj.svg?WA:UA;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;uj.call(dj,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?oj:aj)(t.tagName,i,mj(e,t.childNodes));if(gj(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&vj(r.startTag),o=r&&r.endTag&&vj(r.endTag),s=pj(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function gj(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=_j(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function _j(e,t,n){let r=vj(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)uj.call(n.attrs,i)&&(r[BA(e.schema,i).property]=vj(n.attrs[i]));n.startTag;let a=vj(n.startTag),o=n.endTag?vj(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function vj(e){let t=yj({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=yj({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function yj(e){return e.line&&e.column?e:void 0}var bj={}.hasOwnProperty;function xj(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&bj.call(t,e)){let n=String(t[e]);i=bj.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}var Sj={},Cj={}.hasOwnProperty,wj=xj(`type`,{handlers:{root:Ej,element:jj,text:kj,comment:Aj,doctype:Oj}});function Tj(e,t){let n=(t||Sj).space;return wj(e,n===`svg`?WA:UA)}function Ej(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=Nj(e.children,n,t),Pj(e,n),n}function Dj(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=Nj(e.children,n,t),Pj(e,n),n}function Oj(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return Pj(e,t),t}function kj(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return Pj(e,t),t}function Aj(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return Pj(e,t),t}function jj(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=WA);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&Cj.call(e.properties,a)){let t=Mj(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:lj[o],childNodes:[],parentNode:null};return s.childNodes=Nj(e.children,s,r),Pj(e,s),e.tagName===`template`&&e.content&&(s.content=Dj(e.content,r)),s}function Mj(e,t,n){let r=BA(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?KA(n):XA(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=lj[r.space]}return i}function Nj(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=wj(e[r],n);a.parentNode=t,i.push(a)}return i}function Pj(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Fj=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Ij=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),G;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(G||={});var Lj={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function Rj(e){return e>=55296&&e<=57343}function zj(e){return e>=56320&&e<=57343}function Bj(e,t){return(e-55296)*1024+9216+t}function Vj(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Hj(e){return e>=64976&&e<=65007||Ij.has(e)}var K;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(K||={});var Uj=65536,Wj=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Uj,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(zj(t))return this.pos++,this._addGap(),Bj(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,G.EOF;return this._err(K.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let n=this.html.charCodeAt(t);return n===G.CARRIAGE_RETURN?G.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let e=this.html.charCodeAt(this.pos);return e===G.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,G.LINE_FEED):e===G.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Rj(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===G.LINE_FEED||e===G.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Vj(e)?this._err(K.controlCharacterInInputStream):Hj(e)&&this._err(K.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},Gj;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(Gj||={});function Kj(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var qj=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),Jj=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function Yj(e){return e>=55296&&e<=57343||e>1114111?65533:Jj.get(e)??e}var Xj;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(Xj||={});var Zj=32,Qj;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Qj||={});function $j(e){return e>=Xj.ZERO&&e<=Xj.NINE}function eM(e){return e>=Xj.UPPER_A&&e<=Xj.UPPER_F||e>=Xj.LOWER_A&&e<=Xj.LOWER_F}function tM(e){return e>=Xj.UPPER_A&&e<=Xj.UPPER_Z||e>=Xj.LOWER_A&&e<=Xj.LOWER_Z||$j(e)}function nM(e){return e===Xj.EQUALS||tM(e)}var rM;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(rM||={});var iM;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(iM||={});var aM=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=rM.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=iM.Strict}startEntity(e){this.decodeMode=e,this.state=rM.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case rM.EntityStart:return e.charCodeAt(t)===Xj.NUM?(this.state=rM.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=rM.NamedEntity,this.stateNamedEntity(e,t));case rM.NumericStart:return this.stateNumericStart(e,t);case rM.NumericDecimal:return this.stateNumericDecimal(e,t);case rM.NumericHex:return this.stateNumericHex(e,t);case rM.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Zj)===Xj.LOWER_X?(this.state=rM.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=rM.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if($j(r)||eM(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if($j(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Xj.SEMI)this.consumed+=1;else if(this.decodeMode===iM.Strict)return 0;return this.emitCodePoint(Yj(this.result),this.consumed),this.errors&&(e!==Xj.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Qj.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=oM(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===iM.Attribute&&(i===0||nM(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Qj.VALUE_LENGTH)>>14,i!==0){if(a===Xj.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==iM.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Qj.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Qj.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case rM.NamedEntity:return this.result!==0&&(this.decodeMode!==iM.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case rM.NumericDecimal:return this.emitNumericEntity(0,2);case rM.NumericHex:return this.emitNumericEntity(0,3);case rM.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case rM.EntityStart:return 0}}};function oM(e,t,n,r){let i=(t&Qj.BRANCH_LENGTH)>>7,a=t&Qj.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var q;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(q||={});var sM;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(sM||={});var cM;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(cM||={});var J;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(J||={});var Y;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(Y||={});var lM=new Map([[J.A,Y.A],[J.ADDRESS,Y.ADDRESS],[J.ANNOTATION_XML,Y.ANNOTATION_XML],[J.APPLET,Y.APPLET],[J.AREA,Y.AREA],[J.ARTICLE,Y.ARTICLE],[J.ASIDE,Y.ASIDE],[J.B,Y.B],[J.BASE,Y.BASE],[J.BASEFONT,Y.BASEFONT],[J.BGSOUND,Y.BGSOUND],[J.BIG,Y.BIG],[J.BLOCKQUOTE,Y.BLOCKQUOTE],[J.BODY,Y.BODY],[J.BR,Y.BR],[J.BUTTON,Y.BUTTON],[J.CAPTION,Y.CAPTION],[J.CENTER,Y.CENTER],[J.CODE,Y.CODE],[J.COL,Y.COL],[J.COLGROUP,Y.COLGROUP],[J.DD,Y.DD],[J.DESC,Y.DESC],[J.DETAILS,Y.DETAILS],[J.DIALOG,Y.DIALOG],[J.DIR,Y.DIR],[J.DIV,Y.DIV],[J.DL,Y.DL],[J.DT,Y.DT],[J.EM,Y.EM],[J.EMBED,Y.EMBED],[J.FIELDSET,Y.FIELDSET],[J.FIGCAPTION,Y.FIGCAPTION],[J.FIGURE,Y.FIGURE],[J.FONT,Y.FONT],[J.FOOTER,Y.FOOTER],[J.FOREIGN_OBJECT,Y.FOREIGN_OBJECT],[J.FORM,Y.FORM],[J.FRAME,Y.FRAME],[J.FRAMESET,Y.FRAMESET],[J.H1,Y.H1],[J.H2,Y.H2],[J.H3,Y.H3],[J.H4,Y.H4],[J.H5,Y.H5],[J.H6,Y.H6],[J.HEAD,Y.HEAD],[J.HEADER,Y.HEADER],[J.HGROUP,Y.HGROUP],[J.HR,Y.HR],[J.HTML,Y.HTML],[J.I,Y.I],[J.IMG,Y.IMG],[J.IMAGE,Y.IMAGE],[J.INPUT,Y.INPUT],[J.IFRAME,Y.IFRAME],[J.KEYGEN,Y.KEYGEN],[J.LABEL,Y.LABEL],[J.LI,Y.LI],[J.LINK,Y.LINK],[J.LISTING,Y.LISTING],[J.MAIN,Y.MAIN],[J.MALIGNMARK,Y.MALIGNMARK],[J.MARQUEE,Y.MARQUEE],[J.MATH,Y.MATH],[J.MENU,Y.MENU],[J.META,Y.META],[J.MGLYPH,Y.MGLYPH],[J.MI,Y.MI],[J.MO,Y.MO],[J.MN,Y.MN],[J.MS,Y.MS],[J.MTEXT,Y.MTEXT],[J.NAV,Y.NAV],[J.NOBR,Y.NOBR],[J.NOFRAMES,Y.NOFRAMES],[J.NOEMBED,Y.NOEMBED],[J.NOSCRIPT,Y.NOSCRIPT],[J.OBJECT,Y.OBJECT],[J.OL,Y.OL],[J.OPTGROUP,Y.OPTGROUP],[J.OPTION,Y.OPTION],[J.P,Y.P],[J.PARAM,Y.PARAM],[J.PLAINTEXT,Y.PLAINTEXT],[J.PRE,Y.PRE],[J.RB,Y.RB],[J.RP,Y.RP],[J.RT,Y.RT],[J.RTC,Y.RTC],[J.RUBY,Y.RUBY],[J.S,Y.S],[J.SCRIPT,Y.SCRIPT],[J.SEARCH,Y.SEARCH],[J.SECTION,Y.SECTION],[J.SELECT,Y.SELECT],[J.SOURCE,Y.SOURCE],[J.SMALL,Y.SMALL],[J.SPAN,Y.SPAN],[J.STRIKE,Y.STRIKE],[J.STRONG,Y.STRONG],[J.STYLE,Y.STYLE],[J.SUB,Y.SUB],[J.SUMMARY,Y.SUMMARY],[J.SUP,Y.SUP],[J.TABLE,Y.TABLE],[J.TBODY,Y.TBODY],[J.TEMPLATE,Y.TEMPLATE],[J.TEXTAREA,Y.TEXTAREA],[J.TFOOT,Y.TFOOT],[J.TD,Y.TD],[J.TH,Y.TH],[J.THEAD,Y.THEAD],[J.TITLE,Y.TITLE],[J.TR,Y.TR],[J.TRACK,Y.TRACK],[J.TT,Y.TT],[J.U,Y.U],[J.UL,Y.UL],[J.SVG,Y.SVG],[J.VAR,Y.VAR],[J.WBR,Y.WBR],[J.XMP,Y.XMP]]);function uM(e){return lM.get(e)??Y.UNKNOWN}var X=Y,dM={[q.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[q.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[q.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[q.XLINK]:new Set,[q.XML]:new Set,[q.XMLNS]:new Set},fM=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);J.STYLE,J.SCRIPT,J.XMP,J.IFRAME,J.NOEMBED,J.NOFRAMES,J.PLAINTEXT;var Z;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Z||={});var pM={DATA:Z.DATA,RCDATA:Z.RCDATA,RAWTEXT:Z.RAWTEXT,SCRIPT_DATA:Z.SCRIPT_DATA,PLAINTEXT:Z.PLAINTEXT,CDATA_SECTION:Z.CDATA_SECTION};function mM(e){return e>=G.DIGIT_0&&e<=G.DIGIT_9}function hM(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_Z}function gM(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_Z}function _M(e){return gM(e)||hM(e)}function vM(e){return _M(e)||mM(e)}function yM(e){return e+32}function bM(e){return e===G.SPACE||e===G.LINE_FEED||e===G.TABULATION||e===G.FORM_FEED}function xM(e){return bM(e)||e===G.SOLIDUS||e===G.GREATER_THAN_SIGN}function SM(e){return e===G.NULL?K.nullCharacterReference:e>1114111?K.characterReferenceOutsideUnicodeRange:Rj(e)?K.surrogateCharacterReference:Hj(e)?K.noncharacterCharacterReference:Vj(e)||e===G.CARRIAGE_RETURN?K.controlCharacterReference:null}var CM=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Z.DATA,this.returnState=Z.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new Wj(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new aM(qj,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(K.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(K.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=SM(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Gj.START_TAG,tagName:``,tagID:Y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Gj.END_TAG,tagName:``,tagID:Y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:Gj.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:Gj.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(Kj(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(K.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=uM(e.tagName),e.type===Gj.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(K.endTagWithAttributes),e.selfClosing&&this._err(K.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Gj.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Gj.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Gj.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Gj.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=bM(e)?Gj.WHITESPACE_CHARACTER:e===G.NULL?Gj.NULL_CHARACTER:Gj.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Gj.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Z.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?iM.Attribute:iM.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Z.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Z.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Z.DATA:this._stateData(e);break;case Z.RCDATA:this._stateRcdata(e);break;case Z.RAWTEXT:this._stateRawtext(e);break;case Z.SCRIPT_DATA:this._stateScriptData(e);break;case Z.PLAINTEXT:this._statePlaintext(e);break;case Z.TAG_OPEN:this._stateTagOpen(e);break;case Z.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Z.TAG_NAME:this._stateTagName(e);break;case Z.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Z.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Z.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Z.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Z.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Z.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Z.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Z.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Z.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Z.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Z.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Z.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Z.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Z.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Z.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Z.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Z.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Z.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Z.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Z.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Z.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Z.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Z.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Z.BOGUS_COMMENT:this._stateBogusComment(e);break;case Z.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Z.COMMENT_START:this._stateCommentStart(e);break;case Z.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Z.COMMENT:this._stateComment(e);break;case Z.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Z.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Z.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Z.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Z.COMMENT_END:this._stateCommentEnd(e);break;case Z.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Z.DOCTYPE:this._stateDoctype(e);break;case Z.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Z.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Z.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Z.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Z.CDATA_SECTION:this._stateCdataSection(e);break;case Z.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Z.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Z.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Z.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Z.TAG_OPEN;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitCodePoint(e);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case G.AMPERSAND:this._startCharacterReference();break;case G.LESS_THAN_SIGN:this.state=Z.RCDATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case G.LESS_THAN_SIGN:this.state=Z.RAWTEXT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(_M(e))this._createStartTagToken(),this.state=Z.TAG_NAME,this._stateTagName(e);else switch(e){case G.EXCLAMATION_MARK:this.state=Z.MARKUP_DECLARATION_OPEN;break;case G.SOLIDUS:this.state=Z.END_TAG_OPEN;break;case G.QUESTION_MARK:this._err(K.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(e);break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Z.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(_M(e))this._createEndTagToken(),this.state=Z.TAG_NAME,this._stateTagName(e);else switch(e){case G.GREATER_THAN_SIGN:this._err(K.missingEndTagName),this.state=Z.DATA;break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this.state=Z.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.tagName+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(hM(e)?yM(e):e)}}_stateRcdataLessThanSign(e){e===G.SOLIDUS?this.state=Z.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Z.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){_M(e)?(this.state=Z.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Z.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Z.BEFORE_ATTRIBUTE_NAME,!1;case G.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Z.SELF_CLOSING_START_TAG,!1;case G.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Z.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===G.SOLIDUS?this.state=Z.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Z.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){_M(e)?(this.state=Z.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Z.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case G.SOLIDUS:this.state=Z.SCRIPT_DATA_END_TAG_OPEN;break;case G.EXCLAMATION_MARK:this.state=Z.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Z.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){_M(e)?(this.state=Z.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===G.HYPHEN_MINUS?(this.state=Z.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===G.HYPHEN_MINUS?(this.state=Z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.GREATER_THAN_SIGN:this.state=Z.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===G.SOLIDUS?this.state=Z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:_M(e)?(this._emitChars(`<`),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){_M(e)?(this.state=Z.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Lj.SCRIPT,!1)&&xM(this.preprocessor.peek(Lj.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Lj.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.GREATER_THAN_SIGN:this.state=Z.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===G.SOLIDUS?(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Lj.SCRIPT,!1)&&xM(this.preprocessor.peek(Lj.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Lj.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Z.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this.state=Z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._err(K.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Z.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Z.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this._leaveAttrName(),this.state=Z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._leaveAttrName(),this.state=Z.BEFORE_ATTRIBUTE_VALUE;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:this._err(K.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(hM(e)?yM(e):e)}}_stateAfterAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:this.state=Z.SELF_CLOSING_START_TAG;break;case G.EQUALS_SIGN:this.state=Z.BEFORE_ATTRIBUTE_VALUE;break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Z.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:this.state=Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case G.APOSTROPHE:this.state=Z.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingAttributeValue),this.state=Z.DATA,this.emitCurrentTagToken();break;default:this.state=Z.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case G.QUOTATION_MARK:this.state=Z.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case G.APOSTROPHE:this.state=Z.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Z.BEFORE_ATTRIBUTE_NAME;break;case G.AMPERSAND:this._startCharacterReference();break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Z.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:case G.EQUALS_SIGN:case G.GRAVE_ACCENT:this._err(K.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Z.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this._leaveAttrValue(),this.state=Z.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Z.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.missingWhitespaceBetweenAttributes),this.state=Z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case G.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Z.DATA,this.emitCurrentTagToken();break}case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.unexpectedSolidusInTag),this.state=Z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentComment(t);break;case G.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Lj.DASH_DASH,!0)?(this._createCommentToken(Lj.DASH_DASH.length+1),this.state=Z.COMMENT_START):this._consumeSequenceIfMatch(Lj.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Lj.DOCTYPE.length+1),this.state=Z.DOCTYPE):this._consumeSequenceIfMatch(Lj.CDATA_START,!0)?this.inForeignNode?this.state=Z.CDATA_SECTION:(this._err(K.cdataInHtmlContent),this._createCommentToken(Lj.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Z.BOGUS_COMMENT):this._ensureHibernation()||(this._err(K.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.COMMENT_START_DASH;break;case G.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=Z.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Z.COMMENT_END;break;case G.GREATER_THAN_SIGN:this._err(K.abruptClosingOfEmptyComment),this.state=Z.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Z.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Z.COMMENT_END_DASH;break;case G.LESS_THAN_SIGN:t.data+=`<`,this.state=Z.COMMENT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case G.EXCLAMATION_MARK:t.data+=`!`,this.state=Z.COMMENT_LESS_THAN_SIGN_BANG;break;case G.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===G.HYPHEN_MINUS?this.state=Z.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Z.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===G.HYPHEN_MINUS?this.state=Z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Z.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==G.GREATER_THAN_SIGN&&e!==G.EOF&&this._err(K.nestedComment),this.state=Z.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Z.COMMENT_END;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentComment(t);break;case G.EXCLAMATION_MARK:this.state=Z.COMMENT_END_BANG;break;case G.HYPHEN_MINUS:t.data+=`-`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:t.data+=`--!`,this.state=Z.COMMENT_END_DASH;break;case G.GREATER_THAN_SIGN:this._err(K.incorrectlyClosedComment),this.state=Z.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Z.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BEFORE_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBeforeDoctypeName),this.state=Z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(hM(e))this._createDoctypeToken(String.fromCharCode(yM(e))),this.state=Z.DOCTYPE_NAME;else switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.NULL:this._err(K.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Z.DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:{this._err(K.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Z.DATA;break}case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Z.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.AFTER_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.NULL:this._err(K.unexpectedNullCharacter),t.name+=`�`;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(hM(e)?yM(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Lj.PUBLIC,!1)?this.state=Z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Lj.SYSTEM,!1)?this.state=Z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(K.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case G.APOSTROPHE:this.state=Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.QUOTATION_MARK:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case G.APOSTROPHE:this.state=Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.NULL:this._err(K.unexpectedNullCharacter);break;case G.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case G.RIGHT_SQUARE_BRACKET:this.state=Z.CDATA_SECTION_BRACKET;break;case G.EOF:this._err(K.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===G.RIGHT_SQUARE_BRACKET?this.state=Z.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Z.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case G.GREATER_THAN_SIGN:this.state=Z.DATA;break;case G.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Z.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(G.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&vM(this.preprocessor.peek(1))?Z.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){vM(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===G.SEMICOLON&&this._err(K.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},wM=new Set([Y.DD,Y.DT,Y.LI,Y.OPTGROUP,Y.OPTION,Y.P,Y.RB,Y.RP,Y.RT,Y.RTC]),TM=new Set([...wM,Y.CAPTION,Y.COLGROUP,Y.TBODY,Y.TD,Y.TFOOT,Y.TH,Y.THEAD,Y.TR]),EM=new Set([Y.APPLET,Y.CAPTION,Y.HTML,Y.MARQUEE,Y.OBJECT,Y.TABLE,Y.TD,Y.TEMPLATE,Y.TH]),DM=new Set([...EM,Y.OL,Y.UL]),OM=new Set([...EM,Y.BUTTON]),kM=new Set([Y.ANNOTATION_XML,Y.MI,Y.MN,Y.MO,Y.MS,Y.MTEXT]),AM=new Set([Y.DESC,Y.FOREIGN_OBJECT,Y.TITLE]),jM=new Set([Y.TR,Y.TEMPLATE,Y.HTML]),MM=new Set([Y.TBODY,Y.TFOOT,Y.THEAD,Y.TEMPLATE,Y.HTML]),NM=new Set([Y.TABLE,Y.TEMPLATE,Y.HTML]),PM=new Set([Y.TD,Y.TH]),FM=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=Y.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===Y.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===q.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==q.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(fM,q.HTML)}popUntilTableCellPopped(){this.popUntilPopped(PM,q.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(NM,q.HTML)}clearBackToTableBodyContext(){this.clearBackTo(MM,q.HTML)}clearBackToTableRowContext(){this.clearBackTo(jM,q.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===Y.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===Y.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case q.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case q.SVG:if(AM.has(r))return!1;break;case q.MATHML:if(kM.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,EM)}hasInListItemScope(e){return this.hasInDynamicScope(e,DM)}hasInButtonScope(e){return this.hasInDynamicScope(e,OM)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case q.HTML:if(fM.has(t))return!0;if(EM.has(t))return!1;break;case q.SVG:if(AM.has(t))return!1;break;case q.MATHML:if(kM.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===q.HTML)switch(this.tagIDs[t]){case e:return!0;case Y.TABLE:case Y.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===q.HTML)switch(this.tagIDs[e]){case Y.TBODY:case Y.THEAD:case Y.TFOOT:return!0;case Y.TABLE:case Y.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===q.HTML)switch(this.tagIDs[t]){case e:return!0;case Y.OPTION:case Y.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&wM.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&TM.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&TM.has(this.currentTagId);)this.pop()}},IM=3,LM;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(LM||={});var RM={type:LM.Marker},zM=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===LM.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<IM)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<IM)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=IM&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(RM)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:LM.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:LM.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(RM);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===LM.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===LM.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===LM.Element&&t.element===e)}},BM={createDocument(){return{nodeName:`#document`,mode:cM.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};BM.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(BM.isTextNode(n)){n.value+=t;return}}BM.appendChild(e,BM.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&BM.isTextNode(r)?r.value+=t:BM.insertBefore(e,BM.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},VM=`html`,HM=`about:legacy-compat`,UM=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,WM=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),GM=[...WM,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],KM=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),qM=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],JM=[...qM,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function YM(e,t){return t.some(t=>e.startsWith(t))}function XM(e){return e.name===VM&&e.publicId===null&&(e.systemId===null||e.systemId===HM)}function ZM(e){if(e.name!==VM)return cM.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===UM)return cM.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),KM.has(n))return cM.QUIRKS;let e=t===null?GM:WM;if(YM(n,e))return cM.QUIRKS;if(e=t===null?qM:JM,YM(n,e))return cM.LIMITED_QUIRKS}return cM.NO_QUIRKS}var QM={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},$M=`definitionurl`,eN=`definitionURL`,tN=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),nN=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:q.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:q.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:q.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:q.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:q.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:q.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:q.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:q.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:q.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:q.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:q.XMLNS}]]),rN=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),iN=new Set([Y.B,Y.BIG,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.CENTER,Y.CODE,Y.DD,Y.DIV,Y.DL,Y.DT,Y.EM,Y.EMBED,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HR,Y.I,Y.IMG,Y.LI,Y.LISTING,Y.MENU,Y.META,Y.NOBR,Y.OL,Y.P,Y.PRE,Y.RUBY,Y.S,Y.SMALL,Y.SPAN,Y.STRONG,Y.STRIKE,Y.SUB,Y.SUP,Y.TABLE,Y.TT,Y.U,Y.UL,Y.VAR]);function aN(e){let t=e.tagID;return t===Y.FONT&&e.attrs.some(({name:e})=>e===sM.COLOR||e===sM.SIZE||e===sM.FACE)||iN.has(t)}function oN(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===$M){e.attrs[t].name=eN;break}}function sN(e){for(let t=0;t<e.attrs.length;t++){let n=tN.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function cN(e){for(let t=0;t<e.attrs.length;t++){let n=nN.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function lN(e){let t=rN.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=uM(e.tagName))}function uN(e,t){return t===q.MATHML&&(e===Y.MI||e===Y.MO||e===Y.MN||e===Y.MS||e===Y.MTEXT)}function dN(e,t,n){if(t===q.MATHML&&e===Y.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===sM.ENCODING){let t=n[e].value.toLowerCase();return t===QM.TEXT_HTML||t===QM.APPLICATION_XML}}return t===q.SVG&&(e===Y.FOREIGN_OBJECT||e===Y.DESC||e===Y.TITLE)}function fN(e,t,n,r){return(!r||r===q.HTML)&&dN(e,t,n)||(!r||r===q.MATHML)&&uN(e,t)}var pN=`hidden`,mN=8,hN=3,Q;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(Q||={});var gN={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},_N=new Set([Y.TABLE,Y.TBODY,Y.TFOOT,Y.THEAD,Y.TR]),vN={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:BM,onParseError:null},yN=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Q.INITIAL,this.originalInsertionMode=Q.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...vN,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new CM(this.options,this),this.activeFormattingElements=new zM(this.treeAdapter),this.fragmentContextID=n?uM(this.treeAdapter.getTagName(n)):Y.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new FM(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...vN,...t};e??=n.treeAdapter.createElement(J.TEMPLATE,q.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,q.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===Y.TEMPLATE&&i.tmplInsertionModeStack.unshift(Q.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??gN,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===q.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,q.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Q.TEXT}switchToPlaintextParsing(){this.insertionMode=Q.TEXT,this.originalInsertionMode=Q.IN_BODY,this.tokenizer.state=pM.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===J.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==q.HTML))switch(this.fragmentContextID){case Y.TITLE:case Y.TEXTAREA:this.tokenizer.state=pM.RCDATA;break;case Y.STYLE:case Y.XMP:case Y.IFRAME:case Y.NOEMBED:case Y.NOFRAMES:case Y.NOSCRIPT:this.tokenizer.state=pM.RAWTEXT;break;case Y.SCRIPT:this.tokenizer.state=pM.SCRIPT_DATA;break;case Y.PLAINTEXT:this.tokenizer.state=pM.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,q.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,q.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(J.HTML,q.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Y.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===Gj.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===Y.SVG&&this.treeAdapter.getTagName(t)===J.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===q.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===Y.MGLYPH||e.tagID===Y.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,q.HTML)}_processToken(e){switch(e.type){case Gj.CHARACTER:this.onCharacter(e);break;case Gj.NULL_CHARACTER:this.onNullCharacter(e);break;case Gj.COMMENT:this.onComment(e);break;case Gj.DOCTYPE:this.onDoctype(e);break;case Gj.START_TAG:this._processStartTag(e);break;case Gj.END_TAG:this.onEndTag(e);break;case Gj.EOF:this.onEof(e);break;case Gj.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return fN(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===LM.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Q.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Y.P),this.openElements.popUntilTagNamePopped(Y.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Y.TR:this.insertionMode=Q.IN_ROW;return;case Y.TBODY:case Y.THEAD:case Y.TFOOT:this.insertionMode=Q.IN_TABLE_BODY;return;case Y.CAPTION:this.insertionMode=Q.IN_CAPTION;return;case Y.COLGROUP:this.insertionMode=Q.IN_COLUMN_GROUP;return;case Y.TABLE:this.insertionMode=Q.IN_TABLE;return;case Y.BODY:this.insertionMode=Q.IN_BODY;return;case Y.FRAMESET:this.insertionMode=Q.IN_FRAMESET;return;case Y.SELECT:this._resetInsertionModeForSelect(e);return;case Y.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case Y.HTML:this.insertionMode=this.headElement?Q.AFTER_HEAD:Q.BEFORE_HEAD;return;case Y.TD:case Y.TH:if(e>0){this.insertionMode=Q.IN_CELL;return}break;case Y.HEAD:if(e>0){this.insertionMode=Q.IN_HEAD;return}break}this.insertionMode=Q.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===Y.TEMPLATE)break;if(e===Y.TABLE){this.insertionMode=Q.IN_SELECT_IN_TABLE;return}}this.insertionMode=Q.IN_SELECT}_isElementCausesFosterParenting(e){return _N.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case Y.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===q.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case Y.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return dM[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){LF(this,e);return}switch(this.insertionMode){case Q.INITIAL:MN(this,e);break;case Q.BEFORE_HTML:FN(this,e);break;case Q.BEFORE_HEAD:RN(this,e);break;case Q.IN_HEAD:HN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:GN(this,e);break;case Q.AFTER_HEAD:JN(this,e);break;case Q.IN_BODY:case Q.IN_CAPTION:case Q.IN_CELL:case Q.IN_TEMPLATE:ZN(this,e);break;case Q.TEXT:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Q.IN_TABLE:case Q.IN_TABLE_BODY:case Q.IN_ROW:KP(this,e);break;case Q.IN_TABLE_TEXT:aF(this,e);break;case Q.IN_COLUMN_GROUP:fF(this,e);break;case Q.AFTER_BODY:OF(this,e);break;case Q.AFTER_AFTER_BODY:PF(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){IF(this,e);return}switch(this.insertionMode){case Q.INITIAL:MN(this,e);break;case Q.BEFORE_HTML:FN(this,e);break;case Q.BEFORE_HEAD:RN(this,e);break;case Q.IN_HEAD:HN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:GN(this,e);break;case Q.AFTER_HEAD:JN(this,e);break;case Q.TEXT:this._insertCharacters(e);break;case Q.IN_TABLE:case Q.IN_TABLE_BODY:case Q.IN_ROW:KP(this,e);break;case Q.IN_COLUMN_GROUP:fF(this,e);break;case Q.AFTER_BODY:OF(this,e);break;case Q.AFTER_AFTER_BODY:PF(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){DN(this,e);return}switch(this.insertionMode){case Q.INITIAL:case Q.BEFORE_HTML:case Q.BEFORE_HEAD:case Q.IN_HEAD:case Q.IN_HEAD_NO_SCRIPT:case Q.AFTER_HEAD:case Q.IN_BODY:case Q.IN_TABLE:case Q.IN_CAPTION:case Q.IN_COLUMN_GROUP:case Q.IN_TABLE_BODY:case Q.IN_ROW:case Q.IN_CELL:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:case Q.IN_TEMPLATE:case Q.IN_FRAMESET:case Q.AFTER_FRAMESET:DN(this,e);break;case Q.IN_TABLE_TEXT:oF(this,e);break;case Q.AFTER_BODY:ON(this,e);break;case Q.AFTER_AFTER_BODY:case Q.AFTER_AFTER_FRAMESET:kN(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Q.INITIAL:jN(this,e);break;case Q.BEFORE_HEAD:case Q.IN_HEAD:case Q.IN_HEAD_NO_SCRIPT:case Q.AFTER_HEAD:this._err(e,K.misplacedDoctype);break;case Q.IN_TABLE_TEXT:oF(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,K.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?zF(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Q.INITIAL:MN(this,e);break;case Q.BEFORE_HTML:NN(this,e);break;case Q.BEFORE_HEAD:IN(this,e);break;case Q.IN_HEAD:zN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:UN(this,e);break;case Q.AFTER_HEAD:KN(this,e);break;case Q.IN_BODY:AP(this,e);break;case Q.IN_TABLE:tF(this,e);break;case Q.IN_TABLE_TEXT:oF(this,e);break;case Q.IN_CAPTION:cF(this,e);break;case Q.IN_COLUMN_GROUP:uF(this,e);break;case Q.IN_TABLE_BODY:pF(this,e);break;case Q.IN_ROW:hF(this,e);break;case Q.IN_CELL:_F(this,e);break;case Q.IN_SELECT:yF(this,e);break;case Q.IN_SELECT_IN_TABLE:xF(this,e);break;case Q.IN_TEMPLATE:CF(this,e);break;case Q.AFTER_BODY:EF(this,e);break;case Q.IN_FRAMESET:kF(this,e);break;case Q.AFTER_FRAMESET:jF(this,e);break;case Q.AFTER_AFTER_BODY:NF(this,e);break;case Q.AFTER_AFTER_FRAMESET:FF(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?BF(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Q.INITIAL:MN(this,e);break;case Q.BEFORE_HTML:PN(this,e);break;case Q.BEFORE_HEAD:LN(this,e);break;case Q.IN_HEAD:BN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:WN(this,e);break;case Q.AFTER_HEAD:qN(this,e);break;case Q.IN_BODY:HP(this,e);break;case Q.TEXT:WP(this,e);break;case Q.IN_TABLE:nF(this,e);break;case Q.IN_TABLE_TEXT:oF(this,e);break;case Q.IN_CAPTION:lF(this,e);break;case Q.IN_COLUMN_GROUP:dF(this,e);break;case Q.IN_TABLE_BODY:mF(this,e);break;case Q.IN_ROW:gF(this,e);break;case Q.IN_CELL:vF(this,e);break;case Q.IN_SELECT:bF(this,e);break;case Q.IN_SELECT_IN_TABLE:SF(this,e);break;case Q.IN_TEMPLATE:wF(this,e);break;case Q.AFTER_BODY:DF(this,e);break;case Q.IN_FRAMESET:AF(this,e);break;case Q.AFTER_FRAMESET:MF(this,e);break;case Q.AFTER_AFTER_BODY:PF(this,e);break;default:}}onEof(e){switch(this.insertionMode){case Q.INITIAL:MN(this,e);break;case Q.BEFORE_HTML:FN(this,e);break;case Q.BEFORE_HEAD:RN(this,e);break;case Q.IN_HEAD:HN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:GN(this,e);break;case Q.AFTER_HEAD:JN(this,e);break;case Q.IN_BODY:case Q.IN_TABLE:case Q.IN_CAPTION:case Q.IN_COLUMN_GROUP:case Q.IN_TABLE_BODY:case Q.IN_ROW:case Q.IN_CELL:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:UP(this,e);break;case Q.TEXT:GP(this,e);break;case Q.IN_TABLE_TEXT:oF(this,e);break;case Q.IN_TEMPLATE:TF(this,e);break;case Q.AFTER_BODY:case Q.IN_FRAMESET:case Q.AFTER_FRAMESET:case Q.AFTER_AFTER_BODY:case Q.AFTER_AFTER_FRAMESET:AN(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===G.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case Q.IN_HEAD:case Q.IN_HEAD_NO_SCRIPT:case Q.AFTER_HEAD:case Q.TEXT:case Q.IN_COLUMN_GROUP:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:case Q.IN_FRAMESET:case Q.AFTER_FRAMESET:this._insertCharacters(e);break;case Q.IN_BODY:case Q.IN_CAPTION:case Q.IN_CELL:case Q.IN_TEMPLATE:case Q.AFTER_BODY:case Q.AFTER_AFTER_BODY:case Q.AFTER_AFTER_FRAMESET:XN(this,e);break;case Q.IN_TABLE:case Q.IN_TABLE_BODY:case Q.IN_ROW:KP(this,e);break;case Q.IN_TABLE_TEXT:iF(this,e);break;default:}}};function bN(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):VP(e,t),n}function xN(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function SN(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=hN;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=CN(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function CN(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function wN(e,t,n){let r=uM(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===Y.TEMPLATE&&i===q.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function TN(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function EN(e,t){for(let n=0;n<mN;n++){let n=bN(e,t);if(!n)break;let r=xN(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=SN(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&wN(e,a,i),TN(e,r,n)}}function DN(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function ON(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kN(e,t){e._appendCommentNode(t,e.document)}function AN(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function jN(e,t){e._setDocumentType(t);let n=t.forceQuirks?cM.QUIRKS:ZM(t);XM(t)||e._err(t,K.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Q.BEFORE_HTML}function MN(e,t){e._err(t,K.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,cM.QUIRKS),e.insertionMode=Q.BEFORE_HTML,e._processToken(t)}function NN(e,t){t.tagID===Y.HTML?(e._insertElement(t,q.HTML),e.insertionMode=Q.BEFORE_HEAD):FN(e,t)}function PN(e,t){let n=t.tagID;(n===Y.HTML||n===Y.HEAD||n===Y.BODY||n===Y.BR)&&FN(e,t)}function FN(e,t){e._insertFakeRootElement(),e.insertionMode=Q.BEFORE_HEAD,e._processToken(t)}function IN(e,t){switch(t.tagID){case Y.HTML:AP(e,t);break;case Y.HEAD:e._insertElement(t,q.HTML),e.headElement=e.openElements.current,e.insertionMode=Q.IN_HEAD;break;default:RN(e,t)}}function LN(e,t){let n=t.tagID;n===Y.HEAD||n===Y.BODY||n===Y.HTML||n===Y.BR?RN(e,t):e._err(t,K.endTagWithoutMatchingOpenElement)}function RN(e,t){e._insertFakeElement(J.HEAD,Y.HEAD),e.headElement=e.openElements.current,e.insertionMode=Q.IN_HEAD,e._processToken(t)}function zN(e,t){switch(t.tagID){case Y.HTML:AP(e,t);break;case Y.BASE:case Y.BASEFONT:case Y.BGSOUND:case Y.LINK:case Y.META:e._appendElement(t,q.HTML),t.ackSelfClosing=!0;break;case Y.TITLE:e._switchToTextParsing(t,pM.RCDATA);break;case Y.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,pM.RAWTEXT):(e._insertElement(t,q.HTML),e.insertionMode=Q.IN_HEAD_NO_SCRIPT);break;case Y.NOFRAMES:case Y.STYLE:e._switchToTextParsing(t,pM.RAWTEXT);break;case Y.SCRIPT:e._switchToTextParsing(t,pM.SCRIPT_DATA);break;case Y.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Q.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Q.IN_TEMPLATE);break;case Y.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:HN(e,t)}}function BN(e,t){switch(t.tagID){case Y.HEAD:e.openElements.pop(),e.insertionMode=Q.AFTER_HEAD;break;case Y.BODY:case Y.BR:case Y.HTML:HN(e,t);break;case Y.TEMPLATE:VN(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function VN(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Y.TEMPLATE&&e._err(t,K.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,K.endTagWithoutMatchingOpenElement)}function HN(e,t){e.openElements.pop(),e.insertionMode=Q.AFTER_HEAD,e._processToken(t)}function UN(e,t){switch(t.tagID){case Y.HTML:AP(e,t);break;case Y.BASEFONT:case Y.BGSOUND:case Y.HEAD:case Y.LINK:case Y.META:case Y.NOFRAMES:case Y.STYLE:zN(e,t);break;case Y.NOSCRIPT:e._err(t,K.nestedNoscriptInHead);break;default:GN(e,t)}}function WN(e,t){switch(t.tagID){case Y.NOSCRIPT:e.openElements.pop(),e.insertionMode=Q.IN_HEAD;break;case Y.BR:GN(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function GN(e,t){let n=t.type===Gj.EOF?K.openElementsLeftAfterEof:K.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Q.IN_HEAD,e._processToken(t)}function KN(e,t){switch(t.tagID){case Y.HTML:AP(e,t);break;case Y.BODY:e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode=Q.IN_BODY;break;case Y.FRAMESET:e._insertElement(t,q.HTML),e.insertionMode=Q.IN_FRAMESET;break;case Y.BASE:case Y.BASEFONT:case Y.BGSOUND:case Y.LINK:case Y.META:case Y.NOFRAMES:case Y.SCRIPT:case Y.STYLE:case Y.TEMPLATE:case Y.TITLE:e._err(t,K.abandonedHeadElementChild),e.openElements.push(e.headElement,Y.HEAD),zN(e,t),e.openElements.remove(e.headElement);break;case Y.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:JN(e,t)}}function qN(e,t){switch(t.tagID){case Y.BODY:case Y.HTML:case Y.BR:JN(e,t);break;case Y.TEMPLATE:VN(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function JN(e,t){e._insertFakeElement(J.BODY,Y.BODY),e.insertionMode=Q.IN_BODY,YN(e,t)}function YN(e,t){switch(t.type){case Gj.CHARACTER:ZN(e,t);break;case Gj.WHITESPACE_CHARACTER:XN(e,t);break;case Gj.COMMENT:DN(e,t);break;case Gj.START_TAG:AP(e,t);break;case Gj.END_TAG:HP(e,t);break;case Gj.EOF:UP(e,t);break;default:}}function XN(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ZN(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function QN(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function $N(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function eP(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_FRAMESET)}function tP(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML)}function nP(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&fM.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,q.HTML)}function rP(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function iP(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML),n||(e.formElement=e.openElements.current))}function aP(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===Y.LI&&r===Y.LI||(n===Y.DD||n===Y.DT)&&(r===Y.DD||r===Y.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==Y.ADDRESS&&r!==Y.DIV&&r!==Y.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML)}function oP(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.tokenizer.state=pM.PLAINTEXT}function sP(e,t){e.openElements.hasInScope(Y.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Y.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.framesetOk=!1}function cP(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(J.A);n&&(EN(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Y.NOBR)&&(EN(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function dP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function fP(e,t){e.treeAdapter.getDocumentMode(e.document)!==cM.QUIRKS&&e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode=Q.IN_TABLE}function pP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,q.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mP(e){let t=Kj(e,sM.TYPE);return t!=null&&t.toLowerCase()===pN}function hP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,q.HTML),mP(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function gP(e,t){e._appendElement(t,q.HTML),t.ackSelfClosing=!0}function _P(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._appendElement(t,q.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vP(e,t){t.tagName=J.IMG,t.tagID=Y.IMG,pP(e,t)}function yP(e,t){e._insertElement(t,q.HTML),e.skipNextNewLine=!0,e.tokenizer.state=pM.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Q.TEXT}function bP(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,pM.RAWTEXT)}function xP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,pM.RAWTEXT)}function SP(e,t){e._switchToTextParsing(t,pM.RAWTEXT)}function CP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Q.IN_TABLE||e.insertionMode===Q.IN_CAPTION||e.insertionMode===Q.IN_TABLE_BODY||e.insertionMode===Q.IN_ROW||e.insertionMode===Q.IN_CELL?Q.IN_SELECT_IN_TABLE:Q.IN_SELECT}function wP(e,t){e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML)}function TP(e,t){e.openElements.hasInScope(Y.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,q.HTML)}function EP(e,t){e.openElements.hasInScope(Y.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Y.RTC),e._insertElement(t,q.HTML)}function DP(e,t){e._reconstructActiveFormattingElements(),oN(t),cN(t),t.selfClosing?e._appendElement(t,q.MATHML):e._insertElement(t,q.MATHML),t.ackSelfClosing=!0}function OP(e,t){e._reconstructActiveFormattingElements(),sN(t),cN(t),t.selfClosing?e._appendElement(t,q.SVG):e._insertElement(t,q.SVG),t.ackSelfClosing=!0}function kP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML)}function AP(e,t){switch(t.tagID){case Y.I:case Y.S:case Y.B:case Y.U:case Y.EM:case Y.TT:case Y.BIG:case Y.CODE:case Y.FONT:case Y.SMALL:case Y.STRIKE:case Y.STRONG:lP(e,t);break;case Y.A:cP(e,t);break;case Y.H1:case Y.H2:case Y.H3:case Y.H4:case Y.H5:case Y.H6:nP(e,t);break;case Y.P:case Y.DL:case Y.OL:case Y.UL:case Y.DIV:case Y.DIR:case Y.NAV:case Y.MAIN:case Y.MENU:case Y.ASIDE:case Y.CENTER:case Y.FIGURE:case Y.FOOTER:case Y.HEADER:case Y.HGROUP:case Y.DIALOG:case Y.DETAILS:case Y.ADDRESS:case Y.ARTICLE:case Y.SEARCH:case Y.SECTION:case Y.SUMMARY:case Y.FIELDSET:case Y.BLOCKQUOTE:case Y.FIGCAPTION:tP(e,t);break;case Y.LI:case Y.DD:case Y.DT:aP(e,t);break;case Y.BR:case Y.IMG:case Y.WBR:case Y.AREA:case Y.EMBED:case Y.KEYGEN:pP(e,t);break;case Y.HR:_P(e,t);break;case Y.RB:case Y.RTC:TP(e,t);break;case Y.RT:case Y.RP:EP(e,t);break;case Y.PRE:case Y.LISTING:rP(e,t);break;case Y.XMP:bP(e,t);break;case Y.SVG:OP(e,t);break;case Y.HTML:QN(e,t);break;case Y.BASE:case Y.LINK:case Y.META:case Y.STYLE:case Y.TITLE:case Y.SCRIPT:case Y.BGSOUND:case Y.BASEFONT:case Y.TEMPLATE:zN(e,t);break;case Y.BODY:$N(e,t);break;case Y.FORM:iP(e,t);break;case Y.NOBR:uP(e,t);break;case Y.MATH:DP(e,t);break;case Y.TABLE:fP(e,t);break;case Y.INPUT:hP(e,t);break;case Y.PARAM:case Y.TRACK:case Y.SOURCE:gP(e,t);break;case Y.IMAGE:vP(e,t);break;case Y.BUTTON:sP(e,t);break;case Y.APPLET:case Y.OBJECT:case Y.MARQUEE:dP(e,t);break;case Y.IFRAME:xP(e,t);break;case Y.SELECT:CP(e,t);break;case Y.OPTION:case Y.OPTGROUP:wP(e,t);break;case Y.NOEMBED:case Y.NOFRAMES:SP(e,t);break;case Y.FRAMESET:eP(e,t);break;case Y.TEXTAREA:yP(e,t);break;case Y.NOSCRIPT:e.options.scriptingEnabled?SP(e,t):kP(e,t);break;case Y.PLAINTEXT:oP(e,t);break;case Y.COL:case Y.TH:case Y.TD:case Y.TR:case Y.HEAD:case Y.FRAME:case Y.TBODY:case Y.TFOOT:case Y.THEAD:case Y.CAPTION:case Y.COLGROUP:break;default:kP(e,t)}}function jP(e,t){if(e.openElements.hasInScope(Y.BODY)&&(e.insertionMode=Q.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function MP(e,t){e.openElements.hasInScope(Y.BODY)&&(e.insertionMode=Q.AFTER_BODY,DF(e,t))}function NP(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function PP(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Y.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Y.FORM):n&&e.openElements.remove(n))}function FP(e){e.openElements.hasInButtonScope(Y.P)||e._insertFakeElement(J.P,Y.P),e._closePElement()}function IP(e){e.openElements.hasInListItemScope(Y.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Y.LI),e.openElements.popUntilTagNamePopped(Y.LI))}function LP(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function RP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zP(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function BP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(J.BR,Y.BR),e.openElements.pop(),e.framesetOk=!1}function VP(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==Y.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function HP(e,t){switch(t.tagID){case Y.A:case Y.B:case Y.I:case Y.S:case Y.U:case Y.EM:case Y.TT:case Y.BIG:case Y.CODE:case Y.FONT:case Y.NOBR:case Y.SMALL:case Y.STRIKE:case Y.STRONG:EN(e,t);break;case Y.P:FP(e);break;case Y.DL:case Y.UL:case Y.OL:case Y.DIR:case Y.DIV:case Y.NAV:case Y.PRE:case Y.MAIN:case Y.MENU:case Y.ASIDE:case Y.BUTTON:case Y.CENTER:case Y.FIGURE:case Y.FOOTER:case Y.HEADER:case Y.HGROUP:case Y.DIALOG:case Y.ADDRESS:case Y.ARTICLE:case Y.DETAILS:case Y.SEARCH:case Y.SECTION:case Y.SUMMARY:case Y.LISTING:case Y.FIELDSET:case Y.BLOCKQUOTE:case Y.FIGCAPTION:NP(e,t);break;case Y.LI:IP(e);break;case Y.DD:case Y.DT:LP(e,t);break;case Y.H1:case Y.H2:case Y.H3:case Y.H4:case Y.H5:case Y.H6:RP(e);break;case Y.BR:BP(e);break;case Y.BODY:jP(e,t);break;case Y.HTML:MP(e,t);break;case Y.FORM:PP(e);break;case Y.APPLET:case Y.OBJECT:case Y.MARQUEE:zP(e,t);break;case Y.TEMPLATE:VN(e,t);break;default:VP(e,t)}}function UP(e,t){e.tmplInsertionModeStack.length>0?TF(e,t):AN(e,t)}function WP(e,t){var n;t.tagID===Y.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function GP(e,t){e._err(t,K.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function KP(e,t){if(e.openElements.currentTagId!==void 0&&_N.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Q.IN_TABLE_TEXT,t.type){case Gj.CHARACTER:aF(e,t);break;case Gj.WHITESPACE_CHARACTER:iF(e,t);break}else rF(e,t)}function qP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_CAPTION}function JP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_COLUMN_GROUP}function YP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(J.COLGROUP,Y.COLGROUP),e.insertionMode=Q.IN_COLUMN_GROUP,uF(e,t)}function XP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_TABLE_BODY}function ZP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(J.TBODY,Y.TBODY),e.insertionMode=Q.IN_TABLE_BODY,pF(e,t)}function QP(e,t){e.openElements.hasInTableScope(Y.TABLE)&&(e.openElements.popUntilTagNamePopped(Y.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $P(e,t){mP(t)?e._appendElement(t,q.HTML):rF(e,t),t.ackSelfClosing=!0}function eF(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,q.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function tF(e,t){switch(t.tagID){case Y.TD:case Y.TH:case Y.TR:ZP(e,t);break;case Y.STYLE:case Y.SCRIPT:case Y.TEMPLATE:zN(e,t);break;case Y.COL:YP(e,t);break;case Y.FORM:eF(e,t);break;case Y.TABLE:QP(e,t);break;case Y.TBODY:case Y.TFOOT:case Y.THEAD:XP(e,t);break;case Y.INPUT:$P(e,t);break;case Y.CAPTION:qP(e,t);break;case Y.COLGROUP:JP(e,t);break;default:rF(e,t)}}function nF(e,t){switch(t.tagID){case Y.TABLE:e.openElements.hasInTableScope(Y.TABLE)&&(e.openElements.popUntilTagNamePopped(Y.TABLE),e._resetInsertionMode());break;case Y.TEMPLATE:VN(e,t);break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TBODY:case Y.TD:case Y.TFOOT:case Y.TH:case Y.THEAD:case Y.TR:break;default:rF(e,t)}}function rF(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,YN(e,t),e.fosterParentingEnabled=n}function iF(e,t){e.pendingCharacterTokens.push(t)}function aF(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function oF(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)rF(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var sF=new Set([Y.CAPTION,Y.COL,Y.COLGROUP,Y.TBODY,Y.TD,Y.TFOOT,Y.TH,Y.THEAD,Y.TR]);function cF(e,t){let n=t.tagID;sF.has(n)?e.openElements.hasInTableScope(Y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Q.IN_TABLE,tF(e,t)):AP(e,t)}function lF(e,t){let n=t.tagID;switch(n){case Y.CAPTION:case Y.TABLE:e.openElements.hasInTableScope(Y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Q.IN_TABLE,n===Y.TABLE&&nF(e,t));break;case Y.BODY:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TBODY:case Y.TD:case Y.TFOOT:case Y.TH:case Y.THEAD:case Y.TR:break;default:HP(e,t)}}function uF(e,t){switch(t.tagID){case Y.HTML:AP(e,t);break;case Y.COL:e._appendElement(t,q.HTML),t.ackSelfClosing=!0;break;case Y.TEMPLATE:zN(e,t);break;default:fF(e,t)}}function dF(e,t){switch(t.tagID){case Y.COLGROUP:e.openElements.currentTagId===Y.COLGROUP&&(e.openElements.pop(),e.insertionMode=Q.IN_TABLE);break;case Y.TEMPLATE:VN(e,t);break;case Y.COL:break;default:fF(e,t)}}function fF(e,t){e.openElements.currentTagId===Y.COLGROUP&&(e.openElements.pop(),e.insertionMode=Q.IN_TABLE,e._processToken(t))}function pF(e,t){switch(t.tagID){case Y.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_ROW;break;case Y.TH:case Y.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(J.TR,Y.TR),e.insertionMode=Q.IN_ROW,hF(e,t);break;case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.TBODY:case Y.TFOOT:case Y.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE,tF(e,t));break;default:tF(e,t)}}function mF(e,t){let n=t.tagID;switch(t.tagID){case Y.TBODY:case Y.TFOOT:case Y.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE);break;case Y.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE,nF(e,t));break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TD:case Y.TH:case Y.TR:break;default:nF(e,t)}}function hF(e,t){switch(t.tagID){case Y.TH:case Y.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_CELL,e.activeFormattingElements.insertMarker();break;case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.TBODY:case Y.TFOOT:case Y.THEAD:case Y.TR:e.openElements.hasInTableScope(Y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY,pF(e,t));break;default:tF(e,t)}}function gF(e,t){switch(t.tagID){case Y.TR:e.openElements.hasInTableScope(Y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY);break;case Y.TABLE:e.openElements.hasInTableScope(Y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY,mF(e,t));break;case Y.TBODY:case Y.TFOOT:case Y.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(Y.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY,mF(e,t));break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TD:case Y.TH:break;default:nF(e,t)}}function _F(e,t){let n=t.tagID;sF.has(n)?(e.openElements.hasInTableScope(Y.TD)||e.openElements.hasInTableScope(Y.TH))&&(e._closeTableCell(),hF(e,t)):AP(e,t)}function vF(e,t){let n=t.tagID;switch(n){case Y.TD:case Y.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Q.IN_ROW);break;case Y.TABLE:case Y.TBODY:case Y.TFOOT:case Y.THEAD:case Y.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),gF(e,t));break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:break;default:HP(e,t)}}function yF(e,t){switch(t.tagID){case Y.HTML:AP(e,t);break;case Y.OPTION:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e._insertElement(t,q.HTML);break;case Y.OPTGROUP:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Y.OPTGROUP&&e.openElements.pop(),e._insertElement(t,q.HTML);break;case Y.HR:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Y.OPTGROUP&&e.openElements.pop(),e._appendElement(t,q.HTML),t.ackSelfClosing=!0;break;case Y.INPUT:case Y.KEYGEN:case Y.TEXTAREA:case Y.SELECT:e.openElements.hasInSelectScope(Y.SELECT)&&(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode(),t.tagID!==Y.SELECT&&e._processStartTag(t));break;case Y.SCRIPT:case Y.TEMPLATE:zN(e,t);break;default:}}function bF(e,t){switch(t.tagID){case Y.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===Y.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Y.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Y.OPTGROUP&&e.openElements.pop();break;case Y.OPTION:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop();break;case Y.SELECT:e.openElements.hasInSelectScope(Y.SELECT)&&(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode());break;case Y.TEMPLATE:VN(e,t);break;default:}}function xF(e,t){let n=t.tagID;n===Y.CAPTION||n===Y.TABLE||n===Y.TBODY||n===Y.TFOOT||n===Y.THEAD||n===Y.TR||n===Y.TD||n===Y.TH?(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode(),e._processStartTag(t)):yF(e,t)}function SF(e,t){let n=t.tagID;n===Y.CAPTION||n===Y.TABLE||n===Y.TBODY||n===Y.TFOOT||n===Y.THEAD||n===Y.TR||n===Y.TD||n===Y.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode(),e.onEndTag(t)):bF(e,t)}function CF(e,t){switch(t.tagID){case Y.BASE:case Y.BASEFONT:case Y.BGSOUND:case Y.LINK:case Y.META:case Y.NOFRAMES:case Y.SCRIPT:case Y.STYLE:case Y.TEMPLATE:case Y.TITLE:zN(e,t);break;case Y.CAPTION:case Y.COLGROUP:case Y.TBODY:case Y.TFOOT:case Y.THEAD:e.tmplInsertionModeStack[0]=Q.IN_TABLE,e.insertionMode=Q.IN_TABLE,tF(e,t);break;case Y.COL:e.tmplInsertionModeStack[0]=Q.IN_COLUMN_GROUP,e.insertionMode=Q.IN_COLUMN_GROUP,uF(e,t);break;case Y.TR:e.tmplInsertionModeStack[0]=Q.IN_TABLE_BODY,e.insertionMode=Q.IN_TABLE_BODY,pF(e,t);break;case Y.TD:case Y.TH:e.tmplInsertionModeStack[0]=Q.IN_ROW,e.insertionMode=Q.IN_ROW,hF(e,t);break;default:e.tmplInsertionModeStack[0]=Q.IN_BODY,e.insertionMode=Q.IN_BODY,AP(e,t)}}function wF(e,t){t.tagID===Y.TEMPLATE&&VN(e,t)}function TF(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(Y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):AN(e,t)}function EF(e,t){t.tagID===Y.HTML?AP(e,t):OF(e,t)}function DF(e,t){if(t.tagID===Y.HTML){if(e.fragmentContext||(e.insertionMode=Q.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Y.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else OF(e,t)}function OF(e,t){e.insertionMode=Q.IN_BODY,YN(e,t)}function kF(e,t){switch(t.tagID){case Y.HTML:AP(e,t);break;case Y.FRAMESET:e._insertElement(t,q.HTML);break;case Y.FRAME:e._appendElement(t,q.HTML),t.ackSelfClosing=!0;break;case Y.NOFRAMES:zN(e,t);break;default:}}function AF(e,t){t.tagID===Y.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==Y.FRAMESET&&(e.insertionMode=Q.AFTER_FRAMESET))}function jF(e,t){switch(t.tagID){case Y.HTML:AP(e,t);break;case Y.NOFRAMES:zN(e,t);break;default:}}function MF(e,t){t.tagID===Y.HTML&&(e.insertionMode=Q.AFTER_AFTER_FRAMESET)}function NF(e,t){t.tagID===Y.HTML?AP(e,t):PF(e,t)}function PF(e,t){e.insertionMode=Q.IN_BODY,YN(e,t)}function FF(e,t){switch(t.tagID){case Y.HTML:AP(e,t);break;case Y.NOFRAMES:zN(e,t);break;default:}}function IF(e,t){t.chars=`�`,e._insertCharacters(t)}function LF(e,t){e._insertCharacters(t),e.framesetOk=!1}function RF(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==q.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function zF(e,t){if(aN(t))RF(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===q.MATHML?oN(t):r===q.SVG&&(lN(t),sN(t)),cN(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function BF(e,t){if(t.tagID===Y.P||t.tagID===Y.BR){RF(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===q.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}J.AREA,J.BASE,J.BASEFONT,J.BGSOUND,J.BR,J.COL,J.EMBED,J.FRAME,J.HR,J.IMG,J.INPUT,J.KEYGEN,J.LINK,J.META,J.PARAM,J.SOURCE,J.TRACK,J.WBR;var VF=UF(`end`),HF=UF(`start`);function UF(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 WF(e){let t=HF(e),n=VF(e);if(t&&n)return{start:t,end:n}}var GF=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,KF=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),qF={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function JF(e,t){let n=cI(e),r=xj(`type`,{handlers:{root:XF,element:ZF,text:QF,comment:tI,doctype:$F,raw:nI},unknown:rI}),i={parser:n?new yN(qF):yN.getFragmentParser(void 0,qF),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),iI(i,HF());let a=fj(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&zk(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function YF(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function XF(e,t){YF(e.children,t)}function ZF(e,t){oI(e,t),YF(e.children,t),sI(e,t)}function QF(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:Gj.CHARACTER,chars:e.value,location:lI(e)};iI(t,HF(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function $F(e,t){let n={type:Gj.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:lI(e)};iI(t,HF(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function eI(e,t){t.stitches=!0;let n=uI(e);`children`in e&&`children`in n&&(n.children=JF({type:`root`,children:e.children},t.options).children),tI({type:`comment`,value:{stitch:n}},t)}function tI(e,t){let n=e.value,r={type:Gj.COMMENT,data:n,location:lI(e)};iI(t,HF(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function nI(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,aI(t,HF(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(GF,`&lt;$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function rI(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))eI(n,t);else{let e=``;throw KF.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function iI(e,t){aI(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=pM.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function aI(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function oI(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===pM.PLAINTEXT)return;iI(t,HF(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:lj.html;i===lj.html&&n===`svg`&&(i=lj.svg);let a=Tj({...e,children:[]},{space:i===lj.svg?`svg`:`html`}),o={type:Gj.START_TAG,tagName:n,tagID:uM(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:lI(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function sI(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Fj.includes(n)||t.parser.tokenizer.state===pM.PLAINTEXT)return;iI(t,VF(e));let r={type:Gj.END_TAG,tagName:n,tagID:uM(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:lI(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===pM.RCDATA||t.parser.tokenizer.state===pM.RAWTEXT||t.parser.tokenizer.state===pM.SCRIPT_DATA)&&(t.parser.tokenizer.state=pM.DATA)}function cI(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function lI(e){let t=HF(e)||{line:void 0,column:void 0,offset:void 0},n=VF(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function uI(e){return`children`in e?lA({...e,children:[]}):lA(e)}function dI(e){return function(t,n){return JF(t,{...e,file:n})}}var fI=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],pI={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...fI,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...fI],h2:[[`className`,`sr-only`]],img:[...fI,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...fI,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...fI],table:[...fI],ul:[...fI,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},mI={}.hasOwnProperty;function hI(e,t){let n={type:`root`,children:[]},r=gI({schema:t?{...pI,...t}:pI,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function gI(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return _I(e,n);case`doctype`:return vI(e,n);case`element`:return yI(e,n);case`root`:return bI(e,n);case`text`:return xI(e,n);default:}}}function _I(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return OI(r,t),r}}function vI(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return OI(e,t),e}}function yI(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=SI(e,t.children),i=CI(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&mI.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return OI(o,t),o}function bI(e,t){let n={type:`root`,children:SI(e,t.children)};return OI(n,t),n}function xI(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return OI(n,t),n}function SI(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=gI(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function CI(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&mI.call(r,n)?r[n]:void 0,o=r&&mI.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(mI.call(s,l)){let t=s[l],n=wI(e,kI(a,l),l,t);n??=wI(e,kI(o,l),l,t),n!=null&&(c[l]=n)}if(i&&mI.call(i,n)){let e=i[n];for(l in e)mI.call(e,l)&&!mI.call(c,l)&&(c[l]=e[l])}return c}function wI(e,t,n,r){return t?Array.isArray(r)?TI(e,t,n,r):EI(e,t,n,r):void 0}function TI(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=EI(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function EI(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&DI(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function DI(e,t,n){let r=e.schema.protocols&&mI.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function OI(e,t){let n=WF(t);t.data&&(e.data=lA(t.data)),n&&(e.position=n)}function kI(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function AI(e){return function(t){return hI(t,e)}}function jI(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}var MI=WI(/[A-Za-z]/),NI=WI(/[\dA-Za-z]/),PI=WI(/[#-'*+\--9=?A-Z^-~]/);function FI(e){return e!==null&&(e<32||e===127)}var II=WI(/\d/),LI=WI(/[\dA-Fa-f]/),RI=WI(/[!-/:-@[-`{-~]/);function zI(e){return e!==null&&e<-2}function BI(e){return e!==null&&(e<0||e===32)}function VI(e){return e===-2||e===-1||e===32}var HI=WI(/\p{P}|\p{S}/u),UI=WI(/\s/);function WI(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function GI(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function KI(e,t,n){let r=Dk((n||{}).ignore||[]),i=qI(t),a=-1;for(;++a<i.length;)Lk(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 qI(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([JI(e[0]),YI(e[1])])}return t}function JI(e){return typeof e==`string`?new RegExp(GI(e),`g`):e}function YI(e){return typeof e==`function`?e:function(){return e}}var XI=`phrasing`,ZI=[`autolink`,`link`,`image`,`label`];function QI(){return{transforms:[oL],enter:{literalAutolink:eL,literalAutolinkEmail:tL,literalAutolinkHttp:tL,literalAutolinkWww:tL},exit:{literalAutolink:aL,literalAutolinkEmail:iL,literalAutolinkHttp:nL,literalAutolinkWww:rL}}}function $I(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:XI,notInConstruct:ZI},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:XI,notInConstruct:ZI},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:XI,notInConstruct:ZI}]}}function eL(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function tL(e){this.config.enter.autolinkProtocol.call(this,e)}function nL(e){this.config.exit.autolinkProtocol.call(this,e)}function rL(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 iL(e){this.config.exit.autolinkEmail.call(this,e)}function aL(e){this.exit(e)}function oL(e){KI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sL],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,cL]],{ignore:[`link`,`linkReference`]})}function sL(e,t,n,r,i){let a=``;if(!dL(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!lL(n)))return!1;let o=uL(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 cL(e,t,n,r){return!dL(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function lL(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 uL(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=jI(e,`(`),a=jI(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 dL(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||UI(n)||HI(n))&&(!t||n!==47)}function fL(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}SL.peek=xL;function pL(){this.buffer()}function mL(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function hL(){this.buffer()}function gL(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function _L(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fL(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vL(e){this.exit(e)}function yL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fL(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bL(e){this.exit(e)}function xL(){return`[`}function SL(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 CL(){return{enter:{gfmFootnoteCallString:pL,gfmFootnoteCall:mL,gfmFootnoteDefinitionLabelString:hL,gfmFootnoteDefinition:gL},exit:{gfmFootnoteCallString:_L,gfmFootnoteCall:vL,gfmFootnoteDefinitionLabelString:yL,gfmFootnoteDefinition:bL}}}function wL(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:SL},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?`
112
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?EL:TL))),s(),o}}function TL(e,t,n){return t===0?e:EL(e,t,n)}function EL(e,t,n){return(n?``:` `)+e}var DL=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];ML.peek=NL;function OL(){return{canContainEols:[`delete`],enter:{strikethrough:AL},exit:{strikethrough:jL}}}function kL(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:DL}],handlers:{delete:ML}}}function AL(e){this.enter({type:`delete`,children:[]},e)}function jL(e){this.exit(e)}function ML(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 NL(){return`~`}function PL(e){return e.length}function FL(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||PL,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=IL(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]=LL(r[d]);else{let e=LL(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(`
113
+ `)}function IL(e){return e==null?``:String(e)}function LL(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}function RL(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()),zL);return i(),o}function zL(e,t,n){return`>`+(n?``:` `)+e}function BL(e,t){return VL(e,t.inConstruct,!0)&&!VL(e,t.notInConstruct,!1)}function VL(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 HL(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
114
+ `&&BL(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
115
+ `}function UL(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 WL(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 GL(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function KL(e,t,n,r){let i=GL(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(WL(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(UL(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:`
116
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
117
+ `),a&&(u+=s.move(a+`
118
+ `)),u+=s.move(c),l(),u}function qL(e,t,n){return(n?``:` `)+e}function JL(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function YL(e,t,n,r){let i=JL(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?` `:`
119
+ `,...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 XL(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ZL(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function QL(e){if(e===null||BI(e)||UI(e))return 1;if(HI(e))return 2}function $L(e,t,n){let r=QL(e),i=QL(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}}eR.peek=tR;function eR(e,t,n,r){let i=XL(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=$L(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=ZL(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=$L(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ZL(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function tR(e,t,n){return n.options.emphasis||`*`}var nR={};function rR(e,t){let n=t||nR;return iR(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function iR(e,t,n){if(oR(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 aR(e.children,t,n)}return Array.isArray(e)?aR(e,t,n):``}function aR(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=iR(e[i],t,n);return r.join(``)}function oR(e){return!!(e&&typeof e==`object`)}function sR(e,t){let n=!1;return zk(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)&&rR(e)&&(t.options.setext||n))}function cR(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(sR(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
120
+ `,after:`
121
+ `});return r(),t(),o+`
122
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
123
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
124
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=ZL(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}lR.peek=uR;function lR(e){return e.value||``}function uR(){return`<`}dR.peek=fR;function dR(e,t,n,r){let i=JL(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 fR(){return`!`}pR.peek=mR;function pR(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 mR(){return`!`}hR.peek=gR;function hR(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 gR(){return"`"}function _R(e,t){let n=rR(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))}vR.peek=yR;function vR(e,t,n,r){let i=JL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(_R(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 yR(e,t,n){return _R(e,n)?`<`:`[`}bR.peek=xR;function bR(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 xR(){return`[`}function SR(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 CR(e){let t=SR(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 wR(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function TR(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 ER(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?wR(n):SR(n),s=e.ordered?o===`.`?`)`:`.`:CR(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),TR(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 DR(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 OR(e,t,n,r){let i=DR(n),a=n.bulletCurrent||SR(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 kR(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var AR=Dk([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function jR(e,t,n,r){return(e.children.some(function(e){return AR(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function MR(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}NR.peek=PR;function NR(e,t,n,r){let i=MR(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=$L(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=ZL(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=$L(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ZL(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function PR(e,t,n){return n.options.strong||`*`}function FR(e,t,n,r){return n.safe(e.value,r)}function IR(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 LR(e,t,n){let r=(TR(n)+(n.options.ruleSpaces?` `:``)).repeat(IR(n));return n.options.ruleSpaces?r.slice(0,-1):r}var RR={blockquote:RL,break:HL,code:KL,definition:YL,emphasis:eR,hardBreak:HL,heading:cR,html:lR,image:dR,imageReference:pR,inlineCode:hR,link:vR,linkReference:bR,list:ER,listItem:OR,paragraph:kR,root:jR,strong:NR,text:FR,thematicBreak:LR};function zR(){return{enter:{table:BR,tableData:WR,tableHeader:WR,tableRow:HR},exit:{codeText:GR,table:VR,tableData:UR,tableHeader:UR,tableRow:UR}}}function BR(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 VR(e){this.exit(e),this.data.inTable=void 0}function HR(e){this.enter({type:`tableRow`,children:[]},e)}function UR(e){this.exit(e)}function WR(e){this.enter({type:`tableCell`,children:[]},e)}function GR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,KR));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function KR(e,t){return t===`|`?t:e}function qR(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
125
+ `,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(`
126
+ `))}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 FL(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=RR.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function JR(){return{exit:{taskListCheckValueChecked:XR,taskListCheckValueUnchecked:XR,paragraph:ZR}}}function YR(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:QR}}}function XR(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function ZR(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 QR(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=RR.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 $R(){return[QI(),CL(),OL(),zR(),JR()]}function ez(e){return{extensions:[$I(),wL(e),kL(),qR(e),YR()]}}function tz(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 nz(e,t){return e.length>0?(tz(e,e.length,0,t),e):t}var rz={}.hasOwnProperty;function iz(e){let t={},n=-1;for(;++n<e.length;)az(t,e[n]);return t}function az(e,t){let n;for(n in t){let r=(rz.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){rz.call(r,a)||(r[a]=[]);let e=i[a];oz(r[a],Array.isArray(e)?e:e?[e]:[])}}}function oz(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);tz(e,0,0,r)}var sz={tokenize:xz,partial:!0},cz={tokenize:Sz,partial:!0},lz={tokenize:Cz,partial:!0},uz={tokenize:wz,partial:!0},dz={tokenize:Tz,partial:!0},fz={name:`wwwAutolink`,tokenize:yz,previous:Ez},pz={name:`protocolAutolink`,tokenize:bz,previous:Dz},mz={name:`emailAutolink`,tokenize:vz,previous:Oz},hz={};function gz(){return{text:hz}}for(var _z=48;_z<123;)hz[_z]=mz,_z++,_z===58?_z=65:_z===91&&(_z=97);hz[43]=mz,hz[45]=mz,hz[46]=mz,hz[95]=mz,hz[72]=[mz,pz],hz[104]=[mz,pz],hz[87]=[mz,fz],hz[119]=[mz,fz];function vz(e,t,n){let r=this,i,a;return o;function o(t){return!kz(t)||!Oz.call(r,r.previous)||Az(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return kz(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(dz,u,l)(t):t===45||t===95||NI(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&&MI(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function yz(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Ez.call(r,r.previous)||Az(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(sz,e.attempt(cz,e.attempt(lz,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function bz(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Dz.call(r,r.previous)&&!Az(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(MI(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||FI(t)||BI(t)||UI(t)||HI(t)?n(t):e.attempt(cz,e.attempt(lz,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function xz(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 Sz(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(uz,c,s)(t):t===null||BI(t)||UI(t)||t!==45&&HI(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 Cz(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(uz,t,a)(o):o===null||BI(o)||UI(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function wz(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||BI(o)||UI(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||BI(e)||UI(e)?t(e):r(e)}function a(e){return MI(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):MI(t)?(e.consume(t),o):n(t)}}function Tz(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return NI(e)?n(e):t(e)}}function Ez(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||BI(e)}function Dz(e){return!MI(e)}function Oz(e){return!(e===47||kz(e))}function kz(e){return e===43||e===45||e===46||e===95||NI(e)}function Az(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}function jz(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&NI(e.charCodeAt(n+1))&&NI(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 Mz(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 Nz={name:`attention`,resolveAll:Pz,tokenize:Fz};function Pz(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Iz(d,-c),Iz(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=nz(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=nz(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=nz(l,Mz(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=nz(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=nz(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,tz(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Fz(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=QL(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=QL(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Iz(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Lz={name:`autolink`,tokenize:Rz};function Rz(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 MI(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||NI(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||NI(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||FI(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):PI(t)?(e.consume(t),l):n(t)}function u(e){return NI(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||NI(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function zz(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return VI(r)?(e.enter(n),s(r)):t(r)}function s(r){return VI(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Bz={partial:!0,tokenize:Vz};function Vz(e,t,n){return r;function r(t){return VI(t)?zz(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||zI(e)?t(e):n(e)}}var Hz={continuation:{tokenize:Wz},exit:Gz,name:`blockQuote`,tokenize:Uz};function Uz(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 VI(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Wz(e,t,n){let r=this;return i;function i(t){return VI(t)?zz(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Hz,t,n)(r)}}function Gz(e){e.exit(`blockQuote`)}var Kz={name:`characterEscape`,tokenize:qz};function qz(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 RI(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Jz=document.createElement(`i`);function Yz(e){let t=`&`+e+`;`;Jz.innerHTML=t;let n=Jz.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}var Xz={name:`characterReference`,tokenize:Zz};function Zz(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=NI,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=LI,u):(e.enter(`characterReferenceValue`),a=7,o=II,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===NI&&!Yz(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 Qz={partial:!0,tokenize:tB},$z={concrete:!0,name:`codeFenced`,tokenize:eB};function eB(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`),VI(t)?zz(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||zI(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Qz,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||zI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):VI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),zz(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||zI(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||zI(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&&VI(t)?zz(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||zI(t)?e.check(Qz,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||zI(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`),VI(t)?zz(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`),VI(t)?zz(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||zI(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function tB(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 nB={name:`codeIndented`,tokenize:iB},rB={partial:!0,tokenize:aB};function iB(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),zz(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):zI(t)?e.attempt(rB,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||zI(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function aB(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):zI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):zz(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):zI(e)?i(e):n(e)}}var oB={name:`codeText`,previous:cB,resolve:sB,tokenize:lB};function sB(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 cB(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function lB(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)):zI(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||zI(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 uB=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&&dB(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),dB(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),dB(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);dB(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);dB(this.left,t.reverse())}}};function dB(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 fB(e){let t={},n=-1,r,i,a,o,s,c,l,u=new uB(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,pB(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 tz(e,0,1/0,u.slice(0)),!l}function pB(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 mB={resolve:gB,tokenize:_B},hB={partial:!0,tokenize:vB};function gB(e){return fB(e),e}function _B(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):zI(t)?e.check(hB,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 vB(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),zz(e,a,`linePrefix`)}function a(i){if(i===null||zI(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 yB(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||FI(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||zI(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||BI(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||FI(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 bB(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):zI(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||zI(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!VI(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function xB(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):zI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),zz(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||zI(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 SB(e,t){let n;return r;function r(i){return zI(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):VI(i)?zz(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var CB={name:`definition`,tokenize:TB},wB={partial:!0,tokenize:EB};function TB(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return bB.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=fL(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 BI(t)?SB(e,l)(t):l(t)}function l(t){return yB(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(wB,d,d)(t)}function d(t){return VI(t)?zz(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||zI(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function EB(e,t,n){return r;function r(t){return BI(t)?SB(e,i)(t):n(t)}function i(t){return xB(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return VI(t)?zz(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||zI(e)?t(e):n(e)}}var DB={name:`hardBreakEscape`,tokenize:OB};function OB(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return zI(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var kB={name:`headingAtx`,resolve:AB,tokenize:jB};function AB(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},tz(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function jB(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||BI(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||zI(n)?(e.exit(`atxHeading`),t(n)):VI(n)?zz(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||BI(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var MB=`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(`.`),NB=[`pre`,`script`,`style`,`textarea`],PB={concrete:!0,name:`htmlFlow`,resolveTo:LB,tokenize:RB},FB={partial:!0,tokenize:BB},IB={partial:!0,tokenize:zB};function LB(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 RB(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:F):MI(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):MI(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):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 MI(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||BI(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&NB.includes(l)?(i=1,r.interrupt?t(s):O(s)):MB.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||NI(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 VI(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||MI(t)?(e.consume(t),b):VI(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||NI(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):VI(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):VI(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||zI(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||BI(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||VI(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||zI(t)?O(t):VI(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),te):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):zI(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(FB,I,k)(t)):t===null||zI(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(IB,A,I)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||zI(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return NB.includes(n)?(e.consume(t),te):O(t)}return MI(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function ee(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),te):t===45&&i===2?(e.consume(t),F):O(t)}function te(t){return t===null||zI(t)?(e.exit(`htmlFlowData`),I(t)):(e.consume(t),te)}function I(n){return e.exit(`htmlFlow`),t(n)}}function zB(e,t,n){let r=this;return i;function i(t){return zI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function BB(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Bz,t,n)}}var VB={name:`htmlText`,tokenize:HB};function HB(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):MI(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):MI(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):zI(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):zI(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):zI(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):zI(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return MI(t)?(e.consume(t),S):n(t)}function S(t){return t===45||NI(t)?(e.consume(t),S):C(t)}function C(t){return zI(t)?(o=C,N(t)):VI(t)?(e.consume(t),C):M(t)}function w(t){return t===45||NI(t)?(e.consume(t),w):t===47||t===62||BI(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||MI(t)?(e.consume(t),E):zI(t)?(o=T,N(t)):VI(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||NI(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):zI(t)?(o=D,N(t)):VI(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):zI(t)?(o=O,N(t)):VI(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):zI(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||BI(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||BI(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return VI(t)?zz(e,ee,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ee(t)}function ee(t){return e.enter(`htmlTextData`),o(t)}}var UB={name:`labelEnd`,resolveAll:qB,resolveTo:JB,tokenize:YB},WB={tokenize:XB},GB={tokenize:ZB},KB={tokenize:QB};function qB(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&&tz(e,0,e.length,n),e}function JB(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=nz(s,e.slice(a+1,a+r+3)),s=nz(s,[[`enter`,u,t]]),s=nz(s,Mz(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=nz(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=nz(s,e.slice(o+1)),s=nz(s,[[`exit`,c,t]]),tz(e,a,e.length,s),e}function YB(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(fL(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(WB,u,o?u:d)(t):t===91?e.attempt(GB,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(KB,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function XB(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 BI(t)?SB(e,a)(t):a(t)}function a(t){return t===41?u(t):yB(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return BI(t)?SB(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?xB(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return BI(t)?SB(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 ZB(e,t,n){let r=this;return i;function i(t){return bB.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(fL(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function QB(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 $B={name:`labelStartImage`,resolveAll:UB.resolveAll,tokenize:eV};function eV(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var tV={name:`labelStartLink`,resolveAll:UB.resolveAll,tokenize:nV};function nV(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var rV={name:`lineEnding`,tokenize:iV};function iV(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),zz(e,t,`linePrefix`)}}var aV={name:`thematicBreak`,tokenize:oV};function oV(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||zI(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),VI(t)?zz(e,s,`whitespace`)(t):s(t))}}var sV={continuation:{tokenize:dV},exit:pV,name:`list`,tokenize:uV},cV={partial:!0,tokenize:mV},lV={partial:!0,tokenize:fV};function uV(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:II(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(aV,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 II(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(Bz,r.interrupt?n:u,e.attempt(cV,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return VI(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 dV(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Bz,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,zz(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!VI(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(lV,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,zz(e,e.attempt(sV,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function fV(e,t,n){let r=this;return zz(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 pV(e){e.exit(this.containerState.type)}function mV(e,t,n){let r=this;return zz(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!VI(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var hV={name:`setextUnderline`,resolveTo:gV,tokenize:_V};function gV(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function _V(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`),VI(t)?zz(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||zI(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var vV={tokenize:EV,partial:!0};function yV(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:CV,continuation:{tokenize:wV},exit:TV}},text:{91:{name:`gfmFootnoteCall`,tokenize:SV},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:bV,resolveTo:xV}}}}function bV(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=fL(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 xV(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 SV(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||BI(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(fL(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return BI(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 CV(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||BI(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=fL(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return BI(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),zz(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function wV(e,t,n){return e.check(Bz,t,e.attempt(vV,t,n))}function TV(e){e.exit(`gfmFootnoteDefinition`)}function EV(e,t,n){let r=this;return zz(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 DV(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&&tz(o,o.length,0,Mz(s,e.slice(r+1,n),t)),tz(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),tz(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=QL(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=QL(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var OV=class{constructor(){this.map=[]}add(e,t,n){kV(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}};function kV(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function AV(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 jV(){return{flow:{null:{name:`table`,tokenize:MV,resolveAll:NV}}}}function MV(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 e=r.events[t][1].type;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?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):zI(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):VI(t)?zz(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||BI(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,VI(t)?zz(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 VI(t)?zz(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||zI(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 VI(t)?zz(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||zI(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||zI(n)?(e.exit(`tableRow`),t(n)):VI(n)?zz(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||BI(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 NV(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 OV;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(FV(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=PV(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=PV(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=PV(f,t,o,i,n,d)):(o[0]=o[1],d=PV(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&FV(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=AV(t.events,n))}return e}function PV(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},IV(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=IV(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=IV(t.events,n[2]),a=IV(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({},IV(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function FV(e,t,n,r,i){let a=[],o=IV(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 IV(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var LV={name:`tasklistCheck`,tokenize:zV};function RV(){return{text:{91:LV}}}function zV(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 BI(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 zI(r)?t(r):VI(r)?e.check({tokenize:BV},t,n)(r):n(r)}}function BV(e,t,n){return zz(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function VV(e){return iz([gz(),yV(),DV(e),jV(),RV()])}var HV={};function UV(e){let t=this,n=e||HV,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(VV(n)),a.push($R()),o.push(ez(n))}var WV=Object.defineProperty,GV=Object.defineProperties,KV=Object.getOwnPropertyDescriptors,qV=Object.getOwnPropertySymbols,JV=Object.prototype.hasOwnProperty,YV=Object.prototype.propertyIsEnumerable,XV=(e,t,n)=>t in e?WV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZV=(e,t)=>{for(var n in t||={})JV.call(t,n)&&XV(e,n,t[n]);if(qV)for(var n of qV(t))YV.call(t,n)&&XV(e,n,t[n]);return e},QV=(e,t)=>GV(e,KV(t)),$V=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]===`\\`&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},eH=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},tH=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]===`\\`&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!eH(e,n)&&(t+=1)}return t},nH=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]===`\\`&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},rH=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,iH=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(rH,(t,n,r,i)=>$V(e,i)?t:`${n}\\>${r}`),aH=/(\*\*)([^*]*\*?)$/,oH=/(__)([^_]*?)$/,sH=/(\*\*\*)([^*]*?)$/,cH=/(\*)([^*]*?)$/,lH=/(_)([^_]*?)$/,uH=/(`)([^`]*?)$/,dH=/(~~)([^~]*?)$/,fH=/^[\s_~*`]*$/,pH=/^[\s]*[-*+][\s]+$/,mH=/[\p{L}\p{N}_]/u,hH=/^```[^`\n]*```?$/,gH=/^\*{4,}$/,_H=/(__)([^_]+)_$/,vH=/(~~)([^~]+)~$/,yH=/~~/g,bH=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:mH.test(e)},xH=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},SH=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]===`[`)n+=1;else if(e[r]===`]`&&(--n,n===0))return r;return-1},CH=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]===`\\`&&e[i+1]===`$`){i+=1;continue}e[i]===`$`&&(e[i+1]===`$`?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},wH=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
127
+ `)return!1}return!1},TH=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`)`)return!1;if(e[n]===`(`)return n>0&&e[n-1]===`]`?wH(e,t):!1;if(e[n]===`
128
+ `)return!1}return!1},EH=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`>`)return!1;if(e[n]===`<`){let t=n+1<e.length?e[n+1]:``;return t>=`a`&&t<=`z`||t>=`A`&&t<=`Z`||t===`/`}if(e[n]===`
129
+ `)return!1}return!1},DH=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===`
130
+ `){r=n+1;break}let i=e.length;for(let n=t;n<e.length;n+=1)if(e[n]===`
131
+ `){i=n;break}let a=e.substring(r,i),o=0,s=!1;for(let e of a)if(e===n)o+=1;else if(e!==` `&&e!==` `){s=!0;break}return o>=3&&!s},OH=(e,t,n,r)=>n===`\\`||e.includes(`$`)&&CH(e,t)?!0:n!==`*`&&r===`*`?(t<e.length-2?e[t+2]:``)!==`*`:!!(n===`*`||n&&r&&bH(n)&&bH(r)||(!n||n===` `||n===` `||n===`
132
+ `)&&(!r||r===` `||r===` `||r===`
133
+ `)),kH=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!==`*`)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;OH(e,i,a,o)||(t+=1)}return t},AH=(e,t,n,r)=>!!(n===`\\`||e.includes(`$`)&&CH(e,t)||TH(e,t)||EH(e,t)||n===`_`||r===`_`||n&&r&&bH(n)&&bH(r)),jH=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!==`_`)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;AH(e,i,a,o)||(t+=1)}return t},MH=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]===`*`?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},NH=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]===`*`&&r+1<e.length&&e[r+1]===`*`&&(t+=1,r+=1)}return t},PH=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]===`_`&&r+1<e.length&&e[r+1]===`_`&&(t+=1,r+=1)}return t},FH=(e,t,n)=>{if(!t||fH.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
134
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return pH.test(a)&&t.includes(`
135
+ `)?!0:DH(e,n,`*`)},IH=e=>{let t=e.match(aH);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return $V(e,r)||nH(e,r)||FH(e,n,r)?e:NH(e)%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},LH=(e,t,n)=>{if(!t||fH.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
136
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return pH.test(a)&&t.includes(`
137
+ `)?!0:DH(e,n,`_`)},RH=e=>{let t=e.match(oH);if(!t){let t=e.match(_H);if(t){let n=e.lastIndexOf(t[1]);if(!($V(e,n)||nH(e,n))&&PH(e)%2==1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return $V(e,r)||nH(e,r)||LH(e,n,r)?e:PH(e)%2==1?`${e}__`:e},zH=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]===`*`&&e[n-1]!==`*`&&e[n+1]!==`*`&&e[n-1]!==`\\`&&!CH(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if((!t||t===` `||t===` `||t===`
138
+ `)&&(!r||r===` `||r===` `||r===`
139
+ `)||t&&r&&bH(t)&&bH(r))continue;return n}}return-1},BH=e=>{if(!e.match(cH))return e;let t=zH(e);if(t===-1||$V(e,t)||nH(e,t))return e;let n=e.substring(t+1);return!n||fH.test(n)?e:kH(e)%2==1?`${e}*`:e},VH=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]===`_`&&e[n-1]!==`_`&&e[n+1]!==`_`&&e[n-1]!==`\\`&&!CH(e,n)&&!TH(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if(t&&r&&bH(t)&&bH(r))continue;return n}}return-1},HH=e=>{let t=e.length;for(;t>0&&e[t-1]===`
140
+ `;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},UH=e=>{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if(NH(t)%2!=1)return null;let n=t.indexOf(`**`),r=VH(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},WH=e=>{if(!e.match(lH))return e;let t=VH(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||fH.test(n)||$V(e,t)||nH(e,t))return e;if(jH(e)%2==1){let t=UH(e);return t===null?HH(e):t}return e},GH=e=>{let t=NH(e),n=kH(e);return t%2==0&&n%2==0},KH=(e,t,n)=>!t||fH.test(t)||$V(e,n)||nH(e,n)?!0:DH(e,n,`*`),qH=e=>{if(gH.test(e))return e;let t=e.match(sH);if(!t)return e;let n=t[2];return KH(e,n,e.lastIndexOf(t[1]))?e:MH(e)%2==1?GH(e)?e:`${e}***`:e},JH=/<[a-zA-Z/][^>]*$/,YH=e=>{let t=e.match(JH);return!t||t.index===void 0||$V(e,t.index)?e:e.substring(0,t.index).trimEnd()},XH=e=>!e.match(hH)||e.includes(`
141
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,ZH=e=>(e.match(/```/g)||[]).length%2==1,QH=e=>{let t=XH(e);if(t!==null)return t;let n=e.match(uH);if(n&&!ZH(e)){let t=n[2];if(!t||fH.test(t))return e;if(tH(e)%2==1)return`${e}\``}return e},$H=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",eU=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!$H(e,r)&&(n=!n),!n&&e[r]===`$`&&e[r+1]===`$`&&(t+=1,r+=1);return t},tU=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]===`\\`){r+=1;continue}if(e[r]==="`"&&!$H(e,r)){n=!n;continue}!n&&e[r]===`$`&&(r+1<e.length&&e[r+1]===`$`?r+=1:t+=1)}return t},nU=e=>{if(e.endsWith(`$`)&&!e.endsWith(`$$`))return`${e}$`;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(`
142
+ `,t)!==-1&&!e.endsWith(`
143
+ `)?`${e}
144
+ $$`:`${e}$$`},rU=e=>eU(e)%2==0?e:nU(e),iU=e=>tU(e)%2==1?`${e}$`:e,aU=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=xH(e,t);if(r===-1||$V(e,r))return null;let i=r>0&&e[r-1]===`!`,a=i?r-1:r,o=e.substring(0,a);if(i)return o;let s=e.substring(r+1,t);return n===`text-only`?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},oU=(e,t)=>{for(let n=0;n<t;n++)if(e[n]===`[`&&!$V(e,n)){if(n>0&&e[n-1]===`!`)continue;let t=SH(e,n);if(t===-1)return n;if(t+1<e.length&&e[t+1]===`(`){let r=e.indexOf(`)`,t+2);r!==-1&&(n=r)}}return t},sU=(e,t,n)=>{let r=t>0&&e[t-1]===`!`,i=r?t-1:t;if(!e.substring(t+1).includes(`]`)){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=oU(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}if(SH(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=oU(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},cU=(e,t=`protocol`)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!$V(e,n)){let r=aU(e,n,t);if(r!==null)return r}for(let n=e.length-1;n>=0;--n)if(e[n]===`[`&&!$V(e,n)){let r=sU(e,n,t);if(r!==null)return r}return e},lU=/^-{1,2}$/,uU=/^[\s]*-{1,2}[\s]+$/,dU=/^={1,2}$/,fU=/^[\s]*={1,2}[\s]+$/,pU=e=>{if(!e||typeof e!=`string`)return e;let t=e.lastIndexOf(`
145
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(lU.test(i)&&!n.match(uU)){let t=r.split(`
146
+ `).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(dU.test(i)&&!n.match(fU)){let t=r.split(`
147
+ `).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},mU=RegExp(`(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])`,`gu`),hU=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(mU,(t,n)=>$V(e,n)?t:`\\~`),gU=e=>{let t=e.match(dH);if(t){let n=t[2];if(!n||fH.test(n))return e;let r=e.lastIndexOf(t[1]);if($V(e,r)||nH(e,r))return e;if(e.match(yH)?.length%2==1)return`${e}~~`}else{let t=e.match(vH);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if($V(e,n)||nH(e,n))return e;if(e.match(yH)?.length%2==1)return`${e}~`}}return e},_U=e=>e!==!1,vU=e=>e===!0,yU={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},bU=[{handler:{name:`singleTilde`,handle:hU,priority:yU.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:iH,priority:yU.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:YH,priority:yU.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:pU,priority:yU.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:cU,priority:yU.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:qH,priority:yU.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:IH,priority:yU.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:RH,priority:yU.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:BH,priority:yU.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:WH,priority:yU.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:QH,priority:yU.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:gU,priority:yU.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:rU,priority:yU.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:iU,priority:yU.INLINE_KATEX},optionKey:`inlineKatex`}],xU=e=>{let t=e?.linkMode??`protocol`;return bU.filter(({handler:t,optionKey:n})=>t.name===`links`?_U(e?.links)||_U(e?.images):t.name===`inlineKatex`?vU(e?.inlineKatex):_U(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:QV(ZV({},e),{handle:e=>cU(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},SU=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=xU(t),i=(t?.handlers??[]).map(e=>({handler:QV(ZV({},e),{priority:e.priority??yU.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n};function CU(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=CU(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function wU(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=CU(e))&&(r&&(r+=` `),r+=t);return r}var TU=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},EU=(e,t)=>({classGroupId:e,validator:t}),DU=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),OU=`-`,kU=[],AU=`arbitrary..`,jU=e=>{let t=PU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return NU(e);let n=e.split(OU);return MU(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?TU(i,t):t:i||kU}return n[e]||kU}}},MU=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=MU(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(OU):e.slice(t).join(OU),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},NU=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?AU+r:void 0})(),PU=e=>{let{theme:t,classGroups:n}=e;return FU(n,t)},FU=(e,t)=>{let n=DU();for(let r in e){let i=e[r];IU(i,n,r,t)}return n},IU=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];LU(i,t,n,r)}},LU=(e,t,n,r)=>{if(typeof e==`string`){RU(e,t,n);return}if(typeof e==`function`){zU(e,t,n,r);return}BU(e,t,n,r)},RU=(e,t,n)=>{let r=e===``?t:VU(t,e);r.classGroupId=n},zU=(e,t,n,r)=>{if(HU(e)){IU(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(EU(n,e))},BU=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];IU(o,VU(t,a),n,r)}},VU=(e,t)=>{let n=e,r=t.split(OU),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=DU(),n.nextPart.set(t,i)),n=i}return n},HU=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,UU=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},WU=`!`,GU=`:`,KU=[],qU=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),JU=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===GU){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(WU)?(c=s.slice(0,-1),l=!0):s.startsWith(WU)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return qU(t,l,c,u)};if(t){let e=t+GU,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):qU(KU,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},YU=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},XU=e=>({cache:UU(e.cacheSize),parseClassName:JU(e),sortModifiers:YU(e),postfixLookupClassGroupIds:ZU(e),...jU(e)}),ZU=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},QU=/\s+/,$U=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(QU),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+WU:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},eW=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=tW(n))&&(i&&(i+=` `),i+=r);return i},tW=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=tW(e[r]))&&(n&&(n+=` `),n+=t);return n},nW=(e,...t)=>{let n,r,i,a,o=o=>(n=XU(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=$U(e,n);return i(e,a),a};return a=o,(...e)=>a(eW(...e))},rW=[],iW=e=>{let t=t=>t[e]||rW;return t.isThemeGetter=!0,t},aW=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oW=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sW=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lW=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pW=e=>sW.test(e),mW=e=>!!e&&!Number.isNaN(Number(e)),hW=e=>!!e&&Number.isInteger(Number(e)),gW=e=>e.endsWith(`%`)&&mW(e.slice(0,-1)),_W=e=>cW.test(e),vW=()=>!0,yW=e=>lW.test(e)&&!uW.test(e),bW=()=>!1,xW=e=>dW.test(e),SW=e=>fW.test(e),CW=e=>!EW(e)&&!PW(e),wW=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),TW=e=>HW(e,KW,bW),EW=e=>aW.test(e),DW=e=>HW(e,qW,yW),OW=e=>HW(e,JW,mW),kW=e=>HW(e,XW,vW),AW=e=>HW(e,YW,bW),jW=e=>HW(e,WW,bW),MW=e=>HW(e,GW,SW),NW=e=>HW(e,ZW,xW),PW=e=>oW.test(e),FW=e=>UW(e,qW),IW=e=>UW(e,YW),LW=e=>UW(e,WW),RW=e=>UW(e,KW),zW=e=>UW(e,GW),BW=e=>UW(e,ZW,!0),VW=e=>UW(e,XW,!0),HW=(e,t,n)=>{let r=aW.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},UW=(e,t,n=!1)=>{let r=oW.exec(e);return r?r[1]?t(r[1]):n:!1},WW=e=>e===`position`||e===`percentage`,GW=e=>e===`image`||e===`url`,KW=e=>e===`length`||e===`size`||e===`bg-size`,qW=e=>e===`length`,JW=e=>e===`number`,YW=e=>e===`family-name`,XW=e=>e===`number`||e===`weight`,ZW=e=>e===`shadow`,QW=nW(()=>{let e=iW(`color`),t=iW(`font`),n=iW(`text`),r=iW(`font-weight`),i=iW(`tracking`),a=iW(`leading`),o=iW(`breakpoint`),s=iW(`container`),c=iW(`spacing`),l=iW(`radius`),u=iW(`shadow`),d=iW(`inset-shadow`),f=iW(`text-shadow`),p=iW(`drop-shadow`),m=iW(`blur`),h=iW(`perspective`),g=iW(`aspect`),_=iW(`ease`),v=iW(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),PW,EW],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[PW,EW,c],T=()=>[pW,`full`,`auto`,...w()],E=()=>[hW,`none`,`subgrid`,PW,EW],D=()=>[`auto`,{span:[`full`,hW,PW,EW]},hW,PW,EW],O=()=>[hW,`auto`,PW,EW],k=()=>[`auto`,`min`,`max`,`fr`,PW,EW],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[pW,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[pW,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[pW,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,PW,EW],te=()=>[...b(),LW,jW,{position:[PW,EW]}],I=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,RW,TW,{size:[PW,EW]}],re=()=>[gW,FW,DW],L=()=>[``,`none`,`full`,l,PW,EW],ie=()=>[``,mW,FW,DW],R=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],oe=()=>[mW,gW,LW,jW],se=()=>[``,`none`,m,PW,EW],ce=()=>[`none`,mW,PW,EW],le=()=>[`none`,mW,PW,EW],ue=()=>[mW,PW,EW],de=()=>[pW,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[_W],breakpoint:[_W],color:[vW],container:[_W],"drop-shadow":[_W],ease:[`in`,`out`,`in-out`],font:[CW],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[_W],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[_W],shadow:[_W],spacing:[`px`,mW],text:[_W],"text-shadow":[_W],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,pW,EW,PW,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,PW,EW]}],"container-named":[wW],columns:[{columns:[mW,EW,PW,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[hW,`auto`,PW,EW]}],basis:[{basis:[pW,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[mW,pW,`auto`,`initial`,`none`,EW]}],grow:[{grow:[``,mW,PW,EW]}],shrink:[{shrink:[``,mW,PW,EW]}],order:[{order:[hW,`first`,`last`,`none`,PW,EW]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,FW,DW]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,VW,kW]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,gW,EW]}],"font-family":[{font:[IW,AW,t]}],"font-features":[{"font-features":[EW]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,PW,EW]}],"line-clamp":[{"line-clamp":[mW,`none`,PW,OW]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,PW,EW]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,PW,EW]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...R(),`wavy`]}],"text-decoration-thickness":[{decoration:[mW,`from-font`,`auto`,PW,DW]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[mW,`auto`,PW,EW]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[hW,PW,EW]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,PW,EW]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,PW,EW]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},hW,PW,EW],radial:[``,PW,EW],conic:[hW,PW,EW]},zW,MW]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...R(),`hidden`,`none`]}],"divide-style":[{divide:[...R(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...R(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[mW,PW,EW]}],"outline-w":[{outline:[``,mW,FW,DW]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,BW,NW]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,BW,NW]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ie()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[mW,DW]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,BW,NW]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[mW,PW,EW]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[mW]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[PW,EW]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[mW]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,PW,EW]}],filter:[{filter:[``,`none`,PW,EW]}],blur:[{blur:se()}],brightness:[{brightness:[mW,PW,EW]}],contrast:[{contrast:[mW,PW,EW]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,BW,NW]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,mW,PW,EW]}],"hue-rotate":[{"hue-rotate":[mW,PW,EW]}],invert:[{invert:[``,mW,PW,EW]}],saturate:[{saturate:[mW,PW,EW]}],sepia:[{sepia:[``,mW,PW,EW]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,PW,EW]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[mW,PW,EW]}],"backdrop-contrast":[{"backdrop-contrast":[mW,PW,EW]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,mW,PW,EW]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[mW,PW,EW]}],"backdrop-invert":[{"backdrop-invert":[``,mW,PW,EW]}],"backdrop-opacity":[{"backdrop-opacity":[mW,PW,EW]}],"backdrop-saturate":[{"backdrop-saturate":[mW,PW,EW]}],"backdrop-sepia":[{"backdrop-sepia":[``,mW,PW,EW]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,PW,EW]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[mW,`initial`,PW,EW]}],ease:[{ease:[`linear`,`initial`,_,PW,EW]}],delay:[{delay:[mW,PW,EW]}],animate:[{animate:[`none`,v,PW,EW]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,PW,EW]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[PW,EW,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":[`translate-none`],zoom:[{zoom:[hW,PW,EW]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,PW,EW]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,PW,EW]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[mW,FW,DW,OW]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),$W=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eG=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tG={};function nG(e,t){return((t||tG).jsx?eG:$W).test(e)}var rG=/[ \t\n\f\r]/g;function iG(e){return typeof e==`object`?e.type===`text`?aG(e.value):!1:aG(e)}function aG(e){return e.replace(rG,``)===``}var oG=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`/`,d=`*`,f=``;function p(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,p=1;function h(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
148
+ `);p=~n?e.length-n:p+e.length}function g(){var e={line:l,column:p};return function(t){return t.position=new _(e),b(),t}}function _(e){this.start=e,this.end={line:l,column:p},this.source=t.source}_.prototype.content=e;function v(n){var r=Error(t.source+`:`+l+`:`+p+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function b(){y(i)}function x(e){var t;for(e||=[];t=S();)t!==!1&&e.push(t);return e}function S(){var t=g();if(!(u!=e.charAt(0)||d!=e.charAt(1))){for(var n=2;f!=e.charAt(n)&&(d!=e.charAt(n)||u!=e.charAt(n+1));)++n;if(n+=2,f===e.charAt(n-1))return v(`End of comment missing`);var r=e.slice(2,n-2);return p+=2,h(r),e=e.slice(n),p+=2,t({type:`comment`,comment:r})}}function C(){var e=g(),t=y(a);if(t){if(S(),!y(o))return v(`property missing ':'`);var r=y(s),i=e({type:`declaration`,property:m(t[0].replace(n,f)),value:r?m(r[0].replace(n,f)):f});return y(c),i}}function w(){var e=[];x(e);for(var t;t=C();)t!==!1&&(e.push(t),x(e));return e}return b(),w()}function m(e){return e?e.replace(l,f):f}t.exports=p})),sG=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(oG());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),cG=o((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))}})),lG=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(sG()),r=cG();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function uG(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?fG(e.position):`start`in e||`end`in e?fG(e):`line`in e||`column`in e?dG(e):``}function dG(e){return pG(e&&e.line)+`:`+pG(e&&e.column)}function fG(e){return dG(e&&e.start)+`-`+dG(e&&e.end)}function pG(e){return e&&typeof e==`number`?e:1}var mG=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=uG(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}};mG.prototype.file=``,mG.prototype.name=``,mG.prototype.reason=``,mG.prototype.message=``,mG.prototype.stack=``,mG.prototype.column=void 0,mG.prototype.line=void 0,mG.prototype.ancestors=void 0,mG.prototype.cause=void 0,mG.prototype.fatal=void 0,mG.prototype.place=void 0,mG.prototype.ruleId=void 0,mG.prototype.source=void 0;var hG=l(lG(),1),gG={}.hasOwnProperty,_G=new Map,vG=/[A-Z]/g,yG=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),bG=new Set([`td`,`th`]);function xG(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=MG(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=jG(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`?WA:UA,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=SG(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function SG(e,t,n){if(t.type===`element`)return CG(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return wG(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return EG(e,t,n);if(t.type===`mdxjsEsm`)return TG(e,t);if(t.type===`root`)return DG(e,t,n);if(t.type===`text`)return OG(e,t)}function CG(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=WA,e.schema=i),e.ancestors.push(t);let a=RG(e,t.tagName,!1),o=NG(e,t),s=FG(e,t);return yG.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!iG(e):!0})),kG(e,o,a,t),AG(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function wG(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)}zG(e,t.position)}function TG(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zG(e,t.position)}function EG(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=WA,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:RG(e,t.name,!0),o=PG(e,t),s=FG(e,t);return kG(e,o,a,t),AG(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function DG(e,t,n){let r={};return AG(r,FG(e,t)),e.create(t,e.Fragment,r,n)}function OG(e,t){return t.value}function kG(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function AG(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function jG(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 MG(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=HF(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 NG(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&gG.call(t.properties,i)){let a=IG(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&bG.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 PG(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 zG(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 zG(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function FG(e,t){let n=[],r=-1,i=e.passKeys?new Map:_G;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=SG(e,a,o);s!==void 0&&n.push(s)}return n}function IG(e,t,n){let r=BA(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?KA(n):XA(n)),r.property===`style`){let t=typeof n==`object`?n:LG(e,String(n));return e.stylePropertyNameCase===`css`&&(t=BG(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?IA[r.property]||r.property:r.attribute,n]}}function LG(e,t){try{return(0,hG.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new mG("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=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function RG(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=nG(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=nG(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return gG.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);zG(e)}function zG(e,t){let n=new mG("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=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function BG(e){let t={},n;for(n in e)gG.call(e,n)&&(t[VG(n)]=e[n]);return t}function VG(e){let t=e.replace(vG,HG);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function HG(e){return`-`+e.toLowerCase()}var UG={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`]},WG={tokenize:GG};function GG(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),zz(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return zI(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var KG={tokenize:JG},qG={tokenize:YG};function JG(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 tz(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(qG,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(qG,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return zI(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++;tz(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 YG(e,t,n){return zz(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var XG={tokenize:ZG};function ZG(e){let t=this,n=e.attempt(Bz,r,e.attempt(this.parser.constructs.flowInitial,i,zz(e,e.attempt(this.parser.constructs.flow,i,e.attempt(mB,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var QG={resolveAll:nK()},$G=tK(`string`),eK=tK(`text`);function tK(e){return{resolveAll:nK(e===`text`?rK:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function nK(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 rK(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 iK=s({attentionMarkers:()=>fK,contentInitial:()=>oK,disable:()=>pK,document:()=>aK,flow:()=>cK,flowInitial:()=>sK,insideSpan:()=>dK,string:()=>lK,text:()=>uK}),aK={42:sV,43:sV,45:sV,48:sV,49:sV,50:sV,51:sV,52:sV,53:sV,54:sV,55:sV,56:sV,57:sV,62:Hz},oK={91:CB},sK={[-2]:nB,[-1]:nB,32:nB},cK={35:kB,42:aV,45:[hV,aV],60:PB,61:hV,95:aV,96:$z,126:$z},lK={38:Xz,92:Kz},uK={[-5]:rV,[-4]:rV,[-3]:rV,33:$B,38:Xz,42:Nz,60:[Lz,VB],91:tV,92:[DB,Kz],93:UB,95:Nz,96:oB},dK={null:[Nz,QG]},fK={null:[42,95]},pK={null:[]};function mK(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=nz(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Mz(a,l.events,l),l.events):[]}function f(e,t){return gK(p(e),t)}function p(e){return hK(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){zI(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&&tz(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 hK(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 gK(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=`
149
+ `;break;case-3:o=`\r
150
+ `;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 _K(e){let t={constructs:iz([iK,...(e||{}).extensions||[]]),content:n(WG),defined:[],document:n(KG),flow:n(XG),lazy:{},string:n($G),text:n(eK)};return t;function n(e){return n;function n(n){return mK(t,e,n)}}}function vK(e){for(;!fB(e););return e}var yK=/[\0\t\n\r]/g;function bK(){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(yK.lastIndex=u,c=yK.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}}function xK(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)}var SK=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function CK(e){return e.replace(SK,wK)}function wK(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return xK(n.slice(t?2:1),t?16:10)}return Yz(n)||e}var TK={}.hasOwnProperty;function EK(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),DK(n)(vK(_K(n).document().write(bK()(e,t,!0))))}function DK(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ge),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(fe),blockQuote:a(se),characterEscape:T,characterReference:T,codeFenced:a(ce),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ce,o),codeText:a(le,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(de),hardBreakEscape:a(pe),hardBreakTrailing:a(pe),htmlFlow:a(me,o),htmlFlowData:T,htmlText:a(me,o),htmlTextData:T,image:a(he),label:o,link:a(ge),listItem:a(ve),listItemValue:f,listOrdered:a(_e,d),listUnordered:a(_e),paragraph:a(ye),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a(be),thematicBreak:a(Se)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:L,characterReferenceMarkerNumeric:L,characterReferenceValue:ie,characterReference:R,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:ee,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:F,resourceTitleString:te,resource:I,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};kK(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];TK.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||jK).call(a,void 0,e[0])}for(r.position={start:OK(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:OK(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:OK(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||jK).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+uG({start:e.start,end:e.end})+`): it’s not open`);n.position.end=OK(e.end)}function u(){return rR(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=fL(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:OK(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=OK(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=OK(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=CK(t),n.identifier=fL(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function I(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=fL(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function L(e){this.data.characterReferenceType=e.type}function ie(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=xK(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Yz(t);let i=this.stack[this.stack.length-1];i.value+=r}function R(e){let t=this.stack.pop();t.position.end=OK(e.end)}function ae(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function se(){return{type:`blockquote`,children:[]}}function ce(){return{type:`code`,lang:null,meta:null,value:``}}function le(){return{type:`inlineCode`,value:``}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function he(){return{type:`image`,title:null,url:``,alt:null}}function ge(){return{type:`link`,title:null,url:``,children:[]}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ye(){return{type:`paragraph`,children:[]}}function be(){return{type:`strong`,children:[]}}function xe(){return{type:`text`,value:``}}function Se(){return{type:`thematicBreak`}}}function OK(e){return{line:e.line,column:e.column,offset:e.offset}}function kK(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?kK(e,r):AK(e,r)}}function AK(e,t){let n;for(n in t)if(TK.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function jK(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+uG({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uG({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+uG({start:t.start,end:t.end})+`) is still open`)}function MK(e){let t=this;t.parser=n;function n(n){return EK(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function NK(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 PK(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function FK(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||NK,r=e.options.footnoteBackLabel||PK,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=jz(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:{...lA(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
151
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
152
+ `}]}}function IK(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 LK(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
153
+ `}]}function RK(e,t){let n=t.value?t.value+`
154
+ `:``,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 zK(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BK(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VK(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=jz(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 HK(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 UK(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function WK(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 GK(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return WK(e,t);let i={src:jz(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 KK(e,t){let n={src:jz(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 qK(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 JK(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return WK(e,t);let i={href:jz(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 YK(e,t){let n={href:jz(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 XK(e,t,n){let r=e.all(t),i=n?ZK(n):QK(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:`
155
+ `}),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:`
156
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function ZK(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=QK(n[r])}return t}function QK(e){return e.spread??e.children.length>1}function $K(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 eq(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tq(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function nq(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rq(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=HF(t.children[1]),o=VF(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 iq(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 aq(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var oq=9,sq=32;function cq(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(lq(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(lq(t.slice(i),i>0,!1)),a.join(``)}function lq(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===oq||t===sq;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===oq||t===sq;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function uq(e,t){let n={type:`text`,value:cq(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function dq(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var fq={blockquote:IK,break:LK,code:RK,delete:zK,emphasis:BK,footnoteReference:VK,heading:HK,html:UK,imageReference:GK,image:KK,inlineCode:qK,linkReference:JK,link:YK,listItem:XK,list:$K,paragraph:eq,root:tq,strong:nq,table:rq,tableCell:aq,tableRow:iq,text:uq,thematicBreak:dq,toml:pq,yaml:pq,definition:pq,footnoteDefinition:pq};function pq(){}var mq={}.hasOwnProperty,hq={};function gq(e,t){let n=t||hq,r=new Map,i=new Map,a={all:s,applyData:vq,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...fq,...n.handlers},one:o,options:n,patch:_q,wrap:bq};return zk(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(mq.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=lA(n);return r.children=a.all(e),r}return lA(e)}return(a.options.unknownHandler||yq)(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=xq(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=xq(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function _q(e,t){e.position&&(t.position=WF(e))}function vq(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,lA(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function yq(e,t){let n=t.data||{},r=`value`in t&&!(mq.call(n,`hProperties`)||mq.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 bq(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
157
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
158
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
159
+ `}),n}function xq(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Sq(e,t){let n=gq(e,t),r=n.one(e,void 0),i=FK(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
160
+ `},i)),a}function Cq(e,t){return e&&`run`in e?async function(n,r){let i=Sq(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Sq(n,{file:r,...e||t})}}function wq(e){if(e)throw e}var Tq=o(((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 Eq(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 Dq(){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);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Oq(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 Oq(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 kq={basename:Aq,dirname:jq,extname:Mq,join:Nq,sep:`/`};function Aq(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Iq(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 jq(e){if(Iq(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 Mq(e){Iq(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}continue}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 Nq(...e){let t=-1,n;for(;++t<e.length;)Iq(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Pq(n)}function Pq(e){Iq(e);let t=e.codePointAt(0)===47,n=Fq(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Fq(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 Iq(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Lq={cwd:Rq};function Rq(){return`/`}function zq(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Bq(e){if(typeof e==`string`)e=new URL(e);else if(!zq(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 Vq(e)}function Vq(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 Hq=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Uq=class{constructor(e){let t;t=e?zq(e)?{path:e}:typeof e==`string`||qq(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Lq.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Hq.length;){let e=Hq[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)Hq.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?kq.basename(this.path):void 0}set basename(e){Gq(e,`basename`),Wq(e,`basename`),this.path=kq.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?kq.dirname(this.path):void 0}set dirname(e){Kq(this.basename,`dirname`),this.path=kq.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?kq.extname(this.path):void 0}set extname(e){if(Wq(e,`extname`),Kq(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=kq.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){zq(e)&&(e=Bq(e)),Gq(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?kq.basename(this.path,this.extname):void 0}set stem(e){Gq(e,`stem`),Wq(e,`stem`),this.path=kq.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 mG(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 Wq(e,t){if(e&&e.includes(kq.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+kq.sep+"`")}function Gq(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Kq(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function qq(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Jq=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Yq=l(Tq(),1),Xq={}.hasOwnProperty,Zq=new class e extends Jq{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=Dq()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Yq.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(eJ(`data`,this.frozen),this.namespace[e]=t,this):Xq.call(this.namespace,e)&&this.namespace[e]||void 0:e?(eJ(`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=rJ(e),n=this.parser||this.Parser;return Qq(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Qq(`process`,this.parser||this.Parser),$q(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=rJ(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);aJ(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(),Qq(`processSync`,this.parser||this.Parser),$q(`processSync`,this.compiler||this.Compiler),this.process(e,r),nJ(`processSync`,`process`,t),n;function r(e,r){t=!0,wq(e),n=r}}run(e,t,n){tJ(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=rJ(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),nJ(`runSync`,`run`,n),r;function i(e,t){wq(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=rJ(t),r=this.compiler||this.Compiler;return $q(`stringify`,r),tJ(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(eJ(`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,Yq.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];Eq(o)&&Eq(r)&&(r=(0,Yq.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Qq(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function $q(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function eJ(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 tJ(e){if(!Eq(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function nJ(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function rJ(e){return iJ(e)?e:new Uq(e)}function iJ(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function aJ(e){return typeof e==`string`||oJ(e)}function oJ(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function sJ(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var cJ=sJ();function lJ(e){cJ=e}var uJ={exec:()=>null};function dJ(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(pJ.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var fJ=(()=>{try{return!0}catch{return!1}})(),pJ={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},mJ=/^(?:[ \t]*(?:\n|$))+/,hJ=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gJ=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_J=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vJ=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,yJ=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,bJ=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,xJ=dJ(bJ).replace(/bull/g,yJ).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),SJ=dJ(bJ).replace(/bull/g,yJ).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),CJ=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,wJ=/^[^\n]+/,TJ=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,EJ=dJ(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,TJ).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),DJ=dJ(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yJ).getRegex(),OJ=`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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,kJ=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,AJ=dJ(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,kJ).replace(`tag`,OJ).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),jJ=dJ(CJ).replace(`hr`,_J).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,OJ).getRegex(),MJ={blockquote:dJ(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,jJ).getRegex(),code:hJ,def:EJ,fences:gJ,heading:vJ,hr:_J,html:AJ,lheading:xJ,list:DJ,newline:mJ,paragraph:jJ,table:uJ,text:wJ},NJ=dJ(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,_J).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,OJ).getRegex(),PJ={...MJ,lheading:SJ,table:NJ,paragraph:dJ(CJ).replace(`hr`,_J).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,NJ).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,OJ).getRegex()},FJ={...MJ,html:dJ(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,kJ).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:uJ,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:dJ(CJ).replace(`hr`,_J).replace(`heading`,` *#{1,6} *[^
161
+ ]`).replace(`lheading`,xJ).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},IJ=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,LJ=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,RJ=/^( {2,}|\\)\n(?!\s*$)/,zJ=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,BJ=/[\p{P}\p{S}]/u,VJ=/[\s\p{P}\p{S}]/u,HJ=/[^\s\p{P}\p{S}]/u,UJ=dJ(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,VJ).getRegex(),WJ=/(?!~)[\p{P}\p{S}]/u,GJ=/(?!~)[\s\p{P}\p{S}]/u,KJ=/(?:[^\s\p{P}\p{S}]|~)/u,qJ=dJ(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,fJ?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),JJ=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,YJ=dJ(JJ,`u`).replace(/punct/g,BJ).getRegex(),XJ=dJ(JJ,`u`).replace(/punct/g,WJ).getRegex(),ZJ=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,QJ=dJ(ZJ,`gu`).replace(/notPunctSpace/g,HJ).replace(/punctSpace/g,VJ).replace(/punct/g,BJ).getRegex(),$J=dJ(ZJ,`gu`).replace(/notPunctSpace/g,KJ).replace(/punctSpace/g,GJ).replace(/punct/g,WJ).getRegex(),eY=dJ(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,HJ).replace(/punctSpace/g,VJ).replace(/punct/g,BJ).getRegex(),tY=dJ(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,BJ).getRegex(),nY=dJ(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,HJ).replace(/punctSpace/g,VJ).replace(/punct/g,BJ).getRegex(),rY=dJ(/\\(punct)/,`gu`).replace(/punct/g,BJ).getRegex(),iY=dJ(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),aY=dJ(kJ).replace(`(?:-->|$)`,`-->`).getRegex(),oY=dJ(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,aY).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sY=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,cY=dJ(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,sY).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lY=dJ(/^!?\[(label)\]\[(ref)\]/).replace(`label`,sY).replace(`ref`,TJ).getRegex(),uY=dJ(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,TJ).getRegex(),dY=dJ(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,lY).replace(`nolink`,uY).getRegex(),fY=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,pY={_backpedal:uJ,anyPunctuation:rY,autolink:iY,blockSkip:qJ,br:RJ,code:LJ,del:uJ,delLDelim:uJ,delRDelim:uJ,emStrongLDelim:YJ,emStrongRDelimAst:QJ,emStrongRDelimUnd:eY,escape:IJ,link:cY,nolink:uY,punctuation:UJ,reflink:lY,reflinkSearch:dY,tag:oY,text:zJ,url:uJ},mY={...pY,link:dJ(/^!?\[(label)\]\((.*?)\)/).replace(`label`,sY).getRegex(),reflink:dJ(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,sY).getRegex()},hY={...pY,emStrongRDelimAst:$J,emStrongLDelim:XJ,delLDelim:tY,delRDelim:nY,url:dJ(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,fY).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:dJ(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,fY).getRegex()},gY={...hY,br:dJ(RJ).replace(`{2,}`,`*`).getRegex(),text:dJ(hY.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},_Y={normal:MJ,gfm:PJ,pedantic:FJ},vY={normal:pY,gfm:hY,breaks:gY,pedantic:mY},yY={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},bY=e=>yY[e];function xY(e,t){if(t){if(pJ.escapeTest.test(e))return e.replace(pJ.escapeReplace,bY)}else if(pJ.escapeTestNoEncode.test(e))return e.replace(pJ.escapeReplaceNoEncode,bY);return e}function SY(e){try{e=encodeURI(e).replace(pJ.percentDecode,`%`)}catch{return null}return e}function CY(e,t){let n=e.replace(pJ.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(pJ.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(pJ.slashPipe,`|`);return n}function wY(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function TY(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function EY(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function DY(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function OY(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
162
+ `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
163
+ `)}var kY=class{options;rules;lexer;constructor(e){this.options=e||cJ}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:wY(e,`
164
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=OY(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=wY(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:wY(t[0],`
165
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=wY(t[0],`
166
+ `).split(`
167
+ `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
168
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
169
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
170
+ ${s}`:s,r=r?`${r}
171
+ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
172
+ `+e.join(`
173
+ `),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
174
+ `+e.join(`
175
+ `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
176
+ `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=EY(t[2].split(`
177
+ `,1)[0],t[1].length),l=e.split(`
178
+ `,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
179
+ `,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
180
+ `,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
181
+ `+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
182
+ `+l}u=!l.trim(),r+=p+`
183
+ `,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=CY(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
184
+ `):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(CY(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
185
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=wY(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=TY(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),DY(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return DY(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},AY=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||cJ,this.options.tokenizer=this.options.tokenizer||new kY,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:pJ,block:_Y.normal,inline:vY.normal};this.options.pedantic?(t.block=_Y.pedantic,t.inline=vY.pedantic):this.options.gfm&&(t.block=_Y.gfm,this.options.breaks?t.inline=vY.breaks:t.inline=vY.gfm),this.tokenizer.rules=t}static get rules(){return{block:_Y,inline:vY}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(pJ.carriageReturn,`
186
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(pJ.tabCharGlobal,` `).replace(pJ.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
187
+ `:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
188
+ `)?``:`
189
+ `)+r.raw,n.text+=`
190
+ `+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
191
+ `)?``:`
192
+ `)+r.raw,n.text+=`
193
+ `+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`
194
+ `)?``:`
195
+ `)+r.raw,a.text+=`
196
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
197
+ `)?``:`
198
+ `)+r.raw,n.text+=`
199
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},jY=class{options;parser;constructor(e){this.options=e||cJ}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(pJ.notSpaceStart)?.[0],i=e.replace(pJ.endingNewline,``)+`
200
+ `;return r?`<pre><code class="language-`+xY(r)+`">`+(n?i:xY(i,!0))+`</code></pre>
201
+ `:`<pre><code>`+(n?i:xY(i,!0))+`</code></pre>
202
+ `}blockquote({tokens:e}){return`<blockquote>
203
+ ${this.parser.parse(e)}</blockquote>
204
+ `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
205
+ `}hr(e){return`<hr>
206
+ `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
207
+ `+r+`</`+i+`>
208
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
209
+ `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
210
+ `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
211
+ <thead>
212
+ `+t+`</thead>
213
+ `+r+`</table>
214
+ `}tablerow({text:e}){return`<tr>
215
+ ${e}</tr>
216
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
217
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${xY(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=SY(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+xY(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=SY(e);if(i===null)return xY(n);e=i;let a=`<img src="${e}" alt="${xY(n)}"`;return t&&(a+=` title="${xY(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:xY(e.text)}},MY=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},NY=class e{options;renderer;textRenderer;constructor(e){this.options=e||cJ,this.options.renderer=this.options.renderer||new jY,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new MY}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},PY=class{options;block;constructor(e){this.options=e||cJ}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?AY.lex:AY.lexInline}provideParser(e=this.block){return e?NY.parse:NY.parseInline}},FY=new class{defaults=sJ();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=NY;Renderer=jY;TextRenderer=MY;Lexer=AY;Tokenizer=kY;Hooks=PY;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new jY(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new kY(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new PY;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];PY.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&PY.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return AY.lex(e,t??this.defaults)}parser(e,t){return NY.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?AY.lex:AY.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?NY.parse:NY.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?AY.lex:AY.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?NY.parse:NY.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
218
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+xY(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function IY(e,t){return FY.parse(e,t)}IY.options=IY.setOptions=function(e){return FY.setOptions(e),IY.defaults=FY.defaults,lJ(IY.defaults),IY},IY.getDefaults=sJ,IY.defaults=cJ,IY.use=function(...e){return FY.use(...e),IY.defaults=FY.defaults,lJ(IY.defaults),IY},IY.walkTokens=function(e,t){return FY.walkTokens(e,t)},IY.parseInline=FY.parseInline,IY.Parser=NY,IY.parser=NY.parse,IY.Renderer=jY,IY.TextRenderer=MY,IY.Lexer=AY,IY.lexer=AY.lex,IY.Tokenizer=kY,IY.Hooks=PY,IY.parse=IY,IY.options,IY.setOptions,IY.use,IY.walkTokens,IY.parseInline,NY.parse,AY.lex;var LY=`modulepreload`,RY=function(e,t){return new URL(e,t).href},zY={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=RY(t,n),t=s(t),t in zY)return;zY[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:LY,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},BY=300,VY=`300px`,HY=500;function UY(e={}){let{immediate:t=!1,debounceDelay:n=BY,rootMargin:r=VY,idleTimeout:i=HY}=e,[a,o]=(0,B.useState)(!1),s=(0,B.useRef)(null),c=(0,B.useRef)(null),l=(0,B.useRef)(null),u=(0,B.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,B.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,B.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,B.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var WY=/\s/,GY=/^\s+$/,KY=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),qY=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,JY=e=>e.some(e=>qY(e)&&KY.has(e.tagName)),YY=e=>{let t=[],n=``,r=!1;for(let i of e){let e=WY.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},XY=e=>{let t=[],n=``;for(let r of e)WY.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},ZY=(e,t,n,r,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:o},children:[{type:`text`,value:e}]}},QY=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&`children`in a))return;if(JY(t))return Ik;let o=a,s=o.children.indexOf(e);if(s===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let l=n.sep===`char`?XY(c):YY(c),u=r.prevContentLength,d=l.map(e=>{let t=i.count;if(i.count+=e.length,GY.test(e))return{type:`text`,value:e};let r=u>0&&t<u,a=r?0:i.newIndex++*n.stagger;return ZY(e,n.animation,n.duration,n.easing,r,a)});return o.children.splice(s,1,...d),s+d.length},$Y=0;function eX(e){let t={animation:e?.animation??`fadeIn`,duration:e?.duration??150,easing:e?.easing??`ease`,sep:e?.sep??`word`,stagger:e?.stagger??40},n={prevContentLength:0,lastRenderCharCount:0},r=$Y++,i=()=>e=>{let r={count:0,newIndex:0};Lk(e,`text`,(e,i)=>QY(e,i,t,n,r)),n.lastRenderCharCount=r.count,n.prevContentLength=0};return Object.defineProperty(i,"name",{value:`rehypeAnimate$${r}`}),{name:`animate`,type:`animate`,rehypePlugin:i,setPrevContentLength(e){n.prevContentLength=e},getLastRenderCharCount(){let e=n.lastRenderCharCount;return n.lastRenderCharCount=0,e}}}eX();var tX=(0,B.createContext)(!1),nX=()=>(0,B.useContext)(tX),rX=(...e)=>QW(wU(e)),iX=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(n)?t:`${e}:${t}`).join(` `)},aX=e=>e?(...t)=>iX(e,QW(wU(t))):rX,oX=(e,t,n)=>{let r=typeof t==`string`&&n.startsWith(`text/csv`)?``:``,i=typeof t==`string`?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},sX=(0,B.createContext)(rX),cX=()=>(0,B.useContext)(sX),lX=rX(`block`,`before:content-[counter(line)]`,`before:inline-block`,`before:[counter-increment:line]`,`before:w-6`,`before:mr-4`,`before:text-[13px]`,`before:text-right`,`before:text-muted-foreground/50`,`before:font-mono`,`before:select-none`),uX=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},dX=(0,B.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...o})=>{let s=cX(),c=(0,B.useMemo)(()=>s(lX),[s]),l=(0,B.useMemo)(()=>{let e={};return t.bg&&(e[`--sdm-bg`]=t.bg),t.fg&&(e[`--sdm-fg`]=t.fg),t.rootStyle&&Object.assign(e,uX(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,z.jsx)(`div`,{className:s(r,`overflow-x-auto rounded-md border border-border bg-background p-4 text-sm`),"data-language":n,"data-streamdown":`code-block-body`,...o,children:(0,z.jsx)(`pre`,{className:s(r,`bg-[var(--sdm-bg,inherit]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]`),style:l,children:(0,z.jsx)(`code`,{className:a?s(`[counter-increment:line_0] [counter-reset:line]`):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((e,t)=>(0,z.jsx)(`span`,{className:a?c:void 0,children:e.length===0||e.length===1&&e[0].content===``?`
219
+ `:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,z.jsx)(`span`,{className:s(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),fX=({className:e,language:t,style:n,isIncomplete:r,...i})=>(0,z.jsx)(`div`,{className:cX()(`my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":`code-block`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 200px`,...n},...i}),pX=(0,B.createContext)({code:``}),mX=()=>(0,B.useContext)(pX),hX=({language:e})=>{let t=cX();return(0,z.jsx)(`div`,{className:t(`flex h-8 items-center text-muted-foreground text-xs`),"data-language":e,"data-streamdown":`code-block-header`,children:(0,z.jsx)(`span`,{className:t(`ml-1 font-mono lowercase`),children:e})})},gX=e=>{let t=e.length;for(;t>0&&e[t-1]===`
220
+ `;)t--;return e.slice(0,t)},_X=(0,B.lazy)(()=>$(()=>import(`./highlighted-body-OFNGDK62-D_z62he-.js`).then(e=>({default:e.HighlightedCodeBlockBody})),[],import.meta.url)),vX=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=cX(),l=(0,B.useMemo)(()=>gX(e),[e]),u=(0,B.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:l.split(`
221
+ `).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[l]);return(0,z.jsx)(pX.Provider,{value:{code:e},children:(0,z.jsxs)(fX,{isIncomplete:i,language:t,children:[(0,z.jsx)(hX,{language:t}),r?(0,z.jsx)(`div`,{className:c(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,z.jsx)(`div`,{className:c(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`code-block-actions`,children:r})}):null,(0,z.jsx)(B.Suspense,{fallback:(0,z.jsx)(dX,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,z.jsx)(_X,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},yX={CheckIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z`,fill:`currentColor`,fillRule:`evenodd`})}),CopyIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),DownloadIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),ExternalLinkIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z`,fill:`currentColor`,fillRule:`evenodd`})}),Loader2Icon:e=>(0,z.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,z.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z`,fill:`currentColor`,fillRule:`evenodd`})}),RotateCcwIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z`,fill:`currentColor`,fillRule:`evenodd`})}),XIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomInIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomOutIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})})},bX=(0,B.createContext)(yX),xX=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>e[n]===t[n]):!1},SX=({icons:e,children:t})=>{let n=(0,B.useRef)(e),r=(0,B.useRef)(e?{...yX,...e}:yX);xX(n.current,e)||(n.current=e,r.current=e?{...yX,...e}:yX);let i=r.current;return(0,z.jsx)(bX.Provider,{value:i,children:t})},CX=()=>(0,B.useContext)(bX),wX={copyCode:`Copy Code`,downloadFile:`Download file`,downloadDiagram:`Download diagram`,downloadDiagramAsSvg:`Download diagram as SVG`,downloadDiagramAsPng:`Download diagram as PNG`,downloadDiagramAsMmd:`Download diagram as MMD`,viewFullscreen:`View fullscreen`,exitFullscreen:`Exit fullscreen`,mermaidFormatSvg:`SVG`,mermaidFormatPng:`PNG`,mermaidFormatMmd:`MMD`,copyTable:`Copy table`,copyTableAsMarkdown:`Copy table as Markdown`,copyTableAsCsv:`Copy table as CSV`,copyTableAsTsv:`Copy table as TSV`,downloadTable:`Download table`,downloadTableAsCsv:`Download table as CSV`,downloadTableAsMarkdown:`Download table as Markdown`,tableFormatMarkdown:`Markdown`,tableFormatCsv:`CSV`,tableFormatTsv:`TSV`,imageNotAvailable:`Image not available`,downloadImage:`Download image`,openExternalLink:`Open external link?`,externalLinkWarning:`You're about to visit an external website.`,close:`Close`,copyLink:`Copy link`,copied:`Copied`,openLink:`Open link`},TX=(0,B.createContext)(wX),EX=()=>(0,B.useContext)(TX),DX=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=cX(),[c,l]=(0,B.useState)(!1),u=(0,B.useRef)(0),{code:d}=mX(),{isAnimating:f}=(0,B.useContext)(NQ),p=EX(),m=a??d,h=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{c||(await navigator.clipboard.writeText(m),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,B.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let g=CX(),_=c?g.CheckIcon:g.CopyIcon;return(0,z.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:f,onClick:h,title:p.copyCode,type:`button`,...o,children:r??(0,z.jsx)(_,{size:14})})},OX={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,文言:`wy`},kX=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=cX(),{code:c}=mX(),{isAnimating:l}=(0,B.useContext)(NQ),u=EX(),d=CX(),f=a??c,p=`file.${n&&n in OX?OX[n]:`txt`}`;return(0,z.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:()=>{try{oX(p,f,`text/plain`),e?.()}catch(e){t?.(e)}},title:u.downloadFile,type:`button`,...o,children:r??(0,z.jsx)(d.DownloadIcon,{size:14})})},AX=()=>{let{Loader2Icon:e}=CX(),t=cX();return(0,z.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,z.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,z.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,z.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},jX=/\.[^/.]+$/,MX=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=CX(),c=cX(),l=(0,B.useRef)(null),[u,d]=(0,B.useState)(!1),[f,p]=(0,B.useState)(!1),m=EX(),h=o.width!=null||o.height!=null,g=(u||h)&&!f,_=f&&!h;(0,B.useEffect)(()=>{let e=l.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;d(t),p(!t)}},[]);let v=(0,B.useCallback)(e=>{d(!0),p(!1),i?.(e)},[i]),y=(0,B.useCallback)(e=>{d(!1),p(!0),a?.(e)},[a]),b=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(jX,``)}.${i}`}oX(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,z.jsxs)(`div`,{className:c(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,z.jsx)(`img`,{alt:r,className:c(`max-w-full rounded-lg`,_&&`hidden`,t),"data-streamdown":`image`,onError:y,onLoad:v,ref:l,src:n,...o}),_&&(0,z.jsx)(`span`,{className:c(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:m.imageNotAvailable}),(0,z.jsx)(`div`,{className:c(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`)}),g&&(0,z.jsx)(`button`,{className:c(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:b,title:m.downloadImage,type:`button`,children:(0,z.jsx)(s,{size:14})})]}):null},NX=0,PX=()=>{NX+=1,NX===1&&(document.body.style.overflow=`hidden`)},FX=()=>{NX=Math.max(0,NX-1),NX===0&&(document.body.style.overflow=``)},IX=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=CX(),c=cX(),[l,u]=(0,B.useState)(!1),d=EX(),f=(0,B.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),p=(0,B.useCallback)(()=>{r(),n()},[r,n]);return(0,B.useEffect)(()=>{if(t){PX();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),FX()}}},[t,n]),t?(0,z.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,z.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,z.jsx)(`button`,{className:c(`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:n,title:d.close,type:`button`,children:(0,z.jsx)(s,{size:16})}),(0,z.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,z.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,z.jsx)(o,{size:20}),(0,z.jsx)(`span`,{children:d.openExternalLink})]}),(0,z.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:d.externalLinkWarning})]}),(0,z.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,z.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,z.jsx)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted`),onClick:f,type:`button`,children:l?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(i,{size:14}),(0,z.jsx)(`span`,{children:d.copied})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(a,{size:14}),(0,z.jsx)(`span`,{children:d.copyLink})]})}),(0,z.jsxs)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90`),onClick:p,type:`button`,children:[(0,z.jsx)(o,{size:14}),(0,z.jsx)(`span`,{children:d.openLink})]})]})]})}):null},LX=(0,B.createContext)(null),RX=()=>(0,B.useContext)(LX),zX=()=>RX()?.code??null,BX=()=>RX()?.mermaid??null,VX=e=>{var t;let n=RX();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},HX=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),UX=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=cX(),[s,c]=(0,B.useState)(!1),l=(0,B.useRef)(null),{isAnimating:u}=(0,B.useContext)(NQ),d=CX(),f=BX(),p=EX(),m=async t=>{try{if(t===`mmd`){oX(`diagram.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!f){a?.(Error(`Mermaid plugin not available`));return}let n=f.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){oX(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){oX(`diagram.png`,await HX(l),`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,B.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,z.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,z.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:p.downloadDiagram,type:`button`,children:t??(0,z.jsx)(d.DownloadIcon,{size:14})}),s?(0,z.jsxs)(`div`,{className:o(`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,z.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`svg`),title:p.downloadDiagramAsSvg,type:`button`,children:p.mermaidFormatSvg}),(0,z.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`png`),title:p.downloadDiagramAsPng,type:`button`,children:p.mermaidFormatPng}),(0,z.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`mmd`),title:p.downloadDiagramAsMmd,type:`button`,children:p.mermaidFormatMmd})]}):null]})},WX=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=CX(),c=cX(),[l,u]=(0,B.useState)(!1),{isAnimating:d,controls:f}=(0,B.useContext)(NQ),p=EX(),m=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),h=()=>{u(!l)};return(0,B.useEffect)(()=>{if(l){PX();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),FX()}}},[l]),(0,B.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:d,onClick:h,title:p.viewFullscreen,type:`button`,...a,children:(0,z.jsx)(o,{size:14})}),l?(0,$t.createPortal)((0,z.jsxs)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),onClick:h,onKeyDown:e=>{e.key===`Escape`&&h()},role:`button`,tabIndex:0,children:[(0,z.jsx)(`button`,{className:c(`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:h,title:p.exitFullscreen,type:`button`,children:(0,z.jsx)(s,{size:20})}),(0,z.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,z.jsx)(LQ,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},GX=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},KX=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===`
222
+ `)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(`
223
+ `)},qX=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===`
224
+ `||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===`
225
+ `?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(`
226
+ `)},JX=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):n.push(t);return n.join(``)},YX=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0;r[i]=`| ${t.map(e=>JX(e)).join(` | `)} |`,i+=1;let a=Array(t.length);for(let e=0;e<t.length;e+=1)a[e]=`---`;r[i]=`| ${a.join(` | `)} |`,i+=1;for(let e of n)if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?JX(e[r]):``;r[i]=`| ${n.join(` | `)} |`,i+=1}else r[i]=`| ${e.map(e=>JX(e)).join(` | `)} |`,i+=1;return r.join(`
227
+ `)},XX=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=cX(),[o,s]=(0,B.useState)(!1),[c,l]=(0,B.useState)(!1),u=(0,B.useRef)(null),d=(0,B.useRef)(0),{isAnimating:f}=(0,B.useContext)(NQ),p=EX(),m=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=GX(t),o=({csv:KX,tsv:qX,md:YX}[e]||YX)(a),c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,B.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let h=CX(),g=c?h.CheckIcon:h.CopyIcon;return(0,z.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,z.jsx)(`button`,{className:a(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:f,onClick:()=>s(!o),title:p.copyTable,type:`button`,children:e??(0,z.jsx)(g,{height:14,width:14})}),o?(0,z.jsxs)(`div`,{className:a(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,z.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`md`),title:p.copyTableAsMarkdown,type:`button`,children:p.tableFormatMarkdown}),(0,z.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`csv`),title:p.copyTableAsCsv,type:`button`,children:p.tableFormatCsv}),(0,z.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`tsv`),title:p.copyTableAsTsv,type:`button`,children:p.tableFormatTsv})]}):null]})},ZX=({children:e,className:t,onDownload:n,onError:r})=>{let i=cX(),[a,o]=(0,B.useState)(!1),s=(0,B.useRef)(null),{isAnimating:c}=(0,B.useContext)(NQ),l=EX(),u=CX(),d=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=GX(t),a=e===`csv`?KX(i):YX(i);oX(`table.${e===`csv`?`csv`:`md`}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,B.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,z.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,z.jsx)(`button`,{className:i(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:c,onClick:()=>o(!a),title:l.downloadTable,type:`button`,children:e??(0,z.jsx)(u.DownloadIcon,{size:14})}),a?(0,z.jsxs)(`div`,{className:i(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,z.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`csv`),title:l.downloadTableAsCsv,type:`button`,children:l.tableFormatCsv}),(0,z.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`markdown`),title:l.downloadTableAsMarkdown,type:`button`,children:l.tableFormatMarkdown})]}):null]})},QX=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=CX(),o=cX(),[s,c]=(0,B.useState)(!1),{isAnimating:l}=(0,B.useContext)(NQ),u=EX(),d=()=>{c(!0)},f=()=>{c(!1)};return(0,B.useEffect)(()=>{if(s){PX();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),FX()}}},[s]),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:d,title:u.viewFullscreen,type:`button`,children:(0,z.jsx)(i,{size:14})}),s?(0,$t.createPortal)((0,z.jsx)(`div`,{"aria-label":u.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:f,onKeyDown:e=>{e.key===`Escape`&&f()},role:`dialog`,children:(0,z.jsxs)(`div`,{className:o(`flex h-full flex-col`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,z.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,z.jsx)(XX,{}):null,r?(0,z.jsx)(ZX,{}):null,(0,z.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:f,title:u.exitFullscreen,type:`button`,children:(0,z.jsx)(a,{size:20})})]}),(0,z.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,z.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),document.body):null]})},$X=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=cX(),c=n&&r,l=n&&i,u=n&&a,d=c||l||u;return(0,z.jsxs)(`div`,{className:s(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[d?(0,z.jsxs)(`div`,{className:s(`flex items-center justify-end gap-1`),children:[c?(0,z.jsx)(XX,{}):null,l?(0,z.jsx)(ZX,{}):null,u?(0,z.jsx)(QX,{showCopy:c,showDownload:l,children:e}):null]}):null,(0,z.jsx)(`div`,{className:s(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),children:(0,z.jsx)(`table`,{className:s(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...o,children:e})})]})},eZ=/startLine=(\d+)/,tZ=/\bnoLineNumbers\b/,nZ=(0,B.lazy)(()=>$(()=>import(`./mermaid-GHXKKRXX-ChY6AJ7l.js`).then(e=>({default:e.Mermaid})),[],import.meta.url)),rZ=/language-([^\s]+)/;function iZ(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function aZ(e,t){return e.className===t.className&&iZ(e.node,t.node)}var oZ=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,sZ=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},cZ=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},lZ=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},uZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`ol`,{className:cX()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>aZ(e,t));uZ.displayName=`MarkdownOl`;var dZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`li`,{className:cX()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&iZ(e.node,t.node));dZ.displayName=`MarkdownLi`;var fZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`ul`,{className:cX()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>aZ(e,t));fZ.displayName=`MarkdownUl`;var pZ=(0,B.memo)(({className:e,node:t,...n})=>(0,z.jsx)(`hr`,{className:cX()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>aZ(e,t));pZ.displayName=`MarkdownHr`;var mZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`span`,{className:cX()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>aZ(e,t));mZ.displayName=`MarkdownStrong`;var hZ=(0,B.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=cX(),{linkSafety:o}=(0,B.useContext)(NQ),[s,c]=(0,B.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,B.useCallback)(async e=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,B.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,B.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,z.jsx)(IX,{...p})]}):(0,z.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>aZ(e,t)&&e.href===t.href);hZ.displayName=`MarkdownA`;var gZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h1`,{className:cX()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>aZ(e,t));gZ.displayName=`MarkdownH1`;var _Z=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h2`,{className:cX()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>aZ(e,t));_Z.displayName=`MarkdownH2`;var vZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h3`,{className:cX()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>aZ(e,t));vZ.displayName=`MarkdownH3`;var yZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h4`,{className:cX()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>aZ(e,t));yZ.displayName=`MarkdownH4`;var bZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h5`,{className:cX()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>aZ(e,t));bZ.displayName=`MarkdownH5`;var xZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h6`,{className:cX()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>aZ(e,t));xZ.displayName=`MarkdownH6`;var SZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,B.useContext)(NQ);return(0,z.jsx)($X,{className:t,showControls:oZ(i,`table`),showCopy:sZ(i,`copy`),showDownload:sZ(i,`download`),showFullscreen:sZ(i,`fullscreen`),...r,children:e})},(e,t)=>aZ(e,t));SZ.displayName=`MarkdownTable`;var CZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`thead`,{className:cX()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>aZ(e,t));CZ.displayName=`MarkdownThead`;var wZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`tbody`,{className:cX()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>aZ(e,t));wZ.displayName=`MarkdownTbody`;var TZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`tr`,{className:cX()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>aZ(e,t));TZ.displayName=`MarkdownTr`;var EZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`th`,{className:cX()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>aZ(e,t));EZ.displayName=`MarkdownTh`;var DZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`td`,{className:cX()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>aZ(e,t));DZ.displayName=`MarkdownTd`;var OZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`blockquote`,{className:cX()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>aZ(e,t));OZ.displayName=`MarkdownBlockquote`;var kZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`sup`,{className:cX()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>aZ(e,t));kZ.displayName=`MarkdownSup`;var AZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`sub`,{className:cX()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>aZ(e,t));AZ.displayName=`MarkdownSub`;var jZ=(0,B.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,B.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,B.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,B.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,B.isValidElement)(e))return e;if(e.type===uZ){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,z.jsx)(`section`,{className:t,...r,children:i}):null}return(0,z.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>aZ(e,t));jZ.displayName=`MarkdownSection`;var MZ=(0,B.memo)(({node:e,className:t,children:n,...r})=>{let i=cX(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,B.useContext)(NQ),l=BX(),u=nX(),d=(t?.match(rZ))?.at(1)??``,f=VX(d);if(a)return(0,z.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(eZ),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&tZ.test(p))&&c!==!1,v=``;if((0,B.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,z.jsx)(B.Suspense,{fallback:(0,z.jsx)(AX,{}),children:(0,z.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=oZ(s,`mermaid`),n=lZ(s,`download`),r=lZ(s,`copy`),a=lZ(s,`fullscreen`),c=lZ(s,`panZoom`),l=e&&(n||r||a);return(0,z.jsx)(B.Suspense,{fallback:(0,z.jsx)(AX,{}),children:(0,z.jsxs)(`div`,{className:i(`group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,t),"data-streamdown":`mermaid-block`,children:[(0,z.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,z.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,z.jsx)(`div`,{className:i(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,z.jsxs)(`div`,{className:i(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`mermaid-block-actions`,children:[n?(0,z.jsx)(UX,{chart:v,config:o?.config}):null,r?(0,z.jsx)(DX,{code:v}):null,a?(0,z.jsx)(WX,{chart:v,config:o?.config}):null]})}):null,(0,z.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,z.jsx)(nZ,{chart:v,config:o?.config,showControls:c})})]})})}let y=oZ(s,`code`),b=cZ(s,`download`),x=cZ(s,`copy`);return(0,z.jsx)(vX,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,children:y?(0,z.jsxs)(z.Fragment,{children:[b?(0,z.jsx)(kX,{code:v,language:d}):null,x?(0,z.jsx)(DX,{}):null]}):null})},(e,t)=>e.className===t.className&&iZ(e.node,t.node));MZ.displayName=`MarkdownCode`;var NZ=(0,B.memo)(MX,(e,t)=>e.className===t.className&&iZ(e.node,t.node));NZ.displayName=`MarkdownImg`;var PZ=(0,B.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,B.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,z.jsx)(z.Fragment,{children:e})}return(0,z.jsx)(`p`,{...n,children:e})},(e,t)=>aZ(e,t));PZ.displayName=`MarkdownParagraph`;var FZ={ol:uZ,li:dZ,ul:fZ,hr:pZ,strong:mZ,a:hZ,h1:gZ,h2:_Z,h3:vZ,h4:yZ,h5:bZ,h6:xZ,table:SZ,thead:CZ,tbody:wZ,tr:TZ,th:EZ,td:DZ,blockquote:OZ,code:MZ,img:NZ,pre:({children:e})=>(0,B.isValidElement)(e)?(0,B.cloneElement)(e,{"data-block":`true`}):e,sup:kZ,sub:AZ,p:PZ,section:jZ},IZ=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,LZ=/\p{L}/u;function RZ(e){let t=e.replace(/^#{1,6}\s+/gm,``).replace(/(\*{1,3}|_{1,3})/g,``).replace(/`[^`]*`/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/^[\s>*\-+\d.]+/gm,``);for(let e of t){if(IZ.test(e))return`rtl`;if(LZ.test(e))return`ltr`}return`ltr`}var zZ=/^[ \t]{0,3}(`{3,}|~{3,})/,BZ=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,VZ=e=>{let t=e.split(`
228
+ `),n=null,r=0;for(let e of t){let t=zZ.exec(e);if(n===null){if(t){let e=t[1];n=e[0],r=e.length}}else if(t){let e=t[1],i=e[0],a=e.length;i===n&&a>=r&&(n=null,r=0)}}return n!==null},HZ=e=>{let t=e.split(`
229
+ `);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&BZ.test(t))return!0}return!1},UZ=()=>e=>{zk(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},WZ=[],GZ={allowDangerousHtml:!0},KZ=new WeakMap,qZ=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=KZ.get(e);n||(n=e.name,KZ.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=KZ.get(r);e||(e=r.name,KZ.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},JZ=e=>{let t=YZ(e),n=e.children||``;return nQ(t.runSync(t.parse(n),n),e)},YZ=e=>{let t=qZ.get(e);if(t)return t;let n=ZZ(e);return qZ.set(e,n),n},XZ=e=>e.some(e=>Array.isArray(e)?e[0]===dI:e===dI),ZZ=e=>{let t=e.rehypePlugins||WZ,n=e.remarkPlugins||WZ,r=XZ(t)?n:[...n,UZ],i=e.remarkRehypeOptions?{...GZ,...e.remarkRehypeOptions}:GZ;return Zq().use(MK).use(r).use(Cq,i).use(t)},QZ=e=>e,$Z=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},eQ=(e,t)=>{for(let n in UG)if(Object.hasOwn(UG,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=UG[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},tQ=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},nQ=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||QZ;zk(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return $Z(c,s,a,e.value),s;if(e.type===`element`&&(eQ(e,t),tQ(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return xG(e,{Fragment:z.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0})},rQ=/\[\^[\w-]{1,200}\](?!:)/,iQ=/\[\^[\w-]{1,200}\]:/,aQ=/<(\w+)[\s>]/,oQ=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),sQ=new Map,cQ=new Map,lQ=e=>{let t=e.toLowerCase(),n=sQ.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return sQ.set(t,r),r},uQ=e=>{let t=e.toLowerCase(),n=cQ.get(t);if(n)return n;let r=RegExp(`</${t}(?=[\\s>])[^>]*>`,`gi`);return cQ.set(t,r),r},dQ=(e,t)=>{if(oQ.has(t.toLowerCase()))return 0;let n=e.match(lQ(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},fQ=(e,t)=>{let n=e.match(uQ(t));return n?n.length:0},pQ=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]===`$`&&e[n+1]===`$`&&(t+=1,n+=1);return t},mQ=e=>{let t=rQ.test(e),n=iQ.test(e);if(t||n)return[e];let r=AY.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let e of r){let t=e.raw,n=i.length;if(a.length>0){i[n-1]+=t;let e=a.at(-1),r=dQ(t,e),o=fQ(t,e);for(let t=0;t<r;t+=1)a.push(e);for(let t=0;t<o;t+=1)a.length>0&&a.at(-1)===e&&a.pop();continue}if(e.type===`html`&&e.block){let e=t.match(aQ);if(e){let n=e[1];dQ(t,n)>fQ(t,n)&&a.push(n)}}if(n>0&&!o){let e=i[n-1];if(pQ(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},hQ=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>{if(!n.includes(`
230
+
231
+ `))return t+n+r;let i=n.replace(/\n\n/g,`
232
+ <!---->
233
+ `);return`${t}${(i.startsWith(`
234
+ `)?``:`
235
+ `)+i+(i.endsWith(`
236
+ `)?``:`
237
+ `)}${r}
238
+
239
+ `})}return n},gQ=/([\\`*_~[\]|])/g,_Q=e=>e.replace(gQ,`\\$1`),vQ=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>t+_Q(n).replace(/\n\n/g,`&#10;&#10;`)+r)}return n},yQ=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(yQ).join(``):``,bQ=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));zk(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=yQ(e);e.children=t?[{type:`text`,value:t}]:[]}})},xQ=()=>e=>{zk(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},SQ=/^[ \t]*<[\w!/?-]/,CQ=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,wQ=e=>typeof e!=`string`||e.length===0||!SQ.test(e)?e:e.replace(CQ,`$1`),TQ={...pI,protocols:{...pI.protocols,href:[...pI.protocols?.href??[],`tel`]},attributes:{...pI.attributes,code:[...pI.attributes?.code??[],`metastring`]}},EQ={raw:dI,sanitize:[AI,TQ],harden:[Vk,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},DQ={gfm:[UV,{}],codeMeta:xQ},OQ=Object.values(EQ),kQ=Object.values(DQ),AQ={block:` ▋`,circle:` ●`},jQ=[`github-light`,`github-dark`],MQ={enabled:!0},NQ=(0,B.createContext)({shikiTheme:jQ,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:MQ}),PQ=(0,B.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let c=typeof e==`string`&&n?wQ(e):e,l=(0,z.jsx)(JZ,{...s,children:c});return(0,z.jsx)(tX.Provider,{value:i,children:a?(0,z.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});PQ.displayName=`Block`;var FQ=(0,B.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=OQ,remarkPlugins:s=kQ,className:c,shikiTheme:l=jQ,mermaid:u,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:m=PQ,parseMarkdownIntoBlocksFn:h=mQ,caret:g,plugins:_,remend:v,linkSafety:y=MQ,lineNumbers:b=!0,allowedTags:x,literalTagContent:S,translations:C,icons:w,prefix:T,onAnimationStart:E,onAnimationEnd:D,...O})=>{let k=(0,B.useId)(),[A,j]=(0,B.useTransition)(),M=(0,B.useMemo)(()=>aX(T),[T]),N=(0,B.useRef)(null),P=(0,B.useRef)(E),ee=(0,B.useRef)(D);P.current=E,ee.current=D,(0,B.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=N.current;if(N.current=f,i===null){f&&((e=P.current)==null||e.call(P));return}f&&!i?(n=P.current)==null||n.call(P):!f&&i&&((r=ee.current)==null||r.call(ee))},[f,t]);let F=(0,B.useMemo)(()=>x?Object.keys(x):[],[x]),te=(0,B.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?SU(e,v):e;return S&&S.length>0&&(n=vQ(n,S)),F.length>0&&(n=hQ(n,F)),n},[e,t,r,v,F,S]),I=(0,B.useMemo)(()=>h(te),[te,h]),[ne,re]=(0,B.useState)(I);(0,B.useEffect)(()=>{t===`streaming`&&!oe?j(()=>{re(I)}):re(I)},[I,t]);let L=t===`streaming`?ne:I,ie=(0,B.useMemo)(()=>n===`auto`?L.map(RZ):void 0,[L,n]),R=(0,B.useMemo)(()=>L.map((e,t)=>`${k}-${t}`),[L.length,k]),ae=(0,B.useMemo)(()=>p===!0?`true`:p?JSON.stringify(p):``,[p]),oe=(0,B.useMemo)(()=>ae?ae===`true`?eX():eX(p):null,[ae]),se=(0,B.useMemo)(()=>({shikiTheme:(_?.code)?.getThemes()??l,controls:d,isAnimating:f,lineNumbers:b,mode:t,mermaid:u,linkSafety:y}),[l,d,f,b,t,u,y,_?.code]),ce=(0,B.useMemo)(()=>({...wX,...C}),[(0,B.useMemo)(()=>C?JSON.stringify(C):``,[C])]),le=(0,B.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...FZ,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,B.createElement)(t,n):null:(0,B.createElement)(e,n)}return n},[a]),ue=(0,B.useMemo)(()=>{let e=[];return _!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsBefore]),e=[...e,...s],_!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(e=[...e,_.math.remarkPlugin]),e},[s,_?.math,_?.cjk]),de=(0,B.useMemo)(()=>{let e=o;if(x&&Object.keys(x).length>0&&o===OQ){let t={...TQ,tagNames:[...TQ.tagNames??[],...Object.keys(x)],attributes:{...TQ.attributes,...x}};e=[EQ.raw,[AI,t],EQ.harden]}return S&&S.length>0&&(e=[...e,[bQ,S]]),_!=null&&_.math&&(e=[...e,_.math.rehypePlugin]),oe&&f&&(e=[...e,oe.rehypePlugin]),e},[o,_?.math,oe,f,x,S]),fe=(0,B.useMemo)(()=>{if(!f||L.length===0)return!1;let e=L.at(-1);return VZ(e)||HZ(e)},[f,L]),pe=(0,B.useMemo)(()=>g&&f&&!fe?{"--streamdown-caret":`"${AQ[g]}"`}:void 0,[g,f,fe]);return t===`static`?(0,z.jsx)(TX.Provider,{value:ce,children:(0,z.jsx)(LX.Provider,{value:_??null,children:(0,z.jsx)(NQ.Provider,{value:se,children:(0,z.jsx)(SX,{icons:w,children:(0,z.jsx)(sX.Provider,{value:M,children:(0,z.jsx)(`div`,{className:M(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?RZ(te):n,children:(0,z.jsx)(JZ,{components:le,rehypePlugins:de,remarkPlugins:ue,...O,children:te})})})})})})}):(0,z.jsx)(TX.Provider,{value:ce,children:(0,z.jsx)(LX.Provider,{value:_??null,children:(0,z.jsx)(NQ.Provider,{value:se,children:(0,z.jsx)(SX,{icons:w,children:(0,z.jsx)(sX.Provider,{value:M,children:(0,z.jsxs)(`div`,{className:M(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,g&&!fe?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:pe,children:[L.length===0&&g&&f&&(0,z.jsx)(`span`,{}),L.map((e,t)=>{let a=t===L.length-1,o=f&&a&&VZ(e);return(0,z.jsx)(m,{animatePlugin:oe,components:le,content:e,dir:ie?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:de,remarkPlugins:ue,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...O},R[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);FQ.displayName=`Streamdown`;var IQ=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:l,ZoomOutIcon:u}=CX(),d=cX(),f=(0,B.useRef)(null),p=(0,B.useRef)(null),[m,h]=(0,B.useState)(o),[g,_]=(0,B.useState)({x:0,y:0}),[v,y]=(0,B.useState)(!1),[b,x]=(0,B.useState)({x:0,y:0}),[S,C]=(0,B.useState)({x:0,y:0}),w=(0,B.useCallback)(e=>{h(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),T=(0,B.useCallback)(()=>{w(i)},[w,i]),E=(0,B.useCallback)(()=>{w(-i)},[w,i]),D=(0,B.useCallback)(()=>{h(o),_({x:0,y:0})},[o]),O=(0,B.useCallback)(e=>{e.preventDefault(),w(e.deltaY>0?-i:i)},[w,i]),k=(0,B.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;y(!0),x({x:e.clientX,y:e.clientY}),C(g);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[g]),A=(0,B.useCallback)(e=>{if(!v)return;e.preventDefault();let t=e.clientX-b.x,n=e.clientY-b.y;_({x:S.x+t,y:S.y+n})},[v,b,S]),j=(0,B.useCallback)(e=>{y(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,B.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(`wheel`,O,{passive:!1}),()=>{e.removeEventListener(`wheel`,O)}},[O]),(0,B.useEffect)(()=>{let e=p.current;if(e&&v)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,A,{passive:!1}),e.addEventListener(`pointerup`,j),e.addEventListener(`pointercancel`,j),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,A),e.removeEventListener(`pointerup`,j),e.removeEventListener(`pointercancel`,j)}},[v,A,j]),(0,z.jsxs)(`div`,{className:d(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:f,style:{cursor:v?`grabbing`:`grab`},children:[a?(0,z.jsxs)(`div`,{className:d(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,z.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m>=r,onClick:T,title:`Zoom in`,type:`button`,children:(0,z.jsx)(l,{size:16})}),(0,z.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m<=n,onClick:E,title:`Zoom out`,type:`button`,children:(0,z.jsx)(u,{size:16})}),(0,z.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`),onClick:D,title:`Reset zoom and pan`,type:`button`,children:(0,z.jsx)(c,{size:16})})]}):null,(0,z.jsx)(`div`,{className:d(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:k,ref:p,role:`application`,style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},LQ=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=cX(),[o,s]=(0,B.useState)(null),[c,l]=(0,B.useState)(!1),[u,d]=(0,B.useState)(``),[f,p]=(0,B.useState)(``),[m,h]=(0,B.useState)(0),{mermaid:g}=(0,B.useContext)(NQ),_=BX(),v=g?.errorComponent,{shouldRender:y,containerRef:b}=UY({immediate:r});if((0,B.useEffect)(()=>{if(y){if(!_){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{s(null),l(!0);let t=_.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);d(a),p(a)}catch(e){f||u||s(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{l(!1)}})()}},[e,n,m,y,_]),!(y||u||f))return(0,z.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:b});if(c&&!u&&!f)return(0,z.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:b,children:(0,z.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,z.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,z.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!f)return v?(0,z.jsx)(`div`,{ref:b,children:(0,z.jsx)(v,{chart:e,error:o,retry:()=>h(e=>e+1)})}):(0,z.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:b,children:[(0,z.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,z.jsxs)(`details`,{className:a(`mt-2`),children:[(0,z.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,z.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let x=u||f;return(0,z.jsx)(`div`,{className:a(`size-full`,t),"data-streamdown":`mermaid`,ref:b,children:(0,z.jsx)(IQ,{className:a(r?`size-full overflow-hidden`:`overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,z.jsx)(`div`,{"aria-label":`Mermaid chart`,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:x},role:`img`})})})},RQ=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function zQ(e){return BQ(e)}function BQ(e){return Array.isArray(e)?VQ(e):e instanceof RegExp?e:typeof e==`object`?HQ(e):e}function VQ(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=BQ(e[n]);return t}function HQ(e){let t={};for(let n in e)t[n]=BQ(e[n]);return t}function UQ(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function WQ(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?WQ(e.substring(0,e.length-1)):e.substr(~t+1)}var GQ=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,KQ=class{static hasCaptures(e){return e===null?!1:(GQ.lastIndex=0,GQ.test(e))}static replaceCaptures(e,t,n){return e.replace(GQ,(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 qQ(e,t){return e<t?-1:+(e>t)}function JQ(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=qQ(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function YQ(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 XQ(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var ZQ=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}},QQ=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(r$(e),t)}static createFromParsedTheme(e,t){return o$(e,t)}_cachedMatchRoot=new ZQ(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=>e$(e.parent,t.parentScopes));return n?new n$(n.fontStyle,n.foreground,n.background):null}},$Q=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?!0:this.parent===null?!1: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 e$(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&&!t$(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function t$(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var n$=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function r$(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;break}}let s=null;typeof i.settings.foreground==`string`&&YQ(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&YQ(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 i$(l,u,e,o,s,c)}}return n}var i$=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}},a$=(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))(a$||{});function o$(e,t){e.sort((e,t)=>{let n=qQ(e.scope,t.scope);return n!==0||(n=JQ(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 s$(t),o=new n$(n,a.getId(r),a.getId(i)),s=new u$(new l$(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 QQ(a,o,s)}var s$=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)}},c$=Object.freeze([]),l$=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||c$,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)}},u$=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(),l$.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);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(JQ(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 l$(e,t,n,r,i))}},d$=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)!=0}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=p$(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 f$(e){return e}function p$(e){return e}function m$(e,t){let n=[],r=g$(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(h$(i)){let e=[];do e.push(i),i=r.next();while(h$(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 h$(e){return!!e&&!!e.match(/[\w\.:]+/)}function g$(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 _$(e){typeof e.dispose==`function`&&e.dispose()}var v$=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},y$=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},b$=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))}},x$=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new v$(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new b$;for(let n of e)S$(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof v$){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 S$(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 v$?w$({baseGrammar:a,selfGrammar:i},r):C$(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 v$(e))}function C$(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];T$([r],t,n)}}function w$(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&T$(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&T$(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function T$(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?UQ({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&T$(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=j$(i);switch(a.kind){case 0:w$({...t,selfGrammar:t.baseGrammar},n);break;case 1:w$(t,n);break;case 2:C$(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?C$(a.ruleName,i,n):w$(i,n)}else a.kind===4?n.add(new y$(a.scopeName,a.ruleName)):n.add(new v$(a.scopeName));break}}}var E$=class{kind=0},D$=class{kind=1},O$=class{constructor(e){this.ruleName=e}kind=2},k$=class{constructor(e){this.scopeName=e}kind=3},A$=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function j$(e){if(e===`$base`)return new E$;if(e===`$self`)return new D$;let t=e.indexOf(`#`);return t===-1?new k$(e):t===0?new O$(e.substring(1)):new A$(e.substring(0,t),e.substring(t+1))}var M$=/\\(\d+)/,N$=/\\(\d+)/g,P$=-1,F$=-2;function I$(e){return e}function L$(e){return e}var R$=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=KQ.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=KQ.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${WQ(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:KQ.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:KQ.replaceCaptures(this._contentName,e,t)}},z$=class extends R${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!`)}},B$=class extends R${_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new G$(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 K$,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},V$=class extends R${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 K$,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},H$=class extends R${_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 G$(i,this.id),this.beginCaptures=a,this._end=new G$(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 K$;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}},U$=class extends R${_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 G$(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new G$(o,F$),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 K$;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 K$,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},W$=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new z$(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new B$(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=UQ({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new V$(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new U$(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 H$(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=j$(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);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof V$||e instanceof H$||e instanceof U$)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},G$=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.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=M$.test(this.source):this.hasBackReferences=!1}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 N$.lastIndex=0,this.source.replace(N$,(e,t)=>XQ(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}},K$=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 q$(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 q$(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},q$=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(`
240
+ `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},J$=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Y$=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new J$(e,8),this._embeddedLanguagesMatcher=new X$(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 J$(0,0);_getBasicScopeAttributes=new ZQ(e=>new J$(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/},X$=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])=>XQ(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 Z$=!1,Q$=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function $$(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=e1(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 Q$(i,!0);f()}return new Q$(i,!1);function f(){let o=t1(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===P$){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),s1(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 H$){let r=o;s1(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 U$){let r=o;s1(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(s1(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 e1(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 U$&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=a1(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==F$){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),s1(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 t1(e,t,n,r,i,a){let o=n1(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=r1(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 n1(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=i1(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 r1(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}=i1(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 i1(e,t,n,r,i){return Z$?{ruleScanner:e.compile(t,n),findOptions:o1(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function a1(e,t,n,r,i){return Z$?{ruleScanner:e.compileWhile(t,n),findOptions:o1(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function o1(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function s1(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));$$(e,p,n&&d.start===0,d.start,f,i,!1,0),_$(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 c1(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var c1=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function l1(e,t,n,r,i,a,o,s){return new p1(e,t,n,r,i,a,o,s)}function u1(e,t,n,r,i){let a=m$(t,d1),o=W$.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 d1(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(f1(t[r],e))return n=r+1,!0;return!1})}function f1(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 p1=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Y$(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=m1(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=m$(e,d1);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)u1(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&&u1(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(I$(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[L$(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]=m1(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=W$.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===g1.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=d$.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?h1.createRootAndLookUpScopeName(a,r,this):h1.createRoot(`unknown`,r),t=new g1(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
241
+ `;let a=this.createOnigString(e),o=a.content.length,s=new v1(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=$$(this,a,i,0,t,s,!0,r);return _$(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function m1(e,t){return e=zQ(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 h1=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=$Q.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new $Q(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new $Q(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}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(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),d$.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);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}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}},g1=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?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?h1.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(!0)}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:L$(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=h1.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,I$(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,h1.fromExtension(r,n.contentNameScopesList))}},_1=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):m$(e,d1).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>m$(e,d1).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}},v1=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=d$.set(n,0,f$(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=d$.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}},y1=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,l1(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},b1=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new y1(QQ.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(QQ.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 _1(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new x$(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)}},x1=g1.NULL,S1=/["&'<>`]/g,C1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w1=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,T1=/[|\\{}()[\]^$+*?.]/g,E1=new WeakMap;function D1(e,t){if(e=e.replace(t.subset?O1(t.subset):S1,r),t.subset||t.escapeOnly)return e;return e.replace(C1,n).replace(w1,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 O1(e){let t=E1.get(e);return t||(t=k1(e),E1.set(e,t)),t}function k1(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(T1,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var A1=/[\dA-Fa-f]/;function j1(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!A1.test(String.fromCharCode(t))?r:r+`;`}var M1=/\d/;function N1(e,t,n){let r=`&#`+String(e);return n&&t&&!M1.test(String.fromCharCode(t))?r:r+`;`}var P1=`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(`.`),F1={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:`€`},I1=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],L1={}.hasOwnProperty,R1={},z1;for(z1 in F1)L1.call(F1,z1)&&(R1[F1[z1]]=z1);var B1=/[^\dA-Za-z]/;function V1(e,t,n,r){let i=String.fromCharCode(e);if(L1.call(R1,i)){let e=R1[i],a=`&`+e;return n&&P1.includes(e)&&!I1.includes(e)&&(!r||t&&t!==61&&B1.test(String.fromCharCode(t)))?a:a+`;`}return``}function H1(e,t,n){let r=j1(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=V1(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=N1(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function U1(e,t){return D1(e,Object.assign({format:H1},t))}var W1=/^>|^->|<!--|-->|--!>|<!-$/g,G1=[`>`],K1=[`<`,`>`];function q1(e,t,n,r){return r.settings.bogusComments?`<?`+U1(e.value,Object.assign({},r.settings.characterReferences,{subset:G1}))+`>`:`<!--`+e.value.replace(W1,i)+`-->`;function i(e){return U1(e,Object.assign({},r.settings.characterReferences,{subset:K1}))}}function J1(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var Y1=Q1(1),X1=Q1(-1),Z1=[];function Q1(e){return t;function t(t,n,r){let i=t?t.children:Z1,a=(n||0)+e,o=i[a];if(!r)for(;o&&iG(o);)a+=e,o=i[a];return o}}var $1={}.hasOwnProperty;function e0(e){return t;function t(t,n,r){return $1.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var t0=e0({body:i0,caption:n0,colgroup:n0,dd:c0,dt:s0,head:n0,html:r0,li:o0,optgroup:u0,option:d0,p:a0,rp:l0,rt:l0,tbody:p0,td:g0,tfoot:m0,th:g0,thead:f0,tr:h0});function n0(e,t,n){let r=Y1(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&iG(r.value.charAt(0)))}function r0(e,t,n){let r=Y1(n,t);return!r||r.type!==`comment`}function i0(e,t,n){let r=Y1(n,t);return!r||r.type!==`comment`}function a0(e,t,n){let r=Y1(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 o0(e,t,n){let r=Y1(n,t);return!r||r.type===`element`&&r.tagName===`li`}function s0(e,t,n){let r=Y1(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function c0(e,t,n){let r=Y1(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function l0(e,t,n){let r=Y1(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function u0(e,t,n){let r=Y1(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function d0(e,t,n){let r=Y1(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function f0(e,t,n){let r=Y1(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function p0(e,t,n){let r=Y1(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function m0(e,t,n){return!Y1(n,t)}function h0(e,t,n){let r=Y1(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function g0(e,t,n){let r=Y1(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var _0=e0({body:b0,colgroup:x0,head:y0,html:v0,tbody:S0});function v0(e){let t=Y1(e,-1);return!t||t.type!==`comment`}function y0(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 b0(e){let t=Y1(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&iG(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function x0(e,t,n){let r=X1(n,t),i=Y1(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&t0(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function S0(e,t,n){let r=X1(n,t),i=Y1(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&t0(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var C0={name:[[`
242
+ \f\r &/=>`.split(``),`
243
+ \f\r "&'/=>\``.split(``)],[`\0
244
+ \f\r "&'/<=>`.split(``),`\0
245
+ \f\r "&'/<=>\``.split(``)]],unquoted:[[`
246
+ \f\r &>`.split(``),`\0
247
+ \f\r "&'<=>\``.split(``)],[`\0
248
+ \f\r "&'<=>\``.split(``),`\0
249
+ \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function w0(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1: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=WA);let l=T0(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!_0(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||!t0(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function T0(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=E0(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 E0(e,t,n){let r=BA(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=U1(r.attribute,Object.assign({},e.settings.characterReferences,{subset:C0.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?KA:XA)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=U1(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:C0.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&jI(n,o)>jI(n,e.alternative)&&(o=e.alternative),s=o+U1(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?C0.single:C0.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var D0=[`<`,`&`];function O0(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:U1(e.value,Object.assign({},r.settings.characterReferences,{subset:D0}))}function k0(e,t,n,r){return r.settings.allowDangerousHtml?e.value:O0(e,t,n,r)}function A0(e,t,n,r){return r.all(e)}var j0=xj(`type`,{invalid:M0,unknown:N0,handlers:{comment:q1,doctype:J1,element:w0,raw:k0,root:A0,text:O0}});function M0(e){throw Error("Expected node, not `"+e+"`")}function N0(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var P0={},F0={},I0=[];function L0(e,t){let n=t||P0,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:R0,all:z0,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||Fj,characterReferences:n.characterReferences||F0,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?WA:UA,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function R0(e,t,n){return j0(e,t,n,this)}function z0(e){let t=[],n=e&&e.children||I0,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function B0(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 V0(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function H0(e){return Array.isArray(e)?e:[e]}async function U0(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function W0(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function G0(e){return e===`ansi`||W0(e)}function K0(e){return e===`none`}function q0(e){return K0(e)}function J0(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function Y0(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),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}function X0(e){let t=Y0(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function Z0(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var Q0=`light-dark()`,$0=[`color`,`background-color`];function e2(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 t2(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?e2(e,t):e})):e}function n2(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>r2(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&&$0.includes(a))if(r===Q0&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new RQ('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,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 r2(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&a$.Italic&&(t[`font-style`]=`italic`),e.fontStyle&a$.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&a$.Underline&&n.push(`underline`),e.fontStyle&a$.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function i2(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var a2=new WeakMap;function o2(e,t){a2.set(e,t)}function s2(e){return a2.get(e)}var c2=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(H0(n).map(e=>[e,x1])),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 l2(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function l2(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 u2(e,t){if(!(e instanceof c2))throw new RQ(`Invalid grammar state`);return e.getInternalStack(t)}function d2(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new RQ(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new RQ(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new RQ(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=X0(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));f2(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return t2(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=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new RQ(`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+=p2(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new RQ(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new RQ(`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&&J0(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 f2(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new RQ(`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 RQ(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function p2(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(p2).join(``):``}var m2=[d2()];function h2(e){let t=g2(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...m2]}function g2(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 _2=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],v2={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function y2(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 b2(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}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function x2(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)v2[r]&&t.push({type:`setDecoration`,value:v2[r]});else if(r<=29){let e=v2[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:_2[r-30]}});else if(r===38){let n=b2(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:_2[r-40]}});else if(r===48){let n=b2(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:_2[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:_2[r-100+8]}})}return t}function S2(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=y2(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=x2(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 C2={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 w2(e=C2){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<_2.length;e++)r.push(t(_2[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 T2={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 E2(e,t,n){let r=B0(e,n),i=Y0(t),a=w2(Object.fromEntries(_2.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||T2[t]]}))),o=S2();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=V0(i,r),o=V0(o,r),n.decorations.has(`dim`)&&(i=D2(i));let s=a$.None;return n.decorations.has(`bold`)&&(s|=a$.Bold),n.decorations.has(`italic`)&&(s|=a$.Italic),n.decorations.has(`underline`)&&(s|=a$.Underline),n.decorations.has(`strikethrough`)&&(s|=a$.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function D2(e){let t=e.match(/#([0-9a-f]{3,8})/i);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}`}else if(e.length===6)return`#${e}80`;else 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`)}`}else 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(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function O2(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(W0(i)||K0(r))return Y0(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return E2(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new RQ(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new RQ(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return A2(t,s,a,o,n)}function k2(...e){if(e.length===2)return s2(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(W0(i)||K0(a))throw new RQ(`Plain language does not have grammar state`);if(i===`ansi`)throw new RQ(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new c2(j2(n,c,o,s,r).stateStack,c.name,o.name)}function A2(e,t,n,r,i){let a=j2(e,t,n,r,i),o=new c2(a.stateStack,t.name,n.name);return o2(a.tokens,o),a.tokens}function j2(e,t,n,r,i){let a=B0(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=Y0(e),l=i.grammarState?u2(i.grammarState,n.name)??x1:i.grammarContextCode==null?x1:j2(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,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]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=V0(r[d$.getForeground(s)],a),l=d$.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?M2(t.scopes):N2(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function M2(e){return e.map(e=>({scopeName:e}))}function N2(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:I2(e,i,t.slice(0,r))}}return n}function P2(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function F2(e,t,n){if(!P2(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)P2(e[r],n[i])&&--r,--i;return r===-1}function I2(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(F2(e,t,n)){r.push(a);break}return r}function L2(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=O2(e,t,{...n,theme:r.theme});return{tokens:i,state:s2(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=R2(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new c2(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&o2(o,s),o}function R2(...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}function z2(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 RQ("`themes` option must not be empty");let p=L2(e,t,n);if(c=s2(p),l&&Q0!==l&&!f.find(e=>e.color===l))throw new RQ(`\`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=>n2(e,h,u,l,d))),c&&o2(a,c);let g=f.map(e=>B0(e.theme,n));i=B2(f,m,g,u,l,`fg`,d),r=B2(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=B0(n.theme,n);a=O2(e,t,n);let l=e.getTheme(n.theme);r=V0(l.bg,s),i=V0(l.fg,s),o=l.name,c=s2(a)}else throw new RQ("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function B2(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=V0(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===Q0&&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 RQ('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${V0(t[r][a],n[r])||`inherit`}, ${V0(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function V2(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>V2(e,t,n),codeToTokens:(t,n)=>z2(e,t,n)}){let i=t;for(let e of h2(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=z2(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=U2(a):d===`never`&&(a=W2(a)),f&&(a=G2(a));let p={...r,get source(){return i}};for(let e of h2(n))a=e.tokens?.call(p,a)||a;return H2(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function H2(e,t,n,r=s2(e)){let i=h2(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=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:J0,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:`
250
+ `}));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=i2(a.htmlStyle||r2(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&&o2(m,r),m}function U2(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&a$.Underline||i.fontStyle&a$.Strikethrough));o&&i.content.match(/^\s+$/)&&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 W2(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);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 G2(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=i2(e.htmlStyle||r2(e)),i=i2(n.htmlStyle||r2(n)),a=e.fontStyle&&(e.fontStyle&a$.Underline||e.fontStyle&a$.Strikethrough),o=n.fontStyle&&(n.fontStyle&a$.Underline||n.fontStyle&a$.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var K2=L0;function q2(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>V2(e,t,n),codeToTokens:(t,n)=>z2(e,t,n)},i=K2(V2(e,t,n,r));for(let e of h2(n))i=e.postprocess?.call(r,i,n)||i;return i}var J2={light:`#333333`,dark:`#bbbbbb`},Y2={light:`#fffffe`,dark:`#1e1e1e`},X2=`__shiki_resolved`;function Z2(e){if(e?.[X2])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`?J2.light:J2.dark,n||=t.type===`light`?Y2.light:Y2.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,X2,{enumerable:!1,writable:!1,value:!0}),t}async function Q2(e){return Array.from(new Set((await Promise.all(e.filter(e=>!G0(e)).map(async e=>await U0(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function $2(e){return(await Promise.all(e.map(async e=>q0(e)?null:Z2(await U0(e))))).filter(e=>!!e)}var e4=3,t4=!1;function n4(e,t=3){if(e4&&!(typeof e4==`number`&&t>e4)){if(t4)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var r4=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function i4(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 r4(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var a4=class extends b1{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)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Z2(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=QQ.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=i4(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._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=Array.from(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 r4(`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))}},o4=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).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}},s4=0;function c4(e){s4+=1,e.warnings!==!1&&s4>=10&&s4%10==0&&console.warn(`[Shiki] ${s4} 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 r4("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Z2),i=new a4(new o4(e.engine,n),r,n,e.langAlias),a;function o(t){return i4(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new r4(`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 r4(`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 Q2(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await $2(e))}function g(){if(t)throw new r4(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--s4)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function l4(e){e.engine||n4("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([$2(e.themes||[]),Q2(e.langs||[]),e.engine]);return c4({...e,themes:t,langs:n,engine:r})}async function u4(e){let t=await l4(e);return{getLastGrammarState:(...e)=>k2(t,...e),codeToTokensBase:(e,n)=>O2(t,e,n),codeToTokensWithThemes:(e,n)=>L2(t,e,n),codeToTokens:(e,n)=>z2(t,e,n),codeToHast:(e,n)=>V2(t,e,n),codeToHtml:(e,n)=>q2(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function d4(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,G0(n))return[];let r=t[n];if(!r)throw new RQ(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(q0(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new RQ(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await u4({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function f4(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function p4(e,t){let n=f4(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var m4=[{id:`abap`,name:`ABAP`,import:(()=>$(()=>import(`./abap-CLvhMVsD.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>$(()=>import(`./actionscript-3--17pq3dv.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>$(()=>import(`./ada-C5qYipkI.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>$(()=>import(`./angular-html-B26lsrRw.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-B0BTTyHo.js`),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>$(()=>import(`./apache-U0d_L8uA.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>$(()=>import(`./apex-CGTLDQj6.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>$(()=>import(`./apl-W5hJk0fj.js`),__vite__mapDeps([6,2,3,1,7,8,9]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>$(()=>import(`./applescript-CCn79oCD.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>$(()=>import(`./ara-4CJ0cIlV.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>$(()=>import(`./asciidoc-DE70LPWp.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>$(()=>import(`./asm-Cmm7eHzH.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>$(()=>import(`./astro-ChkXCqsA.js`),__vite__mapDeps([10,2,3,9,11,12,13]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>$(()=>import(`./awk-BWXHIvNe.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>$(()=>import(`./ballerina-B7ZEbQpA.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>$(()=>import(`./bat-Bo4NYOV-.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>$(()=>import(`./beancount-D-usSTwE.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>$(()=>import(`./berry-DKpUyyne.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>$(()=>import(`./bibtex-Ci_nEsc7.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>$(()=>import(`./bicep-CUHmPFLl.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>$(()=>import(`./bird2-C2hNVINV.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-Dy0zTtr6.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-BkkzgIyY.js`),__vite__mapDeps([17,18]),import.meta.url))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-DOHYbsuN.js`).then(e=>e.n),[],import.meta.url))},{id:`c3`,name:`C3`,import:(()=>$(()=>import(`./c3-CnJL0r0V.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>$(()=>import(`./cadence-CQ2zXKGN.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>$(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>$(()=>import(`./clarity-SemFz856.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>$(()=>import(`./clojure-DqKBuwfJ.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>$(()=>import(`./cmake-Bj61d0ZC.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>$(()=>import(`./cobol-DtGo7U_-.js`),__vite__mapDeps([21,1,2,3,8]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>$(()=>import(`./codeowners-C8r90Shi.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>$(()=>import(`./codeql-oeQT6MSM.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>$(()=>import(`./coffee-Uf9fkZqI.js`),__vite__mapDeps([22,2]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>$(()=>import(`./common-lisp-Cv5bFMCO.js`),[],import.meta.url))},{id:`coq`,name:`Coq`,import:(()=>$(()=>import(`./coq-BrsZFFmf.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>$(()=>import(`./cpp-CVwmol0l.js`).then(e=>e.n),__vite__mapDeps([23,16,24,25,26]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-ChHObCtF.js`),__vite__mapDeps([27,2,3,1,16,26,28]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-Ct8U2NOr.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-DYjZAj5w.js`).then(e=>e.n),[],import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>$(()=>import(`./csv-Dx-8-gkx.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>$(()=>import(`./cue-CE9AQfxI.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>$(()=>import(`./cypher-ClKdZ_lG.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>$(()=>import(`./d-qD-0Kul2.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>$(()=>import(`./dart-DkHntEIa.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>$(()=>import(`./dax-BkyTk9wS.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>$(()=>import(`./desktop-Dlh5hvp9.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>$(()=>import(`./diff-woXpYk--.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>$(()=>import(`./docker-IyjqRm3v.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>$(()=>import(`./dotenv-_5a1GRtc.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>$(()=>import(`./dream-maker-DW3nJb8Q.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>$(()=>import(`./edge-C2J43zbu.js`),__vite__mapDeps([29,1,2,3,11,15]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-B7WZ8XhB.js`),__vite__mapDeps([30,1,2,3]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-PN4qGuR2.js`),__vite__mapDeps([31,25,26]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-C9PiwqqW.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-CkbjE2OZ.js`),__vite__mapDeps([32,1,2,3,33,7,8,16,26,23,24,25,28,34,35,11,13,36,37,38]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>$(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([39,40]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>$(()=>import(`./fennel-DQxkIbk2.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>$(()=>import(`./fish-BJitypiv.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>$(()=>import(`./fluent-C03EYrpw.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>$(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([41,42]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>$(()=>import(`./fortran-free-form-CYNrtFtB.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>$(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([43,40]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-C0sCabJj.js`),__vite__mapDeps([44,45,46]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>$(()=>import(`./gdscript-Cp2uCuqX.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>$(()=>import(`./gdshader-CBce3t8t.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>$(()=>import(`./genie-CV2tkWYe.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>$(()=>import(`./gherkin-DExj1W_8.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>$(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([47,48]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-CsGmQhFO.js`),__vite__mapDeps([49,28]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-CSRkHgEL.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-D85-ZYXa.js`),__vite__mapDeps([50,2,3,1,11]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-B_0SLVPe.js`),__vite__mapDeps([51,2,3,1,11]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-BE5n0T0t.js`).then(e=>e.n),__vite__mapDeps([25,26]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>$(()=>import(`./gn-ilITqXS6.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>$(()=>import(`./gnuplot-7GGW24-e.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>$(()=>import(`./go-BJwz_mda.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-BVcCJEBO.js`).then(e=>e.n),__vite__mapDeps([35,2,11,13,36]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-CacY0gHj.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-CyUu15_C.js`),__vite__mapDeps([52,1,2,3,16]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-Dj54pugT.js`).then(e=>e.n),__vite__mapDeps([34,2,3]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-l3llPaCT.js`),__vite__mapDeps([53,2,3,1,38]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>$(()=>import(`./haskell-D8IpX4py.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>$(()=>import(`./haxe-OTjmBuCE.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>$(()=>import(`./hcl-Dh228itO.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>$(()=>import(`./hjson-CxZEssPk.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>$(()=>import(`./hlsl-Cvrh5tZx.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>$(()=>import(`./html--Tmh4628.js`).then(e=>e.n),__vite__mapDeps([1,2,3]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-B0Q_m8BM.js`),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-BXKW9YQL.js`),__vite__mapDeps([54,7,8,9,28,35,2,11,13,36]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-C60QjgUE.js`),__vite__mapDeps([55,7,8,56,35,2,11,13,36]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-B0Qn7Nwc.js`),__vite__mapDeps([57,58]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>$(()=>import(`./hy-CZbG8q4J.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>$(()=>import(`./imba-DsUTQ-LC.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>$(()=>import(`./ini-B5eOa1yu.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>$(()=>import(`./java-aXeLcVht.js`).then(e=>e.n),[],import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-BQcRH4fE.js`).then(e=>e.n),[],import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-DGNUkEt-.js`),__vite__mapDeps([59,1,2,3]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-DwfSvoKv.js`),__vite__mapDeps([60,2]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-B0ukOVyl.js`).then(e=>e.n),[],import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>$(()=>import(`./json5-BR5RXkoi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>$(()=>import(`./jsonc-CYpm1nAK.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>$(()=>import(`./jsonl-CmCQp5Yx.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>$(()=>import(`./jsonnet-CJTPZ8u_.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>$(()=>import(`./jssm-DXw9l8Rf.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>$(()=>import(`./jsx-CzJUnsSO.js`).then(e=>e.n),[],import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-D8zt_FEP.js`),__vite__mapDeps([61,2,16,20,23,24,25,26,62]),import.meta.url))},{id:`just`,name:`Just`,import:(()=>$(()=>import(`./just-nn4e9Gpd.js`),__vite__mapDeps([63,2,11,20,28,33,3,1,7,8,16,26,23,24,25,34,35,13,36,37,38,64]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>$(()=>import(`./kdl-CsD5j6eV.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-DhhofPvG.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-BUv0MjJC.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-OBwqlec5.js`),__vite__mapDeps([65,66,62]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>$(()=>import(`./lean-CewbzKMR.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>$(()=>import(`./less-DVTAwKKz.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>$(()=>import(`./liquid-CktG-Iuw.js`),__vite__mapDeps([67,2,3,1,9]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>$(()=>import(`./llvm-Cm23YOpf.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>$(()=>import(`./log-BNLmms1o.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>$(()=>import(`./logo-Cluzi2Zq.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>$(()=>import(`./lua-ZqavSetL.js`).then(e=>e.n),__vite__mapDeps([37,26]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>$(()=>import(`./luau-CNKltnaQ.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>$(()=>import(`./make-Dixweg8N.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>$(()=>import(`./markdown-BYOwaDjH.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>$(()=>import(`./marko-CxDLRfNz.js`),__vite__mapDeps([68,3,5,11,69]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-D7qyCx1q.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-COZbBQqS.js`),__vite__mapDeps([70,15,1,2,3,38,40]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>$(()=>import(`./mdx-DQZ5AkYe.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>$(()=>import(`./mermaid-Bk4SNUv9.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>$(()=>import(`./mipsasm-BMqwQI7S.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>$(()=>import(`./mojo-BgCJLMeH.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>$(()=>import(`./moonbit-CaWjb8XO.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>$(()=>import(`./move-B1IS1UjX.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>$(()=>import(`./narrat-_X_XdTYD.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>$(()=>import(`./nextflow-Bbiyy34d.js`),__vite__mapDeps([71,72]),import.meta.url))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>$(()=>import(`./nextflow-groovy-Dc_ddanL.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-DB8A8-iZ.js`),__vite__mapDeps([73,37,26]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-Cs5VB9QZ.js`),__vite__mapDeps([74,2,3,1,7,8,26,25,40]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>$(()=>import(`./nix-IvuFDN5E.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>$(()=>import(`./nushell-DcLAeLz5.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>$(()=>import(`./objective-c-D1A_Heim.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>$(()=>import(`./objective-cpp-BsSzOQcm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>$(()=>import(`./ocaml-O90oeIOV.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>$(()=>import(`./odin-B1RWQWA5.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>$(()=>import(`./openscad-BUDT5pXO.js`),[],import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>$(()=>import(`./pascal-4ZHwLPI5.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>$(()=>import(`./perl-pV-3Dli_.js`),__vite__mapDeps([64,2,3,1,7,8,16]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-CFSq0mhc.js`),__vite__mapDeps([75,2,3,1,7,8,9,16]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>$(()=>import(`./pkl-ot-7Btpt.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>$(()=>import(`./plsql-DGHpHOYJ.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>$(()=>import(`./po-BiJDBrnU.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>$(()=>import(`./polar-C7UOKdEL.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>$(()=>import(`./postcss-BXeXVLqQ.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>$(()=>import(`./powerquery-DNMTfnFr.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>$(()=>import(`./powershell-DshXNtvi.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>$(()=>import(`./prisma-BsRQq5mF.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>$(()=>import(`./prolog-iXnhIJG7.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>$(()=>import(`./proto-DB4EqR-F.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>$(()=>import(`./pug-DuCfu-AK.js`),__vite__mapDeps([76,2,3,1]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>$(()=>import(`./puppet-CDv2pdJW.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>$(()=>import(`./purescript-9MfHhQsQ.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>$(()=>import(`./python-gzcpVVnB.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>$(()=>import(`./qml-Gqte1OeW.js`),__vite__mapDeps([77,2]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>$(()=>import(`./qmldir-DCQb3MpD.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>$(()=>import(`./qss-Fe1Jh2GI.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>$(()=>import(`./r-B8XqafmU.js`).then(e=>e.n),[],import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>$(()=>import(`./racket-DcIDlBhZ.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>$(()=>import(`./raku-B3gFvitq.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>$(()=>import(`./razor-HyK7qWun.js`),__vite__mapDeps([78,1,2,3,79]),import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>$(()=>import(`./reg-CRGYupPL.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>$(()=>import(`./regexp-Bdipf9Ks.js`).then(e=>e.n),[],import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>$(()=>import(`./rel-BtDbiS_P.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>$(()=>import(`./riscv-Ckw8ddFX.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>$(()=>import(`./ron-VUp2lXgN.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>$(()=>import(`./rosmsg-CAekHB0j.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>$(()=>import(`./rst-DtdOQB-0.js`),__vite__mapDeps([80,2,15,1,3,20,81,23,16,24,25,26,28,38,33,7,8,34,35,11,13,36,37]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>$(()=>import(`./ruby-DOExsDws.js`),__vite__mapDeps([33,2,3,1,7,8,16,26,23,24,25,28,34,35,11,13,36,37,38]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>$(()=>import(`./rust-Cfkwpbl8.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-BLRRJVWF.js`),__vite__mapDeps([82,16]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>$(()=>import(`./sass-DXrisJhu.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>$(()=>import(`./scala-DKOlJaKm.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>$(()=>import(`./scheme-DQCgrYNe.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>$(()=>import(`./scss-BILH_sWZ.js`).then(e=>e.n),__vite__mapDeps([5,3]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>$(()=>import(`./sdbl-bTVj8UrX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>$(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([83,84]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-CC2KTOv4.js`).then(e=>e.n),[],import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-CiGs-_qT.js`),__vite__mapDeps([85,28]),import.meta.url))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>$(()=>import(`./smalltalk-B16xEiuN.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>$(()=>import(`./solidity-CKzVLygQ.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>$(()=>import(`./soy-QSSlYQhf.js`),__vite__mapDeps([86,1,2,3]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([87,88]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>$(()=>import(`./splunk-BC2Px7Mm.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>$(()=>import(`./sql-CPD_IP3i.js`).then(e=>e.n),[],import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>$(()=>import(`./ssh-config-BgfXC-Er.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>$(()=>import(`./stata-jhUDP248.js`),__vite__mapDeps([89,16]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>$(()=>import(`./stylus-B6D30XZt.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>$(()=>import(`./surrealql-CEI1vHaO.js`),__vite__mapDeps([90,2]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-BqMghnvQ.js`),__vite__mapDeps([91,2,3,11,12]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>$(()=>import(`./swift-DonLKvLd.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>$(()=>import(`./system-verilog-DJ5XKQeo.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>$(()=>import(`./systemd-BxMlprV5.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>$(()=>import(`./talonscript-CohzipZa.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>$(()=>import(`./tasl-DMoTqEGO.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>$(()=>import(`./tcl-CZd0xW_V.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>$(()=>import(`./templ-DhMt3Gd_.js`),__vite__mapDeps([92,2,3,93]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-DswuEJGm.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-B2oLGu4M.js`),__vite__mapDeps([66,62]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-CcmNWLt0.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-DbXbAuWo.js`),__vite__mapDeps([94,2,3,1,7,8,11,16,25,26]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>$(()=>import(`./tsv-sltzmVWM.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>$(()=>import(`./tsx-BWdjt-eB.js`).then(e=>e.n),[],import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-ByJddavk.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-b7sZE9-Z.js`),__vite__mapDeps([95,2,3,5,20,33,1,7,8,16,26,23,24,25,28,34,35,11,13,36,37,38,75,9]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>$(()=>import(`./typescript-B5gQukXY.js`).then(e=>e.n),[],import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-B88KGewJ.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>$(()=>import(`./typst-DI99ib-x.js`),[],import.meta.url))},{id:`v`,name:`V`,import:(()=>$(()=>import(`./v-DETTlOr0.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>$(()=>import(`./vala-zf12oZj6.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>$(()=>import(`./vb-Djn5o6TS.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>$(()=>import(`./verilog-CiiDBU1e.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>$(()=>import(`./vhdl-BroJfC0k.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>$(()=>import(`./viml-DvXPmvsu.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>$(()=>import(`./vue-DGv3yRD9.js`),__vite__mapDeps([96,2,3,1,9,11,15]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-Cx5Ph-Io.js`),__vite__mapDeps([97,2]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-G05O51ag.js`),__vite__mapDeps([98,2,3,5,12,69,99]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>$(()=>import(`./vyper-CgoNMtux.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>$(()=>import(`./wasm-ByWQv1Qj.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>$(()=>import(`./wenyan-C8pVoKbM.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>$(()=>import(`./wgsl-BsKzXJz4.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>$(()=>import(`./wikitext-ClFFjSW2.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>$(()=>import(`./wit-DdvCle-K.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>$(()=>import(`./wolfram-DLL8P-h_.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>$(()=>import(`./xml-Bd8eSLdt.js`).then(e=>e.n),__vite__mapDeps([7,8]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-DVLXYJQL.js`),__vite__mapDeps([100,7,8]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-CO0sPwby.js`).then(e=>e.n),[],import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-BnlCZFoB.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-CMLA9XwU.js`),[],import.meta.url))}],h4=Object.fromEntries(m4.map(e=>[e.id,e.import])),g4=Object.fromEntries(m4.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),_4={...h4,...g4},v4=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>$(()=>import(`./andromeeda-vGVdxbeo.js`),[],import.meta.url))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>$(()=>import(`./aurora-x-CDeNXAV0.js`),[],import.meta.url))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>$(()=>import(`./ayu-dark-DluEY0Gj.js`),[],import.meta.url))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>$(()=>import(`./ayu-light-C3h-C4tm.js`),[],import.meta.url))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>$(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[],import.meta.url))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-frappe-3VR1Za6u.js`),[],import.meta.url))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>$(()=>import(`./catppuccin-latte-DwIHMF0Q.js`),[],import.meta.url))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-macchiato-DYnBP6_5.js`),[],import.meta.url))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-mocha-DYhrFGRu.js`),[],import.meta.url))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>$(()=>import(`./dark-plus-Cs2F2srj.js`),[],import.meta.url))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>$(()=>import(`./dracula-BHWKrbxM.js`),[],import.meta.url))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>$(()=>import(`./dracula-soft-5eyTD99u.js`),[],import.meta.url))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>$(()=>import(`./everforest-dark-sB-x3p7T.js`),[],import.meta.url))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>$(()=>import(`./everforest-light-Df2xbC6M.js`),[],import.meta.url))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>$(()=>import(`./github-dark-C-LZuMrd.js`),[],import.meta.url))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>$(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>$(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[],import.meta.url))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>$(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[],import.meta.url))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>$(()=>import(`./github-light-EUqPIrTm.js`),[],import.meta.url))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>$(()=>import(`./github-light-default-BXViO-2h.js`),[],import.meta.url))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>$(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[],import.meta.url))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[],import.meta.url))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[],import.meta.url))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[],import.meta.url))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[],import.meta.url))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[],import.meta.url))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[],import.meta.url))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>$(()=>import(`./horizon-CE9ld1lL.js`),[],import.meta.url))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>$(()=>import(`./horizon-bright-Br1oVSNq.js`),[],import.meta.url))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>$(()=>import(`./houston-CsvMBhTu.js`),[],import.meta.url))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>$(()=>import(`./kanagawa-dragon-CXtmUGW6.js`),[],import.meta.url))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>$(()=>import(`./kanagawa-lotus-BN08jTvb.js`),[],import.meta.url))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>$(()=>import(`./kanagawa-wave-CTweb8Dz.js`),[],import.meta.url))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>$(()=>import(`./laserwave-C_8bwKvT.js`),[],import.meta.url))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>$(()=>import(`./light-plus-DVQuIRkW.js`),[],import.meta.url))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>$(()=>import(`./material-theme-Bm3Qr25_.js`),[],import.meta.url))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>$(()=>import(`./material-theme-darker-2IIEA8gg.js`),[],import.meta.url))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>$(()=>import(`./material-theme-lighter-uhdI0v04.js`),[],import.meta.url))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>$(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[],import.meta.url))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>$(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[],import.meta.url))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>$(()=>import(`./min-dark-BSWPekZh.js`),[],import.meta.url))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>$(()=>import(`./min-light-DDpmG2fV.js`),[],import.meta.url))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>$(()=>import(`./monokai-CdkpiU2Y.js`),[],import.meta.url))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>$(()=>import(`./night-owl-DhmEMT88.js`),[],import.meta.url))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>$(()=>import(`./night-owl-light-eJ-hLW7d.js`),[],import.meta.url))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>$(()=>import(`./nord-Cb4Vim4T.js`),[],import.meta.url))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>$(()=>import(`./one-dark-pro-CLwyXe_n.js`),[],import.meta.url))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>$(()=>import(`./one-light-D7Lr4KcI.js`),[],import.meta.url))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>$(()=>import(`./plastic-DQwYfKfQ.js`),[],import.meta.url))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>$(()=>import(`./poimandres-DRFjx7u4.js`),[],import.meta.url))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>$(()=>import(`./red-CJ3rzSJv.js`),[],import.meta.url))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>$(()=>import(`./rose-pine-BthvhNj6.js`),[],import.meta.url))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>$(()=>import(`./rose-pine-dawn-Dg85fqjY.js`),[],import.meta.url))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>$(()=>import(`./rose-pine-moon-hon4tzzS.js`),[],import.meta.url))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>$(()=>import(`./slack-dark-DnToyrRv.js`),[],import.meta.url))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>$(()=>import(`./slack-ochin-B2OO5cIa.js`),[],import.meta.url))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>$(()=>import(`./snazzy-light-4G7pJPwS.js`),[],import.meta.url))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>$(()=>import(`./solarized-dark-DV17i1UV.js`),[],import.meta.url))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>$(()=>import(`./solarized-light-DSh2HLQt.js`),[],import.meta.url))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>$(()=>import(`./synthwave-84-nFMaYfgc.js`),[],import.meta.url))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>$(()=>import(`./tokyo-night-oM2G3aXe.js`),[],import.meta.url))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>$(()=>import(`./vesper-D5bVUKB1.js`),[],import.meta.url))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>$(()=>import(`./vitesse-black-fwtXNY1n.js`),[],import.meta.url))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>$(()=>import(`./vitesse-dark-BZCL-v6S.js`),[],import.meta.url))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>$(()=>import(`./vitesse-light-VbXTXTou.js`),[],import.meta.url))}].map(e=>[e.id,e.import])),y4=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function b4(){return 2147483648}function x4(){return typeof performance<`u`?performance.now():Date.now()}var S4=(e,t)=>e+(t-e%t)%t;async function C4(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=b4();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,S4(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:x4,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var w4=Object.defineProperty,T4=(e,t,n)=>t in e?w4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E4=(e,t,n)=>T4(e,typeof t==`symbol`?t:t+``,n),D4=null;function O4(e){throw new y4(e.UTF8ToString(e.getLastOnigError()))}var k4=class e{constructor(t){E4(this,`utf16Length`),E4(this,`utf8Length`),E4(this,`utf16Value`),E4(this,`utf8Value`),E4(this,`utf16OffsetToUtf8`),E4(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},A4=class e{constructor(t){if(E4(this,`id`,++e.LAST_ID),E4(this,`_onigBinding`),E4(this,`content`),E4(this,`utf16Length`),E4(this,`utf8Length`),E4(this,`utf16OffsetToUtf8`),E4(this,`utf8OffsetToUtf16`),E4(this,`ptr`),!D4)throw new y4(`Must invoke loadWasm first.`);this._onigBinding=D4,this.content=t;let n=new k4(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=D4.omalloc(1e4),e._sharedPtrInUse=!0,D4.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(D4)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};E4(A4,`LAST_ID`,0),E4(A4,`_sharedPtr`,0),E4(A4,`_sharedPtrInUse`,!1);var j4=A4,M4=class{constructor(e){if(E4(this,`_onigBinding`),E4(this,`_ptr`),!D4)throw new y4(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new k4(e[r]);t[r]=i.createString(D4),n[r]=i.utf8Length}let r=D4.omalloc(4*e.length);D4.HEAPU32.set(t,r/4);let i=D4.omalloc(4*e.length);D4.HEAPU32.set(n,i/4);let a=D4.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)D4.ofree(t[n]);D4.ofree(i),D4.ofree(r),a===0&&O4(D4),this._onigBinding=D4,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new j4(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function N4(e){return typeof e.instantiator==`function`}function P4(e){return typeof e.default==`function`}function F4(e){return e.data!==void 0}function I4(e){return typeof Response<`u`&&e instanceof Response}function L4(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var R4;function z4(e){if(R4)return R4;async function t(){D4=await C4(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),N4(n)?n=await n.instantiator(t):P4(n)?n=await n.default(t):(F4(n)&&(n=n.data),I4(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await V4(n)(t):await H4(n)(t):L4(n)||n instanceof WebAssembly.Module?n=await B4(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await B4(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return R4=t(),R4}function B4(e){return t=>WebAssembly.instantiate(e,t)}function V4(e){return t=>WebAssembly.instantiateStreaming(e,t)}function H4(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function U4(e){return e&&await z4(e),{createScanner(e){return new M4(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new j4(e)}}}var W4=d4({langs:_4,themes:v4,engine:()=>U4($(()=>import(`./wasm-BnjxR4X6.js`),[],import.meta.url))}),{codeToHtml:G4,codeToHast:K4,codeToTokens:q4,codeToTokensBase:J4,codeToTokensWithThemes:Y4,getSingletonHighlighter:X4,getLastGrammarState:Z4}=p4(W4,{guessEmbeddedLanguages:Z0});function Q4(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function $4(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var e3=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),t3=String.raw;function n3(e,t){if(e==null)throw Error(t??`Value expected`);return e}var r3=t3`\[\^?`,i3=`c.? | C(?:-.?)?|${t3`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${t3`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${t3`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${t3`o\{[^\}]*\}?`}|${t3`\d{1,3}`}`,a3=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,o3=new RegExp(t3`
251
+ \\ (?:
252
+ ${i3}
253
+ | [gk]<[^>]*>?
254
+ | [gk]'[^']*'?
255
+ | .
256
+ )
257
+ | \( (?:
258
+ \? (?:
259
+ [:=!>({]
260
+ | <[=!]
261
+ | <[^>]*>
262
+ | '[^']*'
263
+ | ~\|?
264
+ | #(?:[^)\\]|\\.?)*
265
+ | [^:)]*[:)]
266
+ )?
267
+ | \*[^\)]*\)?
268
+ )?
269
+ | (?:${a3.source})+
270
+ | ${r3}
271
+ | .
272
+ `.replace(/\s+/g,``),`gsu`),s3=new RegExp(t3`
273
+ \\ (?:
274
+ ${i3}
275
+ | .
276
+ )
277
+ | \[:(?:\^?\p{Alpha}+|\^):\]
278
+ | ${r3}
279
+ | &&
280
+ | .
281
+ `.replace(/\s+/g,``),`gsu`);function c3(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=R3(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(o3.lastIndex=0;s=o3.exec(e);){let t=l3(a,e,s[0],o3.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(o3.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`?B3(e,u):e).flat(),flags:r}}function l3(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=u3(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:m3(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:O3(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:h3(n)}}if(a===`K`)return{token:S3(`keep`,n)};if(a===`N`||a===`R`)return{token:x3(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:x3(`any`,n)};if(a===`X`)return{token:x3(`text_segment`,n)};let e=f3(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:N3(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:M3(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:T3(`group`,n)};if(n===`(?>`)return{token:T3(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:T3(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:T3(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:T3(`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:w3(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
282
+ `,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:x3(`dot`,n)}:n===`^`||n===`$`?{token:m3(e.singleline?{"^":t3`\A`,$:t3`\Z`}[n]:n,n)}:n===`|`?{token:p3(n)}:a3.test(n)?{tokens:V3(n)}:{token:g3(Q4(n),n)}}function u3(e,t,n){let r=[b3(t[1]===`^`,t)],i=1,a;for(s3.lastIndex=n;a=s3.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(b3(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(g3(93,e));else if(i--,r.push(_3(e)),!i)break}else{let t=d3(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:s3.lastIndex||e.length}}function d3(e){if(e[0]===`\\`)return f3(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!e3.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return x3(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?v3(e):e===`&&`?y3(e):g3(Q4(e),e)}function f3(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return j3(e);if(`dDhHsSwW`.includes(n))return F3(e);if(e.startsWith(t3`\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 I3(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 g3(Q4(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return g3(z3(e),e);if(A3.has(n))return g3(A3.get(n),e);if(/\d/.test(n))return C3(t,e);if(e===`\\`)throw Error(t3`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return g3(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function p3(e){return{type:`Alternator`,raw:e}}function m3(e,t){return{type:`Assertion`,kind:e,raw:t}}function h3(e){return{type:`Backreference`,raw:e}}function g3(e,t){return{type:`Character`,value:e,raw:t}}function _3(e){return{type:`CharacterClassClose`,raw:e}}function v3(e){return{type:`CharacterClassHyphen`,raw:e}}function y3(e){return{type:`CharacterClassIntersector`,raw:e}}function b3(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function x3(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function S3(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:n3(n.flags),raw:t}}function C3(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function w3(e){return{type:`GroupClose`,raw:e}}function T3(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function E3(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function D3(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function O3(e){return{type:`Subroutine`,raw:e}}var k3=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),A3=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function j3(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return g3(Q4(t.toUpperCase())-64,e)}function M3(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=L3(n),o=L3(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),S3(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,T3(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function N3(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=k3.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 E3(l,r??null,i?.split(`,`)??null,e)}function P3(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 D3(t,n,r,e)}function F3(e){let t=e[1].toLowerCase();return x3({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function I3(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return x3(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function L3(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 R3(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;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function z3(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 B3(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[h3(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(t3`Octal encoded byte above 177 unsupported "${n}"`)}else r=Q4(t);a.push(g3(r,(e===0?`\\`:``)+t))}return a}function V3(e){let t=[],n=new RegExp(a3,`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(P3(e.slice(0,-1)));continue}}}t.push(P3(e))}return t}function H3(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 U3(e){return W3.has(e.type)}var W3=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function G3(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=c3(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 t6();case`Assertion`:return K3(n);case`Backreference`:return q3(n,a);case`Character`:return a6(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return J3(n,a,t);case`CharacterClassOpen`:return Y3(n,a,t);case`CharacterSet`:return X3(n,a);case`Directive`:return l6(n.kind,{flags:n.flags});case`GroupOpen`:return Z3(n,a,t);case`NamedCallout`:return p6(n.kind,n.tag,n.arguments);case`Quantifier`:return Q3(n,a);case`Subroutine`:return $3(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=g6(u6(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(t3`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(t3`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function K3({kind:e}){return n6(n3({"^":`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===t3`\B`||e===t3`\Y`})}function q3({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,r6(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 r6(r)}return i(+r)}function J3(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(),s6(o,e);throw Error(`Invalid character class range`)}return a6(Q4(`-`))}function Y3({negate:e},t,n){let{tokens:r,walk:i}=t,a=[o6()],o=r[t.nextIndex],s=D6(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(o6()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=D6(r[t.nextIndex],o)}let c=o6({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 X3({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=E6(n);if(e3.has(r)&&!o?.has(r))e=`posix`,n=r;else return v6(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?m6(n,{negate:t}):c6(e,{negate:t})}function Z3(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=y6(e),l=c.type===`AbsenceFunction`,u=C6(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&$4(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=O6(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(t6()),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(S6(t)||t.type===`CapturingGroup`)throw Error(e)}else if(S6(t)||C6(t)&&t.negate)throw Error(e)}}f=O6(r[t.nextIndex])}return t.nextIndex++,c}function Q3({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!U3(a))throw Error(`Quantifier requires a repeatable token`);let o=h6(e,t,n,a);return i.body.pop(),o}function $3({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=_6(i);return r.push(o),o}function e6(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:b6(t?.body)}}function t6(e){return{type:`Alternative`,body:x6(e?.body)}}function n6(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function r6(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function i6(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!w6(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:b6(t?.body)}}function a6(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 o6(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:x6(e?.body)}}function s6(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function c6(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 l6(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:n3(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function u6(e){return{type:`Flags`,...e}}function d6(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:b6(e?.body)}}function f6(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:b6(e?.body)}}function p6(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function m6(e,t){let n=!!t?.negate;if(!e3.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function h6(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 g6(e,t){return{type:`Regex`,body:b6(t?.body),flags:e}}function _6(e){return{type:`Subroutine`,ref:e}}function v6(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(E6(e));if(!r){if(n.normalizeUnknownPropertyNames)r=T6(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(t3`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function y6({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return e6(`repeater`);case`atomic`:return d6({atomic:!0});case`capturing`:return i6(i,{name:n});case`group`:return d6({flags:e});case`lookahead`:case`lookbehind`:return f6({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function b6(e){if(e===void 0)e=[t6()];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 x6(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 S6(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function C6(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function w6(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function T6(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 E6(e){return e.replace(/[- _]+/g,``).toLowerCase()}function D6(e,t){let n=t;return n3(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function O6(e){return n3(e,`Unclosed group`)}function k6(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(){A6(c).splice(Math.max(0,j6(s)+l),1),l--,u=!0},removeAllNextSiblings(){return A6(c).splice(j6(s)+1)},removeAllPrevSiblings(){let e=j6(s)+l;return l-=e,A6(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,j6(s)+l)]=e:n3(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(A6(c).splice(Math.max(0,j6(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,j6(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 A6(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function j6(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var M6=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function N6(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function P6(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var F6=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function I6(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;if(!i&&(!r||r===F6.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?F6.CHAR_CLASS:F6.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function L6(e,t,n,r){I6(e,t,n,r)}function R6(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===F6.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function z6(e,t,n){return!!R6(e,t,0,n)}function B6(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 V6=new RegExp(String.raw`(?<noncapturingStart>${M6})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function H6(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(V6.lastIndex=Number.isNaN(c)?0:c+7;f=V6.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),N6(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=I6(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}`},F6.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var U6=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,W6=new RegExp(String.raw`
283
+ \\(?: \d+
284
+ | c[A-Za-z]
285
+ | [gk]<[^>]+>
286
+ | [pPu]\{[^\}]+\}
287
+ | u[A-Fa-f\d]{4}
288
+ | x[A-Fa-f\d]{2}
289
+ )
290
+ | \((?: \? (?: [:=!>]
291
+ | <(?:[=!]|[^>]+>)
292
+ | [A-Za-z\-]+:
293
+ | \(DEFINE\)
294
+ ))?
295
+ | (?<qBase>${U6})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
296
+ | \\?.
297
+ `.replace(/\s+/g,``),`gsu`);function G6(e){if(!RegExp(`${U6}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(W6.lastIndex=0;o=W6.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=P6(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}W6.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var K6=String.raw,q6=K6`\(\?R=(?<rDepth>[^\)]+)\)|${K6`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,J6=K6`\(\?<(?![=!])(?<captureName>[^>]+)>`,Y6=K6`${J6}|(?<unnamed>\()(?!\?)`,X6=new RegExp(K6`${J6}|${q6}|\(\?|\\?.`,`gsu`),Z6=`Cannot use multiple overlapping recursions`;function Q6(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(q6,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&z6(e,K6`\(\?\(DEFINE\)`,F6.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=z6(e,K6`\\[1-9]`,F6.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(X6.lastIndex=0;f=X6.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($6(m),l)throw Error(Z6);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(X6.lastIndex);if(z6(s,q6,F6.DEFAULT))throw Error(Z6);let c=m-1;e=e8(t,s,c,!1,n,a,d),i=r8(i,t,c,a.length,0,d);break}else if(h){$6(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(Z6);break}if(!u)throw Error(K6`Recursive \g cannot be used outside the referenced group "${r===`external`?h:K6`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=B6(e,p);if(o&&z6(m,K6`${J6}|\((?!\?)`,F6.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=e8(_,v,b,!0,n,a,d);i=r8(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,X6.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),X6.lastIndex),s.set(p,X6.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),X6.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function $6(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 e8(e,t,n,r,i,a,o){let s=new Set;r&&L6(e+t,J6,({groups:{captureName:e}})=>{s.add(e)},F6.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${t8(`(?:${e}`,`forward`,...c)}(?:)${t8(`${t})`,`backward`,...c)}${t}`}function t8(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+=I6(e,K6`${Y6}|\\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),n8(i,n),s?e:`(?<${t}${l}>`}return K6`\k<${c}${l}>`},F6.DEFAULT)}return c}function n8(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function r8(e,t,n,r,i,a){if(e.size&&r){let o=0;L6(t,Y6,()=>o++,F6.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 i8=String.fromCodePoint,a8=String.raw,o8={},s8=globalThis.RegExp;o8.flagGroups=(()=>{try{new s8(`(?i:)`)}catch{return!1}return!0})(),o8.unicodeSets=(()=>{try{new s8(`[[]]`,`v`)}catch{return!1}return!0})(),o8.bugFlagVLiteralHyphenIsRange=o8.unicodeSets?(()=>{try{new s8(a8`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,o8.bugNestedClassIgnoresNegation=o8.unicodeSets&&new s8(`[[^a]]`,`v`).test(`a`);function c8(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function l8(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function u8(e,t){return f8[e]>=f8[t]}function d8(e,t){if(e==null)throw Error(t??`Value expected`);return e}var f8={ES2025:2025,ES2024:2024,ES2018:2018},p8={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function m8(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!p8[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=o8.flagGroups?`ES2025`:o8.unicodeSets?`ES2024`:`ES2018`),t}var h8=`[ -\r ]`,g8=new Set([i8(304),i8(305)]),_8=a8`[\p{L}\p{M}\p{N}\p{Pc}]`;function v8(e){if(g8.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=S8.get(n),a=b8.get(n),o=x8.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 y8=new Map(`C Other
298
+ Cc Control cntrl
299
+ Cf Format
300
+ Cn Unassigned
301
+ Co Private_Use
302
+ Cs Surrogate
303
+ L Letter
304
+ LC Cased_Letter
305
+ Ll Lowercase_Letter
306
+ Lm Modifier_Letter
307
+ Lo Other_Letter
308
+ Lt Titlecase_Letter
309
+ Lu Uppercase_Letter
310
+ M Mark Combining_Mark
311
+ Mc Spacing_Mark
312
+ Me Enclosing_Mark
313
+ Mn Nonspacing_Mark
314
+ N Number
315
+ Nd Decimal_Number digit
316
+ Nl Letter_Number
317
+ No Other_Number
318
+ P Punctuation punct
319
+ Pc Connector_Punctuation
320
+ Pd Dash_Punctuation
321
+ Pe Close_Punctuation
322
+ Pf Final_Punctuation
323
+ Pi Initial_Punctuation
324
+ Po Other_Punctuation
325
+ Ps Open_Punctuation
326
+ S Symbol
327
+ Sc Currency_Symbol
328
+ Sk Modifier_Symbol
329
+ Sm Math_Symbol
330
+ So Other_Symbol
331
+ Z Separator
332
+ Zl Line_Separator
333
+ Zp Paragraph_Separator
334
+ Zs Space_Separator
335
+ ASCII
336
+ ASCII_Hex_Digit AHex
337
+ Alphabetic Alpha
338
+ Any
339
+ Assigned
340
+ Bidi_Control Bidi_C
341
+ Bidi_Mirrored Bidi_M
342
+ Case_Ignorable CI
343
+ Cased
344
+ Changes_When_Casefolded CWCF
345
+ Changes_When_Casemapped CWCM
346
+ Changes_When_Lowercased CWL
347
+ Changes_When_NFKC_Casefolded CWKCF
348
+ Changes_When_Titlecased CWT
349
+ Changes_When_Uppercased CWU
350
+ Dash
351
+ Default_Ignorable_Code_Point DI
352
+ Deprecated Dep
353
+ Diacritic Dia
354
+ Emoji
355
+ Emoji_Component EComp
356
+ Emoji_Modifier EMod
357
+ Emoji_Modifier_Base EBase
358
+ Emoji_Presentation EPres
359
+ Extended_Pictographic ExtPict
360
+ Extender Ext
361
+ Grapheme_Base Gr_Base
362
+ Grapheme_Extend Gr_Ext
363
+ Hex_Digit Hex
364
+ IDS_Binary_Operator IDSB
365
+ IDS_Trinary_Operator IDST
366
+ ID_Continue IDC
367
+ ID_Start IDS
368
+ Ideographic Ideo
369
+ Join_Control Join_C
370
+ Logical_Order_Exception LOE
371
+ Lowercase Lower
372
+ Math
373
+ Noncharacter_Code_Point NChar
374
+ Pattern_Syntax Pat_Syn
375
+ Pattern_White_Space Pat_WS
376
+ Quotation_Mark QMark
377
+ Radical
378
+ Regional_Indicator RI
379
+ Sentence_Terminal STerm
380
+ Soft_Dotted SD
381
+ Terminal_Punctuation Term
382
+ Unified_Ideograph UIdeo
383
+ Uppercase Upper
384
+ Variation_Selector VS
385
+ White_Space space
386
+ XID_Continue XIDC
387
+ XID_Start XIDS`.split(/\s/).map(e=>[E6(e),e])),b8=new Map([[`s`,i8(383)],[i8(383),`s`]]),x8=new Map([[i8(223),i8(7838)],[i8(107),i8(8490)],[i8(229),i8(8491)],[i8(969),i8(8486)]]),S8=new Map([T8(453),T8(456),T8(459),T8(498),...E8(8072,8079),...E8(8088,8095),...E8(8104,8111),T8(8124),T8(8140),T8(8188)]),C8=new Map([[`alnum`,a8`[\p{Alpha}\p{Nd}]`],[`alpha`,a8`\p{Alpha}`],[`ascii`,a8`\p{ASCII}`],[`blank`,a8`[\p{Zs}\t]`],[`cntrl`,a8`\p{Cc}`],[`digit`,a8`\p{Nd}`],[`graph`,a8`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,a8`\p{Lower}`],[`print`,a8`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,a8`[\p{P}\p{S}]`],[`space`,a8`\p{space}`],[`upper`,a8`\p{Upper}`],[`word`,a8`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,a8`\p{AHex}`]]);function w8(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function T8(e){let t=i8(e);return[t.toLowerCase(),t]}function E8(e,t){return w8(e,t).map(e=>T8(e))}var D8=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function O8(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};M8(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:u8(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};k6(e,k8,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 k6(e,A8,a),k6(e,j8,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var k8={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=d6();e.body[0].body.push(f6({negate:!0,body:r}),v6(`Any`));let i=d6();i.body[0].body.push(h6(`greedy`,0,1/0,e)),n(Z8(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];l8(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=z8(t.get(e));if(n){let t=d6({flags:n});t.body[0].body=e.body,e.body=[Z8(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(Z8(f6({body:[t6({body:[n6(`string_end`)]}),t6({body:[a6(10)]})]}),t));else if(c===`line_start`)o(Z8(J8(a8`(?<=\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&&G8(e))o(Z8(f6({negate:!0}),t));else if(d)throw Error(a8`Uses "\G" in a way that requires a subclass`);else o(X8(n6(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(Z8(J8(a8`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${_8})(?!${_8})|(?<!${_8})(?=${_8}))`,n=`(?:(?<=${_8})(?=${_8})|(?<!${_8})(?!${_8}))`;o(Z8(J8(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!q8(n)&&(n=R8(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!q8(r)&&(r=R8(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(Z8(o6({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(X8(c6(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(Z8(Y8(J8(h8),l),t));return}if(s&&(c===`word`||u===`word`)){n(X8(c6(`word`,{negate:l}),t));return}if(c===`any`)n(X8(v6(`Any`),t));else if(c===`digit`)n(X8(v6(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error(a8`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=a8`\p{RI}{2}|${e}(?:\u200D${e})*`;n(Z8(J8(a8`(?>\r\n|${i?a8`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(X8(v6(`AHex`,{negate:l}),t));else if(c===`newline`)n(Z8(J8(l?`[^
388
+ ]`:`(?>\r
389
+ ?|[
390
+ \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-${i8(e.codePointAt(0)-1)}${i8(e.codePointAt(2)+1)}-\u{10FFFF}`),n(Z8(J8(`[${e}]`),t))}else n(Z8(Y8(J8(C8.get(u)),l),t));else if(c===`property`)y8.has(E6(u))||(e.key=`sc`);else if(c===`space`)n(X8(v6(`space`,{negate:l}),t));else if(c===`word`)n(Z8(Y8(J8(_8),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=d6({flags:c});e.body[0].body=o(),i(Z8(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&H3(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(a8`Uses "\K" in a way that's unsupported`);let o=f6({behind:!0});o.body[0].body=a(),i(Z8(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(Z8(f6({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=d6();t.body[0].body.push(e.body),e.body=Z8(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=H8(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(a8`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!q8(n)&&(n=R8(n,t),e.ref=n)}},A8={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=X8(I8(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&l8(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=l8(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=c8(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?I8(0):F8(o,r.groupOriginByCopy,null),l=c;if(!s){let e=z8(L8(o,e=>e.type===`Group`&&!!e.flags)),t=e?c8(r.globalFlags,e):r.globalFlags;N8(t,r.currentFlags)||(l=d6({flags:B8(t)}),l.body[0].body.push(c))}n(Z8(l,t),{traverse:!s})}},j8={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=>P8(t,e));i.length?i.length>1?n(Z8(d6({atomic:!0,body:i.reverse().map(e=>t6({body:[r6(e.number)]}))}),t)):e.ref=i[0].number:n(Z8(f6({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=i6();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function M8(e){k6(e,{"*"({node:e,parent:t}){e.parent=t}})}function N8(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function P8(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=V8(n.parent);for(let r of t){if(r===n)break;if(r===e||U8(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function F8(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]=F8(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function I8(e){let t=_6(e);return t.isRecursive=!0,t}function L8(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function R8(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 z8(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 B8({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 V8(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function H8(e){let t=e.find(e=>e.kind===`search_start`||K8(e,{negate:!1})||!W8(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=H8(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function U8(e,t){let n=V8(e)??[];for(let e of n)if(e===t||U8(e,t))return!0;return!1}function W8({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function G8(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function K8(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&H3(e.body[0],{type:`Assertion`,kind:`search_start`})}function q8(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function J8(e,t){let n=G3(e,{...t,unicodePropertyMap:y8}).body;return n.length>1||n[0].body.length>1?d6({body:n}):n[0].body[0]}function Y8(e,t){return e.negate=t,e}function X8(e,t){return e.parent=t,e}function Z8(e,t){return M8(e),e.parent=t,e}function Q8(e,t){let n=m8(t),r=u8(n.target,`ES2024`),i=u8(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];k6(e,$8,{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,d8(e5[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&&l8(f._captureTransfers,e.transferTo,[]).push(t)}),f}var $8={"*":{enter({node:e},t){if(f5(e)){let n=t.getCurrentModI();t.pushModI(e.flags?c8({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){f5(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){o5(i8(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),s5(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&D8.has(e.value)&&t.setHasCasedChar()}},e5={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?a8`\B`:a8`\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=i8(e),r=c5(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&o5(n)){let e=v8(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`);o8.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(m5)&&(o=[a6(45),...o.filter(e=>!m5(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||o8.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=d6(),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=t6({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`&&!(o8.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=c5(n,i),o=c5(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&l5(s5(e)).forEach(e=>{s.add(Array.isArray(e)?`${c5(e[0],i)}-${c5(e[1],i)}`:c5(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?`.`:`[^]`:a8`[^\n]`;if(e===`digit`)return t?a8`\D`:a8`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&D8.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?a8`\P`:a8`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?a8`\W`:a8`\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=c8(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${u5(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)+d5(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})`:a8`\g<${t}&R=${r}>`}},t5=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),n5=new Set([`-`,`\\`,`]`,`^`,`[`]),r5=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),i5=new Map([[9,a8`\t`],[10,a8`\n`],[11,a8`\v`],[12,a8`\f`],[13,a8`\r`],[8232,a8`\u2028`],[8233,a8`\u2029`],[65279,a8`\uFEFF`]]),a5=/^\p{Cased}$/u;function o5(e){return a5.test(e)}function s5(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=i8(e);if(!o5(t))continue;let o=v8(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function c5(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(i5.has(e))return i5.get(e);if(e<32||e>126&&e<160||e>262143||t&&p5(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?r5:n5:t5,a=i8(e);return(i.has(a)?`\\`:``)+a}function l5(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 u5(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 d5({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 f5({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function p5(e){return e>47&&e<58}function m5({type:e,value:t}){return e===`Character`&&t===45}var h5=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=_5(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&&(g5(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||=v5(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 g5(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 _5(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)l8(n,t,{}).transferTo=e;return n}function v5(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 y5(e,t){let n=b5(e,t);return n.options?new h5(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function b5(e,t){let n=m8(t),r=O8(G3(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:y8}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=Q8(r,n),a=Q6(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=H6(G6(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}var x5=4294967295,S5=class{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}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:x5,end:x5,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function C5(e,t){return y5(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function w5(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>C5(e,{target:t.target}),{createScanner(e){return new S5(e,t)},createString(e){return{content:e}}}}var T5=w5({forgiving:!0}),E5=Object.fromEntries(m4.flatMap(e=>(e.aliases??[]).map(t=>[t,e.id]))),D5=new Set(Object.keys(_4)),O5=e=>{let t=e.trim().toLowerCase();return E5[t]||(D5.has(t),t)},k5=new Map,A5=new Map,j5=new Map,M5=e=>typeof e==`string`?e:e.name??`custom`,N5=(e,t)=>`${e}-${M5(t[0])}-${M5(t[1])}`,P5=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):``;return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},F5=(e,t)=>{let n=N5(e,t);if(k5.has(n))return k5.get(n);let r=W4({themes:t,langs:[e],engine:T5});return k5.set(n,r),r};function I5(e={}){let t=e.themes??[`github-light`,`github-dark`];return{name:`shiki`,type:`code-highlighter`,supportsLanguage(e){let t=O5(e);return D5.has(t)},getSupportedLanguages(){return Array.from(D5)},getThemes(){return t},highlight({code:e,language:t,themes:n},r){let i=O5(t),a=[M5(n[0]),M5(n[1])],o=P5(e,i,a);return A5.has(o)?A5.get(o):(r&&(j5.has(o)||j5.set(o,new Set),j5.get(o).add(r)),F5(D5.has(i)?i:`text`,n).then(t=>{let n=t.getLoadedLanguages().includes(i)?i:`text`,r=t.codeToTokens(e,{lang:n,themes:{light:a[0],dark:a[1]}});A5.set(o,r);let s=j5.get(o);if(s){for(let e of s)e(r);j5.delete(o)}}).catch(e=>{console.error(`[Streamdown Code] Failed to highlight code:`,e),j5.delete(o)}),null)}}}var L5=I5();function R5(e){if(e===e.toUpperCase()&&e!==e.toLowerCase())return e.toLowerCase().replace(/_/g,`-`);let t=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);return t=t.startsWith(`-`)?t.slice(1):t,t.replace(/_/g,`-`).replace(/-$/,``)}function z5(e){return(e??`/agents`).replace(/^\/+|\/+$/g,``)||`agents`}function B5(e,t){let n={};if(t&&(n.token=t),!e)return n;if(Array.isArray(e)){for(let t of e){let e=t.indexOf(`=`);if(e<=0)throw Error(`Invalid query "${t}" (expected key=value).`);n[t.slice(0,e)]=t.slice(e+1)}return n}for(let[t,r]of Object.entries(e))n[t]=r;return n}function V5(e){let t=e.instance?.trim()||`default`,n=z5(e.routePrefix),r,i;if(e.url){let t;try{t=new URL(e.url)}catch{throw Error(`Invalid url "${e.url}" (expected a full origin).`)}if(!t.host)throw Error(`Invalid url "${e.url}" (missing host — include a scheme, e.g. https://host).`);r=t.host,i=e.protocol===`ws`||e.protocol===`wss`?e.protocol:t.protocol===`https:`||t.protocol===`wss:`?`wss`:`ws`}else r=e.host?.trim()||`localhost:5173`,i=e.protocol===`wss`?`wss`:`ws`;let a=e.canonicalAgent?e.agent:R5(e.agent),o=[n,encodeURIComponent(a),encodeURIComponent(t)].join(`/`);return{host:r,protocol:i,basePath:o,query:B5(e.query,e.token),instance:t,segment:a}}var H5={connected:{label:`Connected`,dot:`bg-green-500`,cls:`bg-green-500/10 text-kumo-success`},connecting:{label:`Connecting…`,dot:`bg-kumo-warning animate-pulse`,cls:`bg-kumo-warning-tint text-kumo-warning`},disconnected:{label:`Disconnected`,dot:`bg-kumo-danger`,cls:`bg-kumo-danger-tint text-kumo-danger`}};function U5({status:e}){let t=H5[e];return(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium ${t.cls}`,children:[(0,z.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full ${t.dot}`}),t.label]})}function W5(e){return e.isRecovering?(0,z.jsx)(dt,{variant:`warning`,children:`Recovering`}):e.isStreaming?(0,z.jsx)(dt,{variant:`info`,children:`Streaming`}):e.chatStatus===`submitted`?(0,z.jsx)(dt,{variant:`info`,children:`Working`}):e.chatStatus===`error`?(0,z.jsx)(dt,{variant:`destructive`,children:`Error`}):(0,z.jsx)(dt,{variant:`secondary`,children:`Idle`})}function G5({label:e,children:t}){return(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-3 py-1.5`,children:[(0,z.jsx)(Ph,{size:`xs`,variant:`secondary`,children:e}),(0,z.jsx)(`div`,{className:`text-right text-xs text-kumo-default break-all`,children:t})]})}function K5(e){let t=e.state===void 0||e.state===null?null:JSON.stringify(e.state,null,2);return(0,z.jsxs)(`div`,{className:`flex h-full flex-col gap-4 overflow-y-auto p-4`,children:[(0,z.jsx)(Ph,{size:`sm`,bold:!0,children:`Inspector`}),(0,z.jsxs)(Ah,{className:`rounded-xl p-3 ring ring-kumo-line`,children:[(0,z.jsx)(G5,{label:`Agent`,children:e.identity?.agent??`—`}),(0,z.jsx)(G5,{label:`Instance`,children:e.identity?.name??`—`}),(0,z.jsx)(G5,{label:`Connection`,children:(0,z.jsx)(U5,{status:e.status})}),(0,z.jsx)(G5,{label:`Turn`,children:W5(e)}),(0,z.jsxs)(G5,{label:`History`,children:[e.messageCount,` messages`]})]}),(0,z.jsxs)(Ah,{className:`rounded-xl p-3 ring ring-kumo-line`,children:[(0,z.jsx)(Ph,{size:`xs`,variant:`secondary`,bold:!0,children:`Endpoint`}),(0,z.jsx)(`pre`,{className:`mt-1 overflow-x-auto whitespace-pre-wrap break-all font-mono text-xs text-kumo-subtle`,children:`${e.endpoint.protocol}://${e.endpoint.host}/${e.endpoint.basePath}`})]}),(0,z.jsxs)(Ah,{className:`flex-1 rounded-xl p-3 ring ring-kumo-line`,children:[(0,z.jsx)(Ph,{size:`xs`,variant:`secondary`,bold:!0,children:`Live state`}),t===null?(0,z.jsx)(`p`,{className:`mt-1 text-xs italic text-kumo-inactive`,children:`No state yet`}):(0,z.jsx)(`pre`,{className:`mt-1 overflow-x-auto whitespace-pre-wrap break-all font-mono text-xs text-kumo-subtle`,children:t})]})]})}function q5({align:e,variant:t,children:n}){let r=`max-w-[85%] rounded-2xl overflow-hidden`;return(0,z.jsx)(`div`,{className:`flex ${e===`right`?`justify-end`:`justify-start`}`,children:t===`user`?(0,z.jsx)(`div`,{className:`${r} rounded-br-md bg-kumo-contrast text-kumo-inverse`,children:n}):(0,z.jsx)(Ah,{className:`${r} rounded-bl-md ring ring-kumo-line`,children:n})})}function J5({connection:e,onDisconnect:t}){let n=(0,B.useMemo)(()=>V5({agent:e.agent,canonicalAgent:e.canonicalAgent,instance:e.instance,url:e.url,host:e.host,protocol:e.protocol,token:e.token,routePrefix:e.routePrefix}),[e]),[r,i]=(0,B.useState)(`connecting`),[a,o]=(0,B.useState)(null),[s,c]=(0,B.useState)(void 0),[l,u]=(0,B.useState)(``),d=(0,B.useRef)(null),{messages:f,sendMessage:p,clearHistory:m,status:h,isStreaming:g,isRecovering:_,addToolApprovalResponse:v}=Ek({agent:Fg({agent:e.agent,name:n.instance,basePath:n.basePath,host:n.host,protocol:n.protocol,query:n.query,onOpen:(0,B.useCallback)(()=>i(`connected`),[]),onClose:(0,B.useCallback)(()=>i(`disconnected`),[]),onError:(0,B.useCallback)(()=>i(`disconnected`),[]),onIdentity:(0,B.useCallback)((e,t)=>o({name:e,agent:t}),[]),onStateUpdate:(0,B.useCallback)(e=>c(e),[])}),getInitialMessages:(0,B.useCallback)(async()=>[],[])}),y=r===`connected`,b=g||_;(0,B.useEffect)(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[f]);let x=(0,B.useCallback)(()=>{let e=l.trim();!e||b||(p({role:`user`,parts:[{type:`text`,text:e}]}),u(``))},[l,b,p]);return(0,z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-kumo-line px-4 py-2.5`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Ph,{bold:!0,children:`Think Studio`}),(0,z.jsx)(Ph,{size:`xs`,variant:`secondary`,children:a?`${a.agent}/${a.name}`:n.basePath})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(U5,{status:r}),(0,z.jsx)(Gh,{}),(0,z.jsx)(qm,{variant:`secondary`,size:`sm`,icon:(0,z.jsx)(Bt,{size:14}),onClick:t,children:`Disconnect`})]})]}),(0,z.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col p-4`,children:[(0,z.jsxs)(`div`,{ref:d,className:`mb-4 flex-1 space-y-4 overflow-y-auto`,children:[f.length===0?(0,z.jsx)(Bh,{icon:(0,z.jsx)(yt,{size:32}),title:`No messages yet`,description:`Send a message to drive a durable turn on this agent.`}):null,f.map(e=>{let t=e.role===`user`;return(0,z.jsx)(`div`,{className:`space-y-2`,children:e.parts.map((e,n)=>{if(e.type===`text`)return!e.text||e.text.trim()===``?null:(0,z.jsx)(q5,{align:t?`right`:`left`,variant:t?`user`:`assistant`,children:(0,z.jsx)(FQ,{className:`sd-theme px-4 py-2.5 text-sm leading-relaxed ${t?`**:text-kumo-inverse`:``}`,plugins:{code:L5},controls:!1,children:e.text})},n);if(e.type===`reasoning`)return!e.text||e.text.trim()===``?null:(0,z.jsx)(`div`,{className:`flex justify-start`,children:(0,z.jsxs)(`div`,{className:`max-w-[85%] rounded-xl border border-kumo-line bg-kumo-elevated px-3 py-2`,children:[(0,z.jsx)(Ph,{size:`xs`,variant:`secondary`,bold:!0,children:`Reasoning`}),(0,z.jsx)(`div`,{className:`mt-1 whitespace-pre-wrap text-xs text-kumo-subtle`,children:e.text})]})},n);if(!PO(e))return null;let r=IO(e),i=e.input,a=e.output,o=e.errorText;if(e.state===`approval-requested`){let t=vk(e)?.id;return(0,z.jsx)(`div`,{className:`flex justify-start`,children:(0,z.jsxs)(Ah,{className:`max-w-[85%] rounded-xl px-4 py-3 ring ring-kumo-warning`,children:[(0,z.jsxs)(Ph,{size:`sm`,bold:!0,children:[`Approval needed: `,r]}),(0,z.jsx)(`pre`,{className:`mt-1 mb-3 max-h-40 overflow-auto whitespace-pre-wrap break-all rounded-lg bg-kumo-elevated p-2 font-mono text-xs text-kumo-subtle`,children:JSON.stringify(i,null,2)}),(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(qm,{variant:`primary`,size:`sm`,disabled:!t,onClick:()=>t&&v({id:t,approved:!0}),children:`Approve`}),(0,z.jsx)(qm,{variant:`secondary`,size:`sm`,disabled:!t,onClick:()=>t&&v({id:t,approved:!1}),children:`Reject`})]})]})},e.toolCallId)}return(0,z.jsx)(`div`,{className:`flex justify-start`,children:(0,z.jsxs)(Ah,{className:`max-w-[85%] rounded-xl px-3 py-2 ring ring-kumo-line`,children:[(0,z.jsxs)(`div`,{className:`mb-1 flex items-center gap-2`,children:[(0,z.jsx)(jt,{size:14,className:`text-kumo-inactive`}),(0,z.jsx)(Ph,{size:`xs`,variant:`secondary`,bold:!0,children:r}),(0,z.jsx)(Y5,{state:e.state})]}),(0,z.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-all font-mono text-xs ${e.state===`output-error`?`text-kumo-danger`:`text-kumo-subtle`}`,children:e.state===`output-error`?o??`Tool failed`:JSON.stringify(e.state===`output-available`?a:i,null,2)})]})},e.toolCallId)})},e.id)})]}),(0,z.jsx)(`div`,{className:`border-t border-kumo-line pt-4`,children:(0,z.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),x()},children:(0,z.jsxs)(`div`,{className:`flex items-end gap-3 rounded-xl border border-kumo-line bg-kumo-base p-3`,children:[(0,z.jsx)(ah,{value:l,onValueChange:u,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),x())},placeholder:y?`Send a message…`:`Connecting to agent…`,disabled:!y||b,rows:2,className:`flex-1 bg-transparent! shadow-none! outline-none! ring-0! focus:ring-0!`,"aria-label":`Message`}),(0,z.jsxs)(`div`,{className:`mb-0.5 flex items-center gap-2`,children:[(0,z.jsx)(qm,{type:`button`,variant:`ghost`,shape:`square`,size:`sm`,"aria-label":`Clear history`,onClick:m,disabled:f.length===0,icon:(0,z.jsx)(Kt,{size:16})}),(0,z.jsx)(qm,{type:`submit`,variant:`primary`,shape:`square`,"aria-label":`Send message`,disabled:!l.trim()||!y||b,icon:(0,z.jsx)(Rt,{size:18}),loading:b})]})]})})})]}),(0,z.jsx)(`div`,{className:`w-80 shrink-0 border-l border-kumo-line`,children:(0,z.jsx)(K5,{status:r,identity:a,endpoint:n,state:s,messageCount:f.length,isStreaming:g,isRecovering:_,chatStatus:h})})]})]})}function Y5({state:e}){return e===`output-available`?(0,z.jsx)(dt,{variant:`success`,children:`Done`}):e===`output-error`?(0,z.jsx)(dt,{variant:`destructive`,children:`Error`}):e===`output-denied`?(0,z.jsx)(dt,{variant:`secondary`,children:`Denied`}):(0,z.jsx)(dt,{variant:`info`,children:`Running`})}var X5=(0,B.forwardRef)(({to:e,...t},n)=>(0,z.jsx)(`a`,{ref:n,href:typeof e==`string`?e:void 0,...t}));function Z5(){let[e,t]=(0,B.useState)(null),[n,r]=(0,B.useState)(null);return(0,B.useEffect)(()=>{Uh().then(t)},[]),(0,z.jsx)(zm,{component:X5,children:e===null?(0,z.jsx)(`div`,{className:`flex h-full items-center justify-center text-kumo-inactive`,children:`Loading Think Studio…`}):n===null?(0,z.jsx)(qh,{config:e,onConnect:r}):(0,z.jsx)(J5,{connection:n,onDisconnect:()=>r(null)})})}(0,Vh.createRoot)(document.getElementById(`root`)).render((0,z.jsx)(Z5,{}));export{y as a,l as c,LQ as i,zX as n,p as o,NQ as r,s,dX as t};