difit 4.0.2 → 4.0.3

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 (110) hide show
  1. package/README.ja.md +1 -0
  2. package/README.ko.md +1 -0
  3. package/README.md +1 -0
  4. package/README.zh.md +1 -0
  5. package/dist/cli/index.js +38 -28
  6. package/dist/cli/index.test.js +162 -77
  7. package/dist/client/assets/architecture-PBZL5I3N-DUNTzy9d.js +1 -0
  8. package/dist/client/assets/{architectureDiagram-2XIMDMQ5-CXJTJFYJ.js → architectureDiagram-2XIMDMQ5-BOmef_aT.js} +1 -1
  9. package/dist/client/assets/{blockDiagram-WCTKOSBZ-B60owdAn.js → blockDiagram-WCTKOSBZ-CuovjbLp.js} +1 -1
  10. package/dist/client/assets/{c4Diagram-IC4MRINW-4tg2D_Vt.js → c4Diagram-IC4MRINW-l2hgU0UG.js} +1 -1
  11. package/dist/client/assets/channel-BBMOf_Bn.js +1 -0
  12. package/dist/client/assets/{chunk-4BX2VUAB-CW45MZFx.js → chunk-4BX2VUAB-Bh2XMPGo.js} +1 -1
  13. package/dist/client/assets/{chunk-55IACEB6-Busc3sfI.js → chunk-55IACEB6-r9BRoqNs.js} +1 -1
  14. package/dist/client/assets/{chunk-7E7YKBS2-BVR-8Pma.js → chunk-7E7YKBS2-BUy3or4g.js} +1 -1
  15. package/dist/client/assets/{chunk-7R4GIKGN-DneC7PwP.js → chunk-7R4GIKGN-C7ClNgvP.js} +1 -1
  16. package/dist/client/assets/{chunk-C72U2L5F-CJr98gus.js → chunk-C72U2L5F-_P9RrDdo.js} +1 -1
  17. package/dist/client/assets/{chunk-EGIJ26TM-iD_CSqpR.js → chunk-EGIJ26TM-D-xQ2sZ-.js} +1 -1
  18. package/dist/client/assets/{chunk-FMBD7UC4-BSsJVlRg.js → chunk-FMBD7UC4-OuP8NjEM.js} +1 -1
  19. package/dist/client/assets/{chunk-GEFDOKGD-eDUrsRgt.js → chunk-GEFDOKGD-noJ9o8LM.js} +1 -1
  20. package/dist/client/assets/chunk-GLR3WWYH-DVK9OjRZ.js +2 -0
  21. package/dist/client/assets/chunk-HHEYEP7N-C1QyKuQs.js +1 -0
  22. package/dist/client/assets/{chunk-JSJVCQXG-UCJub_Eo.js → chunk-JSJVCQXG-2AjhqYcu.js} +1 -1
  23. package/dist/client/assets/{chunk-KX2RTZJC-DrhxxMOx.js → chunk-KX2RTZJC-tMPTaDcx.js} +1 -1
  24. package/dist/client/assets/{chunk-KYZI473N-Brv52ZeO.js → chunk-KYZI473N-CGwu81pT.js} +1 -1
  25. package/dist/client/assets/{chunk-L3YUKLVL-BkBigLhQ.js → chunk-L3YUKLVL-DFNfIVVw.js} +1 -1
  26. package/dist/client/assets/{chunk-MX3YWQON-DHRoNbgW.js → chunk-MX3YWQON-BnSlIBhe.js} +1 -1
  27. package/dist/client/assets/{chunk-NQ4KR5QH-BZ86r2qK.js → chunk-NQ4KR5QH-CpfTlpaZ.js} +1 -1
  28. package/dist/client/assets/{chunk-O4XLMI2P-Sr33dk8c.js → chunk-O4XLMI2P-BDGKGscp.js} +1 -1
  29. package/dist/client/assets/{chunk-OZEHJAEY-3F2ff7sj.js → chunk-OZEHJAEY-3OAEqm17.js} +1 -1
  30. package/dist/client/assets/{chunk-PQ6SQG4A-C9acTu_E.js → chunk-PQ6SQG4A-DfQjNfPX.js} +1 -1
  31. package/dist/client/assets/{chunk-PU5JKC2W-PQmA4K_y.js → chunk-PU5JKC2W-DRiL1iN6.js} +1 -1
  32. package/dist/client/assets/chunk-QZHKN3VN-DBD5yPlw.js +1 -0
  33. package/dist/client/assets/{chunk-R5LLSJPH-ChexuO_S.js → chunk-R5LLSJPH-dkcbq1pR.js} +1 -1
  34. package/dist/client/assets/{chunk-WL4C6EOR-oxNV_hhM.js → chunk-WL4C6EOR-BeCB6d6F.js} +1 -1
  35. package/dist/client/assets/{chunk-XIRO2GV7-C9gOnffv.js → chunk-XIRO2GV7-BxmEO1Vi.js} +1 -1
  36. package/dist/client/assets/{chunk-XPW4576I-CcqR6BsE.js → chunk-XPW4576I-jm7TiixU.js} +1 -1
  37. package/dist/client/assets/{chunk-XZSTWKYB-C5JJ0TZR.js → chunk-XZSTWKYB-BGKYCy46.js} +1 -1
  38. package/dist/client/assets/{chunk-YBOYWFTD-B6kAkNgH.js → chunk-YBOYWFTD-C9faLjdm.js} +1 -1
  39. package/dist/client/assets/classDiagram-VBA2DB6C-Depk8rxx.js +1 -0
  40. package/dist/client/assets/classDiagram-v2-RAHNMMFH-DHvQPm8y.js +1 -0
  41. package/dist/client/assets/{cose-bilkent-S5V4N54A-hlDud6Ym.js → cose-bilkent-S5V4N54A-BWD5TWFn.js} +1 -1
  42. package/dist/client/assets/{dagre-BwDYerGQ.js → dagre-Dd1VxucU.js} +1 -1
  43. package/dist/client/assets/{dagre-KLK3FWXG-KnkMUlUE.js → dagre-KLK3FWXG-BJFTyMud.js} +1 -1
  44. package/dist/client/assets/{diagram-E7M64L7V-DcTCIFUG.js → diagram-E7M64L7V-eWdHIl72.js} +1 -1
  45. package/dist/client/assets/{diagram-IFDJBPK2-COcDQunj.js → diagram-IFDJBPK2-C1-sqK0o.js} +1 -1
  46. package/dist/client/assets/{diagram-P4PSJMXO-DmgET9pD.js → diagram-P4PSJMXO-DHeUNvSg.js} +1 -1
  47. package/dist/client/assets/{dist-v55TM3-O.js → dist-FLbYR5UU.js} +1 -1
  48. package/dist/client/assets/{erDiagram-INFDFZHY-ByL02DP-.js → erDiagram-INFDFZHY-CX8FAWmU.js} +1 -1
  49. package/dist/client/assets/{flowDiagram-PKNHOUZH-CW-lseYE.js → flowDiagram-PKNHOUZH-DgBnUaHH.js} +1 -1
  50. package/dist/client/assets/{ganttDiagram-A5KZAMGK-BxLjKRld.js → ganttDiagram-A5KZAMGK-C331HQ-y.js} +1 -1
  51. package/dist/client/assets/gitGraph-HDMCJU4V-DPGoIMlm.js +1 -0
  52. package/dist/client/assets/{gitGraphDiagram-K3NZZRJ6-DLEDjokx.js → gitGraphDiagram-K3NZZRJ6-zEXLThxN.js} +1 -1
  53. package/dist/client/assets/index-BGPkswtu.js +79 -0
  54. package/dist/client/assets/{index-Cn4K2uvR.css → index-Cq_APK7Y.css} +1 -1
  55. package/dist/client/assets/info-3K5VOQVL-CYdIfRwG.js +1 -0
  56. package/dist/client/assets/{infoDiagram-LFFYTUFH-CnmYkyCb.js → infoDiagram-LFFYTUFH-CKx11_2a.js} +1 -1
  57. package/dist/client/assets/{ishikawaDiagram-PHBUUO56-zycn1mVK.js → ishikawaDiagram-PHBUUO56-BlZMQgOe.js} +1 -1
  58. package/dist/client/assets/{journeyDiagram-4ABVD52K-aRoH36nV.js → journeyDiagram-4ABVD52K-C3p_p4rn.js} +1 -1
  59. package/dist/client/assets/{kanban-definition-K7BYSVSG-BGtGv5yb.js → kanban-definition-K7BYSVSG-4XJPQF50.js} +1 -1
  60. package/dist/client/assets/{line-Cm3ZuldI.js → line-Bb6xn3n_.js} +1 -1
  61. package/dist/client/assets/{linear-HJOLPv7E.js → linear-BPttYRJr.js} +1 -1
  62. package/dist/client/assets/{mermaid-parser.core-BvMqHn4b.js → mermaid-parser.core-CjY9NqXx.js} +2 -2
  63. package/dist/client/assets/{mermaid.core-C4SvQTx9.js → mermaid.core-B0ynITdC.js} +3 -3
  64. package/dist/client/assets/{mindmap-definition-YRQLILUH-B8jMe7ir.js → mindmap-definition-YRQLILUH-Dya2e4tr.js} +1 -1
  65. package/dist/client/assets/packet-RMMSAZCW-D7vTTuAT.js +1 -0
  66. package/dist/client/assets/pie-UPGHQEXC-ptFuye_f.js +1 -0
  67. package/dist/client/assets/{pieDiagram-SKSYHLDU-CGWbtgxq.js → pieDiagram-SKSYHLDU-MZ74L9cN.js} +1 -1
  68. package/dist/client/assets/{quadrantDiagram-337W2JSQ-CQ1QKsru.js → quadrantDiagram-337W2JSQ-Da_T39nG.js} +1 -1
  69. package/dist/client/assets/radar-KQ55EAFF-BR1_ZPLF.js +1 -0
  70. package/dist/client/assets/{requirementDiagram-Z7DCOOCP-Co1LyL5T.js → requirementDiagram-Z7DCOOCP-DzlKWGt3.js} +1 -1
  71. package/dist/client/assets/{sankeyDiagram-WA2Y5GQK-BQVbT6bS.js → sankeyDiagram-WA2Y5GQK-BPketwK-.js} +1 -1
  72. package/dist/client/assets/{sequenceDiagram-2WXFIKYE-DGIEkdPm.js → sequenceDiagram-2WXFIKYE-geDrMLZ_.js} +1 -1
  73. package/dist/client/assets/{src-DsmFf7gO.js → src-BuTVwZtT.js} +1 -1
  74. package/dist/client/assets/{stateDiagram-RAJIS63D-DgjKbXnG.js → stateDiagram-RAJIS63D-DOLTjnid.js} +1 -1
  75. package/dist/client/assets/stateDiagram-v2-FVOUBMTO-BIjVI5d6.js +1 -0
  76. package/dist/client/assets/{timeline-definition-YZTLITO2-Dz2dVWjY.js → timeline-definition-YZTLITO2-Cy6Qm4Pd.js} +1 -1
  77. package/dist/client/assets/treemap-KZPCXAKY-Bw93Vsua.js +1 -0
  78. package/dist/client/assets/{vennDiagram-LZ73GAT5-IIH5S1B6.js → vennDiagram-LZ73GAT5-UUQN9akd.js} +1 -1
  79. package/dist/client/assets/{xychartDiagram-JWTSCODW-DeYZhM2j.js → xychartDiagram-JWTSCODW-DiTicxdS.js} +1 -1
  80. package/dist/client/index.html +2 -2
  81. package/dist/server/git-diff-tui.d.ts +2 -2
  82. package/dist/server/git-diff-tui.js +12 -7
  83. package/dist/server/git-diff-tui.test.js +18 -2
  84. package/dist/server/git-diff.d.ts +3 -2
  85. package/dist/server/git-diff.js +29 -6
  86. package/dist/server/git-diff.test.js +52 -3
  87. package/dist/server/server.d.ts +2 -3
  88. package/dist/server/server.js +80 -55
  89. package/dist/server/server.test.js +110 -60
  90. package/dist/tui/App.d.ts +2 -2
  91. package/dist/tui/App.js +4 -3
  92. package/dist/types/diff.d.ts +8 -0
  93. package/dist/utils/diffSelection.d.ts +6 -0
  94. package/dist/utils/diffSelection.js +30 -0
  95. package/package.json +1 -1
  96. package/dist/client/assets/architecture-PBZL5I3N-DFdrPtRG.js +0 -1
  97. package/dist/client/assets/channel-DogeU0Wo.js +0 -1
  98. package/dist/client/assets/chunk-GLR3WWYH-NUOKNaxd.js +0 -2
  99. package/dist/client/assets/chunk-HHEYEP7N-DhuxpkmW.js +0 -1
  100. package/dist/client/assets/chunk-QZHKN3VN-DMRW-mur.js +0 -1
  101. package/dist/client/assets/classDiagram-VBA2DB6C-DlDUg6JI.js +0 -1
  102. package/dist/client/assets/classDiagram-v2-RAHNMMFH-BxzJfV1S.js +0 -1
  103. package/dist/client/assets/gitGraph-HDMCJU4V-CjAGJiCH.js +0 -1
  104. package/dist/client/assets/index-CizZxdOT.js +0 -79
  105. package/dist/client/assets/info-3K5VOQVL-CB6KpH1K.js +0 -1
  106. package/dist/client/assets/packet-RMMSAZCW-CzbC-tXD.js +0 -1
  107. package/dist/client/assets/pie-UPGHQEXC-CmhYIo8p.js +0 -1
  108. package/dist/client/assets/radar-KQ55EAFF-BCa9lsCc.js +0 -1
  109. package/dist/client/assets/stateDiagram-v2-FVOUBMTO-gPrpjL74.js +0 -1
  110. package/dist/client/assets/treemap-KZPCXAKY-DXiPfAB6.js +0 -1
@@ -0,0 +1,79 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-B0ynITdC.js","assets/chunk-PU5JKC2W-DRiL1iN6.js","assets/src-BuTVwZtT.js","assets/chunk-GEFDOKGD-noJ9o8LM.js","assets/dist-FLbYR5UU.js","assets/math-CNhlSIO3.js","assets/chunk-7R4GIKGN-C7ClNgvP.js","assets/isArrayLikeObject-icl0H0jo.js","assets/isEmpty-Du8sNmkE.js","assets/chunk-GLR3WWYH-DVK9OjRZ.js","assets/chunk-KYZI473N-CGwu81pT.js","assets/chunk-PQ6SQG4A-DfQjNfPX.js","assets/chunk-YBOYWFTD-C9faLjdm.js","assets/rough.esm-KjoEK0it.js","assets/chunk-O4XLMI2P-BDGKGscp.js","assets/line-Bb6xn3n_.js","assets/path-DfRbCp9y.js","assets/array-DOVTz2Mq.js","assets/chunk-MX3YWQON-BnSlIBhe.js","assets/chunk-HHEYEP7N-C1QyKuQs.js","assets/chunk-XPW4576I-jm7TiixU.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)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(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},l=(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},u=(e,t,n)=>(l(e,t,`default`),n&&l(n,t,`default`)),d=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),f=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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 p=`data-theme`,m={dark:{"--color-github-bg-primary":`#0d1117`,"--color-github-bg-secondary":`#161b22`,"--color-github-bg-tertiary":`#21262d`,"--color-github-border":`#30363d`,"--color-github-text-primary":`#f0f6fc`,"--color-github-text-secondary":`#8b949e`,"--color-github-text-muted":`#6e7681`,"--color-github-accent":`#238636`,"--color-github-danger":`#da3633`,"--color-github-warning":`#d29922`,"--color-diff-addition-bg":`#0d4429`,"--color-diff-addition-border":`#1b7c3d`,"--color-diff-deletion-bg":`#67060c`,"--color-diff-deletion-border":`#da3633`,"--color-diff-neutral-bg":`#21262d`,"--color-comment-bg":`#1c2128`,"--color-comment-border":`#373e47`,"--color-comment-text":`#e6edf3`,"--color-yellow-btn-bg":`rgba(180, 83, 9, 0.2)`,"--color-yellow-btn-border":`rgba(217, 119, 6, 0.5)`,"--color-yellow-btn-text":`#fbbf24`,"--color-yellow-btn-hover-bg":`rgba(180, 83, 9, 0.3)`,"--color-yellow-btn-hover-border":`#d97706`,"--color-yellow-path-bg":`rgba(180, 83, 9, 0.3)`,"--color-yellow-path-text":`#fbbf24`,"--color-editor-btn-bg":`rgba(248, 250, 252, 0.1)`,"--color-editor-btn-border":`rgba(248, 250, 252, 0.3)`,"--color-editor-btn-text":`#f0f6fc`,"--color-editor-btn-hover-bg":`rgba(248, 250, 252, 0.2)`,"--color-editor-btn-hover-border":`rgba(248, 250, 252, 0.45)`},light:{"--color-github-bg-primary":`#ffffff`,"--color-github-bg-secondary":`#f6f8fa`,"--color-github-bg-tertiary":`#f1f3f4`,"--color-github-border":`#d1d9e0`,"--color-github-text-primary":`#24292f`,"--color-github-text-secondary":`#656d76`,"--color-github-text-muted":`#8c959f`,"--color-github-accent":`#1f883d`,"--color-github-danger":`#cf222e`,"--color-github-warning":`#bf8700`,"--color-diff-addition-bg":`#d1f4cd`,"--color-diff-addition-border":`#1f883d`,"--color-diff-deletion-bg":`#ffd8d3`,"--color-diff-deletion-border":`#cf222e`,"--color-diff-neutral-bg":`#f1f3f4`,"--color-comment-bg":`#fff8e1`,"--color-comment-border":`#ffd54f`,"--color-comment-text":`#5d4037`,"--color-yellow-btn-bg":`#fef3c7`,"--color-yellow-btn-border":`#f59e0b`,"--color-yellow-btn-text":`#92400e`,"--color-yellow-btn-hover-bg":`#fde68a`,"--color-yellow-btn-hover-border":`#d97706`,"--color-yellow-path-bg":`#fde68a`,"--color-yellow-path-text":`#92400e`,"--color-editor-btn-bg":`rgba(248, 250, 252, 0.1)`,"--color-editor-btn-border":`rgba(31, 41, 55, 0.35)`,"--color-editor-btn-text":`#1f2937`,"--color-editor-btn-hover-bg":`rgba(248, 250, 252, 0.2)`,"--color-editor-btn-hover-border":`rgba(31, 41, 55, 0.5)`}},h=`reviewit-appearance-settings`,g=e=>e===`light`||e===`dark`||e===`auto`,_=e=>e===`normal`||e===`deuteranopia`,v=e=>e===`light`||e===`dark`,y=()=>{if(!(typeof window>`u`))try{return window.localStorage}catch{return}},b=()=>{if(!(typeof window>`u`))return window};function x(e=y()){if(!e)return null;try{let t=e.getItem(h);if(!t)return null;let n=JSON.parse(t);if(n&&typeof n==`object`){let e={},t=n;return g(t.theme)&&(e.theme=t.theme),_(t.colorVision)&&(e.colorVision=t.colorVision),e}}catch{return null}return null}function S(e=b()){return e?.matchMedia(`(prefers-color-scheme: dark)`).matches??!0?`dark`:`light`}function C(e,t=S()){return e===`light`||e===`dark`?e:t}function w(e=typeof document>`u`?void 0:document,t=y(),n=b()){let r=e?.documentElement.getAttribute(p)??null;return v(r)?r:C(x(t)?.theme,S(n))}var T={dark:{"--color-github-accent":`#58a6ff`,"--color-github-danger":`#d29922`,"--color-diff-addition-bg":`#0c2d6b`,"--color-diff-addition-border":`#388bfd`,"--color-diff-deletion-bg":`#5a3600`,"--color-diff-deletion-border":`#d29922`},light:{"--color-github-accent":`#0969da`,"--color-github-danger":`#bf8700`,"--color-diff-addition-bg":`#ddf4ff`,"--color-diff-addition-border":`#0969da`,"--color-diff-deletion-bg":`#fff8c5`,"--color-diff-deletion-border":`#bf8700`}};function E(e,t=`normal`,n=document){let r=n.documentElement;r.setAttribute(p,e),r.setAttribute(`data-color-vision`,t);let i=m[e];if(Object.entries(i).forEach(([e,t])=>{r.style.setProperty(e,t)}),t===`deuteranopia`){let t=T[e];Object.entries(t).forEach(([e,t])=>{r.style.setProperty(e,t)})}n.body&&(n.body.style.backgroundColor=`var(--color-github-bg-primary)`,n.body.style.color=`var(--color-github-text-primary)`)}function D(e=typeof document>`u`?void 0:document,t=y(),n=b()){if(!e)return null;let r=x(t),i=C(r?.theme,S(n));return E(i,r?.colorVision??`normal`,e),i}D();var O=s((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)},I={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=I,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.4`})),k=s(((e,t)=>{t.exports=O()})),A=s((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}}}})),j=s(((e,t)=>{t.exports=A()})),M=s((e=>{var t=k();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.4`})),N=s(((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()})),P=s((e=>{var t=j(),n=k(),r=N();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var M=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case T: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,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},L=[],R=-1;function z(e){return{current:e}}function ne(e){0>R||(e.current=L[R],L[R]=null,R--)}function B(e,t){R++,L[R]=e.current,e.current=t}var re=z(null),ie=z(null),ae=z(null),oe=z(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),B(re,e)}function ce(){ne(re),ne(ie),ne(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Hd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),Qf._currentValue=te)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!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{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return pe(`Activity`);default:return``}}function _e(e){try{var t=``,n=null;do t+=ge(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,V=t.unstable_IdlePriority,ke=t.log,Ae=t.unstable_setDisableYieldValue,je=null,Me=null;function Ne(e){if(typeof ke==`function`&&Ae(e),Me&&typeof Me.setStrictMode==`function`)try{Me.setStrictMode(je,e)}catch{}}var Pe=Math.clz32?Math.clz32:Ie,Fe=Math.log,H=Math.LN2;function Ie(e){return e>>>=0,e===0?32:31-(Fe(e)/H|0)|0}var Le=256,Re=262144,ze=4194304;function Be(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 Ve(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=Be(n))):i=Be(o):i=Be(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Be(n))):i=Be(o)):i=Be(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 He(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ue(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 We(){var e=ze;return ze<<=1,!(ze&62914560)&&(ze=4194304),e}function Ge(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ke(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qe(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-Pe(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&&Je(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Je(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ye(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Xe(e,t){var n=t&-t;return n=n&42?1:Ze(n),(n&(e.suspendedLanes|t))===0?n:0}function Ze(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 Qe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function $e(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function et(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var tt=Math.random().toString(36).slice(2),nt=`__reactFiber$`+tt,rt=`__reactProps$`+tt,it=`__reactContainer$`+tt,at=`__reactEvents$`+tt,ot=`__reactListeners$`+tt,st=`__reactHandles$`+tt,ct=`__reactResources$`+tt,lt=`__reactMarker$`+tt;function ut(e){delete e[nt],delete e[rt],delete e[at],delete e[ot],delete e[st]}function dt(e){var t=e[nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[nt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function ft(e){if(e=e[nt]||e[it]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function mt(e){var t=e[ct];return t||=e[ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ht(e){e[lt]=!0}var gt=new Set,_t={};function vt(e,t){yt(e,t),yt(e+`Capture`,t)}function yt(e,t){for(_t[e]=t,e=0;e<t.length;e++)gt.add(t[e])}var bt=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]*$`),xt={},St={};function Ct(e){return ve.call(St,e)?!0:ve.call(xt,e)?!1:bt.test(e)?St[e]=!0:(xt[e]=!0,!1)}function wt(e,t,n){if(Ct(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 Tt(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 Et(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 Dt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ot(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function kt(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 At(e){if(!e._valueTracker){var t=Ot(e)?`checked`:`value`;e._valueTracker=kt(e,t,``+e[t])}}function jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ot(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Mt(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 Nt=/[\n"\\]/g;function Pt(e){return e.replace(Nt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ft(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=``+Dt(t)):e.value!==``+Dt(t)&&(e.value=``+Dt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Lt(e,o,Dt(n)):Lt(e,o,Dt(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=``+Dt(s):e.removeAttribute(`name`)}function It(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)){At(e);return}n=n==null?``:``+Dt(n),t=t==null?n:``+Dt(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),At(e)}function Lt(e,t,n){t===`number`&&Mt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Rt(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=``+Dt(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 zt(e,t,n){if(t!=null&&(t=``+Dt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Dt(n)}function Bt(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=Dt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),At(e)}function Vt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ht=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 Ut(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||Ht.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Wt(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&&Ut(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Ut(e,o,t[o])}function Gt(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 Kt=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`]]),qt=/^[\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 Jt(e){return qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Yt(){}var Xt=null;function Zt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qt=null,$t=null;function en(e){var t=ft(e);if(t&&(e=t.stateNode)){var n=e[rt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ft(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="`+Pt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[rt]||null;if(!a)throw Error(i(90));Ft(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&&jt(r)}break a;case`textarea`:zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Rt(e,!!n.multiple,t,!1)}}}var tn=!1;function nn(e,t,n){if(tn)return e(t,n);tn=!0;try{return e(t)}finally{if(tn=!1,(Qt!==null||$t!==null)&&(vu(),Qt&&(t=Qt,e=$t,$t=Qt=null,en(t),e)))for(t=0;t<e.length;t++)en(e[t])}}function rn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[rt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var an=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),on=!1;if(an)try{var U={};Object.defineProperty(U,`passive`,{get:function(){on=!0}}),window.addEventListener(`test`,U,U),window.removeEventListener(`test`,U,U)}catch{on=!1}var sn=null,cn=null,ln=null;function un(){if(ln)return ln;var e,t=cn,n=t.length,r,i=`value`in sn?sn.value:sn.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 ln=i.slice(e,1<r?1-r:void 0)}function dn(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 fn(){return!0}function pn(){return!1}function mn(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)?fn:pn,this.isPropagationStopped=pn,this}return f(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=fn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=fn)},persist:function(){},isPersistent:fn}),t}var hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gn=mn(hn),_n=f({},hn,{view:0,detail:0}),vn=mn(_n),yn,bn,xn,Sn=f({},_n,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nn,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!==xn&&(xn&&e.type===`mousemove`?(yn=e.screenX-xn.screenX,bn=e.screenY-xn.screenY):bn=yn=0,xn=e),yn)},movementY:function(e){return`movementY`in e?e.movementY:bn}}),Cn=mn(Sn),wn=mn(f({},Sn,{dataTransfer:0})),Tn=mn(f({},_n,{relatedTarget:0})),En=mn(f({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),Dn=mn(f({},hn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),On=mn(f({},hn,{data:0})),kn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},An={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`},jn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jn[e])?!!t[e]:!1}function Nn(){return Mn}var Pn=mn(f({},_n,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=dn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?An[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nn,charCode:function(e){return e.type===`keypress`?dn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?dn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Fn=mn(f({},Sn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=mn(f({},_n,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nn})),Ln=mn(f({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=mn(f({},Sn,{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})),zn=mn(f({},hn,{newState:0,oldState:0})),Bn=[9,13,27,32],Vn=an&&`CompositionEvent`in window,Hn=null;an&&`documentMode`in document&&(Hn=document.documentMode);var Un=an&&`TextEvent`in window&&!Hn,Wn=an&&(!Vn||Hn&&8<Hn&&11>=Hn),Gn=` `,Kn=!1;function qn(e,t){switch(e){case`keyup`:return Bn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Jn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Yn=!1;function Xn(e,t){switch(e){case`compositionend`:return Jn(t);case`keypress`:return t.which===32?(Kn=!0,Gn):null;case`textInput`:return e=t.data,e===Gn&&Kn?null:e;default:return null}}function Zn(e,t){if(Yn)return e===`compositionend`||!Vn&&qn(e,t)?(e=un(),ln=cn=sn=null,Yn=!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 Wn&&t.locale!==`ko`?null:t.data;default:return null}}var Qn={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 $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Qn[e.type]:t===`textarea`}function er(e,t,n,r){Qt?$t?$t.push(r):$t=[r]:Qt=r,t=Td(t,`onChange`),0<t.length&&(n=new gn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var tr=null,nr=null;function rr(e){vd(e,0)}function ir(e){if(jt(pt(e)))return e}function ar(e,t){if(e===`change`)return t}var or=!1;if(an){var sr;if(an){var cr=`oninput`in document;if(!cr){var lr=document.createElement(`div`);lr.setAttribute(`oninput`,`return;`),cr=typeof lr.oninput==`function`}sr=cr}else sr=!1;or=sr&&(!document.documentMode||9<document.documentMode)}function ur(){tr&&(tr.detachEvent(`onpropertychange`,dr),nr=tr=null)}function dr(e){if(e.propertyName===`value`&&ir(nr)){var t=[];er(t,nr,e,Zt(e)),nn(rr,t)}}function fr(e,t,n){e===`focusin`?(ur(),tr=t,nr=n,tr.attachEvent(`onpropertychange`,dr)):e===`focusout`&&ur()}function pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ir(nr)}function mr(e,t){if(e===`click`)return ir(t)}function hr(e,t){if(e===`input`||e===`change`)return ir(t)}function gr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var _r=typeof Object.is==`function`?Object.is:gr;function vr(e,t){if(_r(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(!ve.call(t,i)||!_r(e[i],t[i]))return!1}return!0}function yr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function br(e,t){var n=yr(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=yr(n)}}function xr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mt(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=Mt(e.document)}return t}function Cr(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 wr=an&&`documentMode`in document&&11>=document.documentMode,Tr=null,Er=null,Dr=null,Or=!1;function kr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Or||Tr==null||Tr!==Mt(r)||(r=Tr,`selectionStart`in r&&Cr(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}),Dr&&vr(Dr,r)||(Dr=r,r=Td(Er,`onSelect`),0<r.length&&(t=new gn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Tr)))}function Ar(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var jr={animationend:Ar(`Animation`,`AnimationEnd`),animationiteration:Ar(`Animation`,`AnimationIteration`),animationstart:Ar(`Animation`,`AnimationStart`),transitionrun:Ar(`Transition`,`TransitionRun`),transitionstart:Ar(`Transition`,`TransitionStart`),transitioncancel:Ar(`Transition`,`TransitionCancel`),transitionend:Ar(`Transition`,`TransitionEnd`)},Mr={},Nr={};an&&(Nr=document.createElement(`div`).style,`AnimationEvent`in window||(delete jr.animationend.animation,delete jr.animationiteration.animation,delete jr.animationstart.animation),`TransitionEvent`in window||delete jr.transitionend.transition);function Pr(e){if(Mr[e])return Mr[e];if(!jr[e])return e;var t=jr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Nr)return Mr[e]=t[n];return e}var Fr=Pr(`animationend`),Ir=Pr(`animationiteration`),Lr=Pr(`animationstart`),Rr=Pr(`transitionrun`),zr=Pr(`transitionstart`),Br=Pr(`transitioncancel`),Vr=Pr(`transitionend`),Hr=new Map,Ur=`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(` `);Ur.push(`scrollEnd`);function Wr(e,t){Hr.set(e,t),vt(t,[e])}var Gr=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)},Kr=[],qr=0,Jr=0;function Yr(){for(var e=qr,t=Jr=qr=0;t<e;){var n=Kr[t];Kr[t++]=null;var r=Kr[t];Kr[t++]=null;var i=Kr[t];Kr[t++]=null;var a=Kr[t];if(Kr[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&&$r(n,i,a)}}function Xr(e,t,n,r){Kr[qr++]=e,Kr[qr++]=t,Kr[qr++]=n,Kr[qr++]=r,Jr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Zr(e,t,n,r){return Xr(e,t,n,r),ei(e)}function Qr(e,t){return Xr(e,null,null,t),ei(e)}function $r(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-Pe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ei(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ti={};function ni(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 ri(e,t,n,r){return new ni(e,t,n,r)}function ii(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ai(e,t){var n=e.alternate;return n===null?(n=ri(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 oi(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 si(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ii(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ri(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return ci(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ri(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ri(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ri(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ri(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ci(e,t,n,r){return e=ri(7,e,r,t),e.lanes=n,e}function li(e,t,n){return e=ri(6,e,null,t),e.lanes=n,e}function ui(e){var t=ri(18,null,null,0);return t.stateNode=e,t}function di(e,t,n){return t=ri(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fi=new WeakMap;function pi(e,t){if(typeof e==`object`&&e){var n=fi.get(e);return n===void 0?(t={value:e,source:t,stack:_e(t)},fi.set(e,t),t):n}return{value:e,source:t,stack:_e(t)}}var mi=[],hi=0,gi=null,_i=0,vi=[],yi=0,bi=null,xi=1,Si=``;function Ci(e,t){mi[hi++]=_i,mi[hi++]=gi,gi=e,_i=t}function wi(e,t,n){vi[yi++]=xi,vi[yi++]=Si,vi[yi++]=bi,bi=e;var r=xi;e=Si;var i=32-Pe(r)-1;r&=~(1<<i),n+=1;var a=32-Pe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,xi=1<<32-Pe(t)+i|n<<i|r,Si=a+e}else xi=1<<a|n<<i|r,Si=e}function Ti(e){e.return!==null&&(Ci(e,1),wi(e,1,0))}function Ei(e){for(;e===gi;)gi=mi[--hi],mi[hi]=null,_i=mi[--hi],mi[hi]=null;for(;e===bi;)bi=vi[--yi],vi[yi]=null,Si=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null}function Di(e,t){vi[yi++]=xi,vi[yi++]=Si,vi[yi++]=bi,xi=t.id,Si=t.overflow,bi=e}var Oi=null,ki=null,W=!1,Ai=null,ji=!1,Mi=Error(i(519));function Ni(e){throw zi(pi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Mi}function Pi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[nt]=e,t[rt]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),It(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Bt(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||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=Yt),t=!0):t=!1,t||Ni(e,!0)}function Fi(e){for(Oi=e.return;Oi;)switch(Oi.tag){case 5:case 31:case 13:ji=!1;return;case 27:case 3:ji=!0;return;default:Oi=Oi.return}}function Ii(e){if(e!==Oi)return!1;if(!W)return Fi(e),W=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&ki&&Ni(e),Fi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ki=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ki=uf(e)}else t===27?(t=ki,Zd(e.type)?(e=lf,lf=null,ki=e):ki=t):ki=Oi?cf(e.stateNode.nextSibling):null;return!0}function Li(){ki=Oi=null,W=!1}function Ri(){var e=Ai;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Ai=null),e}function zi(e){Ai===null?Ai=[e]:Ai.push(e)}var Bi=z(null),Vi=null,Hi=null;function Ui(e,t,n){B(Bi,t._currentValue),t._currentValue=n}function Wi(e){e._currentValue=Bi.current,ne(Bi)}function Gi(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 Ki(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),Gi(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),Gi(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 qi(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;_r(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Ki(t,e,n,r),t.flags|=262144}function Ji(e){for(e=e.firstContext;e!==null;){if(!_r(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Yi(e){Vi=e,Hi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xi(e){return Qi(Vi,e)}function Zi(e,t){return Vi===null&&Yi(e),Qi(e,t)}function Qi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Hi===null){if(e===null)throw Error(i(308));Hi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Hi=Hi.next=t;return n}var $i=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()})}},ea=t.unstable_scheduleCallback,ta=t.unstable_NormalPriority,na={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ra(){return{controller:new $i,data:new Map,refCount:0}}function ia(e){e.refCount--,e.refCount===0&&ea(ta,function(){e.controller.abort()})}var aa=null,oa=0,sa=0,ca=null;function la(e,t){if(aa===null){var n=aa=[];oa=0,sa=ud(),ca={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return oa++,t.then(ua,ua),t}function ua(){if(--oa===0&&aa!==null){ca!==null&&(ca.status=`fulfilled`);var e=aa;aa=null,sa=0,ca=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function da(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 fa=F.S;F.S=function(e,t){eu=Ce(),typeof t==`object`&&t&&typeof t.then==`function`&&la(e,t),fa!==null&&fa(e,t)};var pa=z(null);function ma(){var e=pa.current;return e===null?Ll.pooledCache:e}function ha(e,t){t===null?B(pa,pa.current):B(pa,t.pool)}function ga(){var e=ma();return e===null?null:{parent:na._currentValue,pool:e}}var _a=Error(i(460)),va=Error(i(474)),ya=Error(i(542)),ba={then:function(){}};function xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Sa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Yt,Yt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e;default:if(typeof t.status==`string`)t.then(Yt,Yt);else{if(e=Ll,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,Ea(e),e}throw wa=t,_a}}function Ca(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(wa=e,_a):e}}var wa=null;function Ta(){if(wa===null)throw Error(i(459));var e=wa;return wa=null,e}function Ea(e){if(e===_a||e===ya)throw Error(i(483))}var Da=null,Oa=0;function ka(e){var t=Oa;return Oa+=1,Da===null&&(Da=[]),Sa(Da,e,t)}function Aa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ja(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ma(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=ai(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=li(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===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Ca(i)===t.type)?(t=a(t,n.props),Aa(t,n),t.return=e,t):(t=si(n.type,n.key,n.props,null,e.mode,r),Aa(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=di(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=ci(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=li(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=si(t.type,t.key,t.props,null,e.mode,n),Aa(n,t),n.return=e,n;case h:return t=di(t,e.mode,n),t.return=e,t;case T:return t=Ca(t),f(e,t,n)}if(ee(t)||A(t))return t=ci(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ka(t),n);if(t.$$typeof===b)return f(e,Zi(e,t),n);ja(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 m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Ca(n),p(e,t,n,r)}if(ee(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ka(n),r);if(n.$$typeof===b)return p(e,t,Zi(e,n),r);ja(e,n)}return null}function _(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 m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Ca(r),_(e,t,n,r,i)}if(ee(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,ka(r),i);if(r.$$typeof===b)return _(e,t,n,Zi(t,r),i);ja(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),W&&Ci(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return W&&Ci(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),W&&Ci(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),W&&Ci(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return W&&Ci(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),W&&Ci(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){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===T&&Ca(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=ci(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=si(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case h: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=di(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ca(o),x(e,r,o,c)}if(ee(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ka(o),c);if(o.$$typeof===b)return x(e,r,Zi(e,o),c);ja(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=li(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=x(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=ri(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(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 Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Il&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ei(e),$r(e,null,n),t}return Xr(e,r,t,n),ei(e)}function Ba(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,Ye(e,n)}}function Va(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 Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!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 p=s.lane&-536870913,m=p!==s.lane;if(m?(X&p)===p:(r&p)===p){p!==0&&p===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Fa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ga(n[e],t)}var qa=z(null),Ja=z(0);function Ya(e,t){e=Ul,B(Ja,e),B(qa,t),Ul=e|t.baseLanes}function Xa(){B(Ja,Ul),B(qa,qa.current)}function Za(){Ul=Ja.current,ne(qa),ne(Ja)}var Qa=z(null),$a=null;function eo(e){var t=e.alternate;B(ao,ao.current&1),B(Qa,e),$a===null&&(t===null||qa.current!==null||t.memoizedState!==null)&&($a=e)}function to(e){B(ao,ao.current),B(Qa,e),$a===null&&($a=e)}function no(e){e.tag===22?(B(ao,ao.current),B(Qa,e),$a===null&&($a=e)):ro(e)}function ro(){B(ao,ao.current),B(Qa,Qa.current)}function io(e){ne(Qa),$a===e&&($a=null),ne(ao)}var ao=z(0);function oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(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 so=0,G=null,co=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_r(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return so=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Ls:Rs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){F.H=Is;var t=co!==null&&co.next!==null;if(so=0,lo=co=G=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||tc||(e=e.dependencies,e!==null&&Ji(e)&&(tc=!0))}function So(e,t,n,r){G=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=co=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=zs,o=t(n,r)}while(fo);return o}function Co(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(co===null?null:co.memoizedState)!==e&&(G.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}so=0,lo=co=G=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?G.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(co===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=co.next;var t=lo===null?G.memoizedState:lo.next;if(t!==null)lo=t,co=e;else{if(e===null)throw G.alternate===null?Error(i(467)):Error(i(310));co=e,e={memoizedState:co.memoizedState,baseState:co.baseState,baseQueue:co.baseQueue,queue:co.queue,next:null},lo===null?G.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Sa(go,e,t),t=G,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Ls:Rs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===b)return Xi(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.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=ko(),G.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]=D;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),co,e)}function Fo(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?(so&f)===f:(X&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===sa&&(d=!0);else if((so&p)===p){u=u.next,p===sa&&(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,G.lanes|=p,Gl|=p;f=u.action,po&&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,G.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!_r(o,e.memoizedState)&&(tc=!0,d&&(n=ca,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 Io(e){var t=Oo(),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);_r(o,t.memoizedState)||(tc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=G,a=Oo(),o=W;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!_r((co||a).memoizedState,n);if(s&&(a.memoizedState=n,tc=!0),a=a.queue,cs(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||so&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=ko(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_r(e,n)}catch{return!0}}function Ho(e){var t=Qr(e,2);t!==null&&hu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Ne(!0);try{n()}finally{Ne(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,co,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ns(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,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(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),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(W){var n=Ll.formState;if(n!==null){a:{var r=G;if(W){if(ki){b:{for(var i=ki,a=ji;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ki=cf(i.nextSibling),r=i.data===`F!`;break a}}Ni(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,G,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,G,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),co,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===_a?ya:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=co;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=ko(),G.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 is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();G.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;co!==null&&r!==null&&yo(r,co.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(G.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=ko(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(Il&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(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 ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||so&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),G.lanes|=e,Gl|=e,n)}function ys(e,t,n,r){return _r(n,t)?n:qa.current===null?!(so&42)||so&1073741824&&!(X&261930)?(tc=!0,e.memoizedState=n):(e=mu(),G.lanes|=e,Gl|=e,t):(e=vs(e,n,r),_r(e,t)||(tc=!0),e)}function bs(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Ms(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,da(c,r),pu(e)):js(e,t,r,pu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Cs(e).queue;bs(e,a,t,te,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},pu())}function Ts(){return Xi(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ra(n);var r=za(t,e,n);r!==null&&(hu(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=Zr(e,t,n,r),n!==null&&(hu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,pu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(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,_r(s,o))return Xr(e,t,i,0),Ll===null&&Yr(),!1}catch{}if(n=Zr(e,t,i,r),n!==null)return hu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(i(479))}else t=Zr(e,n,r,2),t!==null&&hu(t,e,2)}function Ns(e){var t=e.alternate;return e===G||t!==null&&t===G}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ye(e,n)}}var Is={readContext:Xi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:Xi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Xi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Ne(!0);try{n(t)}finally{Ne(!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=ks.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,G,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,a=Do();if(W){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));X&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=Ll.identifierPrefix;if(W){var n=Si,r=xi;n=(r&~(1<<32-Pe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,G)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(Il&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Rs={readContext:Xi,use:jo,useCallback:gs,useContext:Xi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),co.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Rs.useEffectEvent=us;var zs={readContext:Xi,use:jo,useCallback:gs,useContext:Xi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return co===null?vs(n,e,t):ys(n,co.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return co===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};zs.useEffectEvent=us;function Bs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ra(r);i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(hu(t,e,r),Ba(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ra(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(hu(t,e,r),Ba(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ra(n);r.tag=2,t!=null&&(r.callback=t),t=za(e,r,n),t!==null&&(hu(t,e,n),Ba(t,e,n))}};function Hs(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?!vr(n,r)||!vr(i,a):!0}function Us(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&&Vs.enqueueReplaceState(t,t.state,null)}function Ws(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=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Gs(e){Gr(e)}function Ks(e){console.error(e)}function qs(e){Gr(e)}function Js(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ys(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 Xs(e,t,n){return n=Ra(n),n.tag=3,n.payload={element:null},n.callback=function(){Js(e,t)},n}function Zs(e){return e=Ra(e),e.tag=3,e}function Qs(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(){Ys(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ys(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&qi(t,n,a,!0),n=Qa.current,n!==null){switch(n.tag){case 31:case 13:return $a===null?Tu():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===ba?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)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(W)return t=Qa.current,t===null?(r!==Mi&&(t=Error(i(423),{cause:r}),zi(pi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=pi(r,n),a=Xs(e.stateNode,r,a),Va(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Mi&&(e=Error(i(422),{cause:r}),zi(pi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=pi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=pi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Xs(n.stateNode,r,e),Va(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`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Zs(a),Qs(a,e,n,r),Va(n,a),!1}n=n.return}while(n!==null);return!1}var ec=Error(i(461)),tc=!1;function nc(e,t,n,r){t.child=e===null?Pa(t,null,n,r):Na(t,e.child,n,r)}function rc(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 Yi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(W&&s&&Ti(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ii(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=si(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?vr:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=ai(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(vr(a,r)&&e.ref===t.ref)if(tc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(tc=!0);else return t.lanes=e.lanes,Dc(e,t,i)}return pc(e,t,n,r,i)}function oc(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 cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ha(t,a===null?null:a.cachePool),a===null?Xa():Ya(t,a),no(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ha(t,null),Xa(),ro(t)):(ha(t,a.cachePool),Ya(t,a),ro(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=ma();return a=a===null?null:{parent:na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ha(t,null),Xa(),no(t),e!==null&&qi(e,t,r,!0),t.childLanes=i,null}function lc(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return Na(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,io(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(W){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(to(t),(e=ki)?(e=rf(e,ji),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bi===null?null:{id:xi,overflow:Si},retryLane:536870912,hydrationErrors:null},n=ui(e),n.return=t,t.child=n,Oi=t,ki=null)):e=null,e===null)throw Ni(t);return t.lanes=536870912,null}return lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(to(t),a)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(tc||qi(e,t,n,!1),a=(n&e.childLanes)!==0,tc||a){if(r=Ll,r!==null&&(s=Xe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Qr(e,s),hu(r,e,s),ec;Tu(),t=uc(e,t,n)}else e=o.treeContext,ki=cf(s.nextSibling),Oi=t,W=!0,Ai=null,ji=!1,e!==null&&Di(t,e),t=lc(t,r),t.flags|=4096;return t}return e=ai(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(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 pc(e,t,n,r,i){return Yi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(W&&r&&Ti(t),t.flags|=1,nc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return Yi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!tc?(To(e,t,a),Dc(e,t,a)):(W&&r&&Ti(t),t.flags|=1,nc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(Yi(t),t.stateNode===null){var a=ti,o=n.contextType;typeof o==`object`&&o&&(a=Xi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Vs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ia(t),o=n.contextType,a.context=typeof o==`object`&&o?Xi(o):ti,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Bs(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&&Vs.enqueueReplaceState(a,a.state,null),Wa(t,r,a,i),Ua(),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=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=ti,typeof u==`object`&&u&&(o=Xi(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)&&Us(t,a,r,o),Fa=!1;var f=t.memoizedState;a.state=f,Wa(t,r,a,i),Ua(),l=t.memoizedState,s||f!==l||Fa?(typeof d==`function`&&(Bs(t,n,d,r),l=t.memoizedState),(c=Fa||Hs(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,La(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ti,typeof l==`object`&&l&&(c=Xi(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)&&Us(t,a,r,c),Fa=!1,f=t.memoizedState,a.state=f,Wa(t,r,a,i),Ua();var p=t.memoizedState;o!==d||f!==p||Fa||e!==null&&e.dependencies!==null&&Ji(e.dependencies)?(typeof s==`function`&&(Bs(t,n,s,r),p=t.memoizedState),(u=Fa||Hs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ji(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,fc(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=Na(t,e.child,null,i),t.child=Na(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Li(),t.flags|=256,nc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:ga()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function bc(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:(ao.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(W){if(a?eo(t):ro(t),(e=ki)?(e=rf(e,ji),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bi===null?null:{id:xi,overflow:Si},retryLane:536870912,hydrationErrors:null},n=ui(e),n.return=t,t.child=n,Oi=t,ki=null)):e=null,e===null)throw Ni(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ro(t),a=t.mode,c=Sc({mode:`hidden`,children:c},a),r=ci(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(null,r)):(eo(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(eo(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(ro(t),c=r.fallback,a=t.mode,r=Sc({mode:`visible`,children:r.children},a),c=ci(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Na(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=sc(null,r)):(ro(t),t.child=e.child,t.flags|=128,t=null);else if(eo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,zi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(tc||qi(e,t,n,!1),s=(n&e.childLanes)!==0,tc||s){if(s=Ll,s!==null&&(r=Xe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Qr(e,r),hu(s,e,r),ec;af(c)||Tu(),t=Cc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ki=cf(c.nextSibling),Oi=t,W=!0,Ai=null,ji=!1,e!==null&&Di(t,e),t=xc(t,r.children),t.flags|=4096);return t}return a?(ro(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ai(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ci(c,a,n,null),c.flags|=2):c=ai(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(a=c.cachePool,a===null?a=ga():(l=na._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(e.child,r)):(eo(t),n=e.child,e=n.sibling,n=ai(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 xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=ri(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return Na(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gi(e.return,t,n)}function Tc(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 Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ao.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(ao,o),nc(e,t,r,n),r=W?_i:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(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&&oo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(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&&oo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(qi(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=ai(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ai(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ji(e))):!0}function kc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Ui(t,na,e.memoizedState.cache),Li();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Ui(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,to(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(eo(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(eo(t),t.flags|=128,null);eo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(ao,ao.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Ui(t,na,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)tc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return tc=!1,kc(e,t,n);tc=!!(e.flags&131072)}else tc=!1,W&&t.flags&1048576&&wi(t,_i,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ca(t.elementType),t.type=e,typeof e==`function`)ii(e)?(r=Ws(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=rc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ws(r,t.pendingProps),hc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,La(e,t),Wa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ui(t,na,r),r!==o.cache&&Ki(t,[na],n,!0),Ua(),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=gc(e,t,r,n);break a}else if(r!==a){a=pi(Error(i(424)),t),zi(a),t=gc(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(ki=cf(e.firstChild),Oi=t,W=!0,Ai=null,ji=!0,n=Pa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Li(),r===a){t=Dc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:W||(n=t.type,e=t.pendingProps,r=Bd(ae.current).createElement(n),r[nt]=t,r[rt]=e,Pd(r,n,e),ht(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&W&&(r=t.stateNode=ff(t.type,t.pendingProps,ae.current),Oi=t,ji=!0,a=ki,Zd(t.type)?(lf=a,ki=cf(r.firstChild)):ki=a),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&W&&((a=r=ki)&&(r=tf(r,t.type,t.pendingProps,ji),r===null?a=!1:(t.stateNode=r,Oi=t,ki=cf(r.firstChild),ji=!1,a=!0)),a||Ni(t)),le(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),Qf._currentValue=a),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&W&&((e=n=ki)&&(n=nf(n,t.pendingProps,ji),n===null?e=!1:(t.stateNode=n,Oi=t,ki=null,e=!0)),e||Ni(t)),null;case 13:return bc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Na(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ui(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Yi(t),a=Xi(a),r=r(a),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Yi(t),r=Xi(na),e===null?(a=ma(),a===null&&(a=Ll,o=ra(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ia(t),Ui(t,na,a)):((e.lanes&n)!==0&&(La(e,t),Wa(t,null,null,n),Ua()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ui(t,na,r),r!==a.cache&&Ki(t,[na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ui(t,na,r))),nc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function jc(e){e.flags|=4}function Mc(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(Su())e.flags|=8192;else throw wa=ba,va}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Su())e.flags|=8192;else throw wa=ba,va}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:We(),e.lanes|=t,Yl|=t)}function K(e,t){if(!W)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 q(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 Fc(e,t,n){var r=t.pendingProps;switch(Ei(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return q(t),null;case 1:return q(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Wi(na),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ii(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ri())),q(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(q(t),Mc(t,a,null,r,n)):(q(t),Nc(t,o))):o?o===e.memoizedState?(q(t),t.flags&=-16777217):(jc(t),q(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),q(t),Mc(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return q(t),null}e=re.current,Ii(t)?Pi(t,e):(e=ff(a,r,n),t.stateNode=e,jc(t))}return q(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return q(t),null}if(o=re.current,Ii(t))Pi(t,o);else{var s=Bd(ae.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[nt]=t,o[rt]=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(Pd(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&&jc(t)}}return q(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Oi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[nt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Ni(t,!0)}else e=Bd(e).createTextNode(r),e[nt]=t,t.stateNode=e}return q(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(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[nt]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;q(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(t),null);if(t.flags&128)throw Error(i(558))}return q(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ii(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[nt]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;q(t),a=!1}else a=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(io(t),t):(io(t),null)}return io(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),Pc(t,t.updateQueue),q(t),null);case 4:return ce(),e===null&&xd(t.stateNode.containerInfo),q(t),null;case 10:return Wi(t.type),q(t),null;case 19:if(ne(ao),r=t.memoizedState,r===null)return q(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)K(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=oo(e),o!==null){for(t.flags|=128,K(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)oi(n,e),n=n.sibling;return B(ao,ao.current&1|2),W&&Ci(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>tu&&(t.flags|=128,a=!0,K(r,!1),t.lanes=4194304)}else{if(!a)if(e=oo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),K(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!W)return q(t),null}else 2*Ce()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,K(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?(q(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ce(),e.sibling=null,n=ao.current,B(ao,a?n&1|2:n&1),W&&Ci(t,r.treeForkCount),e);case 22:case 23:return io(t),Za(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(q(t),t.subtreeFlags&6&&(t.flags|=8192)):q(t),n=t.updateQueue,n!==null&&Pc(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&&ne(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wi(na),q(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function J(e,t){switch(Ei(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(na),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ao),null;case 4:return ce(),null;case 10:return Wi(t.type),null;case 22:case 23:return io(t),Za(),e!==null&&ne(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wi(na),null;case 25:return null;default:return null}}function Ic(e,t){switch(Ei(t),t.tag){case 3:Wi(na),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:ne(ao);break;case 10:Wi(t.type);break;case 22:case 23:io(t),Za(),e!==null&&ne(pa);break;case 24:Wi(na)}}function Lc(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){Uu(t,t.return,e)}}function Rc(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){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){Uu(e,e.return,t)}}}function Bc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function Vc(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){Uu(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Uu(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){Uu(e,t,n)}else n.current=null}function Uc(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){Uu(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[rt]=t}catch(t){Uu(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(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&&Zd(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 qc(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=Yt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(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&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[nt]=e,t[rt]=n}catch(t){Uu(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Rd=sp,e=Sr(e),Cr(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(zd={focusedElem:e,selectionRange:n},sp=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,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=Ws(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(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,el=e;break}el=t.return}}function nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:_l(e,n),r&4&&Lc(5,n);break;case 1:if(_l(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(_l(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{Ka(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&Yc(n);case 26:case 5:_l(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:_l(e,n);break;case 31:_l(e,n),r&4&&cl(e,n);break;case 13:_l(e,n),r&4&&ll(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Xc,!r){t=t!==null&&t.memoizedState!==null||Zc,i=Xc;var a=Zc;Xc=r,(Zc=t)&&!a?yl(e,n,(n.subtreeFlags&8772)!=0):_l(e,n),Xc=i,Zc=a}break;case 30:break;default:_l(e,n)}}function rl(e){var t=e.alternate;t!==null&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ut(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 il=null,al=!1;function ol(e,t,n){for(n=n.child;n!==null;)sl(e,t,n),n=n.sibling}function sl(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount==`function`)try{Me.onCommitFiberUnmount(je,n)}catch{}switch(n.tag){case 26:Zc||Hc(n,t),ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zc||Hc(n,t);var r=il,i=al;Zd(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),pf(n.stateNode),il=r,al=i;break;case 5:Zc||Hc(n,t);case 6:if(r=il,i=al,il=null,ol(e,t,n),il=r,al=i,il!==null)if(al)try{(il.nodeType===9?il.body:il.nodeName===`HTML`?il.ownerDocument.body:il).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}break;case 18:il!==null&&(al?(e=il,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(il,n.stateNode));break;case 4:r=il,i=al,il=n.stateNode.containerInfo,al=!0,ol(e,t,n),il=r,al=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Zc||Rc(4,n,t),ol(e,t,n);break;case 1:Zc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),ol(e,t,n);break;case 21:ol(e,t,n);break;case 22:Zc=(r=Zc)||n.memoizedState!==null,ol(e,t,n),Zc=r;break;default:ol(e,t,n)}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Uu(t,t.return,e)}}function ul(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $c),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $c),t;default:throw Error(i(435,e.tag))}}function dl(e,t){var n=ul(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function fl(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(Zd(c.type)){il=c.stateNode,al=!1;break a}break;case 5:il=c.stateNode,al=!1;break a;case 3:case 4:il=c.stateNode.containerInfo,al=!0;break a}c=c.return}if(il===null)throw Error(i(160));sl(o,s,a),il=null,al=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ml(t,e),t=t.sibling}var pl=null;function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),hl(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&64&&Xc&&(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=pl;if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(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[lt]||o[nt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[nt]=e,ht(o),r=o;break a;case`link`:var s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[nt]=e,ht(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),e.flags&32){a=e.stateNode;try{Vt(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Wc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Qc=!0);break;case 6:if(fl(t,e),hl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Bf=null,a=pl,pl=gf(t.containerInfo),fl(t,e),pl=a,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Qc&&(Qc=!1,gl(e));break;case 4:r=pl,pl=gf(e.stateNode.containerInfo),fl(t,e),hl(e),pl=r;break;case 12:fl(t,e),hl(e);break;case 31:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),hl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ce()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Xc,d=Zc;if(Xc=u||a,Zc=d||l,fl(t,e),Zc=d,Xc=u,hl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Xc||Zc||vl(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){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Uu(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,dl(e,n))));break;case 19:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),hl(e)}}function hl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Jc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Vt(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nl(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),vl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),vl(t);break;case 27:pf(t.stateNode);case 26:case 5:Hc(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function yl(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:yl(i,a,n),Lc(4,a);break;case 1:if(yl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(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++)Ga(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Yc(a);case 26:case 5:yl(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:yl(i,a,n);break;case 31:yl(i,a,n),n&&o&4&&cl(i,a);break;case 13:yl(i,a,n),n&&o&4&&ll(i,a);break;case 22:a.memoizedState===null&&yl(i,a,n),Vc(a,a.return);break;case 30:break;default:yl(i,a,n)}t=t.sibling}}function bl(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&&ia(n))}function xl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e))}function Sl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cl(e,t,n,r),t=t.sibling}function Cl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:Sl(e,t,n,r);break;case 3:Sl(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&&ia(e)));break;case 12:if(i&2048){Sl(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){Uu(t,t.return,e)}}else Sl(e,t,n,r);break;case 31:Sl(e,t,n,r);break;case 13:Sl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Sl(e,t,n,r):(a._visibility|=2,wl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Sl(e,t,n,r):Tl(e,t),i&2048&&bl(o,t);break;case 24:Sl(e,t,n,r),i&2048&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function wl(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:wl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,wl(a,o,s,c,i)):u._visibility&2?wl(a,o,s,c,i):Tl(a,o),i&&l&2048&&bl(o.alternate,o);break;case 24:wl(a,o,s,c,i),i&&l&2048&&xl(o.alternate,o);break;default:wl(a,o,s,c,i)}t=t.sibling}}function Tl(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:Tl(n,r),i&2048&&bl(r.alternate,r);break;case 24:Tl(n,r),i&2048&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var El=8192;function Dl(e,t,n){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Ol(e,t,n),e=e.sibling}function Ol(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&El&&e.memoizedState!==null&&Gf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=gf(e.stateNode.containerInfo),Dl(e,t,n),pl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,Dl(e,t,n),El=r):Dl(e,t,n));break;default:Dl(e,t,n)}}function kl(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 Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jl(e),e=e.sibling}function jl(e){switch(e.tag){case 0:case 11:case 15:Al(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Al(e);break;case 12:Al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):Al(e);break;default:Al(e)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),Ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function Nl(e,t){for(;el!==null;){var n=el;switch(n.tag){case 0:case 11:case 15:Rc(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:ia(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,el=r;else a:for(n=e;el!==null;){r=el;var i=r.sibling,a=r.return;if(rl(r),r===n){el=null;break a}if(i!==null){i.return=a,el=i;break a}el=a}}}var Pl={getCacheForType:function(e){var t=Xi(na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Xi(na).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Il=0,Ll=null,Y=null,X=0,Rl=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return Il&2&&X!==0?X&-X:F.T===null?$e():ud()}function mu(){if(Jl===0)if(!(X&536870912)||W){var e=Re;Re<<=1,!(Re&3932160)&&(Re=262144),Jl=e}else Jl=536870912;return e=Qa.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===Ll&&(Rl===2||Rl===9)||e.cancelPendingCommit!==null)&&(bu(e,0),Q(e,X,Jl,!1)),Ke(e,n),(!(Il&2)||e!==Ll)&&(e===Ll&&(!(Il&2)&&(Kl|=n),Wl===4&&Q(e,X,Jl,!1)),nd(e))}function gu(e,t,n){if(Il&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||He(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){Vl&&!r&&Q(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Eu(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=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),Q(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:Q(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Ce(),10<a)){if(Q(r,t,Jl,!Bl),Ve(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(Z.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}Z(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);nd(e)}function Z(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:Yt},Ol(t,a,d);var m=(a&62914560)===a?$l-Ce():(a&4194048)===a?eu-Ce():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Q(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function _u(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(!_r(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 Q(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Pe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Je(e,n,t)}function vu(){return Il&6?!0:(rd(0,!1),!1)}function yu(){if(Y!==null){if(Rl===0)var e=Y.return;else e=Y,Hi=Vi=null,Eo(e),Da=null,Oa=0,e=Y;for(;e!==null;)Ic(e.alternate,e),e=e.return;Y=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,yu(),Ll=e,Y=n=ai(e.current,null),X=t,Rl=0,zl=null,Bl=!1,Vl=He(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Pe(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Yr(),n}function xu(e,t){G=null,F.H=Is,t===_a||t===ya?(t=Ta(),Rl=3):t===va?(t=Ta(),Rl=4):Rl=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,Y===null&&(Wl=1,Js(e,pi(t,e.current)))}function Su(){var e=Qa.current;return e===null?!0:(X&4194048)===X?$a===null:(X&62914560)===X||X&536870912?e===$a:!1}function Cu(){var e=F.H;return F.H=Is,e===null?Is:e}function wu(){var e=F.A;return F.A=Pl,e}function Tu(){Wl=4,Bl||(X&4194048)!==X&&Qa.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||Ll===null||Q(Ll,X,Jl,!1)}function Eu(e,t,n){var r=Il;Il|=2;var i=Cu(),a=wu();(Ll!==e||X!==t)&&(nu=null,bu(e,t)),t=!1;var o=Wl;a:do try{if(Rl!==0&&Y!==null){var s=Y,c=zl;switch(Rl){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:Qa.current===null&&(t=!0);var l=Rl;if(Rl=0,zl=null,Mu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=Rl,Rl=0,zl=null,Mu(e,s,c,l)}}Du(),o=Wl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Hi=Vi=null,Il=r,F.H=i,F.A=a,Y===null&&(Ll=null,X=0,Yr()),o}function Du(){for(;Y!==null;)Au(Y)}function Ou(e,t){var n=Il;Il|=2;var r=Cu(),a=wu();Ll!==e||X!==t?(nu=null,tu=Ce()+500,bu(e,t)):Vl=He(e,t);a:do try{if(Rl!==0&&Y!==null){t=Y;var o=zl;b:switch(Rl){case 1:Rl=0,zl=null,Mu(e,t,o,1);break;case 2:case 9:if(xa(o)){Rl=0,zl=null,ju(t);break}t=function(){Rl!==2&&Rl!==9||Ll!==e||(Rl=7),nd(e)},o.then(t,t);break a;case 3:Rl=7;break a;case 4:Rl=5;break a;case 7:xa(o)?(Rl=0,zl=null,ju(t)):(Rl=0,zl=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Wf(s):c.stateNode.complete){Rl=0,zl=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,Nu(u))}break b}}Rl=0,zl=null,Mu(e,t,o,5);break;case 6:Rl=0,zl=null,Mu(e,t,o,6);break;case 8:yu(),Wl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return Hi=Vi=null,F.H=r,F.A=a,Il=n,Y===null?(Ll=null,X=0,Yr(),Wl):0}function ku(){for(;Y!==null&&!xe();)Au(Y)}function Au(e){var t=Ac(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Nu(e):Y=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:Eo(t);default:Ic(n,t),t=Y=oi(t,Ul),t=Ac(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Y=t}function Mu(e,t,n,r){Hi=Vi=null,Eo(t),Da=null,Oa=0;var i=t.return;try{if($s(e,i,t,n,X)){Wl=1,Js(e,pi(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;Wl=1,Js(e,pi(n,e.current)),Y=null;return}t.flags&32768?(W||r===1?e=!0:Vl||X&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Bl);return}e=t.return;var n=Fc(t.alternate,t,Ul);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);Wl===0&&(Wl=5)}function Pu(e,t){do{var n=J(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);Wl=6,Y=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(iu!==0);if(Il&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Jr,qe(e,n,o,s,c,l),e===Ll&&(Y=Ll=null,X=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(De,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=Il,Il|=4;try{tl(e,t,n)}finally{Il=s,I.p=a,F.T=r}}iu=1,Iu(),Lu(),Ru()}}function Iu(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Il;Il|=4;try{ml(t,e);var a=zd,o=Sr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&xr(s.ownerDocument.documentElement,s)){if(c!==null&&Cr(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 _=br(s,h),v=br(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}}sp=!!Rd,zd=Rd=null}finally{Il=i,I.p=r,F.T=n}}e.current=t,iu=2}}function Lu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Il;Il|=4;try{nl(e,t.alternate,t)}finally{Il=i,I.p=r,F.T=n}}iu=3}}function Ru(){if(iu===4||iu===3){iu=0,Se();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),Qe(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot==`function`)try{Me.onCommitFiberRoot(je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.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,I.p=i}}su&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ia(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=Qe(su),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,Il&6)throw Error(i(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,rd(0,!1),Me&&typeof Me.onPostCommitFiberRoot==`function`)try{Me.onPostCommitFiberRoot(je,o)}catch{}return!0}finally{I.p=a,F.T=r,zu(e,t)}}function Hu(e,t,n){t=pi(n,t),t=Xs(e.stateNode,t,2),e=za(e,t,2),e!==null&&(Ke(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=pi(n,e),n=Zs(2),r=za(t,n,2),r!==null&&(Qs(n,r,t,e),Ke(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;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)||(Hl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(X&n)===n&&(Wl===4||Wl===3&&(X&62914560)===X&&300>Ce()-$l?!(Il&2)&&bu(e,0):ql|=n,Yl===X&&(Yl=0)),nd(e)}function Ku(e,t){t===0&&(t=We()),e=Qr(e,t),e!==null&&(Ke(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(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),Ku(e,n)}function Yu(e,t){return ye(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;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-Pe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=X,a=Ve(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||He(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=Ce(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}iu!==0&&iu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Pe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ue(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=X,n=Ve(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Rl===2||Rl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||He(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&be(r),Qe(n)){case 2:case 8:n=Ee;break;case 32:n=De;break;case 268435456:n=V;break;default:n=De}return r=sd.bind(null,e),n=ye(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&be(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=X;return r=Ve(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),od(e,Ce()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;gu(e,t,!0)}function ld(){Yd(function(){Il&6?ye(Te,id):ad()})}function ud(){if(td===0){var e=sa;e===0&&(e=Le,Le<<=1,!(Le&261888)&&(Le=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Jt(``+e)}function fd(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 pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[rt]||null).action),o=r.submitter;o&&(t=(t=o[rt]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new gn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Ur.length;md++){var hd=Ur[md];Wr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Wr(Fr,`onAnimationEnd`),Wr(Ir,`onAnimationIteration`),Wr(Lr,`onAnimationStart`),Wr(`dblclick`,`onDoubleClick`),Wr(`focusin`,`onFocus`),Wr(`focusout`,`onBlur`),Wr(Rr,`onTransitionRun`),Wr(zr,`onTransitionStart`),Wr(Br,`onTransitionCancel`),Wr(Vr,`onTransitionEnd`),yt(`onMouseEnter`,[`mouseout`,`mouseover`]),yt(`onMouseLeave`,[`mouseout`,`mouseover`]),yt(`onPointerEnter`,[`pointerout`,`pointerover`]),yt(`onPointerLeave`,[`pointerout`,`pointerover`]),vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(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){Gr(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){Gr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[at];n===void 0&&(n=t[at]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,gt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!on||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 Cd(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=dt(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}nn(function(){var r=a,i=Zt(n),s=[];a:{var c=Hr.get(e);if(c!==void 0){var l=gn,u=e;switch(e){case`keypress`:if(dn(n)===0)break a;case`keydown`:case`keyup`:l=Pn;break;case`focusin`:u=`focus`,l=Tn;break;case`focusout`:u=`blur`,l=Tn;break;case`beforeblur`:case`afterblur`:l=Tn;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=Cn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=In;break;case Fr:case Ir:case Lr:l=En;break;case Vr:l=Ln;break;case`scroll`:case`scrollend`:l=vn;break;case`wheel`:l=Rn;break;case`copy`:case`cut`:case`paste`:l=Dn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Fn;break;case`toggle`:case`beforetoggle`:l=zn}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=rn(m,p),g!=null&&d.push(wd(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!==Xt&&(u=n.relatedTarget||n.fromElement)&&(dt(u)||u[it]))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?dt(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=Cn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Fn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:pt(l),h=u==null?c:pt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,dt(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=Ed,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&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?pt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ar;else if($n(c))if(or)v=hr;else{v=pr;var y=fr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Gt(r.elementType)&&(v=ar):v=mr;if(v&&=v(e,r)){er(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Lt(c,`number`,c.value)}switch(y=r?pt(r):window,e){case`focusin`:($n(y)||y.contentEditable===`true`)&&(Tr=y,Er=r,Dr=null);break;case`focusout`:Dr=Er=Tr=null;break;case`mousedown`:Or=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Or=!1,kr(s,n,i);break;case`selectionchange`:if(wr)break;case`keydown`:case`keyup`:kr(s,n,i)}var b;if(Vn)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 Yn?qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Wn&&n.locale!==`ko`&&(Yn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Yn&&(b=un()):(sn=i,cn=`value`in sn?sn.value:sn.textContent,Yn=!0)),y=Td(r,x),0<y.length&&(x=new On(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Jn(n),b!==null&&(x.data=b)))),(b=Un?Xn(e,n):Zn(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new On(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(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=rn(e,n),i!=null&&r.unshift(wd(e,i,a)),i=rn(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(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=rn(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=rn(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
10
+ `).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Vt(e,``+r);break;case`className`:Tt(e,`class`,r);break;case`tabIndex`:Tt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Tt(e,n,r);break;case`style`:Wt(e,r,o);break;case`data`:if(t!==`object`){Tt(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=Jt(``+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`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Jt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`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=Jt(``+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`:$(`beforetoggle`,e),$(`toggle`,e),wt(e,`popover`,r);break;case`xlinkActuate`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:wt(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=Kt.get(n)||n,wt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Wt(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`?Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Vt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!_t.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[rt]||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,``):wt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`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:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`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:Md(e,t,r,d,n,null)}}It(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`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:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Rt(e,!!r,n,!0):Rt(e,!!r,t,!1);return;case`textarea`:for(s in $(`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:Md(e,t,s,c,n,null)}Bt(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:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`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:Md(e,t,u,r,n,null)}return;default:if(Gt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(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)||Md(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&&Md(e,t,p,m,r,f)}}Ft(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)||Md(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&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Rt(e,!!n,n?[]:``,!1):Rt(e,!!n,t,!0)):Rt(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:Md(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&&Md(e,t,s,a,r,o)}zt(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:Md(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:Md(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)&&Md(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:Md(e,t,u,p,r,m)}return;default:if(Gt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(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||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(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),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[lt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),ut(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[lt])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(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 pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ut(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=I.d;I.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=vu();return e||t}function yf(e){var t=ft(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Pt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),ht(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Pt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Pt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Pt(n.imageSizes)+`"]`)):i+=`[href="`+Pt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),ht(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Pt(r)+`"][href="`+Pt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),ht(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=mt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);ht(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=mt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ht(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=mt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ht(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ae.current)?gf(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=Af(n.href),n=mt(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=Af(n.href);var o=mt(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(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.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},mf.set(e,n),o||Nf(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=Pf(n),n=mt(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 Af(e){return`href="`+Pt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(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}),Pd(t,`link`,n),ht(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Pt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Pt(n.href)+`"]`);if(r)return t.instance=r,ht(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ht(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,ht(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,ht(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ht(a),Pd(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,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[lt]||a[nt]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ht(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(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=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.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=Jf.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 Qf={$$typeof:b,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function $f(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=Ge(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ge(0),this.hiddenUpdates=Ge(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 ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ri(3,null,null,t),e.current=a,a.stateNode=e,t=ra(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ia(a),e}function tp(e){return e?(e=ti,e):ti}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ra(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=za(e,r,t),n!==null&&(hu(n,e,t),Ba(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Qr(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=Ze(t);var n=Qr(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Be(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Pe(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Il&6)&&(tu=Ce()+500,rd(0,!1))}}break;case 31:case 13:s=Qr(a,2),s!==null&&hu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=Zt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=dt(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 fp=e,null}function mp(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(we()){case Te:return 2;case Ee:return 8;case De:case Oe:return 32;case V:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(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=ft(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=dt(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,et(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,et(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Xt=r,n.target.dispatchEvent(r),Xt=null}else return t=ft(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=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(pp(r||n)===null)continue;break}var a=ft(n);a!==null&&(e.splice(t,3),t-=3,Ss(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.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[rt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[rt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){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 Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[it]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.4`)throw Error(i(527,Lp,`19.2.4`));I.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:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{je=zp.inject(Rp),Me=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Gs,s=Ks,c=qs;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=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[it]=t.current,xd(e),new Fp(t)}})),ee=s(((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=P()})),F=s((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})),I=s(((e,t)=>{t.exports=F()})),te=d(ee(),1),L=d(k(),1),R=I(),z=[`shift`,`alt`,`meta`,`mod`,`ctrl`,`control`],ne={esc:`escape`,return:`enter`,left:`arrowleft`,right:`arrowright`,up:`arrowup`,down:`arrowdown`,ShiftLeft:`shift`,ShiftRight:`shift`,AltLeft:`alt`,AltRight:`alt`,MetaLeft:`meta`,MetaRight:`meta`,OSLeft:`meta`,OSRight:`meta`,ControlLeft:`ctrl`,ControlRight:`ctrl`};function B(e){return(ne[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,``)}function re(e){return z.includes(e)}function ie(e,t=`,`){return e.toLowerCase().split(t)}function ae(e,t=`+`,n=`>`,r=!1,i,a){let o=[],s=!1;e=e.trim(),e.includes(n)?(s=!0,o=e.toLocaleLowerCase().split(n).map(e=>B(e))):o=e.toLocaleLowerCase().split(t).map(e=>B(e));let c={alt:o.includes(`alt`),ctrl:o.includes(`ctrl`)||o.includes(`control`),shift:o.includes(`shift`),meta:o.includes(`meta`),mod:o.includes(`mod`),useKey:r},l=o.filter(e=>!z.includes(e));return{...c,keys:l,description:i,isSequence:s,hotkey:e,metadata:a}}typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.code!==void 0&&le([B(e.code)])}),document.addEventListener(`keyup`,e=>{e.code!==void 0&&ue([B(e.code)])})),typeof window<`u`&&(window.addEventListener(`blur`,()=>{oe.clear()}),window.addEventListener(`contextmenu`,()=>{setTimeout(()=>{oe.clear()},0)}));var oe=new Set;function se(e){return Array.isArray(e)}function ce(e,t=`,`){return(se(e)?e:e.split(t)).every(e=>oe.has(e.trim().toLowerCase()))}function le(e){let t=Array.isArray(e)?e:[e];oe.has(`meta`)&&oe.forEach(e=>{re(e)||oe.delete(e.toLowerCase())}),t.forEach(e=>{oe.add(e.toLowerCase())})}function ue(e){e===`meta`?oe.clear():(Array.isArray(e)?e:[e]).forEach(e=>{oe.delete(e.toLowerCase())})}function de(e,t,n){(typeof n==`function`&&n(e,t)||n===!0)&&e.preventDefault()}function fe(e,t,n){return typeof n==`function`?n(e,t):n===!0||n===void 0}var pe=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`];function me(e){return he(e,pe)}function he(e,t=!1){let{target:n,composed:r}=e,i,a;return ge(n)&&r?(i=e.composedPath()[0]&&e.composedPath()[0].tagName,a=e.composedPath()[0]&&e.composedPath()[0].role):(i=n&&n.tagName,a=n&&n.role),se(t)?!!(i&&t&&t.some(e=>e.toLowerCase()===i.toLowerCase()||e===a)):!!(i&&t&&t)}function ge(e){return!!e.tagName&&!e.tagName.startsWith(`-`)&&e.tagName.includes(`-`)}function _e(e,t){return e.length===0&&t?!1:t?e.some(e=>t.includes(e))||e.includes(`*`):!0}var ve=(e,t,n=!1)=>{let{alt:r,meta:i,mod:a,shift:o,ctrl:s,keys:c,useKey:l}=t,{code:u,key:d,ctrlKey:f,metaKey:p,shiftKey:m,altKey:h}=e,g=B(u);if(l&&c?.length===1&&c.includes(d.toLowerCase()))return!0;if(!c?.includes(g)&&![`ctrl`,`control`,`unknown`,`meta`,`alt`,`shift`,`os`].includes(g))return!1;if(!n){if(r!==h&&g!==`alt`||o!==m&&g!==`shift`)return!1;if(a){if(!p&&!f)return!1}else if(i!==p&&g!==`meta`&&g!==`os`||s!==f&&g!==`ctrl`&&g!==`control`)return!1}return c&&c.length===1&&c.includes(g)?!0:c&&c.length>0?c.includes(g)?ce(c):!1:!c||c.length===0},ye=(0,L.createContext)(void 0),be=()=>(0,L.useContext)(ye);function xe({addHotkey:e,removeHotkey:t,children:n}){return(0,R.jsx)(ye.Provider,{value:{addHotkey:e,removeHotkey:t},children:n})}function Se(e,t){return e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&Se(e[r],t[r]),!0):e===t}var Ce=(0,L.createContext)({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),we=()=>(0,L.useContext)(Ce),Te=({initiallyActiveScopes:e=[`*`],children:t})=>{let[n,r]=(0,L.useState)(e),[i,a]=(0,L.useState)([]),o=(0,L.useCallback)(e=>{r(t=>t.includes(`*`)?[e]:Array.from(new Set([...t,e])))},[]),s=(0,L.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]),c=(0,L.useCallback)(e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):t.includes(`*`)?[e]:Array.from(new Set([...t,e])))},[]),l=(0,L.useCallback)(e=>{a(t=>[...t,e])},[]),u=(0,L.useCallback)(e=>{a(t=>t.filter(t=>!Se(t,e)))},[]);return(0,R.jsx)(Ce.Provider,{value:{activeScopes:n,hotkeys:i,enableScope:o,disableScope:s,toggleScope:c},children:(0,R.jsx)(xe,{addHotkey:l,removeHotkey:u,children:t})})};function Ee(e){let t=(0,L.useRef)(void 0);return Se(t.current,e)||(t.current=e),t.current}var De=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},Oe=typeof window<`u`?L.useLayoutEffect:L.useEffect;function V(e,t,n,r){let i=(0,L.useRef)(null),a=(0,L.useRef)(!1),o=Array.isArray(n)?Array.isArray(r)?void 0:r:n,s=se(e)?e.join(o?.delimiter):e,c=Array.isArray(n)?n:Array.isArray(r)?r:void 0,l=(0,L.useCallback)(t,c??[]),u=(0,L.useRef)(l);c?u.current=l:u.current=t;let d=Ee(o),{activeScopes:f}=we(),p=be();return Oe(()=>{if(d?.enabled===!1||!_e(f,d?.scopes))return;let e=[],t,n=(n,r=!1)=>{if(!(me(n)&&!he(n,d?.enableOnFormTags))){if(i.current!==null){let e=i.current.getRootNode();if((e instanceof Document||e instanceof ShadowRoot)&&e.activeElement!==i.current&&!i.current.contains(e.activeElement)){De(n);return}}n.target?.isContentEditable&&!d?.enableOnContentEditable||ie(s,d?.delimiter).forEach(i=>{if(i.includes(d?.splitKey??`+`)&&i.includes(d?.sequenceSplitKey??`>`)){console.warn(`Hotkey ${i} contains both ${d?.splitKey??`+`} and ${d?.sequenceSplitKey??`>`} which is not supported.`);return}let o=ae(i,d?.splitKey,d?.sequenceSplitKey,d?.useKey,d?.description,d?.metadata);if(o.isSequence){t=setTimeout(()=>{e=[]},d?.sequenceTimeoutMs??1e3);let r=o.useKey?n.key:B(n.code);if(re(r.toLowerCase()))return;if(e.push(r),r!==o.keys?.[e.length-1]){e=[],t&&clearTimeout(t);return}e.length===o.keys?.length&&(u.current(n,o),t&&clearTimeout(t),e=[])}else if(ve(n,o,d?.ignoreModifiers)||o.keys?.includes(`*`)){if(d?.ignoreEventWhen?.(n)||r&&a.current)return;if(de(n,o,d?.preventDefault),!fe(n,o,d?.enabled)){De(n);return}u.current(n,o),r||(a.current=!0)}})}},r=e=>{e.code!==void 0&&(le(B(e.code)),(d?.keydown===void 0&&d?.keyup!==!0||d?.keydown)&&n(e))},c=e=>{e.code!==void 0&&(ue(B(e.code)),a.current=!1,d?.keyup&&n(e,!0))},l=i.current||o?.document||document;return l.addEventListener(`keyup`,c,o?.eventListenerOptions),l.addEventListener(`keydown`,r,o?.eventListenerOptions),p&&ie(s,d?.delimiter).forEach(e=>{p.addHotkey(ae(e,d?.splitKey,d?.sequenceSplitKey,d?.useKey,d?.description,d?.metadata))}),()=>{l.removeEventListener(`keyup`,c,o?.eventListenerOptions),l.removeEventListener(`keydown`,r,o?.eventListenerOptions),p&&ie(s,d?.delimiter).forEach(e=>{p.removeHotkey(ae(e,d?.splitKey,d?.sequenceSplitKey,d?.useKey,d?.description,d?.metadata))}),e=[],t&&clearTimeout(t)}},[s,d,f]),i}var ke=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ae=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),je=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Me=e=>{let t=je(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ne={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Pe=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Fe=(0,L.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,L.createElement)(`svg`,{ref:c,...Ne,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ke(`lucide`,i),...!a&&!Pe(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,L.createElement)(e,t)),...Array.isArray(a)?a:[a]])),H=(e,t)=>{let n=(0,L.forwardRef)(({className:n,...r},i)=>(0,L.createElement)(Fe,{ref:i,iconNode:t,className:ke(`lucide-${Ae(Me(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Me(e),n},Ie=H(`arrow-down-from-line`,[[`path`,{d:`M19 3H5`,key:`1236rx`}],[`path`,{d:`M12 21V7`,key:`gj6g52`}],[`path`,{d:`m6 15 6 6 6-6`,key:`h15q88`}]]),Le=H(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),Re=H(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ze=H(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Be=H(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Ve=H(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),He=H(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),Ue=H(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),We=H(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ge=H(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),Ke=H(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),qe=H(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),Je=H(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Ye=H(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Xe=H(`file-diff`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),Ze=H(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),Qe=H(`file-plus`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),$e=H(`file-x`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m14.5 12.5-5 5`,key:`b62r18`}],[`path`,{d:`m9.5 12.5 5 5`,key:`1rk7el`}]]),et=H(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),tt=H(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),nt=H(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),rt=H(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),it=H(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),at=H(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ot=H(`message-square-reply`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`m10 8-3 3 3 3`,key:`fp6dz7`}],[`path`,{d:`M17 14v-1a2 2 0 0 0-2-2H7`,key:`1tkjnz`}]]),st=H(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),ct=H(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),lt=H(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),ut=H(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),dt=H(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),ft=H(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),pt=H(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),mt=H(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),ht=H(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),gt=H(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),_t=H(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),vt=H(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),yt=`split`;function bt(e){switch(e){case`split`:case`side-by-side`:return`split`;case`unified`:case`inline`:return`unified`;default:return yt}}function xt(e){return e??`direct`}function St(e,t,n){return xt(n)===`merge-base`?{baseCommitish:e,targetCommitish:t,baseMode:`merge-base`}:{baseCommitish:e,targetCommitish:t}}function Ct(e,t){return e?.baseCommitish===t?.baseCommitish&&e?.targetCommitish===t?.targetCommitish&&xt(e?.baseMode)===xt(t?.baseMode)}function wt(e){return`${e.baseCommitish}:${e.targetCommitish}:${xt(e.baseMode)}`}function Tt({checked:e,onChange:t,label:n,className:r=``,title:i}){return(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-github-text-primary cursor-pointer ${r}`,title:i,onClick:n=>{n.stopPropagation(),t(!e)},onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),n.stopPropagation(),t(!e))},role:`checkbox`,"aria-checked":e,tabIndex:0,children:[(0,R.jsx)(`div`,{className:`w-4 h-4 rounded border flex items-center justify-center transition-all duration-200 cursor-pointer ${e?`bg-github-accent border-github-accent`:`bg-github-bg-tertiary border-github-text-muted hover:border-github-accent/50`}`,children:e&&(0,R.jsx)(Re,{size:10,className:`text-white`})}),n&&(0,R.jsx)(`span`,{className:`select-none`,children:n})]})}function Et({commentsCount:e,isCopiedAll:t,onCopyAll:n,onDeleteAll:r,onViewAll:i,direction:a=`down`,compact:o=!1}){let[s,c]=(0,L.useState)(!1),l=(0,L.useRef)(null),u=o,d=a===`up`;(0,L.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let f=()=>{n(),c(!1)},p=()=>{r(),c(!1)},m=()=>{i?.(),c(!1)},h=u?t?`Copied`:`Copy All (${e})`:t?`Copied All!`:`Copy All Prompt (${e})`;return(0,R.jsxs)(`div`,{className:`relative`,ref:l,children:[(0,R.jsxs)(`div`,{className:`flex`,children:[(0,R.jsxs)(`button`,{onClick:f,className:`text-xs px-3 py-1.5 pr-2 rounded-l transition-all flex items-center gap-1.5 ${u?`whitespace-normal`:`whitespace-nowrap`}`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,border:`1px solid var(--color-yellow-btn-border)`,borderRight:`none`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},title:`Copy all ${e} comments to AI coding agent`,children:[t?(0,R.jsx)(Re,{size:12}):(0,R.jsx)(Ke,{size:12}),h]}),(0,R.jsx)(`button`,{onClick:()=>c(!s),className:`text-xs px-2 py-1.5 rounded-r transition-all flex items-center border-l`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,borderTop:`1px solid var(--color-yellow-btn-border)`,borderRight:`1px solid var(--color-yellow-btn-border)`,borderBottom:`1px solid var(--color-yellow-btn-border)`,borderLeft:`1px solid var(--color-yellow-btn-border)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},title:`More options`,children:(0,R.jsx)(ze,{size:12,className:`transition-transform duration-200 ${s?`rotate-180`:``}`})})]}),s&&(0,R.jsxs)(`div`,{className:`absolute left-0 right-0 bg-github-bg-primary border border-github-border z-50 pb-px ${d?`bottom-full rounded-t`:`top-full rounded-b`}`,style:{borderTop:d?void 0:`none`,borderBottom:d?`none`:void 0},children:[i&&(0,R.jsxs)(`button`,{onClick:m,className:`w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors`,disabled:e===0,children:[(0,R.jsx)(it,{size:12}),`View All Comments`]}),(0,R.jsxs)(`button`,{onClick:p,className:`w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors`,children:[(0,R.jsx)(qe,{size:12}),`Cleanup All Prompt`]})]})]})}function Dt(e){if(typeof document>`u`||typeof document.execCommand!=`function`)throw Error(`Clipboard is unavailable in this environment`);let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.setAttribute(`aria-hidden`,`true`),t.style.position=`fixed`,t.style.top=`0`,t.style.left=`-9999px`,t.style.opacity=`0`;let n=document.getSelection(),r=n?.rangeCount?n.getRangeAt(0):null,i=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.append(t),t.focus(),t.select(),t.setSelectionRange(0,e.length);let a=document.execCommand(`copy`);if(t.remove(),n&&r&&(n.removeAllRanges(),n.addRange(r)),i?.focus(),!a)throw Error(`Failed to copy text`)}async function Ot(e){try{if(typeof navigator>`u`||typeof navigator.clipboard?.writeText!=`function`)throw Error(`Modern clipboard API is unavailable`);await navigator.clipboard.writeText(e);return}catch{Dt(e)}}function kt(e){return/```suggestion\n([\s\S]*?)```/.test(e)}function At(e){let t=[],n=/```suggestion\n([\s\S]*?)```/g,r;for(;(r=n.exec(e))!==null;)t.push({suggestedCode:r[1].replace(/\n$/,``),startIndex:r.index,endIndex:r.index+r[0].length});return t}function jt(e){return`\`\`\`suggestion\n${e.endsWith(`
11
+ `)?e:e+`
12
+ `}\`\`\``}var Mt=2,Nt=100;function Pt(e){return!(e.length<Mt||e.length>Nt)}function Ft(e){return e.toLowerCase()}function It(e){let t=e.trim();return t?t.match(/^\w+$/)!==null&&Pt(t):!1}var Lt=200,Rt=(0,L.createContext)(void 0);function zt({children:e}){let[t,n]=(0,L.useState)(null),r=(0,L.useRef)(null),i=(0,L.useCallback)(()=>{r.current&&=(clearTimeout(r.current),null)},[]),a=(0,L.useCallback)(e=>{let t=e.target;if(!t.classList.contains(`word-token`))return;i();let a=t.getAttribute(`data-word`);a&&(r.current=setTimeout(()=>{n(a)},Lt))},[i]),o=(0,L.useCallback)(()=>{i(),n(null)},[i]),s=(0,L.useCallback)(e=>t?Ft(e)===Ft(t):!1,[t]);(0,L.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);let c=(0,L.useMemo)(()=>({highlightedWord:t,handleMouseOver:a,handleMouseOut:o,isWordHighlighted:s}),[t,a,o,s]);return(0,R.jsx)(Rt.Provider,{value:c,children:e})}function Bt(){let e=(0,L.useContext)(Rt);if(!e)throw Error(`useWordHighlight must be used within a WordHighlightProvider`);return e}function Vt(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=Vt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ht(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Vt(e))&&(r&&(r+=` `),r+=t);return r}var Ut=Object.create,Wt=Object.defineProperty,Gt=Object.defineProperties,Kt=Object.getOwnPropertyDescriptor,qt=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertyNames,Yt=Object.getOwnPropertySymbols,Xt=Object.getPrototypeOf,Zt=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,$t=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,en=(e,t)=>{for(var n in t||={})Zt.call(t,n)&&$t(e,n,t[n]);if(Yt)for(var n of Yt(t))Qt.call(t,n)&&$t(e,n,t[n]);return e},tn=(e,t)=>Gt(e,qt(t)),nn=(e,t)=>{var n={};for(var r in e)Zt.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Yt)for(var r of Yt(e))t.indexOf(r)<0&&Qt.call(e,r)&&(n[r]=e[r]);return n},rn=(e,t)=>function(){return t||(0,e[Jt(e)[0]])((t={exports:{}}).exports,t),t.exports},an=(e,t)=>{for(var n in t)Wt(e,n,{get:t[n],enumerable:!0})},on=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Jt(t))!Zt.call(e,i)&&i!==n&&Wt(e,i,{get:()=>t[i],enumerable:!(r=Kt(t,i))||r.enumerable});return e},U=((e,t,n)=>(n=e==null?{}:Ut(Xt(e)),on(t||!e||!e.__esModule?Wt(n,`default`,{value:e,enumerable:!0}):n,e)))(rn({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,`__id`,{value:++t}),e.__id},clone:function e(t,n){n||={};var i,a;switch(r.util.type(t)){case`Object`:if(a=r.util.objId(t),n[a])return n[a];for(var o in i={},n[a]=i,t)t.hasOwnProperty(o)&&(i[o]=e(t[o],n));return i;case`Array`:return a=r.util.objId(t),n[a]?n[a]:(i=[],n[a]=i,t.forEach(function(t,r){i[r]=e(t,n)}),i);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return`none`},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,`gi`),``),t.classList.add(`language-`+n)},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var i in t)n[i]=t[i];return n},insertBefore:function(e,t,n,i){i||=r.languages;var a=i[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=i[e];return i[e]=o,r.languages.DFS(r.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,i,a){a||={};var o=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],i||s);var c=t[s],l=r.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run(`before-tokenize`,a),!a.grammar)throw Error(`The language "`+a.language+`" has no grammar.`);return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run(`after-tokenize`,a),i.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new s;return c(i,i.head,e),o(e,i,t,i.head,0),u(i)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(!(!n||!n.length))for(var i=0,a;a=n[i++];)a(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}i.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var i=``;return t.forEach(function(t){i+=e(t,n)}),i}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),r.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function a(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function o(e,t,n,s,u,d){for(var f in n)if(!(!n.hasOwnProperty(f)||!n[f])){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=s.next,C=u;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof i)){var T=1,E;if(v){if(E=a(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,O=E.index+E[0].length,k=C;for(k+=S.value.length;D>=k;)S=S.next,k+=S.value.length;if(k-=S.value.length,C=k,S.value instanceof i)continue;for(var A=S;A!==t.tail&&(k<O||typeof A.value==`string`);A=A.next)T++,k+=A.value.length;T--,w=e.slice(C,k),E.index-=C}else if(E=a(x,0,w,_),!E)continue;var D=E.index,j=E[0],M=w.slice(0,D),N=w.slice(D+j.length),P=C+w.length;d&&P>d.reach&&(d.reach=P);var ee=S.prev;M&&(ee=c(t,ee,M),C+=M.length),l(t,ee,T);var F=new i(f,g?r.tokenize(j,g):j,y,j);if(S=c(t,ee,F),N&&c(t,S,N),T>1){var I={cause:f+`,`+m,reach:P};o(e,t,n,S.prev,C,I),d&&I.reach>d.reach&&(d.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function l(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function u(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}return r}();t.exports=n,n.default=n}})());U.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},U.languages.markup.tag.inside[`attr-value`].inside.entity=U.languages.markup.entity,U.languages.markup.doctype.inside[`internal-subset`].inside=U.languages.markup,U.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(U.languages.markup.tag,`addInlined`,{value:function(e,t){var n={},n=(n[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:U.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),t=(n[`language-`+t]={pattern:/[\s\S]+/,inside:U.languages[t]},{});t[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:n},U.languages.insertBefore(`markup`,`cdata`,t)}}),Object.defineProperty(U.languages.markup.tag,`addAttribute`,{value:function(e,t){U.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:U.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),U.languages.html=U.languages.markup,U.languages.mathml=U.languages.markup,U.languages.svg=U.languages.markup,U.languages.xml=U.languages.extend(`markup`,{}),U.languages.ssml=U.languages.xml,U.languages.atom=U.languages.xml,U.languages.rss=U.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:`escape`},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r=`(?:[^\\\\-]|`+n.source+`)`,r=RegExp(r+`-`+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:`variable`};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:`operator`},"char-class-punctuation":{pattern:/^\[|\]$/,alias:`punctuation`},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:`operator`}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:`class-name`},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:`class-name`},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:`keyword`},{pattern:/\\k<[^<>']+>/,alias:`keyword`,inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:`function`},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:`punctuation`,inside:{"group-name":i}},{pattern:/\)/,alias:`punctuation`}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:`number`},alternation:{pattern:/\|/,alias:`keyword`}}}(U),U.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},U.languages.javascript=U.languages.extend(`clike`,{"class-name":[U.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),U.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,U.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:U.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:U.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:U.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:U.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:U.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),U.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:U.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),U.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),U.languages.markup&&(U.languages.markup.tag.addInlined(`script`,`javascript`),U.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),U.languages.js=U.languages.javascript,U.languages.actionscript=U.languages.extend(`javascript`,{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),U.languages.actionscript[`class-name`].alias=`function`,delete U.languages.actionscript.parameter,delete U.languages.actionscript[`literal-property`],U.languages.markup&&U.languages.insertBefore(`actionscript`,`string`,{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:U.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:`variable`};e.languages.coffeescript=e.languages.extend(`javascript`,{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:`variable`}}),e.languages.insertBefore(`coffeescript`,`comment`,{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:`comment`},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:`regex`,inside:{comment:t,interpolation:n}}}),e.languages.insertBefore(`coffeescript`,`string`,{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:`punctuation`},script:{pattern:/[\s\S]+/,alias:`language-javascript`,inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:`string`},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:`string`,inside:{interpolation:n}}]}),e.languages.insertBefore(`coffeescript`,`keyword`,{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript[`template-string`],e.languages.coffee=e.languages.coffeescript}(U),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,`addSupport`,{value:function(t,n){(t=typeof t==`string`?[t]:t).forEach(function(t){var r=function(e){e.inside||={},e.inside.rest=n},i=`doc-comment`;if(a=e.languages[t]){var a,o=a[i];if((o||=(a=e.languages.insertBefore(t,`comment`,{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:`comment`}}))[i])instanceof RegExp&&(o=a[i]={pattern:o}),Array.isArray(o))for(var s=0,c=o.length;s<c;s++)o[s]instanceof RegExp&&(o[s]={pattern:o[s]}),r(o[s]);else r(o)}})}}),t.addSupport([`java`,`javascript`,`php`],t)}(U),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined(`style`,`css`),t.tag.addAttribute(`style`,`css`))}(U),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+`)*\\]`),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:`keyword`},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside[`selector-function-argument`].inside=t,e.languages.insertBefore(`css`,`property`,{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore(`css`,`function`,{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:`color`},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(U),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r=`(?:`+n.source+`(?:[ ]+`+t.source+`)?|`+t.source+`(?:[ ]+`+n.source+`)?)`,i=`(?:[^\\s\\x00-\\x08\\x0e-\\x1f!"#%&'*,\\-:>?@[\\]\`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*`.replace(/<PLAIN>/g,function(){return`[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]`}),a=`"(?:[^"\\\\\\r\\n]|\\\\.)*"|'(?:[^'\\\\\\r\\n]|\\\\.)*'`;function o(e,t){t=(t||``).replace(/m/g,``)+`m`;var n=`([:\\-,[{]\\s*(?:\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\]|\\}|(?:[\\r\\n]\\s*)?#))`.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return e});return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(`([\\-:]\\s*(?:\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\S[^\\r\\n]*(?:\\2[^\\r\\n]+)*)`.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:`string`},comment:/#.*/,key:{pattern:RegExp(`((?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\s*:\\s)`.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return`(?:`+i+`|`+a+`)`})),lookbehind:!0,greedy:!0,alias:`atrule`},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:`important`},datetime:{pattern:o(`\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \\t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \\t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?`),lookbehind:!0,alias:`number`},boolean:{pattern:o(`false|true`,`i`),lookbehind:!0,alias:`important`},null:{pattern:o(`null|~`,`i`),lookbehind:!0,alias:`important`},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(`[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)`,`i`),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(U),function(e){var t=`(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))`;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(`((?:^|[^\\\\])(?:\\\\{2})*)(?:`+e+`)`)}var r="(?:\\\\.|``(?:[^`\\r\\n]|`(?!`))+``|`[^`\\r\\n]+`|[^\\\\|\\r\\n`])+",i=`\\|?__(?:\\|__)+\\|?(?:(?:\\n|\\r\\n?)|(?![\\s\\S]))`.replace(/__/g,function(){return r}),a=`\\|?[ \\t]*:?-{3,}:?[ \\t]*(?:\\|[ \\t]*:?-{3,}:?[ \\t]*)+\\|?(?:\\n|\\r\\n?)`,o=(e.languages.markdown=e.languages.extend(`markup`,{}),e.languages.insertBefore(`markdown`,`prolog`,{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:[`yaml`,`language-yaml`],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:`punctuation`},table:{pattern:RegExp(`^`+i+a+`(?:`+i+`)*`,`m`),inside:{"table-data-rows":{pattern:RegExp(`^(`+i+a+`)(?:`+i+`)*$`),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp(`^(`+i+`)`+a+`$`),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp(`^`+i+`$`),inside:{"table-header":{pattern:RegExp(r),alias:`important`,inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:`keyword`},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:`important`,inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:`important`,inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:`punctuation`},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:`punctuation`},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:`url`},bold:{pattern:n(`\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(`\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(`(~~?)(?:(?!~)<inner>)+\\2`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:[`code`,`keyword`]},url:{pattern:n(`!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \\t]?\\[(?:(?!\\])<inner>)+\\])`),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),[`url`,`bold`,`italic`,`strike`].forEach(function(t){[`url`,`bold`,`italic`,`strike`,`code-snippet`].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add(`after-tokenize`,function(e){e.language!==`markdown`&&e.language!==`md`||function e(t){if(t&&typeof t!=`string`)for(var n=0,r=t.length;n<r;n++){var i,a=t[n];a.type===`code`?(i=a.content[1],a=a.content[3],i&&a&&i.type===`code-language`&&a.type===`code-block`&&typeof i.content==`string`&&(i=i.content.replace(/\b#/g,`sharp`).replace(/\b\+\+/g,`pp`),i=`language-`+(i=(/[a-z][\w-]*/i.exec(i)||[``])[0].toLowerCase()),a.alias?typeof a.alias==`string`?a.alias=[a.alias,i]:a.alias.push(i):a.alias=[i])):e(a.content)}}(e.tokens)}),e.hooks.add(`wrap`,function(t){if(t.type===`code-block`){for(var n=``,r=0,i=t.classes.length;r<i;r++){var a=t.classes[r],a=/language-(.+)/.exec(a);if(a){n=a[1];break}}var l,u=e.languages[n];u?t.content=e.highlight(function(e){return e=e.replace(o,``),e=e.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;return(t=t.toLowerCase())[0]===`#`?(n=t[1]===`x`?parseInt(t.slice(2),16):Number(t.slice(1)),c(n)):s[t]||e})}(t.content),u,n):n&&n!==`none`&&e.plugins.autoloader&&(l=`md-`+new Date().valueOf()+`-`+Math.floor(0x2386f26fc10000*Math.random()),t.attributes.id=l,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(l);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}),RegExp(e.languages.markup.tag.pattern.source,`gi`)),s={amp:`&`,lt:`<`,gt:`>`,quot:`"`},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(U),U.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:`string`,inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:U.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:`function`},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:`class-name`},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},U.hooks.add(`after-tokenize`,function(e){if(e.language===`graphql`)for(var t=e.tokens.filter(function(e){return typeof e!=`string`&&e.type!==`comment`&&e.type!==`scalar`}),n=0;n<t.length;){var r=t[n++];if(r.type===`keyword`&&r.content===`mutation`){var i=[];if(d([`definition-mutation`,`punctuation`])&&u(1).content===`(`){n+=2;var a=f(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var o=u(0);o.type===`variable`&&(p(o,`variable-input`),i.push(o.content))}n=a+1}if(d([`punctuation`,`property-query`])&&u(0).content===`{`&&(n++,p(u(0),`property-mutation`),0<i.length)){var s=f(/^\{$/,/^\}$/);if(s!==-1)for(var c=n;c<s;c++){var l=t[c];l.type===`variable`&&0<=i.indexOf(l.content)&&p(l,`variable-input`)}}}}function u(e){return t[n+e]}function d(e,t){t||=0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function f(e,r){for(var i=1,a=n;a<t.length;a++){var o=t[a],s=o.content;if(o.type===`punctuation`&&typeof s==`string`){if(e.test(s))i++;else if(r.test(s)&&--i===0)return a}}return-1}function p(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}}),U.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript[`template-string`],n=t.pattern.source,r=t.inside.interpolation,i=r.inside[`interpolation-punctuation`],a=r.pattern.source;function o(t,r){if(e.languages[t])return{pattern:RegExp(`((?:`+r+`)\\s*)`+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run(`before-tokenize`,t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run(`after-tokenize`,t),t.tokens}function c(t,n,o){var c=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),l=0,u={},c=s(c.map(function(e){if(typeof e==`string`)return e;for(var n,r,e=e.content;t.indexOf((r=l++,n=`___`+o.toUpperCase()+`_`+r+`___`))!==-1;);return u[n]=e,n}).join(``),n,o),d=Object.keys(u);return l=0,function t(n){for(var a=0;a<n.length;a++){if(l>=d.length)return;var o,c,f,p,m,h,g,_=n[a];typeof _==`string`||typeof _.content==`string`?(o=d[l],(g=(h=typeof _==`string`?_:_.content).indexOf(o))!==-1&&(++l,c=h.substring(0,g),m=u[o],f=void 0,(p={})[`interpolation-punctuation`]=i,(p=e.tokenize(m,p)).length===3&&((f=[1,1]).push.apply(f,s(p[1],e.languages.javascript,`javascript`)),p.splice.apply(p,f)),f=new e.Token(`interpolation`,p,r.alias,m),p=h.substring(g+o.length),m=[],c&&m.push(c),m.push(f),p&&(t(h=[p]),m.push.apply(m,h)),typeof _==`string`?(n.splice.apply(n,[a,1].concat(m)),a+=m.length-1):_.content=m)):(g=_.content,t(Array.isArray(g)?g:[g]))}}(c),new e.Token(o,c,`language-`+o,t)}e.languages.javascript[`template-string`]=[o(`css`,`\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)`),o(`html`,`\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?=`),o(`svg`,`\\bsvg`),o(`markdown`,`\\b(?:markdown|md)`),o(`graphql`,`\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)`),o(`sql`,`\\bsql`),t].filter(Boolean);var l={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return typeof e==`string`?e:Array.isArray(e)?e.map(u).join(``):u(e.content)}e.hooks.add(`after-tokenize`,function(t){t.language in l&&function t(n){for(var r=0,i=n.length;r<i;r++){var a,o,s,l=n[r];typeof l!=`string`&&(a=l.content,Array.isArray(a)?l.type===`template-string`?(l=a[1],a.length===3&&typeof l!=`string`&&l.type===`embedded-code`&&(o=u(l),l=l.alias,l=Array.isArray(l)?l[0]:l,s=e.languages[l])&&(a[1]=c(o,s,l))):t(a):typeof a!=`string`&&t([a]))}}(t.tokens)})}(U),function(e){e.languages.typescript=e.languages.extend(`javascript`,{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript[`literal-property`];var t=e.languages.extend(`typescript`,{});delete t[`class-name`],e.languages.typescript[`class-name`].inside=t,e.languages.insertBefore(`typescript`,`function`,{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:`operator`},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:t}}}}),e.languages.ts=e.languages.typescript}(U),function(e){var t=e.languages.javascript,n=`\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})+\\}`,r=`(@(?:arg|argument|param|property)\\s+(?:`+n+`\\s+)?)`;e.languages.jsdoc=e.languages.extend(`javadoclike`,{parameter:{pattern:RegExp(r+`(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?=\\s|$)`),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore(`jsdoc`,`keyword`,{"optional-parameter":{pattern:RegExp(r+`\\[(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?:=[^[\\]]+)?\\](?=\\s|$)`),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:`language-javascript`},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(`(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\\s+(?:<TYPE>\\s+)?)[A-Z]\\w*(?:\\.[A-Z]\\w*)*`.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp(`(@[a-z]+\\s+)`+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:`language-javascript`}}}}),e.languages.javadoclike.addSupport(`javascript`,e.languages.jsdoc)}(U),function(e){e.languages.flow=e.languages.extend(`javascript`,{}),e.languages.insertBefore(`flow`,`keyword`,{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:`class-name`}]}),e.languages.flow[`function-variable`].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore(`flow`,`operator`,{"flow-punctuation":{pattern:/\{\||\|\}/,alias:`punctuation`}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(U),U.languages.n4js=U.languages.extend(`javascript`,{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),U.languages.insertBefore(`n4js`,`constant`,{annotation:{pattern:/@+\w+/,alias:`operator`}}),U.languages.n4jsd=U.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,function(){return`(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*`}),t)}e.languages.insertBefore(`javascript`,`function-variable`,{"method-variable":{pattern:RegExp(`(\\.\\s*)`+e.languages.javascript[`function-variable`].pattern.source),lookbehind:!0,alias:[`function-variable`,`method`,`function`,`property-access`]}}),e.languages.insertBefore(`javascript`,`function`,{method:{pattern:RegExp(`(\\.\\s*)`+e.languages.javascript.function.source),lookbehind:!0,alias:[`function`,`property-access`]}}),e.languages.insertBefore(`javascript`,`constant`,{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:`class-name`},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:`class-name`}]}),e.languages.insertBefore(`javascript`,`keyword`,{imports:{pattern:t(`(\\bimport\\b\\s*)(?:<ID>(?:\\s*,\\s*(?:\\*\\s*as\\s+<ID>|\\{[^{}]*\\}))?|\\*\\s*as\\s+<ID>|\\{[^{}]*\\})(?=\\s*\\bfrom\\b)`),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(`(\\bexport\\b\\s*)(?:\\*(?:\\s*as\\s+<ID>)?(?=\\s*\\bfrom\\b)|\\{[^{}]*\\})`),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:`module`},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:`control-flow`},{pattern:/\bnull\b/,alias:[`null`,`nil`]},{pattern:/\bundefined\b/,alias:`nil`}),e.languages.insertBefore(`javascript`,`operator`,{spread:{pattern:/\.{3}/,alias:`operator`},arrow:{pattern:/=>/,alias:`operator`}}),e.languages.insertBefore(`javascript`,`punctuation`,{"property-access":{pattern:t(`(\\.\\s*)#?<ID>`),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:`variable`},console:{pattern:/\bconsole(?=\s*\.)/,alias:`class-name`}});for(var n=[`function`,`function-variable`,`method`,`method-variable`,`property-access`],r=0;r<n.length;r++){var i=n[r],a=e.languages.javascript[i],i=(a=e.util.type(a)===`RegExp`?e.languages.javascript[i]={pattern:a}:a).inside||{};(a.inside=i)[`maybe-class-name`]=/^[A-Z][\s\S]*/}}(U),function(e){var t=e.util.clone(e.languages.javascript),n=`(?:\\s|\\/\\/.*(?!.)|\\/\\*(?:[^*]|\\*(?!\\/))\\*\\/)`,r=`(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})`,i=`(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})`;function a(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(e,t)}i=a(i).source,e.languages.jsx=e.languages.extend(`markup`,t),e.languages.jsx.tag.pattern=a(`<\\/?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[\\s\\S]|[^\\\\"])*"|'(?:\\\\[\\s\\S]|[^\\\\'])*'|[^\\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\\/?)?>`),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside[`attr-value`].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside[`class-name`]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore(`inside`,`attr-name`,{spread:{pattern:a(`<SPREAD>`),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore(`inside`,`special-attr`,{script:{pattern:a(`=<BRACES>`),alias:`language-javascript`,inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:`punctuation`},rest:e.languages.jsx}}},e.languages.jsx.tag);function o(t){for(var n=[],r=0;r<t.length;r++){var i=t[r],a=!1;typeof i!=`string`&&(i.type===`tag`&&i.content[0]&&i.content[0].type===`tag`?i.content[0].content[0].content===`</`?0<n.length&&n[n.length-1].tagName===s(i.content[0].content[1])&&n.pop():i.content[i.content.length-1].content!==`/>`&&n.push({tagName:s(i.content[0].content[1]),openedBraces:0}):0<n.length&&i.type===`punctuation`&&i.content===`{`?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&i.type===`punctuation`&&i.content===`}`?n[n.length-1].openedBraces--:a=!0),(a||typeof i==`string`)&&0<n.length&&n[n.length-1].openedBraces===0&&(a=s(i),r<t.length-1&&(typeof t[r+1]==`string`||t[r+1].type===`plain-text`)&&(a+=s(t[r+1]),t.splice(r+1,1)),0<r&&(typeof t[r-1]==`string`||t[r-1].type===`plain-text`)&&(a=s(t[r-1])+a,t.splice(r-1,1),r--),t[r]=new e.Token(`plain-text`,a,null,a)),i.content&&typeof i.content!=`string`&&o(i.content)}}var s=function(e){return e?typeof e==`string`?e:typeof e.content==`string`?e.content:e.content.map(s).join(``):``};e.hooks.add(`after-tokenize`,function(e){e.language!==`jsx`&&e.language!==`tsx`||o(e.tokens)})}(U),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend(`jsx`,t),delete e.languages.tsx.parameter,delete e.languages.tsx[`literal-property`],e.languages.tsx.tag);t.pattern=RegExp(`(^|[^\\w$]|(?=<\\/))(?:`+t.pattern.source+`)`,t.pattern.flags),t.lookbehind=!0}(U),U.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(`(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^(])|[^\\\\\\r\\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:`punctuation`},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(`(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^#])|[^\\\\\\r\\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:`punctuation`},string:/[\s\S]+/}}],directive:{pattern:RegExp(`#(?:(?:elseif|if)\\b(?:[ ]*(?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \\t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)`),alias:`property`,inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:`constant`},"other-directive":{pattern:/#\w+\b/,alias:`property`},attribute:{pattern:/@\w+/,alias:`atrule`},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:`function`},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:`important`},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:`constant`},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:`keyword`},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},U.languages.swift[`string-literal`].forEach(function(e){e.inside.interpolation.inside=U.languages.swift}),function(e){e.languages.kotlin=e.languages.extend(`clike`,{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin[`class-name`];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:`punctuation`},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore(`kotlin`,`string`,{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:`multiline`,inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:`singleline`,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore(`kotlin`,`keyword`,{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:`builtin`}}),e.languages.insertBefore(`kotlin`,`function`,{label:{pattern:/\b\w+@|@\w+\b/,alias:`symbol`}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(U),U.languages.c=U.languages.extend(`clike`,{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),U.languages.insertBefore(`c`,`string`,{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),U.languages.insertBefore(`c`,`string`,{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:`property`,inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},U.languages.c.string],char:U.languages.c.char,comment:U.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:`function`}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:`keyword`},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:U.languages.c}}}}),U.languages.insertBefore(`c`,`function`,{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete U.languages.c.boolean,U.languages.objectivec=U.languages.extend(`c`,{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete U.languages.objectivec[`class-name`],U.languages.objc=U.languages.objectivec,U.languages.reason=U.languages.extend(`clike`,{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),U.languages.insertBefore(`reason`,`class-name`,{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:`symbol`}}),delete U.languages.reason.function,function(e){for(var t=`\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/`,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return`[^\\s\\S]`}),e.languages.rust={comment:[{pattern:RegExp(`(^|[^\\\\])`+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:`attr-name`,inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:`punctuation`},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:`symbol`},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:`punctuation`},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:`function`},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:`class-name`},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:`namespace`},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:`namespace`,inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:`property`},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust[`closure-params`].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(U),U.languages.go=U.languages.extend(`clike`,{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),U.languages.insertBefore(`go`,`string`,{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete U.languages.go[`class-name`],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=`\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b`.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend(`c`,{"class-name":[{pattern:RegExp(`(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+`.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore(`cpp`,`string`,{module:{pattern:RegExp(`(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\\r\\n|[\\s\\S])|[^"\\\\\\r\\n])*"|<[^<>\\r\\n]*>|`+`<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>`.replace(/<mod-name>/g,function(){return n})+`)`),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:`string`,greedy:!0}}),e.languages.insertBefore(`cpp`,`keyword`,{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:e.languages.cpp}}}}),e.languages.insertBefore(`cpp`,`operator`,{"double-colon":{pattern:/::/,alias:`punctuation`}}),e.languages.insertBefore(`cpp`,`class-name`,{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend(`cpp`,{})}}),e.languages.insertBefore(`inside`,`double-colon`,{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp[`base-clause`])}(U),U.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:`punctuation`},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:`string`},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:[`annotation`,`punctuation`],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},U.languages.python[`string-interpolation`].inside.interpolation.inside.rest=U.languages.python,U.languages.py=U.languages.python,U.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},U.languages.webmanifest=U.languages.json;var sn={};an(sn,{dracula:()=>cn,duotoneDark:()=>ln,duotoneLight:()=>un,github:()=>dn,gruvboxMaterialDark:()=>Dn,gruvboxMaterialLight:()=>On,jettwaveDark:()=>Cn,jettwaveLight:()=>wn,nightOwl:()=>fn,nightOwlLight:()=>pn,oceanicNext:()=>hn,okaidia:()=>gn,oneDark:()=>Tn,oneLight:()=>En,palenight:()=>_n,shadesOfPurple:()=>vn,synthwave84:()=>yn,ultramin:()=>bn,vsDark:()=>xn,vsLight:()=>Sn});var cn={plain:{color:`#F8F8F2`,backgroundColor:`#282A36`},styles:[{types:[`prolog`,`constant`,`builtin`],style:{color:`rgb(189, 147, 249)`}},{types:[`inserted`,`function`],style:{color:`rgb(80, 250, 123)`}},{types:[`deleted`],style:{color:`rgb(255, 85, 85)`}},{types:[`changed`],style:{color:`rgb(255, 184, 108)`}},{types:[`punctuation`,`symbol`],style:{color:`rgb(248, 248, 242)`}},{types:[`string`,`char`,`tag`,`selector`],style:{color:`rgb(255, 121, 198)`}},{types:[`keyword`,`variable`],style:{color:`rgb(189, 147, 249)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`rgb(98, 114, 164)`}},{types:[`attr-name`],style:{color:`rgb(241, 250, 140)`}}]},ln={plain:{backgroundColor:`#2a2734`,color:`#9a86fd`},styles:[{types:[`comment`,`prolog`,`doctype`,`cdata`,`punctuation`],style:{color:`#6c6783`}},{types:[`namespace`],style:{opacity:.7}},{types:[`tag`,`operator`,`number`],style:{color:`#e09142`}},{types:[`property`,`function`],style:{color:`#9a86fd`}},{types:[`tag-id`,`selector`,`atrule-id`],style:{color:`#eeebff`}},{types:[`attr-name`],style:{color:`#c4b9fe`}},{types:[`boolean`,`string`,`entity`,`url`,`attr-value`,`keyword`,`control`,`directive`,`unit`,`statement`,`regex`,`atrule`,`placeholder`,`variable`],style:{color:`#ffcc99`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`#c4b9fe`}}]},un={plain:{backgroundColor:`#faf8f5`,color:`#728fcb`},styles:[{types:[`comment`,`prolog`,`doctype`,`cdata`,`punctuation`],style:{color:`#b6ad9a`}},{types:[`namespace`],style:{opacity:.7}},{types:[`tag`,`operator`,`number`],style:{color:`#063289`}},{types:[`property`,`function`],style:{color:`#b29762`}},{types:[`tag-id`,`selector`,`atrule-id`],style:{color:`#2d2006`}},{types:[`attr-name`],style:{color:`#896724`}},{types:[`boolean`,`string`,`entity`,`url`,`attr-value`,`keyword`,`control`,`directive`,`unit`,`statement`,`regex`,`atrule`],style:{color:`#728fcb`}},{types:[`placeholder`,`variable`],style:{color:`#93abdc`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`#896724`}}]},dn={plain:{color:`#393A34`,backgroundColor:`#f6f8fa`},styles:[{types:[`comment`,`prolog`,`doctype`,`cdata`],style:{color:`#999988`,fontStyle:`italic`}},{types:[`namespace`],style:{opacity:.7}},{types:[`string`,`attr-value`],style:{color:`#e3116c`}},{types:[`punctuation`,`operator`],style:{color:`#393A34`}},{types:[`entity`,`url`,`symbol`,`number`,`boolean`,`variable`,`constant`,`property`,`regex`,`inserted`],style:{color:`#36acaa`}},{types:[`atrule`,`keyword`,`attr-name`,`selector`],style:{color:`#00a4db`}},{types:[`function`,`deleted`,`tag`],style:{color:`#d73a49`}},{types:[`function-variable`],style:{color:`#6f42c1`}},{types:[`tag`,`selector`,`keyword`],style:{color:`#00009f`}}]},fn={plain:{color:`#d6deeb`,backgroundColor:`#011627`},styles:[{types:[`changed`],style:{color:`rgb(162, 191, 252)`,fontStyle:`italic`}},{types:[`deleted`],style:{color:`rgba(239, 83, 80, 0.56)`,fontStyle:`italic`}},{types:[`inserted`,`attr-name`],style:{color:`rgb(173, 219, 103)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`rgb(99, 119, 119)`,fontStyle:`italic`}},{types:[`string`,`url`],style:{color:`rgb(173, 219, 103)`}},{types:[`variable`],style:{color:`rgb(214, 222, 235)`}},{types:[`number`],style:{color:`rgb(247, 140, 108)`}},{types:[`builtin`,`char`,`constant`,`function`],style:{color:`rgb(130, 170, 255)`}},{types:[`punctuation`],style:{color:`rgb(199, 146, 234)`}},{types:[`selector`,`doctype`],style:{color:`rgb(199, 146, 234)`,fontStyle:`italic`}},{types:[`class-name`],style:{color:`rgb(255, 203, 139)`}},{types:[`tag`,`operator`,`keyword`],style:{color:`rgb(127, 219, 202)`}},{types:[`boolean`],style:{color:`rgb(255, 88, 116)`}},{types:[`property`],style:{color:`rgb(128, 203, 196)`}},{types:[`namespace`],style:{color:`rgb(178, 204, 214)`}}]},pn={plain:{color:`#403f53`,backgroundColor:`#FBFBFB`},styles:[{types:[`changed`],style:{color:`rgb(162, 191, 252)`,fontStyle:`italic`}},{types:[`deleted`],style:{color:`rgba(239, 83, 80, 0.56)`,fontStyle:`italic`}},{types:[`inserted`,`attr-name`],style:{color:`rgb(72, 118, 214)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`rgb(152, 159, 177)`,fontStyle:`italic`}},{types:[`string`,`builtin`,`char`,`constant`,`url`],style:{color:`rgb(72, 118, 214)`}},{types:[`variable`],style:{color:`rgb(201, 103, 101)`}},{types:[`number`],style:{color:`rgb(170, 9, 130)`}},{types:[`punctuation`],style:{color:`rgb(153, 76, 195)`}},{types:[`function`,`selector`,`doctype`],style:{color:`rgb(153, 76, 195)`,fontStyle:`italic`}},{types:[`class-name`],style:{color:`rgb(17, 17, 17)`}},{types:[`tag`],style:{color:`rgb(153, 76, 195)`}},{types:[`operator`,`property`,`keyword`,`namespace`],style:{color:`rgb(12, 150, 155)`}},{types:[`boolean`],style:{color:`rgb(188, 84, 84)`}}]},mn={char:`#D8DEE9`,comment:`#999999`,keyword:`#c5a5c5`,primitive:`#5a9bcf`,string:`#8dc891`,variable:`#d7deea`,boolean:`#ff8b50`,punctuation:`#5FB3B3`,tag:`#fc929e`,function:`#79b6f2`,className:`#FAC863`,method:`#6699CC`,operator:`#fc929e`},hn={plain:{backgroundColor:`#282c34`,color:`#ffffff`},styles:[{types:[`attr-name`],style:{color:mn.keyword}},{types:[`attr-value`],style:{color:mn.string}},{types:[`comment`,`block-comment`,`prolog`,`doctype`,`cdata`,`shebang`],style:{color:mn.comment}},{types:[`property`,`number`,`function-name`,`constant`,`symbol`,`deleted`],style:{color:mn.primitive}},{types:[`boolean`],style:{color:mn.boolean}},{types:[`tag`],style:{color:mn.tag}},{types:[`string`],style:{color:mn.string}},{types:[`punctuation`],style:{color:mn.string}},{types:[`selector`,`char`,`builtin`,`inserted`],style:{color:mn.char}},{types:[`function`],style:{color:mn.function}},{types:[`operator`,`entity`,`url`,`variable`],style:{color:mn.variable}},{types:[`keyword`],style:{color:mn.keyword}},{types:[`atrule`,`class-name`],style:{color:mn.className}},{types:[`important`],style:{fontWeight:`400`}},{types:[`bold`],style:{fontWeight:`bold`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`namespace`],style:{opacity:.7}}]},gn={plain:{color:`#f8f8f2`,backgroundColor:`#272822`},styles:[{types:[`changed`],style:{color:`rgb(162, 191, 252)`,fontStyle:`italic`}},{types:[`deleted`],style:{color:`#f92672`,fontStyle:`italic`}},{types:[`inserted`],style:{color:`rgb(173, 219, 103)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`#8292a2`,fontStyle:`italic`}},{types:[`string`,`url`],style:{color:`#a6e22e`}},{types:[`variable`],style:{color:`#f8f8f2`}},{types:[`number`],style:{color:`#ae81ff`}},{types:[`builtin`,`char`,`constant`,`function`,`class-name`],style:{color:`#e6db74`}},{types:[`punctuation`],style:{color:`#f8f8f2`}},{types:[`selector`,`doctype`],style:{color:`#a6e22e`,fontStyle:`italic`}},{types:[`tag`,`operator`,`keyword`],style:{color:`#66d9ef`}},{types:[`boolean`],style:{color:`#ae81ff`}},{types:[`namespace`],style:{color:`rgb(178, 204, 214)`,opacity:.7}},{types:[`tag`,`property`],style:{color:`#f92672`}},{types:[`attr-name`],style:{color:`#a6e22e !important`}},{types:[`doctype`],style:{color:`#8292a2`}},{types:[`rule`],style:{color:`#e6db74`}}]},_n={plain:{color:`#bfc7d5`,backgroundColor:`#292d3e`},styles:[{types:[`comment`],style:{color:`rgb(105, 112, 152)`,fontStyle:`italic`}},{types:[`string`,`inserted`],style:{color:`rgb(195, 232, 141)`}},{types:[`number`],style:{color:`rgb(247, 140, 108)`}},{types:[`builtin`,`char`,`constant`,`function`],style:{color:`rgb(130, 170, 255)`}},{types:[`punctuation`,`selector`],style:{color:`rgb(199, 146, 234)`}},{types:[`variable`],style:{color:`rgb(191, 199, 213)`}},{types:[`class-name`,`attr-name`],style:{color:`rgb(255, 203, 107)`}},{types:[`tag`,`deleted`],style:{color:`rgb(255, 85, 114)`}},{types:[`operator`],style:{color:`rgb(137, 221, 255)`}},{types:[`boolean`],style:{color:`rgb(255, 88, 116)`}},{types:[`keyword`],style:{fontStyle:`italic`}},{types:[`doctype`],style:{color:`rgb(199, 146, 234)`,fontStyle:`italic`}},{types:[`namespace`],style:{color:`rgb(178, 204, 214)`}},{types:[`url`],style:{color:`rgb(221, 221, 221)`}}]},vn={plain:{color:`#9EFEFF`,backgroundColor:`#2D2A55`},styles:[{types:[`changed`],style:{color:`rgb(255, 238, 128)`}},{types:[`deleted`],style:{color:`rgba(239, 83, 80, 0.56)`}},{types:[`inserted`],style:{color:`rgb(173, 219, 103)`}},{types:[`comment`],style:{color:`rgb(179, 98, 255)`,fontStyle:`italic`}},{types:[`punctuation`],style:{color:`rgb(255, 255, 255)`}},{types:[`constant`],style:{color:`rgb(255, 98, 140)`}},{types:[`string`,`url`],style:{color:`rgb(165, 255, 144)`}},{types:[`variable`],style:{color:`rgb(255, 238, 128)`}},{types:[`number`,`boolean`],style:{color:`rgb(255, 98, 140)`}},{types:[`attr-name`],style:{color:`rgb(255, 180, 84)`}},{types:[`keyword`,`operator`,`property`,`namespace`,`tag`,`selector`,`doctype`],style:{color:`rgb(255, 157, 0)`}},{types:[`builtin`,`char`,`constant`,`function`,`class-name`],style:{color:`rgb(250, 208, 0)`}}]},yn={plain:{backgroundColor:`linear-gradient(to bottom, #2a2139 75%, #34294f)`,backgroundImage:`#34294f`,color:`#f92aad`,textShadow:`0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3`},styles:[{types:[`comment`,`block-comment`,`prolog`,`doctype`,`cdata`],style:{color:`#495495`,fontStyle:`italic`}},{types:[`punctuation`],style:{color:`#ccc`}},{types:[`tag`,`attr-name`,`namespace`,`number`,`unit`,`hexcode`,`deleted`],style:{color:`#e2777a`}},{types:[`property`,`selector`],style:{color:`#72f1b8`,textShadow:`0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475`}},{types:[`function-name`],style:{color:`#6196cc`}},{types:[`boolean`,`selector-id`,`function`],style:{color:`#fdfdfd`,textShadow:`0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975`}},{types:[`class-name`,`maybe-class-name`,`builtin`],style:{color:`#fff5f6`,textShadow:`0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75`}},{types:[`constant`,`symbol`],style:{color:`#f92aad`,textShadow:`0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3`}},{types:[`important`,`atrule`,`keyword`,`selector-class`],style:{color:`#f4eee4`,textShadow:`0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575`}},{types:[`string`,`char`,`attr-value`,`regex`,`variable`],style:{color:`#f87c32`}},{types:[`parameter`],style:{fontStyle:`italic`}},{types:[`entity`,`url`],style:{color:`#67cdcc`}},{types:[`operator`],style:{color:`ffffffee`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`entity`],style:{cursor:`help`}},{types:[`inserted`],style:{color:`green`}}]},bn={plain:{color:`#282a2e`,backgroundColor:`#ffffff`},styles:[{types:[`comment`],style:{color:`rgb(197, 200, 198)`}},{types:[`string`,`number`,`builtin`,`variable`],style:{color:`rgb(150, 152, 150)`}},{types:[`class-name`,`function`,`tag`,`attr-name`],style:{color:`rgb(40, 42, 46)`}}]},xn={plain:{color:`#9CDCFE`,backgroundColor:`#1E1E1E`},styles:[{types:[`prolog`],style:{color:`rgb(0, 0, 128)`}},{types:[`comment`],style:{color:`rgb(106, 153, 85)`}},{types:[`builtin`,`changed`,`keyword`,`interpolation-punctuation`],style:{color:`rgb(86, 156, 214)`}},{types:[`number`,`inserted`],style:{color:`rgb(181, 206, 168)`}},{types:[`constant`],style:{color:`rgb(100, 102, 149)`}},{types:[`attr-name`,`variable`],style:{color:`rgb(156, 220, 254)`}},{types:[`deleted`,`string`,`attr-value`,`template-punctuation`],style:{color:`rgb(206, 145, 120)`}},{types:[`selector`],style:{color:`rgb(215, 186, 125)`}},{types:[`tag`],style:{color:`rgb(78, 201, 176)`}},{types:[`tag`],languages:[`markup`],style:{color:`rgb(86, 156, 214)`}},{types:[`punctuation`,`operator`],style:{color:`rgb(212, 212, 212)`}},{types:[`punctuation`],languages:[`markup`],style:{color:`#808080`}},{types:[`function`],style:{color:`rgb(220, 220, 170)`}},{types:[`class-name`],style:{color:`rgb(78, 201, 176)`}},{types:[`char`],style:{color:`rgb(209, 105, 105)`}}]},Sn={plain:{color:`#000000`,backgroundColor:`#ffffff`},styles:[{types:[`comment`],style:{color:`rgb(0, 128, 0)`}},{types:[`builtin`],style:{color:`rgb(0, 112, 193)`}},{types:[`number`,`variable`,`inserted`],style:{color:`rgb(9, 134, 88)`}},{types:[`operator`],style:{color:`rgb(0, 0, 0)`}},{types:[`constant`,`char`],style:{color:`rgb(129, 31, 63)`}},{types:[`tag`],style:{color:`rgb(128, 0, 0)`}},{types:[`attr-name`],style:{color:`rgb(255, 0, 0)`}},{types:[`deleted`,`string`],style:{color:`rgb(163, 21, 21)`}},{types:[`changed`,`punctuation`],style:{color:`rgb(4, 81, 165)`}},{types:[`function`,`keyword`],style:{color:`rgb(0, 0, 255)`}},{types:[`class-name`],style:{color:`rgb(38, 127, 153)`}}]},Cn={plain:{color:`#f8fafc`,backgroundColor:`#011627`},styles:[{types:[`prolog`],style:{color:`#000080`}},{types:[`comment`],style:{color:`#6A9955`}},{types:[`builtin`,`changed`,`keyword`,`interpolation-punctuation`],style:{color:`#569CD6`}},{types:[`number`,`inserted`],style:{color:`#B5CEA8`}},{types:[`constant`],style:{color:`#f8fafc`}},{types:[`attr-name`,`variable`],style:{color:`#9CDCFE`}},{types:[`deleted`,`string`,`attr-value`,`template-punctuation`],style:{color:`#cbd5e1`}},{types:[`selector`],style:{color:`#D7BA7D`}},{types:[`tag`],style:{color:`#0ea5e9`}},{types:[`tag`],languages:[`markup`],style:{color:`#0ea5e9`}},{types:[`punctuation`,`operator`],style:{color:`#D4D4D4`}},{types:[`punctuation`],languages:[`markup`],style:{color:`#808080`}},{types:[`function`],style:{color:`#7dd3fc`}},{types:[`class-name`],style:{color:`#0ea5e9`}},{types:[`char`],style:{color:`#D16969`}}]},wn={plain:{color:`#0f172a`,backgroundColor:`#f1f5f9`},styles:[{types:[`prolog`],style:{color:`#000080`}},{types:[`comment`],style:{color:`#6A9955`}},{types:[`builtin`,`changed`,`keyword`,`interpolation-punctuation`],style:{color:`#0c4a6e`}},{types:[`number`,`inserted`],style:{color:`#B5CEA8`}},{types:[`constant`],style:{color:`#0f172a`}},{types:[`attr-name`,`variable`],style:{color:`#0c4a6e`}},{types:[`deleted`,`string`,`attr-value`,`template-punctuation`],style:{color:`#64748b`}},{types:[`selector`],style:{color:`#D7BA7D`}},{types:[`tag`],style:{color:`#0ea5e9`}},{types:[`tag`],languages:[`markup`],style:{color:`#0ea5e9`}},{types:[`punctuation`,`operator`],style:{color:`#475569`}},{types:[`punctuation`],languages:[`markup`],style:{color:`#808080`}},{types:[`function`],style:{color:`#0e7490`}},{types:[`class-name`],style:{color:`#0ea5e9`}},{types:[`char`],style:{color:`#D16969`}}]},Tn={plain:{backgroundColor:`hsl(220, 13%, 18%)`,color:`hsl(220, 14%, 71%)`,textShadow:`0 1px rgba(0, 0, 0, 0.3)`},styles:[{types:[`comment`,`prolog`,`cdata`],style:{color:`hsl(220, 10%, 40%)`}},{types:[`doctype`,`punctuation`,`entity`],style:{color:`hsl(220, 14%, 71%)`}},{types:[`attr-name`,`class-name`,`maybe-class-name`,`boolean`,`constant`,`number`,`atrule`],style:{color:`hsl(29, 54%, 61%)`}},{types:[`keyword`],style:{color:`hsl(286, 60%, 67%)`}},{types:[`property`,`tag`,`symbol`,`deleted`,`important`],style:{color:`hsl(355, 65%, 65%)`}},{types:[`selector`,`string`,`char`,`builtin`,`inserted`,`regex`,`attr-value`],style:{color:`hsl(95, 38%, 62%)`}},{types:[`variable`,`operator`,`function`],style:{color:`hsl(207, 82%, 66%)`}},{types:[`url`],style:{color:`hsl(187, 47%, 55%)`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`hsl(220, 14%, 71%)`}}]},En={plain:{backgroundColor:`hsl(230, 1%, 98%)`,color:`hsl(230, 8%, 24%)`},styles:[{types:[`comment`,`prolog`,`cdata`],style:{color:`hsl(230, 4%, 64%)`}},{types:[`doctype`,`punctuation`,`entity`],style:{color:`hsl(230, 8%, 24%)`}},{types:[`attr-name`,`class-name`,`boolean`,`constant`,`number`,`atrule`],style:{color:`hsl(35, 99%, 36%)`}},{types:[`keyword`],style:{color:`hsl(301, 63%, 40%)`}},{types:[`property`,`tag`,`symbol`,`deleted`,`important`],style:{color:`hsl(5, 74%, 59%)`}},{types:[`selector`,`string`,`char`,`builtin`,`inserted`,`regex`,`attr-value`,`punctuation`],style:{color:`hsl(119, 34%, 47%)`}},{types:[`variable`,`operator`,`function`],style:{color:`hsl(221, 87%, 60%)`}},{types:[`url`],style:{color:`hsl(198, 99%, 37%)`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`hsl(230, 8%, 24%)`}}]},Dn={plain:{color:`#ebdbb2`,backgroundColor:`#292828`},styles:[{types:[`imports`,`class-name`,`maybe-class-name`,`constant`,`doctype`,`builtin`,`function`],style:{color:`#d8a657`}},{types:[`property-access`],style:{color:`#7daea3`}},{types:[`tag`],style:{color:`#e78a4e`}},{types:[`attr-name`,`char`,`url`,`regex`],style:{color:`#a9b665`}},{types:[`attr-value`,`string`],style:{color:`#89b482`}},{types:[`comment`,`prolog`,`cdata`,`operator`,`inserted`],style:{color:`#a89984`}},{types:[`delimiter`,`boolean`,`keyword`,`selector`,`important`,`atrule`,`property`,`variable`,`deleted`],style:{color:`#ea6962`}},{types:[`entity`,`number`,`symbol`],style:{color:`#d3869b`}}]},On={plain:{color:`#654735`,backgroundColor:`#f9f5d7`},styles:[{types:[`delimiter`,`boolean`,`keyword`,`selector`,`important`,`atrule`,`property`,`variable`,`deleted`],style:{color:`#af2528`}},{types:[`imports`,`class-name`,`maybe-class-name`,`constant`,`doctype`,`builtin`],style:{color:`#b4730e`}},{types:[`string`,`attr-value`],style:{color:`#477a5b`}},{types:[`property-access`],style:{color:`#266b79`}},{types:[`function`,`attr-name`,`char`,`url`],style:{color:`#72761e`}},{types:[`tag`],style:{color:`#b94c07`}},{types:[`comment`,`prolog`,`cdata`,`operator`,`inserted`],style:{color:`#a89984`}},{types:[`entity`,`number`,`symbol`],style:{color:`#924f79`}}]},kn=e=>(0,L.useCallback)(t=>{var n=t,{className:r,style:i,line:a}=n;let o=tn(en({},nn(n,[`className`,`style`,`line`])),{className:Ht(`token-line`,r)});return typeof e==`object`&&`plain`in e&&(o.style=e.plain),typeof i==`object`&&(o.style=en(en({},o.style||{}),i)),o},[e]),An=e=>{let t=(0,L.useCallback)(({types:t,empty:n})=>{if(e!=null)return t.length===1&&t[0]===`plain`?n==null?void 0:{display:`inline-block`}:t.length===1&&n!=null?e[t[0]]:Object.assign(n==null?{}:{display:`inline-block`},...t.map(t=>e[t]))},[e]);return(0,L.useCallback)(e=>{var n=e,{token:r,className:i,style:a}=n;let o=tn(en({},nn(n,[`token`,`className`,`style`])),{className:Ht(`token`,...r.types,i),children:r.content,style:t(r)});return a!=null&&(o.style=en(en({},o.style||{}),a)),o},[t])},jn=/\r\n|\r|\n/,Mn=e=>{e.length===0?e.push({types:[`plain`],content:`
13
+ `,empty:!0}):e.length===1&&e[0].content===``&&(e[0].content=`
14
+ `,e[0].empty=!0)},Nn=(e,t)=>{let n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},Pn=e=>{let t=[[]],n=[e],r=[0],i=[e.length],a=0,o=0,s=[],c=[s];for(;o>-1;){for(;(a=r[o]++)<i[o];){let e,l=t[o],u=n[o][a];if(typeof u==`string`?(l=o>0?l:[`plain`],e=u):(l=Nn(l,u.type),u.alias&&(l=Nn(l,u.alias)),e=u.content),typeof e!=`string`){o++,t.push(l),n.push(e),r.push(0),i.push(e.length);continue}let d=e.split(jn),f=d.length;s.push({types:l,content:d[0]});for(let e=1;e<f;e++)Mn(s),c.push(s=[]),s.push({types:l,content:d[e]})}o--,t.pop(),n.pop(),r.pop(),i.pop()}return Mn(s),c},Fn=({prism:e,code:t,grammar:n,language:r})=>(0,L.useMemo)(()=>{if(n==null)return Pn([t]);let i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run(`before-tokenize`,i),i.tokens=e.tokenize(t,n),e.hooks.run(`after-tokenize`,i),Pn(i.tokens)},[t,n,r,e]),In=(e,t)=>{let{plain:n}=e,r=e.styles.reduce((e,n)=>{let{languages:r,style:i}=n;return r&&!r.includes(t)||n.types.forEach(t=>{e[t]=en(en({},e[t]),i)}),e},{});return r.root=n,r.plain=tn(en({},n),{backgroundColor:void 0}),r},Ln=({children:e,language:t,code:n,theme:r,prism:i})=>{let a=t.toLowerCase(),o=In(r,a),s=kn(o),c=An(o),l=i.languages[a];return e({tokens:Fn({prism:i,language:a,code:n,grammar:l}),className:`prism-code language-${a}`,style:o==null?{}:o.root,getLineProps:s,getTokenProps:c})},Rn=e=>(0,L.createElement)(Ln,tn(en({},e),{prism:e.prism||U,theme:e.theme||xn,code:e.code,language:e.language})),zn=`modulepreload`,Bn=function(e){return`/`+e},Vn={},Hn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Bn(t,n),t in Vn)return;Vn[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:zn,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Un={};function Wn(e){if(!Un[e]){let t={bash:()=>Hn(()=>import(`./prism-bash-6uMTC0Q2.js`),[]),sh:()=>Hn(()=>import(`./prism-bash-6uMTC0Q2.js`),[]),shell:()=>Hn(()=>import(`./prism-bash-6uMTC0Q2.js`),[]),php:async()=>(await Hn(()=>import(`./prism-markup-templating-DS0ksKLt.js`),[]),Hn(()=>import(`./prism-php-DVtOAJsW.js`),[])),sql:()=>Hn(()=>import(`./prism-sql-D5pwK0Dp.js`),[]),ruby:()=>Hn(()=>import(`./prism-ruby-Saes64I6.js`),[]),java:()=>Hn(()=>import(`./prism-java-DBXf7fH0.js`),[]),scala:async()=>(await Wn(`java`),Hn(()=>import(`./prism-scala-ANOINMog.js`),[])),solidity:()=>Hn(()=>import(`./prism-solidity-C5Mx5y66.js`),[]),vim:()=>Hn(()=>import(`./prism-vim-BSZSu-gX.js`),[]),dart:()=>Hn(()=>import(`./prism-dart-iZy_wlz-.js`),[]),csharp:()=>Hn(()=>import(`./prism-csharp-Dkc2OSmh.js`),[]),protobuf:()=>Hn(()=>import(`./prism-protobuf-BUsrNVvv.js`),[]),hcl:()=>Hn(()=>import(`./prism-hcl-Bx2FGBKG.js`),[]),perl:()=>Hn(()=>import(`./prism-perl-BlhPiMfT.js`),[]),elixir:()=>Hn(()=>import(`./prism-elixir-BIzI9WJK.js`),[])}[e];if(!t)return console.warn(`No loader available for language: ${e}`),Promise.reject(Error(`Unsupported language: ${e}`));Un[e]=t().then(()=>void 0).catch(t=>{throw delete Un[e],console.warn(`Failed to load language: ${e}`,t),t})}return Un[e]}typeof global<`u`?global.Prism=U:typeof window<`u`&&(window.Prism=U);var Gn=U,Kn=`markup.html.xml.svg.javascript.js.typescript.ts.jsx.tsx.css.c.cpp.swift.kotlin.objectivec.reason.rust.go.graphql.yaml.yml.json.markdown.md.python.py`.split(`.`);function qn(e,t){let[n,r]=(0,L.useState)(()=>Kn.includes(t)||!!Gn.languages[t]);return(0,L.useEffect)(()=>{if(!n){if(Kn.includes(t)){r(!0);return}Wn(t).then(()=>{r(!0)}).catch(()=>{r(!1)})}},[t,n]),{ready:n,actualLang:n?t:`text`}}function Jn(e){return e&&e.split(`.`).pop()?.toLowerCase()||null}function Yn(e){return e&&e.split(`/`).pop()||``}var Xn={js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`javascript`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsx:`typescript`,py:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,cpp:`cpp`,c:`c`,cs:`csharp`,php:`php`,swift:`swift`,kt:`kotlin`,scala:`scala`,r:`r`,sql:`sql`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,yml:`yaml`,yaml:`yaml`,json:`json`,xml:`xml`,html:`html`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,md:`markdown`,markdown:`markdown`,tex:`latex`,vim:`vim`,ex:`elixir`,exs:`elixir`,heex:`elixir`},Zn={ts:`typescript`,tsx:`tsx`,mts:`typescript`,cts:`typescript`,js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,json:`json`,css:`css`,scss:`css`,html:`html`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,yml:`yaml`,yaml:`yaml`,md:`markdown`,py:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,cpp:`cpp`,c:`c`,php:`php`,sql:`sql`,xml:`xml`,swift:`swift`,kt:`kotlin`,scala:`scala`,svelte:`svelte`,r:`r`,lua:`lua`,perl:`perl`,pl:`perl`,pm:`perl`,dockerfile:`docker`,makefile:`makefile`,gitignore:`git`,env:`bash`,conf:`nginx`,ini:`ini`,toml:`toml`,sol:`solidity`,vim:`vim`,dart:`dart`,cs:`csharp`,proto:`protobuf`,tf:`hcl`,tfvars:`hcl`,hcl:`hcl`,ex:`elixir`,exs:`elixir`,heex:`elixir`},Qn={dockerfile:`docker`,makefile:`makefile`,".gitignore":`git`,".env":`bash`,".bashrc":`bash`,".zshrc":`bash`,".bash_profile":`bash`,".profile":`bash`};function $n(e,t){if(e)return t[e.toLowerCase()]}function er(e){return $n(Jn(e),Xn)}function tr(e){return Qn[Yn(e).toLowerCase()]||$n(Jn(e),Zn)||`text`}function nr(e){return{...e,styles:e.styles.map(e=>({...e,style:{...e.style,background:void 0,backgroundColor:void 0}}))}}function rr(e){let t;switch(e){case`github`:t=sn.github;break;case`vsLight`:t=sn.vsLight;break;case`oneLight`:t=sn.oneLight;break;case`gruvboxMaterialLight`:t=sn.gruvboxMaterialLight;break;case`nightOwlLight`:t=sn.nightOwlLight;break;case`vsDark`:t=sn.vsDark;break;case`oneDark`:t=sn.oneDark;break;case`gruvboxMaterialDark`:t=sn.gruvboxMaterialDark;break;case`nightOwl`:t=sn.nightOwl;break;case`dracula`:t=sn.dracula;break;case`okaidia`:t=sn.okaidia;break;default:t=sn.vsDark}return nr(t)}var ir=L.memo(function({code:e,language:t,className:n,syntaxTheme:r=`vsDark`,filename:i=``,renderToken:a,onMouseOver:o,onMouseOut:s}){let{actualLang:c}=qn(e,t||(i?tr(i):`text`));return(0,R.jsx)(Rn,{code:e,language:c,theme:rr(r),prism:Gn,children:(0,L.useCallback)(({style:e,tokens:t,getLineProps:r,getTokenProps:i})=>(0,R.jsx)(`span`,{className:n,style:{...e,background:`transparent`,backgroundColor:`transparent`},onMouseOver:o,onMouseOut:s,children:t.map((e,t)=>(0,R.jsx)(`span`,{...r({line:e}),children:e.map((e,t)=>a?a(e,t,i):(0,R.jsx)(`span`,{...i({token:e})},t))},t))}),[n,o,s,a])})}),ar=L.memo(function(e){let{handleMouseOver:t,handleMouseOut:n,isWordHighlighted:r}=Bt(),i=(0,L.useCallback)((e,t,n)=>{let i=n({token:e}),a=e.content.split(/( +)/);if(a.length===1&&a[0]&&!It(a[0]))return(0,R.jsx)(`span`,{...i},t);let o=a.map((e,n)=>{if(!e)return null;if(It(e)){let i=e.trim();return(0,R.jsx)(`span`,{className:`word-token ${r(i)?`word-highlight`:``}`,"data-word":i,children:e},`${t}-${n}`)}return(0,R.jsx)(`span`,{children:e},`${t}-${n}`)});return(0,R.jsx)(`span`,{...i,children:o},t)},[r]);return(0,R.jsx)(ir,{...e,renderToken:i,onMouseOver:t,onMouseOut:n})}),or=L.memo(function({segments:e,className:t=``}){return(0,R.jsx)(`span`,{className:t,children:(0,L.useMemo)(()=>e.map((e,t)=>(0,R.jsx)(`span`,{className:e.type===`added`?`word-diff-added`:e.type===`removed`?`word-diff-removed`:``,children:e.value},t)),[e])})}),sr=e=>{switch(e){case`add`:return`+`;case`delete`:return`-`;default:return` `}},cr=e=>{switch(e){case`add`:return`text-github-accent bg-diff-addition-bg`;case`delete`:return`text-github-danger bg-diff-deletion-bg`;default:return`text-github-text-muted bg-github-bg-secondary`}};function lr({line:e,syntaxTheme:t,filename:n,diffSegments:r,showPrefixBorder:i=!0}){return(0,R.jsxs)(`div`,{className:`flex items-center relative min-h-[16px]`,children:[(0,R.jsx)(`span`,{className:`w-5 text-center flex-shrink-0 ${i?`border-r border-github-border`:``} ${cr(e.type)}`,children:sr(e.type)}),r?(0,R.jsx)(or,{segments:r,className:`flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text`}):(0,R.jsx)(ar,{code:e.content,className:`flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit`,syntaxTheme:t,filename:n})]})}var ur=e=>e===`add`?`bg-diff-addition-bg`:`bg-diff-deletion-bg`,dr=(e,t)=>({type:e,content:t});function fr({code:e,type:t,filename:n,keyPrefix:r,syntaxTheme:i}){return(0,R.jsx)(R.Fragment,{children:e.split(`
15
+ `).map((e,a)=>(0,R.jsx)(`div`,{className:ur(t),children:(0,R.jsx)(lr,{line:dr(t,e),filename:n,syntaxTheme:i,showPrefixBorder:!1})},`${r}-${a}`))})}function pr(e){return kt(e)}function mr({body:e,originalCode:t,filename:n,syntaxTheme:r}){return(0,R.jsx)(`div`,{className:`text-github-text-primary text-sm leading-6`,children:(0,L.useMemo)(()=>{let n=At(e);if(n.length===0)return[{type:`text`,content:e}];let r=[],i=0;for(let a of n)a.startIndex>i&&r.push({type:`text`,content:e.slice(i,a.startIndex)}),r.push({type:`suggestion`,code:a.suggestedCode,original:t||``}),i=a.endIndex;return i<e.length&&r.push({type:`text`,content:e.slice(i)}),r},[e,t]).map((e,t)=>e.type===`text`?(0,R.jsx)(`span`,{className:`whitespace-pre-wrap`,children:e.content},t):(0,R.jsx)(`div`,{className:`my-2 border border-github-border rounded-md overflow-hidden`,children:(0,R.jsxs)(`div`,{className:`font-mono text-sm`,children:[e.original&&(0,R.jsx)(fr,{code:e.original,type:`delete`,filename:n,keyPrefix:`orig-${t}`,syntaxTheme:r}),(0,R.jsx)(fr,{code:e.code,type:`add`,filename:n,keyPrefix:`sugg-${t}`,syntaxTheme:r})]})},t))})}var hr=`text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all flex items-center gap-1`;function gr({selectedCode:e,value:t,onChange:n,textareaRef:r,className:i=hr}){return e?(0,R.jsxs)(`button`,{type:`button`,onClick:()=>{let i=jt(e),a=r?.current;if(!a){n(`${t}${t?`
16
+
17
+ `:``}${i}\n\n`);return}let o=a.selectionStart,s=a.selectionEnd,c=t.slice(0,o),l=t.slice(s),u=`${c?`
18
+
19
+ `:``}${i}\n\n`;n(c+u+l);let d=c.length+u.length;requestAnimationFrame(()=>{a.focus(),a.setSelectionRange(d,d)})},className:i,title:`Add code suggestion`,children:[(0,R.jsx)(We,{size:12}),`Add suggestion`]}):null}function _r({onSubmit:e,onCancel:t,selectedCode:n,syntaxTheme:r,filename:i,initialValue:a=``,embedded:o=!1,title:s=`Add a comment`,submitLabel:c=`Submit`,placeholder:l=`Leave a comment...`}){let[u,d]=(0,L.useState)(a),[f,p]=(0,L.useState)(!1),[m,h]=(0,L.useState)(`edit`),g=(0,L.useRef)(null),_=pr(u),v=_?m:`edit`,y=async t=>{if(t.preventDefault(),u.trim()){p(!0);try{await e(u.trim()),d(``),h(`edit`)}catch(e){console.error(`Failed to submit comment:`,e)}finally{p(!1)}}},b=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)?y(e):e.key===`Escape`&&t()};return(0,R.jsxs)(`form`,{className:o?`bg-transparent`:`m-2 mx-3 rounded-md border border-yellow-600/50 border-l-4 border-l-yellow-400 bg-github-bg-tertiary p-3`,onSubmit:y,onClick:e=>e.stopPropagation(),"data-empty":!u.trim(),children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,R.jsx)(`span`,{className:`text-sm font-medium`,style:{color:`var(--color-yellow-path-text)`},children:s}),_?(0,R.jsxs)(`div`,{className:`flex items-center border border-github-border rounded-md overflow-hidden`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:()=>h(`edit`),className:`text-xs px-2.5 py-1.5 ${v===`edit`?`bg-github-bg-tertiary text-github-text-primary`:`bg-github-bg-secondary text-github-text-secondary`} transition-colors`,children:`Edit`}),(0,R.jsx)(`button`,{type:`button`,onClick:()=>h(`preview`),className:`text-xs px-2.5 py-1.5 border-l border-github-border ${v===`preview`?`bg-github-bg-tertiary text-github-text-primary`:`bg-github-bg-secondary text-github-text-secondary`} transition-colors`,children:`Preview`})]}):(0,R.jsx)(gr,{selectedCode:n,value:u,onChange:d,textareaRef:g})]}),_&&v===`preview`?(0,R.jsx)(`div`,{className:`min-h-[60px] mb-2 bg-github-bg-secondary border border-github-border rounded px-3 py-2`,children:(0,R.jsx)(mr,{body:u,originalCode:n,filename:i,syntaxTheme:r})}):(0,R.jsx)(`textarea`,{ref:g,className:`w-full min-h-[60px] mb-2 resize-y bg-github-bg-secondary border border-github-border rounded px-3 py-2 text-github-text-primary text-sm leading-6 focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/30 focus:min-h-[80px] disabled:opacity-50`,value:u,onChange:e=>d(e.target.value),onKeyDown:b,placeholder:l,rows:Math.max(3,u.split(`
20
+ `).length),autoFocus:!0,disabled:f}),(0,R.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:t,className:`text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all disabled:opacity-50`,disabled:f,children:`Cancel`}),(0,R.jsx)(`button`,{type:`submit`,className:`text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,border:`1px solid var(--color-yellow-btn-border)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},disabled:!u.trim()||f,children:f?`Submitting...`:c})]})]})}function vr({message:e,isRootMessage:t=!1,showAuthorBadge:n,syntaxTheme:r,filename:i,originalCode:a,onUpdate:o,onResolveOrDelete:s,actionLabel:c,confirmMessage:l,onClick:u}){let[d,f]=(0,L.useState)(!1),p=n&&!!e.author,m=e.author?.trim()===`User`;return(0,R.jsx)(`div`,{className:d?``:`flex min-w-0 items-start gap-3`,onClick:u,children:d?(0,R.jsx)(_r,{onSubmit:t=>(t!==e.body&&o(t),f(!1),Promise.resolve()),onCancel:()=>{f(!1)},selectedCode:a,syntaxTheme:r,filename:i,initialValue:e.body,embedded:!0,title:`Edit comment`,submitLabel:`Save`,placeholder:`Edit your message...`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[p&&(0,R.jsx)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 pr-2 text-xs text-github-text-secondary`,children:(0,R.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-github-border bg-github-bg-primary px-2 py-0.5 text-[11px] font-medium text-github-text-primary`,children:e.author})}),(0,R.jsx)(mr,{body:e.body,originalCode:a,filename:i,syntaxTheme:r})]}),(t||m)&&(0,R.jsxs)(`div`,{className:`flex shrink-0 items-start gap-2 pt-0.5`,children:[m&&(0,R.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),f(!0)},className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 text-github-text-primary transition-all hover:bg-github-bg-primary`,title:`Edit message`,children:(0,R.jsx)(ut,{size:12})}),(0,R.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),!(l&&!confirm(l))&&s()},className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 transition-all hover:bg-github-bg-primary ${t?`text-green-700 hover:text-green-800`:`text-github-danger`}`,title:c,"aria-label":c,children:t?(0,R.jsx)(Re,{size:12}):(0,R.jsx)(gt,{size:12})})]})]})})}function yr({thread:e,showAuthorBadges:t=!1,confirmRootAction:n=!0,onGeneratePrompt:r,onRemoveThread:i,onReplyToThread:a,onRemoveMessage:o,onUpdateMessage:s,onClick:c,syntaxTheme:l}){let[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(!1),m=Array.isArray(e.line)?`${e.line[0]}-${e.line[1]}`:e.line,h=async t=>{t.stopPropagation();try{await Ot(r(e)),d(!0),setTimeout(()=>d(!1),2e3)}catch(e){console.error(`Failed to copy thread prompt:`,e)}},g=e.messages[0];return g?(0,R.jsxs)(`div`,{id:`comment-thread-${e.id}`,className:`rounded-md border border-yellow-600/50 border-l-4 border-l-yellow-400 bg-github-bg-tertiary p-3 shadow-sm transition-all ${c?`cursor-pointer hover:shadow-md`:``}`,onClick:c,children:[(0,R.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,R.jsx)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs text-github-text-secondary`,children:(0,R.jsxs)(`span`,{className:`font-mono px-1 py-0.5 rounded overflow-hidden text-ellipsis whitespace-nowrap`,style:{backgroundColor:`var(--color-yellow-path-bg)`,color:`var(--color-yellow-path-text)`},children:[e.file,`:`,m]})}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:h,className:`whitespace-nowrap rounded px-2 py-1 text-xs transition-all`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,border:`1px solid var(--color-yellow-btn-border)`},title:`Copy thread prompt for AI coding agent`,children:(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,R.jsx)(Ke,{size:12}),u?`Copied!`:`Copy Prompt`]})}),(0,R.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),p(e=>!e)},"aria-label":`Reply`,className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 text-github-text-primary transition-all hover:bg-github-bg-primary`,title:`Reply to thread`,children:(0,R.jsx)(ot,{size:14})})]})]}),(0,R.jsxs)(`div`,{className:`space-y-3`,children:[(0,R.jsx)(vr,{message:g,isRootMessage:!0,showAuthorBadge:t,syntaxTheme:l,filename:e.file,originalCode:e.codeContent,onUpdate:t=>s(e.id,g.id,t),onResolveOrDelete:()=>i(e.id),actionLabel:`Resolve thread`,confirmMessage:n?`Resolve this thread?\n\n"${g.body}"`:void 0}),e.messages.slice(1).map(n=>(0,R.jsx)(`div`,{className:`ml-4 border-l border-github-border pl-3`,children:(0,R.jsx)(vr,{message:n,showAuthorBadge:t,syntaxTheme:l,filename:e.file,originalCode:e.codeContent,onUpdate:t=>s(e.id,n.id,t),onResolveOrDelete:()=>o(e.id,n.id),actionLabel:`Delete reply`,confirmMessage:`Delete this reply?\n\n"${n.body}"`})},n.id)),f&&(0,R.jsx)(`div`,{className:`ml-4 border-l border-github-border pl-3`,onClick:e=>e.stopPropagation(),children:(0,R.jsx)(_r,{onSubmit:async t=>{await a(e.id,t),p(!1)},onCancel:()=>p(!1),selectedCode:e.codeContent,syntaxTheme:l,filename:e.file,embedded:!0,title:`Reply to thread`,submitLabel:`Reply`,placeholder:`Write a reply...`})})]})]}):null}function br({isOpen:e,onClose:t,onNavigate:n,comments:r,showAuthorBadges:i=!1,onRemoveThread:a,onGenerateThreadPrompt:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u}){let[d,f]=(0,L.useState)(0),p=(0,L.useRef)([]),{enableScope:m,disableScope:h}=we(),g=[...r].sort((e,t)=>{let n=e.file.localeCompare(t.file);if(n!==0)return n;let r=Array.isArray(e.line)?e.line[0]:e.line,i=Array.isArray(t.line)?t.line[0]:t.line;return r===i?e.createdAt.localeCompare(t.createdAt):r-i}),_=(0,L.useCallback)(e=>{n(e),t()},[t,n]),v=(0,L.useCallback)(e=>{let t=e.messages[0]?.body||``;confirm(`Resolve this thread?\n\n"${t}"`)&&(a(e.id),d>=g.length-1&&d>0&&f(d-1))},[a,d,g.length]);(0,L.useEffect)(()=>(e?(m(`comments-list`),h(`navigation`)):(m(`navigation`),h(`comments-list`),f(0)),()=>{m(`navigation`),h(`comments-list`)}),[h,m,e]);let y={scopes:`comments-list`,enableOnFormTags:!1};return V(`escape`,()=>t(),y,[t]),V(`j, down`,()=>f(e=>Math.min(e+1,g.length-1)),y,[g.length]),V(`k, up`,()=>f(e=>Math.max(e-1,0)),y,[]),V(`enter`,()=>{g[d]&&_(g[d])},y,[_,d,g]),V(`d`,()=>{g[d]&&v(g[d])},y,[v,d,g]),(0,L.useEffect)(()=>{p.current[d]&&p.current[d]?.scrollIntoView({behavior:`smooth`,block:`nearest`})},[d]),e?(0,R.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,R.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,R.jsxs)(`div`,{className:`relative max-h-[80vh] w-full max-w-4xl overflow-hidden rounded-lg border border-github-border bg-github-bg-primary shadow-lg`,children:[(0,R.jsxs)(`div`,{className:`sticky top-0 border-b border-github-border bg-github-bg-primary px-6 py-4`,children:[(0,R.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold text-github-text-primary`,children:`All Comments`}),(0,R.jsx)(`button`,{onClick:t,className:`text-github-text-secondary transition-colors hover:text-github-text-primary`,"aria-label":`Close comments list`,children:(0,R.jsx)(vt,{size:20})})]}),(0,R.jsxs)(`div`,{className:`text-xs text-github-text-secondary`,children:[(0,R.jsx)(`span`,{className:`font-mono`,children:`j/k`}),` or `,(0,R.jsx)(`span`,{className:`font-mono`,children:`↑/↓`}),` to navigate • `,(0,R.jsx)(`span`,{className:`font-mono`,children:`Enter`}),` to jump •`,` `,(0,R.jsx)(`span`,{className:`font-mono`,children:`d`}),` to resolve • `,(0,R.jsx)(`span`,{className:`font-mono`,children:`Esc`}),` `,`to close`]})]}),(0,R.jsx)(`div`,{className:`max-h-[calc(80vh-120px)] overflow-y-auto`,children:(0,R.jsx)(`div`,{className:`p-6`,children:g.length===0?(0,R.jsx)(`p`,{className:`text-center text-github-text-secondary`,children:`No comments yet`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`space-y-2`,children:g.map((e,t)=>(0,R.jsx)(`div`,{ref:e=>{p.current[t]=e},className:d===t?`rounded ring-2 ring-blue-500`:``,children:(0,R.jsx)(yr,{thread:e,showAuthorBadges:i,confirmRootAction:!1,onGeneratePrompt:o,onRemoveThread:t=>{t===e.id&&v(e)},onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u,onClick:n=>{n.stopPropagation(),f(t),_(e)}})},e.id))}),(0,R.jsxs)(`div`,{className:`mt-4 border-t border-github-border pt-4 text-center text-xs text-github-text-secondary`,children:[d+1,` of `,g.length,` threads`]})]})})})]})]}):null}function xr(){return typeof window<`u`}function Sr(e){return Tr(e)?(e.nodeName||``).toLowerCase():`#document`}function Cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wr(e){return((Tr(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Tr(e){return xr()?e instanceof Node||e instanceof Cr(e).Node:!1}function Er(e){return xr()?e instanceof Element||e instanceof Cr(e).Element:!1}function Dr(e){return xr()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function Or(e){return!xr()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}function kr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ar(e){return/^(table|td|th)$/.test(Sr(e))}function jr(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Mr=/transform|translate|scale|rotate|perspective|filter/,Nr=/paint|layout|strict|content/,Pr=e=>!!e&&e!==`none`,Fr;function Ir(e){let t=Er(e)?Br(e):e;return Pr(t.transform)||Pr(t.translate)||Pr(t.scale)||Pr(t.rotate)||Pr(t.perspective)||!Rr()&&(Pr(t.backdropFilter)||Pr(t.filter))||Mr.test(t.willChange||``)||Nr.test(t.contain||``)}function Lr(e){let t=Hr(e);for(;Dr(t)&&!zr(t);){if(Ir(t))return t;if(jr(t))return null;t=Hr(t)}return null}function Rr(){return Fr??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Fr}function zr(e){return/^(html|body|#document)$/.test(Sr(e))}function Br(e){return Cr(e).getComputedStyle(e)}function Vr(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hr(e){if(Sr(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Or(e)&&e.host||wr(e);return Or(t)?t.host:t}function Ur(e){let t=Hr(e);return zr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dr(t)&&kr(t)?t:Ur(t)}function Wr(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ur(e),i=r===e.ownerDocument?.body,a=Cr(r);if(i){let e=Gr(a);return t.concat(a,a.visualViewport||[],kr(r)?r:[],e&&n?Wr(e):[])}else return t.concat(r,Wr(r,[],n))}function Gr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Kr=Math.min,qr=Math.max,Jr=Math.round,Yr=Math.floor,Xr=e=>({x:e,y:e}),Zr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Qr(e,t,n){return qr(e,Kr(t,n))}function $r(e,t){return typeof e==`function`?e(t):e}function ei(e){return e.split(`-`)[0]}function ti(e){return e.split(`-`)[1]}function ni(e){return e===`x`?`y`:`x`}function ri(e){return e===`y`?`height`:`width`}function ii(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ai(e){return ni(ii(e))}function oi(e,t,n){n===void 0&&(n=!1);let r=ti(e),i=ai(e),a=ri(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=hi(o)),[o,hi(o)]}function si(e){let t=hi(e);return[ci(e),t,ci(t)]}function ci(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var li=[`left`,`right`],ui=[`right`,`left`],di=[`top`,`bottom`],fi=[`bottom`,`top`];function pi(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ui:li:t?li:ui;case`left`:case`right`:return t?di:fi;default:return[]}}function mi(e,t,n,r){let i=ti(e),a=pi(ei(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ci)))),a}function hi(e){let t=ei(e);return Zr[t]+e.slice(t.length)}function gi(e){return{top:0,right:0,bottom:0,left:0,...e}}function _i(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:gi(e)}function vi(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}}var yi=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),bi=typeof Element>`u`,xi=bi?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Si=!bi&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},Ci=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):Ci(e.parentNode))},wi=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},Ti=function(e,t,n){if(Ci(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(yi));return t&&xi.call(e,yi)&&r.unshift(e),r=r.filter(n),r},Ei=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Ci(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=Ei(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{xi.call(a,yi)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Ci(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=Ei(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},Di=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Oi=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||wi(e))&&!Di(e)?0:e.tabIndex},ki=function(e,t){var n=Oi(e);return n<0&&t&&!Di(e)?0:n},W=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ai=function(e){return e.tagName===`INPUT`},ji=function(e){return Ai(e)&&e.type===`hidden`},Mi=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Ni=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Pi=function(e){if(!e.name)return!0;var t=e.form||Si(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Ni(r,e.form);return!i||i===e},Fi=function(e){return Ai(e)&&e.type===`radio`},Ii=function(e){return Fi(e)&&!Pi(e)},Li=function(e){var t=e&&Si(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=Si(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},Ri=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},zi=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=xi.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(xi.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=Si(e);if(o&&!o.shadowRoot&&r(o)===!0)return Ri(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(Li(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return Ri(e);return!1},Bi=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return xi.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Vi=function(e,t){return!(t.disabled||ji(t)||zi(t,e)||Mi(t)||Bi(t))},Hi=function(e,t){return!(Ii(t)||Oi(t)<0||!Vi(e,t))},Ui=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},Wi=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=ki(a,i),s=i?Wi(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(W).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Gi=function(e,t){return t||={},Wi(t.getShadowRoot?Ei([e],t.includeContainer,{filter:Hi.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ui}):Ti(e,t.includeContainer,Hi.bind(null,t)))},Ki=function(e,t){return t||={},t.getShadowRoot?Ei([e],t.includeContainer,{filter:Vi.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Ti(e,t.includeContainer,Vi.bind(null,t))},qi=function(e,t){if(t||={},!e)throw Error(`No node provided`);return xi.call(e,yi)===!1?!1:Hi(t,e)};function Ji(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Yi(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function Xi(){return/apple/i.test(navigator.vendor)}function Zi(){let e=/android/i;return e.test(Ji())||e.test(Yi())}function Qi(){return Ji().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function $i(){return Yi().includes(`jsdom/`)}var ea=`data-floating-ui-focusable`,ta=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function na(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function ra(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Or(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ia(e){return`composedPath`in e?e.composedPath()[0]:e.target}function aa(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 oa(e){return e.matches(`html,body`)}function sa(e){return e?.ownerDocument||document}function ca(e){return Dr(e)&&e.matches(ta)}function la(e){return e?e.getAttribute(`role`)===`combobox`&&ca(e):!1}function ua(e){if(!e||$i())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function da(e){return e?e.hasAttribute(ea)?e:e.querySelector(`[`+ea+`]`)||e:null}function fa(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...fa(e,t.id,n)])}function pa(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 ma(e){e.preventDefault(),e.stopPropagation()}function ha(e){return`nativeEvent`in e}function ga(e){return e.mozInputSource===0&&e.isTrusted?!0:Zi()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function _a(e){return $i()?!1:!Zi()&&e.width===0&&e.height===0||Zi()&&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 va(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var ya=typeof document<`u`?L.useLayoutEffect:function(){},ba={...L};function xa(e){let t=L.useRef(e);return ya(()=>{t.current=e}),t}var Sa=ba.useInsertionEffect||(e=>e());function Ca(e){let t=L.useRef(()=>{});return Sa(()=>{t.current=e}),L.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var wa=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function Ta(e,t){let n=Gi(e,wa()),r=n.length;if(r===0)return;let i=na(sa(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Ea(e){return Ta(sa(e).body,1)||e}function Da(e){return Ta(sa(e).body,-1)||e}function Oa(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!ra(n,r)}function ka(e){Gi(e,wa()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Aa(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var ja=d(N(),1);function Ma(e,t,n){let{reference:r,floating:i}=e,a=ii(t),o=ai(t),s=ri(o),c=ei(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(ti(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 Na(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=$r(t,e),p=_i(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=vi(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=vi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Pa=50,Fa=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Na},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ma(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<Pa&&(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}=Ma(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ia=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}=$r(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ei(r),_=ii(o),v=ei(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[hi(o)]:si(o)),x=p!==`none`;!d&&x&&b.push(...mi(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=oi(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`&&_!==ii(t))||T.every(e=>ii(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=ii(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{}}}},La=new Set([`left`,`top`]);async function Ra(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ei(n),s=ti(n),c=ii(n)===`y`,l=La.has(o)?-1:1,u=a&&c?-1:1,d=$r(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 za=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 Ra(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}}}}},Ba=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}=$r(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ii(ei(i)),p=ni(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=Qr(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=Qr(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}}}}}};function Va(e){let t=Br(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Dr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Jr(n)!==a||Jr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ha(e){return Er(e)?e:e.contextElement}function Ua(e){let t=Ha(e);if(!Dr(t))return Xr(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Va(t),o=(a?Jr(n.width):n.width)/r,s=(a?Jr(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Wa=Xr(0);function Ga(e){let t=Cr(e);return!Rr()||!t.visualViewport?Wa:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ka(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Cr(e)?!1:t}function qa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ha(e),o=Xr(1);t&&(r?Er(r)&&(o=Ua(r)):o=Ua(e));let s=Ka(a,n,r)?Ga(a):Xr(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=Cr(a),t=r&&Er(r)?Cr(r):r,n=e,i=Gr(n);for(;i&&r&&t!==n;){let e=Ua(i),t=i.getBoundingClientRect(),r=Br(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=Cr(i),i=Gr(n)}}return vi({width:u,height:d,x:c,y:l})}function Ja(e,t){let n=Vr(e).scrollLeft;return t?t.left+n:qa(wr(e)).left+n}function Ya(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ja(e,n),y:n.top+t.scrollTop}}function Xa(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=wr(r),s=t?jr(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Xr(1),u=Xr(0),d=Dr(r);if((d||!d&&!a)&&((Sr(r)!==`body`||kr(o))&&(c=Vr(r)),d)){let e=qa(r);l=Ua(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ya(o,c):Xr(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 Za(e){return Array.from(e.getClientRects())}function Qa(e){let t=wr(e),n=Vr(e),r=e.ownerDocument.body,i=qr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=qr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Ja(e),s=-n.scrollTop;return Br(r).direction===`rtl`&&(o+=qr(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var $a=25;function eo(e,t){let n=Cr(e),r=wr(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Rr();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Ja(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<=$a&&(a-=o)}else l<=$a&&(a+=l);return{width:a,height:o,x:s,y:c}}function to(e,t){let n=qa(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Dr(e)?Ua(e):Xr(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function no(e,t,n){let r;if(t===`viewport`)r=eo(e,n);else if(t===`document`)r=Qa(wr(e));else if(Er(t))r=to(t,n);else{let n=Ga(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vi(r)}function ro(e,t){let n=Hr(e);return n===t||!Er(n)||zr(n)?!1:Br(n).position===`fixed`||ro(n,t)}function io(e,t){let n=t.get(e);if(n)return n;let r=Wr(e,[],!1).filter(e=>Er(e)&&Sr(e)!==`body`),i=null,a=Br(e).position===`fixed`,o=a?Hr(e):e;for(;Er(o)&&!zr(o);){let t=Br(o),n=Ir(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||kr(o)&&!n&&ro(e,o))?r=r.filter(e=>e!==o):i=t,o=Hr(o)}return t.set(e,r),r}function ao(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?jr(t)?[]:io(t,this._c):[].concat(n),r],o=no(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=no(t,a[e],i);s=qr(n.top,s),c=Kr(n.right,c),l=Kr(n.bottom,l),u=qr(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function oo(e){let{width:t,height:n}=Va(e);return{width:t,height:n}}function so(e,t,n){let r=Dr(t),i=wr(t),a=n===`fixed`,o=qa(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Xr(0);function l(){c.x=Ja(i)}if(r||!r&&!a)if((Sr(t)!==`body`||kr(i))&&(s=Vr(t)),r){let e=qa(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?Ya(i,s):Xr(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 G(e){return Br(e).position===`static`}function co(e,t){if(!Dr(e)||Br(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return wr(e)===n&&(n=n.ownerDocument.body),n}function lo(e,t){let n=Cr(e);if(jr(e))return n;if(!Dr(e)){let t=Hr(e);for(;t&&!zr(t);){if(Er(t)&&!G(t))return t;t=Hr(t)}return n}let r=co(e,t);for(;r&&Ar(r)&&G(r);)r=co(r,t);return r&&zr(r)&&G(r)&&!Ir(r)?n:r||Lr(e)||n}var uo=async function(e){let t=this.getOffsetParent||lo,n=this.getDimensions,r=await n(e.floating);return{reference:so(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fo(e){return Br(e).direction===`rtl`}var po={convertOffsetParentRelativeRectToViewportRelativeRect:Xa,getDocumentElement:wr,getClippingRect:ao,getOffsetParent:lo,getElementRects:uo,getClientRects:Za,getDimensions:oo,getScale:Ua,isElement:Er,isRTL:fo};function mo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ho(e,t){let n=null,r,i=wr(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=Yr(d),h=Yr(i.clientWidth-(u+f)),g=Yr(i.clientHeight-(d+p)),_=Yr(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:qr(0,Kr(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&&!mo(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 go(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=Ha(e),u=i||a?[...l?Wr(l):[],...t?Wr(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?ho(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?qa(e):null;c&&g();function g(){let t=qa(e);h&&!mo(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 _o=za,vo=Ba,yo=Ia,bo=(e,t,n)=>{let r=new Map,i={platform:po,...n},a={...i.platform,_c:r};return Fa(e,t,{...i,platform:a})},xo=typeof document<`u`?L.useLayoutEffect:function(){};function So(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(!So(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)&&!So(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Co(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wo(e,t){let n=Co(e);return Math.round(t*n)/n}function To(e){let t=L.useRef(e);return xo(()=>{t.current=e}),t}function Eo(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]=L.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=L.useState(r);So(f,r)||p(r);let[m,h]=L.useState(null),[g,_]=L.useState(null),v=L.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=L.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=L.useRef(null),C=L.useRef(null),w=L.useRef(u),T=c!=null,E=To(c),D=To(i),O=To(l),k=L.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),bo(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!So(w.current,t)&&(w.current=t,ja.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);xo(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=L.useRef(!1);xo(()=>(A.current=!0,()=>{A.current=!1}),[]),xo(()=>{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=L.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=L.useMemo(()=>({reference:b,floating:x}),[b,x]),N=L.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=wo(M.floating,u.x),r=wo(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Co(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return L.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Do=(e,t)=>{let n=_o(e);return{name:n.name,fn:n.fn,options:[e,t]}},Oo=(e,t)=>{let n=vo(e);return{name:n.name,fn:n.fn,options:[e,t]}},ko=(e,t)=>{let n=yo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ao=`data-floating-ui-focusable`,jo=`active`,Mo=`selected`,No=`ArrowLeft`,Po=`ArrowRight`,Fo=`ArrowUp`,Io=`ArrowDown`,Lo=[No,Po],Ro=[Fo,Io];[...Lo,...Ro];var zo={...L},Bo=!1,Vo=0,Ho=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ Vo++;function Uo(){let[e,t]=L.useState(()=>Bo?Ho():void 0);return ya(()=>{e??t(Ho())},[]),L.useEffect(()=>{Bo=!0},[]),e}var Wo=zo.useId||Uo;function Go(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Ko=L.createContext(null),qo=L.createContext(null),Jo=()=>L.useContext(Ko)?.id||null,Yo=()=>L.useContext(qo);function Xo(e){return`data-floating-ui-`+e}function Zo(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Qo=Xo(`safe-polygon`);function $o(e,t,n){if(n&&!va(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function es(e){return typeof e==`function`?e():e}function ts(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Yo(),m=Jo(),h=xa(l),g=xa(c),_=xa(n),v=xa(d),y=L.useRef(),b=L.useRef(-1),x=L.useRef(),S=L.useRef(-1),C=L.useRef(!0),w=L.useRef(!1),T=L.useRef(()=>{}),E=L.useRef(!1),D=Ca(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});L.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Zo(b),Zo(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),L.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=sa(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=L.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=$o(g.current,`close`,y.current);i&&!x.current?(Zo(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Zo(b),r(!1,e,n))},[g,r]),k=Ca(()=>{T.current(),x.current=void 0}),A=Ca(()=>{if(w.current){let e=sa(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Qo),w.current=!1}}),j=Ca(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);L.useEffect(()=>{if(!s)return;function e(e){if(Zo(b),C.current=!1,u&&!va(y.current)||es(v.current)>0&&!$o(g.current,`open`))return;let t=$o(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=sa(o.floating);if(Zo(S),E.current=!1,h.current&&i.current.floatingContext){n||Zo(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!ra(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){Zo(b)}function l(e){j()||O(e,!1)}if(Er(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),ya(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(Er(o.domReference)&&e){var t;let n=sa(o.floating).body;n.setAttribute(Qo,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),ya(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),L.useEffect(()=>()=>{k(),Zo(b),Zo(S),A()},[s,o.domReference,k,A]);let M=L.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}u&&!va(y.current)||n||es(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(Zo(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,es(v.current))))}}},[u,r,n,_,v]);return L.useMemo(()=>s?{reference:M}:{},[s,M])}var ns=0;function rs(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(ns);let a=()=>e?.focus({preventScroll:n});i?a():ns=requestAnimationFrame(a)}function is(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Or(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function as(e){return`composedPath`in e?e.composedPath()[0]:e.target}function os(e){return e?.ownerDocument||document}var ss={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function cs(e){return e===`inert`?ss.inert:e===`aria-hidden`?ss[`aria-hidden`]:ss.none}var ls=new WeakSet,us={},ds=0,fs=()=>typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype;function ps(e){return e?Or(e)?e.host:ps(e.parentNode):null}var ms=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=ps(t);return e.contains(n)?n:null}).filter(e=>e!=null);function hs(e,t,n,r){let i=`data-floating-ui-inert`,a=r?`inert`:n?`aria-hidden`:null,o=ms(t,e),s=new Set,c=new Set(o),l=[];us[i]||(us[i]=new WeakMap);let u=us[i];o.forEach(d),f(t),s.clear();function d(e){!e||s.has(e)||(s.add(e),e.parentNode&&d(e.parentNode))}function f(e){!e||c.has(e)||[].forEach.call(e.children,e=>{if(Sr(e)!==`script`)if(s.has(e))f(e);else{let t=a?e.getAttribute(a):null,n=t!==null&&t!==`false`,r=cs(a),o=(r.get(e)||0)+1,s=(u.get(e)||0)+1;r.set(e,o),u.set(e,s),l.push(e),o===1&&n&&ls.add(e),s===1&&e.setAttribute(i,``),!n&&a&&e.setAttribute(a,a===`inert`?``:`true`)}})}return ds++,()=>{l.forEach(e=>{let t=cs(a),n=(t.get(e)||0)-1,r=(u.get(e)||0)-1;t.set(e,n),u.set(e,r),n||(!ls.has(e)&&a&&e.removeAttribute(a),ls.delete(e)),r||e.removeAttribute(i)}),ds--,ds||(ss.inert=new WeakMap,ss[`aria-hidden`]=new WeakMap,ss.none=new WeakMap,ls=new WeakSet,us={})}}function gs(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=os(e[0]).body;return hs(e.concat(Array.from(r.querySelectorAll(`[aria-live],[role="status"],output`))),r,t,n)}var _s={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},vs=L.forwardRef(function(e,t){let[n,r]=L.useState();ya(()=>{Xi()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Xo(`focus-guard`)]:``,style:_s};return(0,R.jsx)(`span`,{...e,...i})}),ys={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},bs=L.createContext(null),xs=Xo(`portal`);function Ss(e){e===void 0&&(e={});let{id:t,root:n}=e,r=Wo(),i=ws(),[a,o]=L.useState(null),s=L.useRef(null);return ya(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),ya(()=>{if(!r||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(xs,``),e.appendChild(n),s.current=n,o(n)},[t,r]),ya(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!Tr(e)&&(e=e.current),e||=document.body;let a=null;t&&(a=document.createElement(`div`),a.id=t,e.appendChild(a));let c=document.createElement(`div`);c.id=r,c.setAttribute(xs,``),e=a||e,e.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function Cs(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=Ss({id:n,root:r}),[o,s]=L.useState(null),c=L.useRef(null),l=L.useRef(null),u=L.useRef(null),d=L.useRef(null),f=o?.modal,p=o?.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return L.useEffect(()=>{if(!a||!i||f)return;function e(e){a&&Oa(e)&&(e.type===`focusin`?Aa:ka)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,f]),L.useEffect(()=>{a&&(p||Aa(a))},[p,a]),(0,R.jsxs)(bs.Provider,{value:L.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&(0,R.jsx)(vs,{"data-type":`outside`,ref:c,onFocus:e=>{if(Oa(e,a)){var t;(t=u.current)==null||t.focus()}else Da(o?o.domReference:null)?.focus()}}),m&&a&&(0,R.jsx)(`span`,{"aria-owns":a.id,style:ys}),a&&ja.createPortal(t,a),m&&a&&(0,R.jsx)(vs,{"data-type":`outside`,ref:l,onFocus:e=>{if(Oa(e,a)){var t;(t=d.current)==null||t.focus()}else Ea(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var ws=()=>L.useContext(bs);function Ts(e){return L.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}var Es=20,Ds=[];function Os(){Ds=Ds.filter(e=>e.deref()?.isConnected)}function ks(e){Os(),e&&Sr(e)!==`body`&&(Ds.push(new WeakRef(e)),Ds.length>Es&&(Ds=Ds.slice(-Es)))}function As(){return Os(),Ds[Ds.length-1]?.deref()}function js(e){let t=wa();return qi(e,t)?e:Gi(e,t)[0]||e}function Ms(e,t){var n;if(!t.current.includes(`floating`)&&!((n=e.getAttribute(`role`))!=null&&n.includes(`dialog`)))return;let r=wa(),i=Ki(e,r).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return qi(e,r)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),a=e.getAttribute(`tabindex`);t.current.includes(`floating`)||i.length===0?a!==`0`&&e.setAttribute(`tabindex`,`0`):(a!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}var Ns=L.forwardRef(function(e,t){return(0,R.jsx)(`button`,{...e,type:`button`,ref:t,tabIndex:-1,style:_s})});function Ps(e){let{context:t,children:n,disabled:r=!1,order:i=[`content`],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:m,onOpenChange:h,events:g,dataRef:_,elements:{domReference:v,floating:y}}=t,b=Ca(()=>_.current.floatingContext?.nodeId),x=Ca(p),S=typeof o==`number`&&o<0,C=la(v)&&S,w=fs(),T=w?a:!0,E=!T||w&&f,D=xa(i),O=xa(o),k=xa(s),A=Yo(),j=ws(),M=L.useRef(null),N=L.useRef(null),P=L.useRef(!1),ee=L.useRef(!1),F=L.useRef(-1),I=L.useRef(-1),te=j!=null,z=da(y),ne=Ca(function(e){return e===void 0&&(e=z),e?Gi(e,wa()):[]}),B=Ca(e=>{let t=ne(e);return D.current.map(e=>v&&e===`reference`?v:z&&e===`floating`?z:t).filter(Boolean).flat()});L.useEffect(()=>{if(r||!l)return;function e(e){if(e.key===`Tab`){ra(z,na(sa(z)))&&ne().length===0&&!C&&ma(e);let t=B(),n=ia(e);D.current[0]===`reference`&&n===v&&(ma(e),e.shiftKey?rs(t[t.length-1]):rs(t[1])),D.current[1]===`floating`&&n===z&&e.shiftKey&&(ma(e),rs(t[0]))}}let t=sa(z);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,v,z,l,D,C,ne,B]),L.useEffect(()=>{if(r||!y)return;function e(e){let t=ia(e),n=ne().indexOf(t);n!==-1&&(F.current=n)}return y.addEventListener(`focusin`,e),()=>{y.removeEventListener(`focusin`,e)}},[r,y,ne]),L.useEffect(()=>{if(r||!d)return;function e(){ee.current=!0,setTimeout(()=>{ee.current=!1})}function t(e){let t=e.relatedTarget,n=e.currentTarget,r=ia(e);queueMicrotask(()=>{let i=b(),a=!(ra(v,t)||ra(y,t)||ra(t,y)||ra(j?.portalNode,t)||t!=null&&t.hasAttribute(Xo(`focus-guard`))||A&&(fa(A.nodesRef.current,i).find(e=>ra(e.context?.elements.floating,t)||ra(e.context?.elements.domReference,t))||pa(A.nodesRef.current,i).find(e=>[e.context?.elements.floating,da(e.context?.elements.floating)].includes(t)||e.context?.elements.domReference===t)));if(n===v&&z&&Ms(z,D),c&&n!==v&&!(r!=null&&r.isConnected)&&na(sa(z))===sa(z).body){Dr(z)&&z.focus();let e=F.current,t=ne(),n=t[e]||t[t.length-1]||z;Dr(n)&&n.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(C||!l)&&t&&a&&!ee.current&&t!==As()&&(P.current=!0,h(!1,e,`focus-out`))})}let n=!!(!A&&j);function i(){Zo(I),_.current.insideReactTree=!0,I.current=window.setTimeout(()=>{_.current.insideReactTree=!1})}if(y&&Dr(v))return v.addEventListener(`focusout`,t),v.addEventListener(`pointerdown`,e),y.addEventListener(`focusout`,t),n&&y.addEventListener(`focusout`,i,!0),()=>{v.removeEventListener(`focusout`,t),v.removeEventListener(`pointerdown`,e),y.removeEventListener(`focusout`,t),n&&y.removeEventListener(`focusout`,i,!0)}},[r,v,y,z,l,A,j,h,d,c,ne,C,b,D,_]);let re=L.useRef(null),ie=L.useRef(null),ae=Ts([re,j?.beforeInsideRef]),oe=Ts([ie,j?.afterInsideRef]);L.useEffect(()=>{var e,t;if(r||!y)return;let n=Array.from((j==null||(e=j.portalNode)==null?void 0:e.querySelectorAll(`[`+Xo(`portal`)+`]`))||[]),i=[y,(t=(A?pa(A.nodesRef.current,b()):[]).find(e=>la(e.context?.elements.domReference||null)))==null||(t=t.context)==null?void 0:t.elements.domReference,...n,...x(),M.current,N.current,re.current,ie.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,D.current.includes(`reference`)||C?v:null].filter(e=>e!=null),a=l||C?gs(i,!E,E):gs(i);return()=>{a()}},[r,v,y,l,D,j,C,T,E,A,b,x]),ya(()=>{if(r||!Dr(z))return;let e=na(sa(z));queueMicrotask(()=>{let t=B(z),n=O.current,r=(typeof n==`number`?t[n]:n.current)||z,i=ra(z,e);!S&&!i&&m&&rs(r,{preventScroll:r===z})})},[r,m,z,S,B,O]),ya(()=>{if(r||!z)return;let e=sa(z);ks(na(e));function t(e){let{reason:t,event:n,nested:r}=e;if([`hover`,`safe-polygon`].includes(t)&&n.type===`mouseleave`&&(P.current=!0),t===`outside-press`)if(r)P.current=!1;else if(ga(n)||_a(n))P.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?P.current=!1:P.current=!0}}g.on(`openchange`,t);let n=e.createElement(`span`);n.setAttribute(`tabindex`,`-1`),n.setAttribute(`aria-hidden`,`true`),Object.assign(n.style,_s),te&&v&&v.insertAdjacentElement(`afterend`,n);function i(){if(typeof k.current==`boolean`){let e=v||As();return e&&e.isConnected?e:n}return k.current.current||n}return()=>{g.off(`openchange`,t);let r=na(e),a=ra(y,r)||A&&fa(A.nodesRef.current,b(),!1).some(e=>ra(e.context?.elements.floating,r)),o=i();queueMicrotask(()=>{let t=js(o);k.current&&!P.current&&Dr(t)&&(!(t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),n.remove()})}},[r,y,z,k,_,g,A,te,v,b]),L.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(Os)}),[r]),ya(()=>{if(!r&&j)return j.setFocusManagerState({modal:l,closeOnFocusOut:d,open:m,onOpenChange:h,domReference:v}),()=>{j.setFocusManagerState(null)}},[r,j,l,m,h,d,v]),ya(()=>{r||z&&Ms(z,D)},[r,z,D]);function se(e){return r||!u||!l?null:(0,R.jsx)(Ns,{ref:e===`start`?M:N,onClick:e=>h(!1,e.nativeEvent),children:typeof u==`string`?u:`Dismiss`})}let ce=!r&&T&&(l?!C:!0)&&(te||l);return(0,R.jsxs)(R.Fragment,{children:[ce&&(0,R.jsx)(vs,{"data-type":`inside`,ref:ae,onFocus:e=>{if(l){let e=B();rs(i[0]===`reference`?e[0]:e[e.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(P.current=!1,Oa(e,j.portalNode))Ea(v)?.focus();else{var t;(t=j.beforeOutsideRef.current)==null||t.focus()}}}),!C&&se(`start`),n,se(`end`),ce&&(0,R.jsx)(vs,{"data-type":`inside`,ref:oe,onFocus:e=>{if(l)rs(B()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(d&&(P.current=!0),Oa(e,j.portalNode))Da(v)?.focus();else{var t;(t=j.afterOutsideRef.current)==null||t.focus()}}})]})}function Fs(e){return Dr(e.target)&&e.target.tagName===`BUTTON`}function Is(e){return Dr(e.target)&&e.target.tagName===`A`}function Ls(e){return ca(e)}function Rs(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s=`click`,toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=L.useRef(),p=L.useRef(!1),m=L.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current;e.button===0&&s!==`click`&&(va(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`mousedown`)?r(!1,e.nativeEvent,`click`):(e.preventDefault(),r(!0,e.nativeEvent,`click`))))},onClick(e){let t=f.current;if(s===`mousedown`&&f.current){f.current=void 0;return}va(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`click`)?r(!1,e.nativeEvent,`click`):r(!0,e.nativeEvent,`click`))},onKeyDown(e){f.current=void 0,!(e.defaultPrevented||!u||Fs(e))&&(e.key===` `&&!Ls(a)&&(e.preventDefault(),p.current=!0),!Is(e)&&e.key===`Enter`&&r(!(n&&c),e.nativeEvent,`click`))},onKeyUp(e){e.defaultPrevented||!u||Fs(e)||Ls(a)||e.key===` `&&p.current&&(p.current=!1,r(!(n&&c),e.nativeEvent,`click`))}}),[i,a,s,l,u,r,n,d,c]);return L.useMemo(()=>o?{reference:m}:{},[o,m])}var zs={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Bs={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Vs=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Hs(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Yo(),g=Ca(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=L.useRef(!1),{escapeKey:y,outsidePress:b}=Vs(p),{escapeKey:x,outsidePress:S}=Vs(m),C=L.useRef(!1),w=Ca(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?fa(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,ha(e)?e.nativeEvent:e,`escape-key`)}),T=Ca(e=>{var t;let n=()=>{var t;w(e),(t=ia(e))==null||t.removeEventListener(`keydown`,n)};(t=ia(e))==null||t.addEventListener(`keydown`,n)}),E=Ca(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=ia(e),s=`[`+Xo(`inert`)+`]`,c=sa(i.floating).querySelectorAll(s),u=Er(o)?o:null;for(;u&&!zr(u);){let e=Hr(u);if(zr(e)||!Er(e))break;u=e}if(c.length&&Er(o)&&!oa(o)&&!ra(o,i.floating)&&Array.from(c).every(e=>!ra(u,e)))return;if(Dr(o)&&k){let t=zr(o),n=Br(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&fa(h.nodesRef.current,d).some(t=>aa(e,t.context?.elements.floating));if(aa(e,i.floating)||aa(e,i.domReference)||f)return;let p=h?fa(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=Ca(e=>{var t;let n=()=>{var t;E(e),(t=ia(e))==null||t.removeEventListener(l,n)};(t=ia(e))==null||t.addEventListener(l,n)});L.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},Rr()?5:0)}let d=sa(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(Er(i.domReference)&&(p=Wr(i.domReference)),Er(i.floating)&&(p=p.concat(Wr(i.floating))),!Er(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(Wr(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),L.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=L.useMemo(()=>({onKeyDown:w,...u&&{[zs[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=L.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[Bs[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return L.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function Us(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=Wo(),a=L.useRef({}),[o]=L.useState(()=>Go()),s=Jo()!=null,[c,l]=L.useState(r.reference),u=Ca((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=L.useMemo(()=>({setPositionReference:l}),[]),f=L.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return L.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Ws(e){e===void 0&&(e={});let{nodeId:t}=e,n=Us({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=L.useState(null),[s,c]=L.useState(null),l=i?.domReference||a,u=L.useRef(null),d=Yo();ya(()=>{l&&(u.current=l)},[l]);let f=Eo({...e,elements:{...i,...s&&{reference:s}}}),p=L.useCallback(e=>{let t=Er(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=L.useCallback(e=>{(Er(e)||e===null)&&(u.current=e,o(e)),(Er(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!Er(e))&&f.refs.setReference(e)},[f.refs]),h=L.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=L.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=L.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return ya(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),L.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}function Gs(){return Qi()&&Xi()}function Ks(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=L.useRef(!1),u=L.useRef(-1),d=L.useRef(!0);L.useEffect(()=>{if(!s)return;let e=Cr(o.domReference);function t(){!n&&Dr(o.domReference)&&o.domReference===na(sa(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),Gs()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),Gs()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),L.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),L.useEffect(()=>()=>{Zo(u)},[]);let f=L.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=ia(e.nativeEvent);if(c&&Er(t)){if(Gs()&&!e.relatedTarget){if(!d.current&&!ca(t))return}else if(!ua(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=Er(t)&&t.hasAttribute(Xo(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=na(o.domReference?o.domReference.ownerDocument:document);!t&&e===o.domReference||ra(a.current.floatingContext?.refs.floating.current,e)||ra(o.domReference,e)||i||r(!1,n,`focus`)})}}),[a,o.domReference,r,c]);return L.useMemo(()=>s?{reference:f}:{},[s,f])}function qs(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[jo]:t,[Mo]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Ao]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[jo,Mo].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function Js(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=L.useCallback(t=>qs(t,e,`reference`),t),a=L.useCallback(t=>qs(t,e,`floating`),n),o=L.useCallback(t=>qs(t,e,`item`),r);return L.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Ys=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Xs(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=Wo(),c=r.domReference?.id||s,l=L.useMemo(()=>da(r.floating)?.id||i,[r.floating,i]),u=Ys.get(o)??o,d=Jo()!=null,f=L.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=L.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=L.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return L.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var Zs=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e.toLowerCase());function Qs(e,t){return typeof e==`function`?e(t):e}function $s(e,t){let[n,r]=L.useState(e);return e&&!n&&r(!0),L.useEffect(()=>{if(!e&&n){let e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}function ec(e,t){t===void 0&&(t={});let{open:n,elements:{floating:r}}=e,{duration:i=250}=t,a=(typeof i==`number`?i:i.close)||0,[o,s]=L.useState(`unmounted`),c=$s(n,a);return!c&&o===`close`&&s(`unmounted`),ya(()=>{if(r){if(n){s(`initial`);let e=requestAnimationFrame(()=>{ja.flushSync(()=>{s(`open`)})});return()=>{cancelAnimationFrame(e)}}s(`close`)}},[n,r]),{isMounted:c,status:o}}function tc(e,t){t===void 0&&(t={});let{initial:n={opacity:0},open:r,close:i,common:a,duration:o=250}=t,s=e.placement,c=s.split(`-`)[0],l=L.useMemo(()=>({side:c,placement:s}),[c,s]),u=typeof o==`number`,d=(u?o:o.open)||0,f=(u?o:o.close)||0,[p,m]=L.useState(()=>({...Qs(a,l),...Qs(n,l)})),{isMounted:h,status:g}=ec(e,{duration:o}),_=xa(n),v=xa(r),y=xa(i),b=xa(a);return ya(()=>{let e=Qs(_.current,l),t=Qs(y.current,l),n=Qs(b.current,l),r=Qs(v.current,l)||Object.keys(e).reduce((e,t)=>(e[t]=``,e),{});if(g===`initial`&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),g===`open`&&m({transitionProperty:Object.keys(r).map(Zs).join(`,`),transitionDuration:d+`ms`,...n,...r}),g===`close`){let r=t||e;m({transitionProperty:Object.keys(r).map(Zs).join(`,`),transitionDuration:f+`ms`,...n,...r})}},[f,y,_,v,b,d,g,l]),{isMounted:h,styles:p}}function nc(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...nc(e,t.id,n)])}function rc(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function ic(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ac(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){Zo(i),u()}if(Zo(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=as(e),v=e.type===`mouseleave`,y=is(c.floating,_),b=is(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=ic(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&Er(e.relatedTarget)&&is(c.floating,e.relatedTarget)||f&&nc(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]];break}function P(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],...[[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],...[[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[...[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom]],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],...[[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]]}}if(!rc([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}rc([m,h],P([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var oc={".":`Uncommitted Changes`,staged:`Staging Area`,working:`Working Directory`},sc=new Set([`.`,`staged`,`working`]),cc=e=>{let t=!e||sc.has(e)?`HEAD`:`${e}^`;return St(`${t}^`,t)},lc=e=>xt(e.baseMode)===`merge-base`?!1:!!e.targetCommitish&&e.baseCommitish===`${e.targetCommitish}^`,uc=(e,t)=>e?e===t.shortHash||e===t.hash:!1,dc=(e,t)=>t?`${e.shortHash}^`:e.shortHash,fc=(e,t,n)=>{if(!t)return`Select...`;let r=t.endsWith(`^`),i=r?t.slice(0,-1):t;if(i.startsWith(`HEAD`))return t;let a=oc[t];if(a)return a;let o=e.specialOptions.find(e=>e.value===t);if(o)return o.label;let s=e.branches.find(e=>e.name===i);if(s)return r?`${s.name}^`:s.name;let c=e.commits.find(e=>e.shortHash===i||e.hash===i);if(c)return dc(c,r);if(n){let t=e.commits.find(e=>e.shortHash===n||e.hash===n);if(t)return dc(t,!1)}return t};function pc({options:e,selection:t,resolvedBaseRevision:n,resolvedTargetRevision:r,onSelectDiff:i,onOpenAdvanced:a,compact:o=!1}){let[s,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)(!1),d=o,{refs:f,floatingStyles:p,context:m}=Ws({open:s||l,onOpenChange:e=>{!e&&l||c(e)},placement:`bottom-end`,middleware:[Do(6),ko(),Oo({padding:8})],whileElementsMounted:go}),{getReferenceProps:h,getFloatingProps:g}=Js([ts(m,{handleClose:ac()}),Rs(m),Hs(m),Xs(m,{role:`menu`})]),{refs:_,floatingStyles:v,context:y}=Ws({open:l,onOpenChange:e=>{e&&c(!0),u(e)},placement:`left-start`,middleware:[Do(0),ko(),Oo({padding:8})],whileElementsMounted:go}),{getReferenceProps:b,getFloatingProps:x}=Js([ts(y,{handleClose:ac()}),Rs(y),Hs(y),Xs(y,{role:`menu`})]);(0,L.useEffect)(()=>{s||u(!1)},[s]);let S=(0,L.useMemo)(()=>{let i=lc(t),a=e.commits.find(e=>i?uc(t.targetCommitish,e)||uc(r,e):!1);return a?`${a.shortHash} ${a.message}`:`${fc(e,t.baseCommitish,n)}...${fc(e,t.targetCommitish,r)}${xt(t.baseMode)===`merge-base`?` (merge-base)`:``}`},[e,t,n,r]),C=(0,L.useMemo)(()=>e.branches.find(e=>e.name===`main`)||e.branches.find(e=>e.name===`master`),[e.branches]),w=e.originDefaultBranch,T=(0,L.useMemo)(()=>St(`HEAD^`,`HEAD`),[]),E=(0,L.useMemo)(()=>St(`HEAD`,`.`,`merge-base`),[]),D=(0,L.useMemo)(()=>C?St(C.name,`.`,`merge-base`):null,[C]),O=(0,L.useMemo)(()=>w?St(w,`.`,`merge-base`):null,[w]),k=(0,L.useMemo)(()=>cc(t.targetCommitish),[t.targetCommitish]),A=e=>{i(e),u(!1),c(!1)},j=()=>{u(!1),c(!1),a()},M=(e,t)=>[`w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors`,e?`hover:bg-diff-selected-bg focus:bg-diff-selected-bg`:`hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary`,e?`bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2`:``,t?`opacity-50 cursor-not-allowed`:`cursor-pointer`].join(` `),N=e=>Ct(t,e),P=e=>lc(t)?uc(t.targetCommitish,e)||uc(r,e):!1;return(0,R.jsxs)(`div`,{className:`relative`,children:[(0,R.jsx)(`button`,{ref:f.setReference,type:`button`,className:`flex items-center gap-1.5 cursor-pointer group`,"aria-haspopup":`menu`,"aria-expanded":s,"aria-label":`Revision menu: ${S}`,title:S,...h(),children:d?(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors`,children:[(0,R.jsx)(nt,{size:14,className:`text-github-text-secondary`}),(0,R.jsx)(ze,{size:12,className:`text-github-text-secondary group-hover:text-github-text-primary transition-colors`})]}):(0,R.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors`,children:[(0,R.jsx)(`code`,{className:`text-xs text-github-text-primary`,children:S}),(0,R.jsx)(ze,{size:12,className:`text-github-text-secondary group-hover:text-github-text-primary transition-colors`})]})}),s&&(0,R.jsx)(Cs,{children:(0,R.jsxs)(`div`,{ref:f.setFloating,style:p,className:`bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[260px] max-h-[360px] overflow-y-auto`,...g(),children:[(0,R.jsxs)(`div`,{className:`border-b border-github-border`,children:[(0,R.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Quick Diffs`}),(0,R.jsx)(`button`,{onClick:()=>A(T),className:M(N(T),!1),children:`HEAD`}),(0,R.jsx)(`button`,{onClick:()=>A(E),className:M(N(E),!1),children:`HEAD...Uncommitted (merge-base)`}),C&&D&&(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)(`button`,{onClick:()=>A(D),className:M(N(D),!1),children:[C.name,`...Uncommitted (merge-base)`]})}),w&&O&&(0,R.jsxs)(`button`,{onClick:()=>A(O),className:M(N(O),!1),children:[w,`...Uncommitted (merge-base)`]})]}),(0,R.jsx)(`div`,{className:`border-b border-github-border`,children:(0,R.jsx)(`button`,{onClick:()=>A(k),className:M(N(k),!1),type:`button`,children:`Previous commit`})}),(0,R.jsx)(`div`,{className:`border-b border-github-border`,children:(0,R.jsx)(`button`,{ref:e.commits.length>0?_.setReference:void 0,className:M(!1,e.commits.length===0),...e.commits.length>0?b():{},disabled:e.commits.length===0,type:`button`,children:(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(Be,{size:12,className:`text-github-text-secondary`}),(0,R.jsx)(`span`,{children:`Pick Commit...`})]})})}),(0,R.jsx)(`div`,{children:(0,R.jsx)(`button`,{onClick:j,className:M(!1,!1),type:`button`,children:`Detailed...`})})]})}),l&&e.commits.length>0&&(0,R.jsx)(Cs,{children:(0,R.jsxs)(`div`,{ref:_.setFloating,style:v,className:`bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[360px] overflow-y-auto`,...x(),children:[(0,R.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Recent Commits`}),e.commits.map(e=>(0,R.jsx)(`button`,{onClick:()=>A(St(`${e.shortHash}^`,e.shortHash)),className:M(P(e),!1),type:`button`,children:(0,R.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,R.jsx)(`code`,{className:`text-xs text-github-text-primary font-mono whitespace-nowrap`,children:e.shortHash}),(0,R.jsx)(`span`,{className:`text-xs text-github-text-secondary flex-1 break-words`,children:e.message})]})},e.hash))]})})]})}var mc=[`jpg`,`jpeg`,`png`,`gif`,`bmp`,`svg`,`webp`,`ico`,`tiff`,`tif`,`avif`,`heic`,`heif`];function hc(e){if(!e)return!1;let t=Jn(e);return t?mc.includes(t):!1}var gc=[`md`,`markdown`];function _c(e){if(!e)return!1;let t=Jn(e);return t?gc.includes(t):!1}var vc=[`ipynb`];function yc(e){if(!e)return!1;let t=Jn(e);return t?vc.includes(t):!1}function bc({file:e,diffMode:t,baseCommitish:n,targetCommitish:r}){let i=t??`split`,a=e.status===`deleted`,o=e.status===`added`,s=e.status===`modified`||e.status===`renamed`,c=n||`HEAD~1`,l=r||`HEAD`,[u,d]=(0,L.useState)({}),[f,p]=(0,L.useState)({}),m=async(e,t)=>{try{let n=e.naturalWidth,r=e.naturalHeight,i=(await(await fetch(e.src)).blob()).size;t({width:n,height:r,size:i})}catch(e){console.error(`Failed to get image info:`,e)}},h=e=>e?e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`:``,g=e=>!e.width||!e.height?``:`W: ${e.width}px | H: ${e.height}px`,_={backgroundImage:`
21
+ linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
22
+ linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
23
+ `,backgroundSize:`20px 20px`,backgroundPosition:`0 0, 10px 10px`,backgroundColor:`white`};return a?(0,R.jsx)(`div`,{className:`bg-github-bg-primary p-4`,children:(0,R.jsxs)(`div`,{className:`text-center`,children:[(0,R.jsx)(`div`,{className:`mb-2`,children:(0,R.jsx)(`span`,{className:`text-github-danger font-medium`,children:`Deleted Image`})}),(0,R.jsxs)(`div`,{className:`inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,R.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Previous version:`}),(0,R.jsx)(`img`,{src:`/api/blob/${e.oldPath||e.path}?ref=${c}`,alt:`Previous version of ${e.oldPath||e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,d),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,R.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(u.width||u.size)&&(0,R.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(u),g(u)&&h(u.size)&&` | `,h(u.size)]})]})]})}):o?(0,R.jsx)(`div`,{className:`bg-github-bg-primary p-4`,children:(0,R.jsxs)(`div`,{className:`text-center`,children:[(0,R.jsx)(`div`,{className:`mb-2`,children:(0,R.jsx)(`span`,{className:`text-github-accent font-medium`,children:`Added Image`})}),(0,R.jsxs)(`div`,{className:`inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,R.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`New file:`}),(0,R.jsx)(`img`,{src:`/api/blob/${e.path}?ref=${l}`,alt:`New image ${e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,p),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,R.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(f.width||f.size)&&(0,R.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(f),g(f)&&h(f.size)&&` | `,h(f.size)]})]})]})}):s?i===`split`?(0,R.jsxs)(`div`,{className:`bg-github-bg-primary p-4`,children:[(0,R.jsx)(`div`,{className:`text-center mb-4`,children:(0,R.jsx)(`span`,{className:`text-github-text-primary font-medium`,children:`Modified Image`})}),(0,R.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,R.jsx)(`div`,{className:`text-center`,children:(0,R.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,R.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Previous version:`}),(0,R.jsx)(`img`,{src:`/api/blob/${e.oldPath||e.path}?ref=${c}`,alt:`Previous version of ${e.oldPath||e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,d),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,R.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(u.width||u.size)&&(0,R.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(u),g(u)&&h(u.size)&&` | `,h(u.size)]})]})}),(0,R.jsx)(`div`,{className:`text-center`,children:(0,R.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,R.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Current version:`}),(0,R.jsx)(`img`,{src:`/api/blob/${e.path}?ref=${l}`,alt:`Current version of ${e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,p),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,R.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(f.width||f.size)&&(0,R.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(f),g(f)&&h(f.size)&&` | `,h(f.size)]})]})})]})]}):(0,R.jsxs)(`div`,{className:`bg-github-bg-primary p-4`,children:[(0,R.jsx)(`div`,{className:`text-center mb-4`,children:(0,R.jsx)(`span`,{className:`text-github-text-primary font-medium`,children:`Modified Image`})}),(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsx)(`div`,{className:`text-center`,children:(0,R.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block`,children:[(0,R.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Previous version:`}),(0,R.jsx)(`img`,{src:`/api/blob/${e.oldPath||e.path}?ref=${c}`,alt:`Previous version of ${e.oldPath||e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,d),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,R.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(u.width||u.size)&&(0,R.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(u),g(u)&&h(u.size)&&` | `,h(u.size)]})]})}),(0,R.jsx)(`div`,{className:`text-center`,children:(0,R.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block`,children:[(0,R.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Current version:`}),(0,R.jsx)(`img`,{src:`/api/blob/${e.path}?ref=${l}`,alt:`Current version of ${e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,p),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,R.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(f.width||f.size)&&(0,R.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(f),g(f)&&h(f.size)&&` | `,h(f.size)]})]})})]})]}):null}function xc(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Sc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wc={};function Tc(e,t){return((t||wc).jsx?Cc:Sc).test(e)}var Ec=/[ \t\n\f\r]/g;function Dc(e){return typeof e==`object`?e.type===`text`?Oc(e.value):!1:Oc(e)}function Oc(e){return e.replace(Ec,``)===``}var kc=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};kc.prototype.normal={},kc.prototype.property={},kc.prototype.space=void 0;function Ac(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new kc(n,r,t)}function jc(e){return e.toLowerCase()}var Mc=class{constructor(e,t){this.attribute=t,this.property=e}};Mc.prototype.attribute=``,Mc.prototype.booleanish=!1,Mc.prototype.boolean=!1,Mc.prototype.commaOrSpaceSeparated=!1,Mc.prototype.commaSeparated=!1,Mc.prototype.defined=!1,Mc.prototype.mustUseProperty=!1,Mc.prototype.number=!1,Mc.prototype.overloadedBoolean=!1,Mc.prototype.property=``,Mc.prototype.spaceSeparated=!1,Mc.prototype.space=void 0;var Nc=c({boolean:()=>K,booleanish:()=>q,commaOrSpaceSeparated:()=>Rc,commaSeparated:()=>Lc,number:()=>J,overloadedBoolean:()=>Fc,spaceSeparated:()=>Ic}),Pc=0,K=zc(),q=zc(),Fc=zc(),J=zc(),Ic=zc(),Lc=zc(),Rc=zc();function zc(){return 2**++Pc}var Bc=Object.keys(Nc),Vc=class extends Mc{constructor(e,t,n,r){let i=-1;if(super(e,t),Hc(this,`space`,r),typeof n==`number`)for(;++i<Bc.length;){let e=Bc[i];Hc(this,Bc[i],(n&Nc[e])===Nc[e])}}};Vc.prototype.defined=!0;function Hc(e,t,n){n&&(e[t]=n)}function Uc(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Vc(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[jc(r)]=r,n[jc(a.attribute)]=r}return new kc(t,n,e.space)}var Wc=Uc({properties:{ariaActiveDescendant:null,ariaAtomic:q,ariaAutoComplete:null,ariaBusy:q,ariaChecked:q,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:Ic,ariaCurrent:null,ariaDescribedBy:Ic,ariaDetails:null,ariaDisabled:q,ariaDropEffect:Ic,ariaErrorMessage:null,ariaExpanded:q,ariaFlowTo:Ic,ariaGrabbed:q,ariaHasPopup:null,ariaHidden:q,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ic,ariaLevel:J,ariaLive:null,ariaModal:q,ariaMultiLine:q,ariaMultiSelectable:q,ariaOrientation:null,ariaOwns:Ic,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:q,ariaReadOnly:q,ariaRelevant:null,ariaRequired:q,ariaRoleDescription:Ic,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:q,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Gc(e,t){return t in e?e[t]:t}function Kc(e,t){return Gc(e,t.toLowerCase())}var qc=Uc({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Lc,acceptCharset:Ic,accessKey:Ic,action:null,allow:null,allowFullScreen:K,allowPaymentRequest:K,allowUserMedia:K,alt:null,as:null,async:K,autoCapitalize:null,autoComplete:Ic,autoFocus:K,autoPlay:K,blocking:Ic,capture:null,charSet:null,checked:K,cite:null,className:Ic,cols:J,colSpan:null,content:null,contentEditable:q,controls:K,controlsList:Ic,coords:J|Lc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:K,defer:K,dir:null,dirName:null,disabled:K,download:Fc,draggable:q,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:K,formTarget:null,headers:Ic,height:J,hidden:Fc,high:J,href:null,hrefLang:null,htmlFor:Ic,httpEquiv:Ic,id:null,imageSizes:null,imageSrcSet:null,inert:K,inputMode:null,integrity:null,is:null,isMap:K,itemId:null,itemProp:Ic,itemRef:Ic,itemScope:K,itemType:Ic,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:K,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:K,muted:K,name:null,nonce:null,noModule:K,noValidate:K,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:K,optimum:J,pattern:null,ping:Ic,placeholder:null,playsInline:K,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:K,referrerPolicy:null,rel:Ic,required:K,reversed:K,rows:J,rowSpan:J,sandbox:Ic,scope:null,scoped:K,seamless:K,selected:K,shadowRootClonable:K,shadowRootDelegatesFocus:K,shadowRootMode:null,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:q,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:K,useMap:null,value:q,width:J,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ic,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:K,declare:K,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:K,noHref:K,noShade:K,noWrap:K,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:q,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:K,disableRemotePlayback:K,prefix:null,property:null,results:J,security:null,unselectable:null},space:`html`,transform:Kc}),Jc=Uc({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Rc,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:Ic,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:K,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Lc,g2:Lc,glyphName:Lc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:Rc,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:J,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ic,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rc,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rc,rev:Rc,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rc,requiredFeatures:Rc,requiredFonts:Rc,requiredFormats:Rc,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:Rc,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rc,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rc,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Gc}),Yc=Uc({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()}}),Xc=Uc({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Kc}),Zc=Uc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Qc={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`},$c=/[A-Z]/g,el=/-[a-z]/g,tl=/^data[-\w.:]+$/i;function nl(e,t){let n=jc(t),r=t,i=Mc;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&tl.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(el,il);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!el.test(e)){let n=e.replace($c,rl);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Vc}return new i(r,t)}function rl(e){return`-`+e.toLowerCase()}function il(e){return e.charAt(1).toUpperCase()}var al=Ac([Wc,qc,Yc,Xc,Zc],`html`),ol=Ac([Wc,Jc,Yc,Xc,Zc],`svg`);function sl(e){return e.join(` `).trim()}var cl=s(((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=`
24
+ `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),ll=s((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(cl());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}})),ul=s((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))}})),dl=s(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ll()),r=ul();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})),fl=ml(`end`),pl=ml(`start`);function ml(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 hl(e){let t=pl(e),n=fl(e);if(t&&n)return{start:t,end:n}}function gl(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?vl(e.position):`start`in e||`end`in e?vl(e):`line`in e||`column`in e?_l(e):``}function _l(e){return yl(e&&e.line)+`:`+yl(e&&e.column)}function vl(e){return _l(e&&e.start)+`-`+_l(e&&e.end)}function yl(e){return e&&typeof e==`number`?e:1}var bl=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=gl(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}};bl.prototype.file=``,bl.prototype.name=``,bl.prototype.reason=``,bl.prototype.message=``,bl.prototype.stack=``,bl.prototype.column=void 0,bl.prototype.line=void 0,bl.prototype.ancestors=void 0,bl.prototype.cause=void 0,bl.prototype.fatal=void 0,bl.prototype.place=void 0,bl.prototype.ruleId=void 0,bl.prototype.source=void 0;var xl=d(dl(),1),Sl={}.hasOwnProperty,Cl=new Map,wl=/[A-Z]/g,Tl=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),El=new Set([`td`,`th`]),Dl=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Ol(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=X(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=Y(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`?ol:al,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=kl(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function kl(e,t,n){if(t.type===`element`)return Al(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return jl(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Nl(e,t,n);if(t.type===`mdxjsEsm`)return Ml(e,t);if(t.type===`root`)return Pl(e,t,n);if(t.type===`text`)return Fl(e,t)}function Al(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ol,e.schema=i),e.ancestors.push(t);let a=Ul(e,t.tagName,!1),o=Rl(e,t),s=Bl(e,t);return Tl.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Dc(e):!0})),Il(e,o,a,t),Ll(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function jl(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)}Wl(e,t.position)}function Ml(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wl(e,t.position)}function Nl(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ol,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Ul(e,t.name,!0),o=zl(e,t),s=Bl(e,t);return Il(e,o,a,t),Ll(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Pl(e,t,n){let r={};return Ll(r,Bl(e,t)),e.create(t,e.Fragment,r,n)}function Fl(e,t){return t.value}function Il(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ll(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Y(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 X(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=pl(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 Rl(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Sl.call(t.properties,i)){let a=Vl(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&El.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 zl(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 Wl(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 Wl(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Bl(e,t){let n=[],r=-1,i=e.passKeys?new Map:Cl;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=kl(e,a,o);s!==void 0&&n.push(s)}return n}function Vl(e,t,n){let r=nl(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?xc(n):sl(n)),r.property===`style`){let t=typeof n==`object`?n:Hl(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Gl(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Qc[r.property]||r.property:r.attribute,n]}}function Hl(e,t){try{return(0,xl.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new bl("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=Dl+`#cannot-parse-style-attribute`,r}}function Ul(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=Tc(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=Tc(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Sl.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wl(e)}function Wl(e,t){let n=new bl("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=Dl+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Gl(e){let t={},n;for(n in e)Sl.call(e,n)&&(t[Kl(n)]=e[n]);return t}function Kl(e){let t=e.replace(wl,ql);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function ql(e){return`-`+e.toLowerCase()}var Jl={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`]},Yl={};function Xl(e,t){let n=t||Yl;return Zl(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Zl(e,t,n){if($l(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 Ql(e.children,t,n)}return Array.isArray(e)?Ql(e,t,n):``}function Ql(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Zl(e[i],t,n);return r.join(``)}function $l(e){return!!(e&&typeof e==`object`)}var eu=document.createElement(`i`);function tu(e){let t=`&`+e+`;`;eu.innerHTML=t;let n=eu.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function nu(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 ru(e,t){return e.length>0?(nu(e,e.length,0,t),e):t}var iu={}.hasOwnProperty;function au(e){let t={},n=-1;for(;++n<e.length;)ou(t,e[n]);return t}function ou(e,t){let n;for(n in t){let r=(iu.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){iu.call(r,a)||(r[a]=[]);let e=i[a];su(r[a],Array.isArray(e)?e:e?[e]:[])}}}function su(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);nu(e,0,0,r)}function cu(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function lu(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var uu=bu(/[A-Za-z]/),du=bu(/[\dA-Za-z]/),fu=bu(/[#-'*+\--9=?A-Z^-~]/);function pu(e){return e!==null&&(e<32||e===127)}var mu=bu(/\d/),hu=bu(/[\dA-Fa-f]/),gu=bu(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function _u(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var vu=bu(/\p{P}|\p{S}/u),yu=bu(/\s/);function bu(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function xu(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&du(e.charCodeAt(n+1))&&du(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 Su(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Cu={tokenize:wu};function wu(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`),Su(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 Z(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Tu={tokenize:Du},Eu={tokenize:Ou};function Du(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 nu(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(Eu,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(Eu,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 Z(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++;nu(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 Ou(e,t,n){return Su(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function ku(e){if(e===null||_u(e)||yu(e))return 1;if(vu(e))return 2}function Au(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 ju={name:`attention`,resolveAll:Mu,tokenize:Nu};function Mu(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};Pu(d,-c),Pu(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=ru(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=ru(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=ru(l,Au(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=ru(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=ru(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,nu(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 Nu(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ku(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=ku(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 Pu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Fu={name:`autolink`,tokenize:Iu};function Iu(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 uu(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||du(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||du(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||pu(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):fu(t)?(e.consume(t),l):n(t)}function u(e){return du(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||du(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Lu={partial:!0,tokenize:Ru};function Ru(e,t,n){return r;function r(t){return Q(t)?Su(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Z(e)?t(e):n(e)}}var zu={continuation:{tokenize:Vu},exit:Hu,name:`blockQuote`,tokenize:Bu};function Bu(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 Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Vu(e,t,n){let r=this;return i;function i(t){return Q(t)?Su(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(zu,t,n)(r)}}function Hu(e){e.exit(`blockQuote`)}var Uu={name:`characterEscape`,tokenize:Wu};function Wu(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 gu(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Gu={name:`characterReference`,tokenize:Ku};function Ku(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=du,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=hu,u):(e.enter(`characterReferenceValue`),a=7,o=mu,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===du&&!tu(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 qu={partial:!0,tokenize:Xu},Ju={concrete:!0,name:`codeFenced`,tokenize:Yu};function Yu(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`),Q(t)?Su(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Z(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(qu,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Su(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Z(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Z(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&&Q(t)?Su(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Z(t)?e.check(qu,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Z(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`),Q(t)?Su(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`),Q(t)?Su(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Z(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Xu(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 Zu={name:`codeIndented`,tokenize:$u},Qu={partial:!0,tokenize:ed};function $u(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Su(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):Z(t)?e.attempt(Qu,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ed(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Su(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):Z(e)?i(e):n(e)}}var td={name:`codeText`,previous:rd,resolve:nd,tokenize:id};function nd(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 rd(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function id(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)):Z(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||Z(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 ad=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&&od(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),od(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),od(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);od(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);od(this.left,t.reverse())}}};function od(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 sd(e){let t={},n=-1,r,i,a,o,s,c,l,u=new ad(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,cd(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 nu(e,0,1/0,u.slice(0)),!l}function cd(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 ld={resolve:dd,tokenize:fd},ud={partial:!0,tokenize:pd};function dd(e){return sd(e),e}function fd(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):Z(t)?e.check(ud,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 pd(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Su(e,a,`linePrefix`)}function a(i){if(i===null||Z(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 md(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||pu(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||Z(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||_u(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||pu(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 hd(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):Z(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||Z(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function gd(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):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Su(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Z(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 _d(e,t){let n;return r;function r(i){return Z(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?Su(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var vd={name:`definition`,tokenize:yd},$={partial:!0,tokenize:bd};function yd(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return hd.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=lu(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 _u(t)?_d(e,l)(t):l(t)}function l(t){return md(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt($,d,d)(t)}function d(t){return Q(t)?Su(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Z(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function bd(e,t,n){return r;function r(t){return _u(t)?_d(e,i)(t):n(t)}function i(t){return gd(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?Su(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Z(e)?t(e):n(e)}}var xd={name:`hardBreakEscape`,tokenize:Sd};function Sd(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Z(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Cd={name:`headingAtx`,resolve:wd,tokenize:Td};function wd(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`},nu(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Td(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||_u(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Z(n)?(e.exit(`atxHeading`),t(n)):Q(n)?Su(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||_u(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Ed=`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(`.`),Dd=[`pre`,`script`,`style`,`textarea`],Od={concrete:!0,name:`htmlFlow`,resolveTo:jd,tokenize:Md},kd={partial:!0,tokenize:Pd},Ad={partial:!0,tokenize:Nd};function jd(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 Md(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):uu(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):uu(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 uu(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||_u(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Dd.includes(l)?(i=1,r.interrupt?t(s):O(s)):Ed.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||du(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 Q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||uu(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||du(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(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):Q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Z(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||_u(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Z(t)?O(t):Q(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),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):Z(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(kd,te,k)(t)):t===null||Z(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Ad,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Z(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 Dd.includes(n)?(e.consume(t),I):O(t)}return uu(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),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||Z(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function Nd(e,t,n){let r=this;return i;function i(t){return Z(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 Pd(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Lu,t,n)}}var Fd={name:`htmlText`,tokenize:Id};function Id(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):uu(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):uu(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):Z(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):Z(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):Z(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Z(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return uu(t)?(e.consume(t),S):n(t)}function S(t){return t===45||du(t)?(e.consume(t),S):C(t)}function C(t){return Z(t)?(o=C,N(t)):Q(t)?(e.consume(t),C):M(t)}function w(t){return t===45||du(t)?(e.consume(t),w):t===47||t===62||_u(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||uu(t)?(e.consume(t),E):Z(t)?(o=T,N(t)):Q(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||du(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Z(t)?(o=D,N(t)):Q(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):Z(t)?(o=O,N(t)):Q(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):Z(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||_u(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||_u(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 Q(t)?Su(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 Ld={name:`labelEnd`,resolveAll:Vd,resolveTo:Hd,tokenize:Ud},Rd={tokenize:Wd},zd={tokenize:Gd},Bd={tokenize:Kd};function Vd(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&&nu(e,0,e.length,n),e}function Hd(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=ru(s,e.slice(a+1,a+r+3)),s=ru(s,[[`enter`,u,t]]),s=ru(s,Au(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=ru(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=ru(s,e.slice(o+1)),s=ru(s,[[`exit`,c,t]]),nu(e,a,e.length,s),e}function Ud(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(lu(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(Rd,u,o?u:d)(t):t===91?e.attempt(zd,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Bd,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Wd(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 _u(t)?_d(e,a)(t):a(t)}function a(t){return t===41?u(t):md(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return _u(t)?_d(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?gd(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return _u(t)?_d(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 Gd(e,t,n){let r=this;return i;function i(t){return hd.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(lu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Kd(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 qd={name:`labelStartImage`,resolveAll:Ld.resolveAll,tokenize:Jd};function Jd(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 Yd={name:`labelStartLink`,resolveAll:Ld.resolveAll,tokenize:Xd};function Xd(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 Zd={name:`lineEnding`,tokenize:Qd};function Qd(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Su(e,t,`linePrefix`)}}var $d={name:`thematicBreak`,tokenize:ef};function ef(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||Z(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?Su(e,s,`whitespace`)(t):s(t))}}var tf={continuation:{tokenize:of},exit:cf,name:`list`,tokenize:af},nf={partial:!0,tokenize:lf},rf={partial:!0,tokenize:sf};function af(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:mu(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($d,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 mu(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(Lu,r.interrupt?n:u,e.attempt(nf,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(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 of(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Lu,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Su(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(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(rf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Su(e,e.attempt(tf,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function sf(e,t,n){let r=this;return Su(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 cf(e){e.exit(this.containerState.type)}function lf(e,t,n){let r=this;return Su(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!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var uf={name:`setextUnderline`,resolveTo:df,tokenize:ff};function df(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 ff(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`),Q(t)?Su(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Z(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var pf={tokenize:mf};function mf(e){let t=this,n=e.attempt(Lu,r,e.attempt(this.parser.constructs.flowInitial,i,Su(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ld,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 hf={resolveAll:yf()},gf=vf(`string`),_f=vf(`text`);function vf(e){return{resolveAll:yf(e===`text`?bf: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 yf(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 bf(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 xf=c({attentionMarkers:()=>kf,contentInitial:()=>Cf,disable:()=>Af,document:()=>Sf,flow:()=>Tf,flowInitial:()=>wf,insideSpan:()=>Of,string:()=>Ef,text:()=>Df}),Sf={42:tf,43:tf,45:tf,48:tf,49:tf,50:tf,51:tf,52:tf,53:tf,54:tf,55:tf,56:tf,57:tf,62:zu},Cf={91:vd},wf={[-2]:Zu,[-1]:Zu,32:Zu},Tf={35:Cd,42:$d,45:[uf,$d],60:Od,61:uf,95:$d,96:Ju,126:Ju},Ef={38:Gu,92:Uu},Df={[-5]:Zd,[-4]:Zd,[-3]:Zd,33:qd,38:Gu,42:ju,60:[Fu,Fd],91:Yd,92:[xd,Uu],93:Ld,95:ju,96:td},Of={null:[ju,hf]},kf={null:[42,95]},Af={null:[]};function jf(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=ru(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Au(a,l.events,l),l.events):[]}function f(e,t){return Nf(p(e),t)}function p(e){return Mf(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){Z(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&&nu(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 Mf(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 Nf(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=`
25
+ `;break;case-3:o=`\r
26
+ `;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 Pf(e){let t={constructs:au([xf,...(e||{}).extensions||[]]),content:n(Cu),defined:[],document:n(Tu),flow:n(pf),lazy:{},string:n(gf),text:n(_f)};return t;function n(e){return n;function n(n){return jf(t,e,n)}}}function Ff(e){for(;!sd(e););return e}var If=/[\0\t\n\r]/g;function Lf(){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(If.lastIndex=u,c=If.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Rf=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zf(e){return e.replace(Rf,Bf)}function Bf(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return cu(n.slice(t?2:1),t?16:10)}return tu(n)||e}var Vf={}.hasOwnProperty;function Hf(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),Uf(n)(Ff(Pf(n).document().write(Lf()(e,t,!0))))}function Uf(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(me),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ue),blockQuote:a(ae),characterEscape:T,characterReference:T,codeFenced:a(oe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(oe,o),codeText:a(se,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(le),hardBreakEscape:a(de),hardBreakTrailing:a(de),htmlFlow:a(fe,o),htmlFlowData:T,htmlText:a(fe,o),htmlTextData:T,image:a(pe),label:o,link:a(me),listItem:a(ge),listItemValue:f,listOrdered:a(he,d),listUnordered:a(he),paragraph:a(_e),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ue),strong:a(ve),thematicBreak:a(be)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ie,autolinkProtocol:re,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:ne,characterReference:B,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:R,resourceDestinationString:F,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Gf(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]];Vf.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]||qf).call(a,void 0,e[0])}for(r.position={start:Wf(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Wf(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:Wf(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]||qf).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+gl({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Wf(e.end)}function u(){return Xl(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=lu(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=ye(),n.position={start:Wf(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=Wf(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=Wf(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=zf(t),n.identifier=lu(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 I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function L(){this.data.referenceType=`collapsed`}function R(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=lu(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function z(e){this.data.characterReferenceType=e.type}function ne(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=cu(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=tu(t);let i=this.stack[this.stack.length-1];i.value+=r}function B(e){let t=this.stack.pop();t.position.end=Wf(e.end)}function re(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ie(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ae(){return{type:`blockquote`,children:[]}}function oe(){return{type:`code`,lang:null,meta:null,value:``}}function se(){return{type:`inlineCode`,value:``}}function ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function le(){return{type:`emphasis`,children:[]}}function ue(){return{type:`heading`,depth:0,children:[]}}function de(){return{type:`break`}}function fe(){return{type:`html`,value:``}}function pe(){return{type:`image`,title:null,url:``,alt:null}}function me(){return{type:`link`,title:null,url:``,children:[]}}function he(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ge(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function _e(){return{type:`paragraph`,children:[]}}function ve(){return{type:`strong`,children:[]}}function ye(){return{type:`text`,value:``}}function be(){return{type:`thematicBreak`}}}function Wf(e){return{line:e.line,column:e.column,offset:e.offset}}function Gf(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Gf(e,r):Kf(e,r)}}function Kf(e,t){let n;for(n in t)if(Vf.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 qf(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+gl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+gl({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+gl({start:t.start,end:t.end})+`) is still open`)}function Jf(e){let t=this;t.parser=n;function n(n){return Hf(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Yf(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 Xf(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
27
+ `}]}function Zf(e,t){let n=t.value?t.value+`
28
+ `:``,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 Qf(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $f(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ep(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=xu(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 tp(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 np(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function rp(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 ip(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rp(e,t);let i={src:xu(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 ap(e,t){let n={src:xu(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 op(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 sp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rp(e,t);let i={href:xu(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 cp(e,t){let n={href:xu(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 lp(e,t,n){let r=e.all(t),i=n?up(n):dp(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:`
29
+ `}),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:`
30
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function up(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=dp(n[r])}return t}function dp(e){return e.spread??e.children.length>1}function fp(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 pp(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mp(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function hp(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gp(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=pl(t.children[1]),o=fl(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 _p(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 vp(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var yp=9,bp=32;function xp(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Sp(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Sp(t.slice(i),i>0,!1)),a.join(``)}function Sp(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===yp||t===bp;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===yp||t===bp;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Cp(e,t){let n={type:`text`,value:xp(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wp(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Tp={blockquote:Yf,break:Xf,code:Zf,delete:Qf,emphasis:$f,footnoteReference:ep,heading:tp,html:np,imageReference:ip,image:ap,inlineCode:op,linkReference:sp,link:cp,listItem:lp,list:fp,paragraph:pp,root:mp,strong:hp,table:gp,tableCell:vp,tableRow:_p,text:Cp,thematicBreak:wp,toml:Ep,yaml:Ep,definition:Ep,footnoteDefinition:Ep};function Ep(){}var Dp=typeof self==`object`?self:globalThis,Op=(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(new Dp[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(new Dp[a](o),i)};return r},kp=e=>Op(new Map,e)(0),Ap=``,{toString:jp}={},{keys:Mp}=Object,Np=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=jp.call(e).slice(8,-1);switch(n){case`Array`:return[1,Ap];case`Object`:return[2,Ap];case`Date`:return[3,Ap];case`RegExp`:return[4,Ap];case`Map`:return[5,Ap];case`Set`:return[6,Ap];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Pp=([e,t])=>e===0&&(t===`function`||t===`symbol`),Fp=(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]=Np(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 Mp(r))(e||!Pp(Np(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||!(Pp(Np(n))||Pp(Np(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Pp(Np(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Ip=(e,{json:t,lossy:n}={})=>{let r=[];return Fp(!(t||n),!!t,new Map,r)(e),r},Lp=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?kp(Ip(e,t)):structuredClone(e):(e,t)=>kp(Ip(e,t));function Rp(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 zp(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Bp(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Rp,r=e.options.footnoteBackLabel||zp,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=xu(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:{...Lp(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
31
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
32
+ `}]}}var Vp=(function(e){if(e==null)return Kp;if(typeof e==`function`)return Gp(e);if(typeof e==`object`)return Array.isArray(e)?Hp(e):Up(e);if(typeof e==`string`)return Wp(e);throw Error(`Expected function, string, or object as test`)});function Hp(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Vp(e[n]);return Gp(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Up(e){let t=e;return Gp(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Wp(e){return Gp(t);function t(t){return t&&t.type===e}}function Gp(e){return t;function t(t,n,r){return!!(qp(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Kp(){return!0}function qp(e){return typeof e==`object`&&!!e&&`type`in e}function Jp(e){return e}var Yp=[];function Xp(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Vp(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 (`+Jp(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Yp,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Zp(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 Zp(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Yp:[e]}function Qp(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),Xp(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 $p={}.hasOwnProperty,em={};function tm(e,t){let n=t||em,r=new Map,i=new Map,a={all:s,applyData:rm,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Tp,...n.handlers},one:o,options:n,patch:nm,wrap:am};return Qp(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($p.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=Lp(n);return r.children=a.all(e),r}return Lp(e)}return(a.options.unknownHandler||im)(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=om(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=om(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function nm(e,t){e.position&&(t.position=hl(e))}function rm(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,Lp(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function im(e,t){let n=t.data||{},r=`value`in t&&!($p.call(n,`hProperties`)||$p.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 am(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
33
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
34
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
35
+ `}),n}function om(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function sm(e,t){let n=tm(e,t),r=n.one(e,void 0),i=Bp(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
36
+ `},i)),a}function cm(e,t){return e&&`run`in e?async function(n,r){let i=sm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return sm(n,{file:r,...e||t})}}function lm(e){if(e)throw e}var um=s(((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 dm(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 fm(){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?pm(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 pm(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 mm={basename:hm,dirname:gm,extname:_m,join:vm,sep:`/`};function hm(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);xm(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 gm(e){if(xm(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 _m(e){xm(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 vm(...e){let t=-1,n;for(;++t<e.length;)xm(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:ym(n)}function ym(e){xm(e);let t=e.codePointAt(0)===47,n=bm(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function bm(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 xm(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Sm={cwd:Cm};function Cm(){return`/`}function wm(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Tm(e){if(typeof e==`string`)e=new URL(e);else if(!wm(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 Em(e)}function Em(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 Dm=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Om=class{constructor(e){let t;t=e?wm(e)?{path:e}:typeof e==`string`||Mm(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Sm.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Dm.length;){let e=Dm[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)Dm.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?mm.basename(this.path):void 0}set basename(e){Am(e,`basename`),km(e,`basename`),this.path=mm.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?mm.dirname(this.path):void 0}set dirname(e){jm(this.basename,`dirname`),this.path=mm.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?mm.extname(this.path):void 0}set extname(e){if(km(e,`extname`),jm(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=mm.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){wm(e)&&(e=Tm(e)),Am(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?mm.basename(this.path,this.extname):void 0}set stem(e){Am(e,`stem`),km(e,`stem`),this.path=mm.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 bl(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 km(e,t){if(e&&e.includes(mm.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+mm.sep+"`")}function Am(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function jm(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Mm(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Nm=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Pm=d(um(),1),Fm={}.hasOwnProperty,Im=new class e extends Nm{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=fm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Pm.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(zm(`data`,this.frozen),this.namespace[e]=t,this):Fm.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zm(`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=Hm(e),n=this.parser||this.Parser;return Lm(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Lm(`process`,this.parser||this.Parser),Rm(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Hm(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);Wm(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(),Lm(`processSync`,this.parser||this.Parser),Rm(`processSync`,this.compiler||this.Compiler),this.process(e,r),Vm(`processSync`,`process`,t),n;function r(e,r){t=!0,lm(e),n=r}}run(e,t,n){Bm(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=Hm(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),Vm(`runSync`,`run`,n),r;function i(e,t){lm(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Hm(t),r=this.compiler||this.Compiler;return Rm(`stringify`,r),Bm(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(zm(`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,Pm.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];dm(o)&&dm(r)&&(r=(0,Pm.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Lm(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Rm(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function zm(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 Bm(e){if(!dm(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Vm(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Hm(e){return Um(e)?e:new Om(e)}function Um(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Wm(e){return typeof e==`string`||Gm(e)}function Gm(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Km=[],qm={allowDangerousHtml:!0},Jm=/^(https?|ircs?|mailto|xmpp)$/i,Ym=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Xm(e){let t=Zm(e),n=Qm(e);return $m(t.runSync(t.parse(n),n),e)}function Zm(e){let t=e.rehypePlugins||Km,n=e.remarkPlugins||Km,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qm}:qm;return Im().use(Jf).use(n).use(cm,r).use(t)}function Qm(e){let t=e.children||``,n=new Om;return typeof t==`string`?n.value=t:``+t,n}function $m(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||eh;for(let e of Ym)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Qp(e,l),Ol(e,{Fragment:R.Fragment,components:i,ignoreInvalidStyle:!0,jsx:R.jsx,jsxs:R.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Jl)if(Object.hasOwn(Jl,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Jl[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function eh(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Jm.test(e.slice(0,t))?e:``}function th(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function nh(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function rh(e,t,n){let r=Vp((n||{}).ignore||[]),i=ih(t),a=-1;for(;++a<i.length;)Xp(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 ih(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([ah(e[0]),oh(e[1])])}return t}function ah(e){return typeof e==`string`?new RegExp(nh(e),`g`):e}function oh(e){return typeof e==`function`?e:function(){return e}}var sh=`phrasing`,ch=[`autolink`,`link`,`image`,`label`];function lh(){return{transforms:[_h],enter:{literalAutolink:dh,literalAutolinkEmail:fh,literalAutolinkHttp:fh,literalAutolinkWww:fh},exit:{literalAutolink:gh,literalAutolinkEmail:hh,literalAutolinkHttp:ph,literalAutolinkWww:mh}}}function uh(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:sh,notInConstruct:ch},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:sh,notInConstruct:ch},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:sh,notInConstruct:ch}]}}function dh(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function fh(e){this.config.enter.autolinkProtocol.call(this,e)}function ph(e){this.config.exit.autolinkProtocol.call(this,e)}function mh(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 hh(e){this.config.exit.autolinkEmail.call(this,e)}function gh(e){this.exit(e)}function _h(e){rh(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vh],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,yh]],{ignore:[`link`,`linkReference`]})}function vh(e,t,n,r,i){let a=``;if(!Sh(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!bh(n)))return!1;let o=xh(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 yh(e,t,n,r){return!Sh(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function bh(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 xh(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=th(e,`(`),a=th(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 Sh(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||yu(n)||vu(n))&&(!t||n!==47)}Mh.peek=jh;function Ch(){this.buffer()}function wh(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Th(){this.buffer()}function Eh(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Dh(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Oh(e){this.exit(e)}function kh(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ah(e){this.exit(e)}function jh(){return`[`}function Mh(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 Nh(){return{enter:{gfmFootnoteCallString:Ch,gfmFootnoteCall:wh,gfmFootnoteDefinitionLabelString:Th,gfmFootnoteDefinition:Eh},exit:{gfmFootnoteCallString:Dh,gfmFootnoteCall:Oh,gfmFootnoteDefinitionLabelString:kh,gfmFootnoteDefinition:Ah}}}function Ph(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Mh},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?`
37
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Ih:Fh))),s(),o}}function Fh(e,t,n){return t===0?e:Ih(e,t,n)}function Ih(e,t,n){return(n?``:` `)+e}var Lh=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Hh.peek=Uh;function Rh(){return{canContainEols:[`delete`],enter:{strikethrough:Bh},exit:{strikethrough:Vh}}}function zh(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Lh}],handlers:{delete:Hh}}}function Bh(e){this.enter({type:`delete`,children:[]},e)}function Vh(e){this.exit(e)}function Hh(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 Uh(){return`~`}function Wh(e){return e.length}function Gh(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Wh,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=Kh(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]=qh(r[d]);else{let e=qh(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(`
38
+ `)}function Kh(e){return e==null?``:String(e)}function qh(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 Jh(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()),Yh);return i(),o}function Yh(e,t,n){return`>`+(n?``:` `)+e}function Xh(e,t){return Zh(e,t.inConstruct,!0)&&!Zh(e,t.notInConstruct,!1)}function Zh(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 Qh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
39
+ `&&Xh(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
40
+ `}function $h(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 eg(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 tg(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ng(e,t,n,r){let i=tg(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(eg(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,rg);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max($h(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:`
41
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
42
+ `),a&&(u+=s.move(a+`
43
+ `)),u+=s.move(c),l(),u}function rg(e,t,n){return(n?``:` `)+e}function ig(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ag(e,t,n,r){let i=ig(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?` `:`
44
+ `,...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 og(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function sg(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function cg(e,t,n){let r=ku(e),i=ku(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}}lg.peek=ug;function lg(e,t,n,r){let i=og(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=cg(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=sg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=cg(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+sg(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function ug(e,t,n){return n.options.emphasis||`*`}function dg(e,t){let n=!1;return Qp(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)&&Xl(e)&&(t.options.setext||n))}function fg(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(dg(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
45
+ `,after:`
46
+ `});return r(),t(),o+`
47
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
48
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
49
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=sg(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}pg.peek=mg;function pg(e){return e.value||``}function mg(){return`<`}hg.peek=gg;function hg(e,t,n,r){let i=ig(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 gg(){return`!`}_g.peek=vg;function _g(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 vg(){return`!`}yg.peek=bg;function yg(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 bg(){return"`"}function xg(e,t){let n=Xl(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))}Sg.peek=Cg;function Sg(e,t,n,r){let i=ig(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(xg(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 Cg(e,t,n){return xg(e,n)?`<`:`[`}wg.peek=Tg;function wg(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 Tg(){return`[`}function Eg(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 Dg(e){let t=Eg(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 Og(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function kg(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 Ag(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Og(n):Eg(n),s=e.ordered?o===`.`?`)`:`.`:Dg(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),kg(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 jg(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 Mg(e,t,n,r){let i=jg(n),a=n.bulletCurrent||Eg(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 Ng(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Pg=Vp([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Fg(e,t,n,r){return(e.children.some(function(e){return Pg(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ig(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Lg.peek=Rg;function Lg(e,t,n,r){let i=Ig(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=cg(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=sg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=cg(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+sg(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Rg(e,t,n){return n.options.strong||`*`}function zg(e,t,n,r){return n.safe(e.value,r)}function Bg(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 Vg(e,t,n){let r=(kg(n)+(n.options.ruleSpaces?` `:``)).repeat(Bg(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Hg={blockquote:Jh,break:Qh,code:ng,definition:ag,emphasis:lg,hardBreak:Qh,heading:fg,html:pg,image:hg,imageReference:_g,inlineCode:yg,link:Sg,linkReference:wg,list:Ag,listItem:Mg,paragraph:Ng,root:Fg,strong:Lg,text:zg,thematicBreak:Vg};function Ug(){return{enter:{table:Wg,tableData:Jg,tableHeader:Jg,tableRow:Kg},exit:{codeText:Yg,table:Gg,tableData:qg,tableHeader:qg,tableRow:qg}}}function Wg(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 Gg(e){this.exit(e),this.data.inTable=void 0}function Kg(e){this.enter({type:`tableRow`,children:[]},e)}function qg(e){this.exit(e)}function Jg(e){this.enter({type:`tableCell`,children:[]},e)}function Yg(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Xg));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Xg(e,t){return t===`|`?t:e}function Zg(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
50
+ `,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(`
51
+ `))}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 Gh(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=Hg.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Qg(){return{exit:{taskListCheckValueChecked:e_,taskListCheckValueUnchecked:e_,paragraph:t_}}}function $g(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:n_}}}function e_(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function t_(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 n_(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=Hg.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[lh(),Nh(),Rh(),Ug(),Qg()]}function i_(e){return{extensions:[uh(),Ph(e),zh(),Zg(e),$g()]}}var a_={tokenize:y_,partial:!0},o_={tokenize:b_,partial:!0},s_={tokenize:x_,partial:!0},c_={tokenize:S_,partial:!0},l_={tokenize:C_,partial:!0},u_={name:`wwwAutolink`,tokenize:__,previous:w_},d_={name:`protocolAutolink`,tokenize:v_,previous:T_},f_={name:`emailAutolink`,tokenize:g_,previous:E_},p_={};function m_(){return{text:p_}}for(var h_=48;h_<123;)p_[h_]=f_,h_++,h_===58?h_=65:h_===91&&(h_=97);p_[43]=f_,p_[45]=f_,p_[46]=f_,p_[95]=f_,p_[72]=[f_,d_],p_[104]=[f_,d_],p_[87]=[f_,u_],p_[119]=[f_,u_];function g_(e,t,n){let r=this,i,a;return o;function o(t){return!D_(t)||!E_.call(r,r.previous)||O_(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return D_(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(l_,u,l)(t):t===45||t===95||du(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&&uu(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function __(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!w_.call(r,r.previous)||O_(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(a_,e.attempt(o_,e.attempt(s_,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function v_(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&T_.call(r,r.previous)&&!O_(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(uu(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||pu(t)||_u(t)||yu(t)||vu(t)?n(t):e.attempt(o_,e.attempt(s_,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function y_(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 b_(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(c_,c,s)(t):t===null||_u(t)||yu(t)||t!==45&&vu(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 x_(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(c_,t,a)(o):o===null||_u(o)||yu(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function S_(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||_u(o)||yu(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||_u(e)||yu(e)?t(e):r(e)}function a(e){return uu(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):uu(t)?(e.consume(t),o):n(t)}}function C_(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return du(e)?n(e):t(e)}}function w_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_u(e)}function T_(e){return!uu(e)}function E_(e){return!(e===47||D_(e))}function D_(e){return e===43||e===45||e===46||e===95||du(e)}function O_(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var k_={tokenize:L_,partial:!0};function A_(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:P_,continuation:{tokenize:F_},exit:I_}},text:{91:{name:`gfmFootnoteCall`,tokenize:N_},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:j_,resolveTo:M_}}}}function j_(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=lu(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 M_(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 N_(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||_u(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(lu(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return _u(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 P_(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||_u(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=lu(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return _u(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),Su(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function F_(e,t,n){return e.check(Lu,t,e.attempt(k_,t,n))}function I_(e){e.exit(`gfmFootnoteDefinition`)}function L_(e,t,n){let r=this;return Su(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 R_(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&&nu(o,o.length,0,Au(s,e.slice(r+1,n),t)),nu(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),nu(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=ku(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=ku(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var z_=class{constructor(){this.map=[]}add(e,t,n){B_(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 B_(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 V_(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 H_(){return{flow:{null:{name:`table`,tokenize:U_,resolveAll:W_}}}}function U_(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):Z(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Q(t)?Su(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||_u(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,Q(t)?Su(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 Q(t)?Su(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||Z(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 Q(t)?Su(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Z(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||Z(n)?(e.exit(`tableRow`),t(n)):Q(n)?Su(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||_u(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 W_(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 z_;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(K_(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=G_(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=G_(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=G_(f,t,o,i,n,d)):(o[0]=o[1],d=G_(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&K_(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=V_(t.events,n))}return e}function G_(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},q_(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=q_(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=q_(t.events,n[2]),a=q_(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({},q_(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function K_(e,t,n,r,i){let a=[],o=q_(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 q_(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var J_={name:`tasklistCheck`,tokenize:X_};function Y_(){return{text:{91:J_}}}function X_(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 _u(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 Z(r)?t(r):Q(r)?e.check({tokenize:Z_},t,n)(r):n(r)}}function Z_(e,t,n){return Su(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Q_(e){return au([m_(),A_(),R_(e),H_(),Y_()])}var $_={};function ev(e){let t=this,n=e||$_,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Q_(n)),a.push(r_()),o.push(i_(n))}var tv=null,nv=()=>(tv??=Hn(()=>import(`./mermaid.core-B0ynITdC.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),tv),rv=e=>e===`light`?`default`:`dark`;function iv({chart:e}){let t=(0,L.useRef)(null),n=(0,L.useId)().replace(/:/g,`-`),[r,i]=(0,L.useState)(()=>w()),[a,o]=(0,L.useState)(null),s=rv(r);return(0,L.useEffect)(()=>{let e=document.documentElement,t=()=>{let e=w();i(t=>t===e?t:e)};t();let n=new MutationObserver(e=>{e.some(e=>e.attributeName===`data-theme`)&&t()});return n.observe(e,{attributes:!0,attributeFilter:[`data-theme`]}),()=>{n.disconnect()}},[]),(0,L.useEffect)(()=>{let r=!1,i=t.current;return(async()=>{if(i){i.innerHTML=``,o(null);try{let{default:t}=await nv();t.initialize({startOnLoad:!1,securityLevel:`strict`,theme:s});let{svg:a,bindFunctions:o}=await t.render(`mermaid-diagram-${n}`,e);if(r)return;i.innerHTML=a,o?.(i)}catch(e){if(r)return;i.innerHTML=``,o(e instanceof Error?e.message:`Failed to render Mermaid diagram`)}}})(),()=>{r=!0,i&&(i.innerHTML=``)}},[e,n,s]),a?(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`div`,{className:`text-sm text-github-danger`,title:a,children:`Unable to render Mermaid diagram.`}),(0,R.jsx)(`pre`,{className:`markdown-preview-code whitespace-pre-wrap border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm font-mono text-github-text-primary`,children:e})]}):(0,R.jsx)(`div`,{ref:t,"aria-label":`Mermaid diagram`,className:`mermaid-diagram overflow-x-auto rounded border border-github-border bg-github-bg-secondary p-3`})}var av=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends av{};function ov(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function sv(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function cv(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function lv(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function uv(e,t){return cv(e,t,``)}function dv(e,t){return lv(e,t,``)}function fv(e,t){return t.slice(0,pv(e,t))}function pv(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function mv(e){let t;for(t=e.length-1;t>=0&&e[t].match(/\s/);t--);return e.substring(t+1)}function hv(e){let t=e.match(/^\s*/);return t?t[0]:``}var gv=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,_v=RegExp(`[${gv}]+|\\s+|[^${gv}]`,`ug`),vv=new class extends av{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=[];for(let t of Array.from(r.segment(e))){let e=t.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}}else n=e.match(_v)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&bv(n,i,r,e),n=e,r=null,i=null)}),(r||i)&&bv(n,i,r,null),e}};function yv(e,t,n){return n?.ignoreWhitespace!=null&&!n.ignoreWhitespace?Sv(e,t,n):vv.diff(e,t,n)}function bv(e,t,n,r){if(t&&n){let i=hv(t.value),a=mv(t.value),o=hv(n.value),s=mv(n.value);if(e){let r=ov(i,o);e.value=lv(e.value,o,r),t.value=uv(t.value,r),n.value=uv(n.value,r)}if(r){let e=sv(a,s);r.value=cv(r.value,s,e),t.value=dv(t.value,e),n.value=dv(n.value,e)}}else if(n){if(e){let e=hv(n.value);n.value=n.value.substring(e.length)}if(r){let e=hv(r.value);r.value=r.value.substring(e.length)}}else if(e&&r){let n=hv(r.value),i=hv(t.value),a=mv(t.value),o=ov(n,i);t.value=uv(t.value,o);let s=sv(uv(n,o),a);t.value=dv(t.value,s),r.value=cv(r.value,n,s),e.value=lv(e.value,n,n.slice(0,n.length-s.length))}else if(r){let e=hv(r.value),n=fv(mv(t.value),e);t.value=dv(t.value,n)}else if(e){let n=fv(mv(e.value),hv(t.value));t.value=uv(t.value,n)}}var xv=new class extends av{tokenize(e){let t=RegExp(`(\\r?\\n)|[${gv}]+|[^\\S\\n\\r]+|[^${gv}]`,`ug`);return e.match(t)||[]}};function Sv(e,t,n){return xv.diff(e,t,n)}var Cv=new class extends av{constructor(){super(...arguments),this.tokenize=Tv}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
52
+ `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
53
+ `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
54
+ `)&&(e=e.slice(0,-1)),t.endsWith(`
55
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function wv(e,t,n){return Cv.diff(e,t,n)}function Tv(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
56
+ `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function Ev(e){return e==`.`||e==`!`||e==`?`}new class extends av{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(Ev(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends av{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends av{constructor(){super(...arguments),this.tokenize=Tv}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(Dv(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function Dv(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=Dv(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=Dv(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends av{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function Ov(e,t){let n=Sv(e,t),r=[],i=[];for(let e of n)e.added?i.push({value:e.value,type:`added`}):e.removed?r.push({value:e.value,type:`removed`}):(r.push({value:e.value,type:`unchanged`}),i.push({value:e.value,type:`unchanged`}));return{oldSegments:r,newSegments:i}}function kv(e,t){if(!e.trim()||!t.trim()||e===t)return!1;let n=yv(e,t),r=0,i=0;for(let e of n)i+=e.value.length,!e.added&&!e.removed&&(r+=e.value.length);return r/i>=.2}var Av=L.memo(({onMouseDown:e,onMouseUp:t,title:n=`Add a comment`})=>(0,R.jsx)(`button`,{className:`absolute -right-2 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10`,"data-comment-button":`true`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,border:`1px solid var(--color-yellow-btn-border)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},onMouseDown:e,onMouseUp:t,title:n,children:(0,R.jsx)(st,{className:`w-4 h-4`})}));Av.displayName=`CommentButton`;var jv=L.memo(({onClick:e,title:t=`Open in editor`,className:n})=>(0,R.jsx)(`button`,{className:`absolute -right-10 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10 ${n||``}`,"data-open-in-editor-button":`true`,style:{backgroundColor:`var(--color-editor-btn-bg)`,color:`var(--color-editor-btn-text)`,border:`1px solid var(--color-editor-btn-border)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`var(--color-editor-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-editor-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-editor-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-editor-btn-border)`},onMouseDown:e=>{e.stopPropagation()},onClick:t=>{t.stopPropagation(),e(t)},title:t,children:(0,R.jsx)(Je,{className:`w-4 h-4 opacity-80`})}));jv.displayName=`OpenInEditorButton`;var Mv=e=>{if(`isExpanded`in e&&e.isExpanded)return`bg-github-bg-tertiary/80`;switch(e.type){case`add`:return`bg-diff-addition-bg`;case`delete`:return`bg-diff-deletion-bg`;default:return`bg-transparent`}},Nv=L.memo(({line:e,index:t,lineId:n,isCurrentLine:r=!1,hoveredLineIndex:i,selectedLineStyle:a,onMouseEnter:o,onMouseLeave:s,onMouseMove:c,onCommentButtonMouseDown:l,onCommentButtonMouseUp:u,onOpenInEditor:d,syntaxTheme:f,onClick:p,filename:m,diffSegments:h})=>{let g=e.newLineNumber||e.oldLineNumber,_=i===t&&g,v=r?`keyboard-cursor`:``;return(0,R.jsxs)(`tr`,{id:n,className:`group ${Mv(e)} relative ${a} ${v} cursor-pointer`,onMouseEnter:o,onMouseLeave:s,onMouseMove:c,onClick:p,children:[(0,R.jsx)(`td`,{className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative`,children:e.oldLineNumber||``}),(0,R.jsxs)(`td`,{className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible`,children:[(0,R.jsx)(`span`,{children:e.newLineNumber||``}),_&&(0,R.jsxs)(R.Fragment,{children:[d&&(0,R.jsx)(jv,{onClick:d}),(0,R.jsx)(Av,{onMouseDown:l,onMouseUp:u})]})]}),(0,R.jsx)(`td`,{className:`p-0 w-full relative align-top`,children:(0,R.jsx)(lr,{line:e,syntaxTheme:f,filename:m,diffSegments:h})})]})});Nv.displayName=`DiffLineRow`;var Pv=e=>e!==void 0&&`isExpanded`in e&&e.isExpanded===!0,Fv=(e,t)=>t?`bg-github-bg-tertiary/80`:e?.type===`delete`?`bg-diff-deletion-bg`:e?.type===`add`?`bg-diff-addition-bg`:e?.type===`normal`?`bg-transparent`:`bg-github-bg-secondary`;function Iv({chunk:e,chunkIndex:t,threads:n,showAuthorBadges:r=!1,onAddComment:i,onGenerateThreadPrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u,cursor:d=null,fileIndex:f=0,onLineClick:p,commentTrigger:m,onCommentTriggerHandled:h,filename:g,onOpenInEditor:_}){let[v,y]=(0,L.useState)(null),[b,x]=(0,L.useState)(null),[S,C]=(0,L.useState)(!1),[w,T]=(0,L.useState)(null),[E,D]=(0,L.useState)(null);(0,L.useEffect)(()=>{if(m?.lineIndex!==void 0){let t=e.lines[m.lineIndex];if(t&&t.type!==`delete`){let e=t.newLineNumber;e&&(T({side:`new`,lineNumber:e}),h?.())}}},[m,e.lines,h]),(0,L.useEffect)(()=>{if(S){let e=()=>{C(!1),y(null),x(null)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}}},[S]);let O=(0,L.useCallback)((e,t)=>{w?.side===e&&w?.lineNumber===t?T(null):T({side:e,lineNumber:t})},[w]),k=(0,L.useCallback)(()=>{T(null)},[]),A=(0,L.useCallback)(()=>{if(!w)return``;let{side:t,lineNumber:n}=w,r=e.lines;if(typeof n==`number`)return r.find(e=>t===`old`?e.oldLineNumber===n:e.newLineNumber===n)?.content?.replace(/^[+-]/,``)||``;{let[e,i]=n;return r.filter(n=>{let r=t===`old`?n.oldLineNumber:n.newLineNumber;return r!==void 0&&r>=e&&r<=i}).map(e=>e.content?.replace(/^[+-]/,``)||``).join(`
57
+ `)}},[w,e.lines]),j=(0,L.useCallback)(async e=>{if(w!==null){let t=A();await i(w.lineNumber,e,t||void 0,w.side),T(null)}},[w,i,A]),M=(e,t)=>n.filter(n=>{let r=Array.isArray(n.line)?n.line[1]===e:n.line===e,i=!n.side||n.side===t;return r&&i}).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)),N=e=>e.oldLine?.type===`delete`&&e.newLine?.type===`add`?e.newLineNumber?`right`:`left`:e.oldLine?.type===`delete`?`left`:e.newLine?.type===`add`?`right`:`full`,P=(e,t)=>{let n=e===`old`?t.oldLineNumber:t.newLineNumber;if(!n)return``;if(S&&v&&b&&v.side===e&&b.side===e){let e=Math.min(v.lineNumber,b.lineNumber),t=Math.max(v.lineNumber,b.lineNumber);if(n>=e&&n<=t){let r=`after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none`;return n===e&&(r+=` after:border-t-2`),n===t&&(r+=` after:border-b-2`),r}}if(w&&w.side===e){let e=Array.isArray(w.lineNumber)?w.lineNumber:[w.lineNumber,w.lineNumber],t=e[0],r=e[1];if(t!==void 0&&r!==void 0&&n>=t&&n<=r)return`after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none`}return``},ee=(0,L.useCallback)(t=>{let n=[],r=e.oldStart,i=e.newStart,a=0;for(;a<t.length;){let e=t[a];if(!e){a++;continue}if(e.type===`normal`)n.push({oldLine:e,newLine:{...e},oldLineNumber:e.oldLineNumber??r,newLineNumber:e.newLineNumber??i,oldLineOriginalIndex:a,newLineOriginalIndex:a}),r++,i++,a++;else if(e.type===`delete`){let e=a+1;for(;e<t.length&&t[e]?.type===`delete`;)e++;let o=t.slice(a,e),s=a,c=[],l=e;for(;e<t.length&&t[e]?.type===`add`;){let n=t[e];n&&c.push(n),e++}let u=Math.max(o.length,c.length);for(let e=0;e<u;e++){let t=o[e],a=c[e],u;t&&a&&kv(t.content,a.content)&&(u=Ov(t.content,a.content)),n.push({oldLine:t,newLine:a,oldLineNumber:t?t.oldLineNumber??r+e:void 0,newLineNumber:a?a.newLineNumber??i+e:void 0,oldLineOriginalIndex:t?s+e:void 0,newLineOriginalIndex:a?l+e:void 0,wordLevelDiff:u})}r+=o.length,i+=c.length,a=e}else e.type===`add`&&(n.push({newLine:e,newLineNumber:e.newLineNumber??i,newLineOriginalIndex:a}),i++,a++)}return n},[e.oldStart,e.newStart]);return(0,R.jsx)(`div`,{className:`bg-github-bg-primary overflow-hidden`,children:(0,R.jsx)(`table`,{className:`w-full table-fixed border-collapse font-mono text-sm leading-5`,children:(0,R.jsx)(`tbody`,{children:(0,L.useMemo)(()=>ee(e.lines),[e.lines,ee]).map((e,n)=>{let i=e.oldLineNumber?M(e.oldLineNumber,`old`):[],m=e.newLineNumber?M(e.newLineNumber,`new`):[],h=[...i,...m],T=e.oldLineOriginalIndex??-1,ee=e.newLineOriginalIndex??-1,F=d?d.side===`left`&&T>=0?d.chunkIndex===t&&d.lineIndex===T:d.side===`right`&&ee>=0?d.chunkIndex===t&&d.lineIndex===ee:!1:!1,I=T>=0?`file-${f}-chunk-${t}-line-${T}-left`:void 0,te=ee>=0?`file-${f}-chunk-${t}-line-${ee}-right`:void 0,z=F&&d?.side===`left`,ne=F&&d?.side===`right`,B=`keyboard-cursor`;return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsxs)(`tr`,{className:`group cursor-pointer`,onClick:e=>{if(!S){let n=e.target;if(!(n instanceof HTMLElement))return;let r=n.closest(`td:nth-child(1)`)||n.closest(`td:nth-child(2)`),i=n.closest(`td:nth-child(3)`)||n.closest(`td:nth-child(4)`);r&&T>=0?p?.(f,t,T,`left`):i&&ee>=0&&p?.(f,t,ee,`right`)}},onMouseEnter:t=>{let n=t.target;if(!(n instanceof HTMLElement))return;let r=n.closest(`td:nth-child(1)`)||n.closest(`td:nth-child(2)`),i=n.closest(`td:nth-child(3)`)||n.closest(`td:nth-child(4)`);r&&e.oldLineNumber?D({side:`old`,lineNumber:e.oldLineNumber}):i&&e.newLineNumber&&D({side:`new`,lineNumber:e.newLineNumber})},onMouseMove:t=>{let n=t.target;if(!(n instanceof HTMLElement))return;let r=n.closest(`td:nth-child(1)`)||n.closest(`td:nth-child(2)`),i=n.closest(`td:nth-child(3)`)||n.closest(`td:nth-child(4)`);r&&e.oldLineNumber?(E?.side!==`old`||E?.lineNumber!==e.oldLineNumber)&&D({side:`old`,lineNumber:e.oldLineNumber}):i&&e.newLineNumber&&(E?.side!==`new`||E?.lineNumber!==e.newLineNumber)&&D({side:`new`,lineNumber:e.newLineNumber}),S&&v&&(v.side===`old`&&e.oldLineNumber?x({side:`old`,lineNumber:e.oldLineNumber}):v.side===`new`&&e.newLineNumber&&x({side:`new`,lineNumber:e.newLineNumber}))},onMouseLeave:()=>D(null),children:[(0,R.jsxs)(`td`,{id:I,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${z?B:``}`,children:[(0,R.jsx)(`span`,{children:e.oldLineNumber||``}),E?.side===`old`&&E?.lineNumber===e.oldLineNumber&&(0,R.jsxs)(R.Fragment,{children:[_&&g&&e.oldLine?.type!==`delete`&&e.newLineNumber!==void 0&&(0,R.jsx)(jv,{onClick:()=>{let t=e.newLineNumber;!g||t===void 0||_(g,t)}}),(0,R.jsx)(Av,{onMouseDown:t=>{t.stopPropagation(),e.oldLineNumber&&(y({side:`old`,lineNumber:e.oldLineNumber}),x({side:`old`,lineNumber:e.oldLineNumber}),C(!0))},onMouseUp:t=>{if(t.stopPropagation(),!e.oldLineNumber||!v){C(!1),y(null),x(null);return}let n=b&&b.side===`old`?b.lineNumber:e.oldLineNumber;v.side!==`old`||v.lineNumber===n?O(`old`,e.oldLineNumber):O(`old`,[Math.min(v.lineNumber,n),Math.max(v.lineNumber,n)]),C(!1),y(null),x(null)}})]})]}),(0,R.jsx)(`td`,{className:`w-1/2 p-0 align-top border-r border-github-border relative ${Fv(e.oldLine,Pv(e.oldLine))} ${P(`old`,e)} ${z?B:``}`,children:e.oldLine&&(0,R.jsx)(`div`,{className:`flex items-center relative min-h-[20px] px-3`,children:e.wordLevelDiff?(0,R.jsx)(or,{segments:e.wordLevelDiff.oldSegments,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text`}):(0,R.jsx)(ar,{code:e.oldLine.content,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit`,syntaxTheme:u,filename:g})})}),(0,R.jsxs)(`td`,{id:te,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${ne?B:``}`,children:[(0,R.jsx)(`span`,{children:e.newLineNumber||``}),E?.side===`new`&&E?.lineNumber===e.newLineNumber&&(0,R.jsxs)(R.Fragment,{children:[_&&g&&e.newLineNumber!==void 0&&(0,R.jsx)(jv,{onClick:()=>{let t=e.newLineNumber;!g||t===void 0||_(g,t)}}),(0,R.jsx)(Av,{onMouseDown:t=>{t.stopPropagation(),e.newLineNumber&&(y({side:`new`,lineNumber:e.newLineNumber}),x({side:`new`,lineNumber:e.newLineNumber}),C(!0))},onMouseUp:t=>{if(t.stopPropagation(),!e.newLineNumber||!v){C(!1),y(null),x(null);return}let n=b&&b.side===`new`?b.lineNumber:e.newLineNumber;v.side!==`new`||v.lineNumber===n?O(`new`,e.newLineNumber):O(`new`,[Math.min(v.lineNumber,n),Math.max(v.lineNumber,n)]),C(!1),y(null),x(null)}})]})]}),(0,R.jsx)(`td`,{className:`w-1/2 p-0 align-top relative ${Fv(e.newLine,Pv(e.newLine))} ${P(`new`,e)} ${ne?B:``}`,children:e.newLine&&(0,R.jsx)(`div`,{className:`flex items-center relative min-h-[20px] px-3`,children:e.wordLevelDiff?(0,R.jsx)(or,{segments:e.wordLevelDiff.newSegments,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text`}):(0,R.jsx)(ar,{code:e.newLine.content,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit`,syntaxTheme:u,filename:g})})})]}),h.length>0&&(0,R.jsx)(`tr`,{className:`bg-github-bg-secondary`,children:(0,R.jsx)(`td`,{colSpan:4,className:`p-0 border-t border-github-border`,children:h.map(t=>{let n=t.side||`new`,i;return i=n===`old`&&e.oldLineNumber?`left`:n===`new`&&e.newLineNumber?`right`:N(e),(0,R.jsx)(`div`,{className:`flex ${i===`left`?`justify-start`:i===`right`?`justify-end`:`justify-center`}`,children:(0,R.jsx)(`div`,{className:`${i===`full`?`w-full`:`w-1/2`}`,children:(0,R.jsx)(`div`,{className:`m-2 mx-3`,children:(0,R.jsx)(yr,{thread:t,showAuthorBadges:r,onGeneratePrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u})})})},t.id)})})}),w&&(w.side===`old`&&w.lineNumber===e.oldLineNumber||w.side===`new`&&w.lineNumber===e.newLineNumber||Array.isArray(w.lineNumber)&&(w.side===`new`&&w.lineNumber[1]===e.newLineNumber||w.side===`old`&&w.lineNumber[1]===e.oldLineNumber))&&(0,R.jsx)(`tr`,{className:`bg-github-bg-secondary`,children:(0,R.jsx)(`td`,{colSpan:4,className:`p-0`,children:(0,R.jsx)(`div`,{className:`flex ${w.side===`old`?`justify-start`:w.side===`new`?`justify-end`:`justify-center`}`,children:(0,R.jsx)(`div`,{className:`w-1/2`,children:(0,R.jsx)(_r,{onSubmit:j,onCancel:k,selectedCode:A(),syntaxTheme:u,filename:g})})})})})]},n)})})})})}var Lv=(0,L.memo)(function({chunk:e,chunkIndex:t,threads:n,showAuthorBadges:r=!1,onAddComment:i,onGenerateThreadPrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,mode:u=yt,syntaxTheme:d,cursor:f=null,fileIndex:p=0,onLineClick:m,commentTrigger:h,onCommentTriggerHandled:g,filename:_,onOpenInEditor:v}){let[y,b]=(0,L.useState)(null),[x,S]=(0,L.useState)(null),[C,w]=(0,L.useState)(!1),[T,E]=(0,L.useState)(null),[D,O]=(0,L.useState)(null);(0,L.useEffect)(()=>{if(h?.lineIndex!==void 0){let t=e.lines[h.lineIndex];if(t){let e=t.newLineNumber||t.oldLineNumber,n=t.type===`delete`?`old`:`new`;e&&(E({side:n,lineNumber:e}),g?.())}}},[h,e.lines,g]),(0,L.useEffect)(()=>{if(C){let e=()=>{w(!1),b(null),S(null)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}}},[C]);let k=(0,L.useCallback)((e,t)=>{T?.side===e&&T?.lineNumber===t?E(null):E({side:e,lineNumber:t})},[T]),A=(0,L.useCallback)(()=>{E(null)},[]),j=(0,L.useCallback)(()=>{if(!T)return``;let{side:t,lineNumber:n}=T,r=e.lines;if(typeof n==`number`)return r.find(e=>t===`old`?e.oldLineNumber===n:e.newLineNumber===n)?.content?.replace(/^[+-]/,``)||``;{let[e,i]=n;return r.filter(n=>{let r=t===`old`?n.oldLineNumber:n.newLineNumber;return r!==void 0&&r>=e&&r<=i}).map(e=>e.content?.replace(/^[+-]/,``)||``).join(`
58
+ `)}},[T,e.lines]),M=(0,L.useCallback)(async e=>{if(T!==null){let t=j();await i(T.lineNumber,e,t||void 0,T.side),E(null)}},[T,i,j]),N=(e,t)=>n.filter(n=>{let r=Array.isArray(n.line)?n.line[1]===e:n.line===e,i=!n.side||n.side===t;return r&&i}).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)),P=e=>{if(u===`unified`)return`full`;switch(e.type){case`delete`:return`left`;case`add`:return`right`;default:return`full`}},ee=(e,t)=>{if(!e)return``;if(C&&y&&x){let t=Math.min(y,x),n=Math.max(y,x);if(e>=t&&e<=n){let r=`after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none`;return e===t&&(r+=` after:border-t-2`),e===n&&(r+=` after:border-b-2`),r}}if(T&&T.side===t){let t=Array.isArray(T.lineNumber)?T.lineNumber[0]:T.lineNumber,n=Array.isArray(T.lineNumber)?T.lineNumber[1]:T.lineNumber;if(e>=t&&e<=n)return`after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none`}return``},F=(0,L.useMemo)(()=>{let t=new Map,n=e.lines,r=0;for(;r<n.length;){let e=n[r];if(!e){r++;continue}if(e.type===`delete`){let e=r+1;for(;e<n.length&&n[e]?.type===`delete`;)e++;let i=n.slice(r,e),a=r,o=[];for(;e<n.length&&n[e]?.type===`add`;){let t=n[e];t&&o.push({line:t,index:e}),e++}let s=Math.max(i.length,o.length);for(let e=0;e<s;e++){let n=i[e],r=o[e];if(n&&r&&kv(n.content,r.line.content)){let i=Ov(n.content,r.line.content);t.set(a+e,i.oldSegments),t.set(r.index,i.newSegments)}}r=e}else r++}return t},[e.lines]);return u===`split`?(0,R.jsx)(Iv,{chunk:e,chunkIndex:t,threads:n,showAuthorBadges:r,onAddComment:i,onGenerateThreadPrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,onOpenInEditor:v,syntaxTheme:d,cursor:f,fileIndex:p,onLineClick:m,filename:_,commentTrigger:h,onCommentTriggerHandled:g}):(0,R.jsx)(`div`,{className:`bg-github-bg-primary`,children:(0,R.jsx)(`table`,{className:`w-full table-fixed border-collapse font-mono text-sm leading-5`,children:(0,R.jsx)(`tbody`,{children:e.lines.map((e,n)=>{let i=e.newLineNumber||e.oldLineNumber||0,u=e.type===`delete`?`old`:`new`,h=T?Array.isArray(T.lineNumber)?T.lineNumber[1]:T.lineNumber:null,g=e.type===`delete`?e.oldLineNumber:e.newLineNumber,E=e.type===`delete`?`old`:`new`,I=g?N(g,E):[],te=`file-${p}-chunk-${t}-line-${n}`,z=f&&f.chunkIndex===t&&f.lineIndex===n;return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(Nv,{line:e,index:n,lineId:te,isCurrentLine:z||!1,hoveredLineIndex:D,selectedLineStyle:ee(e.newLineNumber||e.oldLineNumber,e.type===`delete`?`old`:`new`),onMouseEnter:()=>{O(n)},onMouseLeave:()=>O(null),onMouseMove:()=>{if(C&&y){let t=e.newLineNumber||e.oldLineNumber;t&&S(t)}},onCommentButtonMouseDown:t=>{t.stopPropagation();let n=e.newLineNumber||e.oldLineNumber;n&&(b(n),S(n),w(!0))},onCommentButtonMouseUp:t=>{t.stopPropagation();let n=e.newLineNumber||e.oldLineNumber,r=e.type===`delete`?`old`:`new`;if(!n||!y){w(!1),b(null),S(null);return}let i=x||n;y===i?k(r,n):k(r,[Math.min(y,i),Math.max(y,i)]),w(!1),b(null),S(null)},onOpenInEditor:v&&_&&e.type!==`delete`&&(e.newLineNumber||e.oldLineNumber)?()=>{let t=e.newLineNumber||e.oldLineNumber;t&&_&&v(_,t)}:void 0,syntaxTheme:d,filename:_,diffSegments:F.get(n),onClick:()=>{let r=e.type===`delete`?`left`:`right`;m?.(p,t,n,r)}}),I.map(t=>{let n=P(e);return(0,R.jsx)(`tr`,{className:`bg-github-bg-secondary`,children:(0,R.jsx)(`td`,{colSpan:3,className:`p-0 border-t border-github-border`,children:(0,R.jsx)(`div`,{className:`flex ${n===`left`?`justify-start`:n===`right`?`justify-end`:`justify-center`}`,children:(0,R.jsx)(`div`,{className:`${n===`full`?`w-full`:`w-1/2`} m-2 mx-4`,children:(0,R.jsx)(yr,{thread:t,showAuthorBadges:r,onGeneratePrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:d})})})})},t.id)}),T&&T.side===u&&h===i&&(0,R.jsx)(`tr`,{className:`bg-[var(--bg-secondary)]`,children:(0,R.jsx)(`td`,{colSpan:3,className:`p-0`,children:(0,R.jsx)(`div`,{className:`flex ${P(e)===`left`?`justify-start`:P(e)===`right`?`justify-end`:`justify-center`}`,children:(0,R.jsx)(`div`,{className:`${P(e)===`full`?`w-full`:`w-1/2`}`,children:(0,R.jsx)(_r,{onSubmit:M,onCancel:A,selectedCode:j(),syntaxTheme:d,filename:_})})})})})]},n)})})})})}),Rv=20,zv=(0,L.memo)(function({direction:e,hiddenLines:t,onExpandUp:n,onExpandDown:r,onExpandAll:i,isLoading:a=!1}){if(t<=0)return null;let o=`${t} ${t===1?`line`:`lines`}`,s=t<=Rv,c=[];return s?c.push({key:`all`,onClick:i,ariaLabel:`Expand all ${t} hidden lines`,icon:(0,R.jsx)(_t,{size:16,"aria-hidden":`true`})}):((e===`up`||e===`both`)&&c.push({key:`up`,onClick:n,ariaLabel:`Expand ${Rv} hidden lines above`,icon:(0,R.jsx)(Le,{size:12,"aria-hidden":`true`,className:`translate-y-0.5`})}),(e===`down`||e===`both`)&&c.push({key:`down`,onClick:r,ariaLabel:`Expand ${Rv} hidden lines below`,icon:(0,R.jsx)(Ie,{size:12,"aria-hidden":`true`,className:`-translate-y-0.5`})})),(0,R.jsxs)(`div`,{className:`grid w-full border-l border-r border-github-border bg-github-bg-tertiary text-sm grid-cols-[var(--line-number-width)_1fr]`,children:[(0,R.jsx)(`div`,{className:`flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border`,children:a?(0,R.jsx)(at,{size:14,className:`animate-spin text-github-text-muted self-center`,"aria-hidden":`true`}):c.map(e=>(0,R.jsx)(`button`,{type:`button`,onClick:e.onClick,disabled:a||!e.onClick,className:`flex flex-1 w-full items-center justify-center py-1 text-github-text-primary hover:bg-github-bg-secondary hover:text-github-text-muted transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`,title:e.ariaLabel,"aria-label":e.ariaLabel,children:e.icon},e.key))}),(0,R.jsx)(`div`,{className:`flex items-center justify-start px-3 py-1.5 font-mono text-github-text-muted select-none`,children:o})]})});function Bv({file:e,threads:t,showAuthorBadges:n,diffMode:r,syntaxTheme:i,cursor:a,fileIndex:o,mergedChunks:s,isExpandLoading:c,expandHiddenLines:l,expandAllBetweenChunks:u,onAddComment:d,onGenerateThreadPrompt:f,onRemoveThread:p,onReplyToThread:m,onRemoveMessage:h,onUpdateMessage:g,onLineClick:_,onOpenInEditor:v,commentTrigger:y,onCommentTriggerHandled:b}){let x=(t,n,r,i)=>t===`top`&&n.hiddenLinesBefore>0?(0,R.jsx)(zv,{direction:`down`,hiddenLines:n.hiddenLinesBefore,onExpandDown:()=>l(e,r,`up`),onExpandAll:()=>u(e,r,n.hiddenLinesBefore),isLoading:c}):t===`middle`&&n.hiddenLinesBefore>0?(0,R.jsx)(zv,{direction:`both`,hiddenLines:n.hiddenLinesBefore,onExpandUp:()=>l(e,r-1,`down`),onExpandDown:()=>l(e,r,`up`),onExpandAll:()=>u(e,r,n.hiddenLinesBefore),isLoading:c}):t===`bottom`&&n.hiddenLinesAfter>0?(0,R.jsx)(zv,{direction:`up`,hiddenLines:n.hiddenLinesAfter,onExpandUp:()=>l(e,i,`down`),onExpandAll:()=>l(e,i,`down`,n.hiddenLinesAfter),isLoading:c}):null;return(0,R.jsx)(R.Fragment,{children:s.map((c,l)=>{let u=l===0,S=l===s.length-1,C=c.originalIndices[0]??0,w=c.originalIndices[c.originalIndices.length-1]??0;return(0,R.jsxs)(L.Fragment,{children:[u&&x(`top`,c,C,w),!u&&x(`middle`,c,C,w),(0,R.jsx)(`div`,{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,`-`)}-${l}`,children:(0,R.jsx)(Lv,{chunk:c,chunkIndex:l,threads:t,showAuthorBadges:n,onAddComment:d,onGenerateThreadPrompt:f,onRemoveThread:p,onReplyToThread:m,onRemoveMessage:h,onUpdateMessage:g,onOpenInEditor:v,mode:r,syntaxTheme:i,cursor:a&&a.chunkIndex===l?a:null,fileIndex:o,onLineClick:_,commentTrigger:y&&y.chunkIndex===l?y:null,onCommentTriggerHandled:b,filename:e.path})}),S&&x(`bottom`,c,C,w)]},l)})})}var Vv=e=>!!(e&&e!==`stdin`),Hv=[`text-[26px] font-semibold`,`text-[22px] font-semibold`,`text-xl font-semibold`,`text-lg font-semibold`,`text-base font-semibold uppercase tracking-wide`,`text-base font-semibold`],Uv=e=>e.type===`delete`||e.type===`remove`,Wv=e=>e.type===`normal`||e.type===`context`,Gv=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),Kv=(e,t,n)=>{let r=e[e.length-1];if(r&&r.type===t){r.lines.push(n);return}e.push({type:t,lines:[n]})},qv=(e,t)=>{t.forEach(t=>Kv(e,`delete`,t)),t.length=0},Jv=e=>{let t=[],n=[],r=!1;return e.forEach(e=>{e.lines.forEach(e=>{if(!(e.type===`header`||e.type===`hunk`)){if(Uv(e)){n.push(e.content);return}if(e.type===`add`){n.length>0&&(qv(t,n),r=!0),Kv(t,r?`change`:`add`,e.content);return}Wv(e)&&(qv(t,n),r=!1,Kv(t,`context`,e.content))}}),qv(t,n),r=!1}),t},Yv=e=>L.isValidElement(e),Xv=e=>L.isValidElement(e),Zv=e=>e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(Zv).join(``):Yv(e)?Zv(e.props.children):``,Qv=e=>({h1:({children:e})=>(0,R.jsx)(`h1`,{className:`${Hv[0]} mt-6 mb-2 first:mt-0`,children:e}),h2:({children:e})=>(0,R.jsx)(`h2`,{className:`${Hv[1]} mt-6 mb-2 first:mt-0`,children:e}),h3:({children:e})=>(0,R.jsx)(`h3`,{className:`${Hv[2]} mt-6 mb-2 first:mt-0`,children:e}),h4:({children:e})=>(0,R.jsx)(`h4`,{className:`${Hv[3]} mt-6 mb-2 first:mt-0`,children:e}),h5:({children:e})=>(0,R.jsx)(`h5`,{className:`${Hv[4]} mt-6 mb-2 first:mt-0`,children:e}),h6:({children:e})=>(0,R.jsx)(`h6`,{className:`${Hv[5]} mt-6 mb-2 first:mt-0`,children:e}),p:({children:e})=>(0,R.jsx)(`p`,{className:`text-base leading-7`,children:e}),ul:({children:e})=>(0,R.jsx)(`ul`,{className:`list-disc pl-6 text-base space-y-1`,children:e}),ol:({children:e})=>(0,R.jsx)(`ol`,{className:`list-decimal pl-6 text-base space-y-1`,children:e}),li:({children:e})=>(0,R.jsx)(`li`,{children:e}),blockquote:({children:e})=>(0,R.jsx)(`blockquote`,{className:`border-l-4 border-github-border pl-4 text-github-text-muted italic`,children:e}),hr:()=>(0,R.jsx)(`hr`,{className:`border-github-border`}),a:({href:e,children:t})=>{let n=e??``;if(!n||!Gv(n))return(0,R.jsx)(`span`,{children:t});let r=n.startsWith(`http`);return(0,R.jsx)(`a`,{href:n,target:r?`_blank`:void 0,rel:r?`noreferrer`:void 0,className:`text-sky-400 hover:text-sky-300 underline underline-offset-4`,children:t})},img:({src:e,alt:t})=>{let n=e??``;return!n||!Gv(n)?null:(0,R.jsx)(`img`,{src:n,alt:t??``,loading:`lazy`,className:`max-w-full rounded border border-github-border`})},pre:({children:t})=>{let n=(Array.isArray(t)?t:[t]).find(Xv),r=Zv(n??t),i=/language-(\S+)/.exec(n?.props.className??``)?.[1],a=r.replace(/\n$/,``);return i===`mermaid`&&a.trim()?(0,R.jsx)(iv,{chart:a}):r.trim()?(0,R.jsx)(`pre`,{className:`markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm`,children:(0,R.jsx)(ir,{code:a,language:i,syntaxTheme:e,className:`font-mono text-github-text-primary`})}):(0,R.jsx)(`pre`,{className:`markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm`,children:t})},code:({className:e,children:t})=>e?(0,R.jsx)(`code`,{className:e,children:t}):(0,R.jsx)(`code`,{className:`px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-sm font-mono`,children:t}),table:({children:e})=>(0,R.jsx)(`div`,{className:`overflow-x-auto`,children:(0,R.jsx)(`table`,{className:`w-full border-collapse text-sm`,children:e})}),thead:({children:e})=>(0,R.jsx)(`thead`,{className:`bg-github-bg-secondary`,children:e}),tbody:({children:e})=>(0,R.jsx)(`tbody`,{children:e}),tr:({children:e})=>(0,R.jsx)(`tr`,{className:`border-b border-github-border`,children:e}),th:({children:e})=>(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-semibold border border-github-border`,children:e}),td:({children:e})=>(0,R.jsx)(`td`,{className:`px-3 py-2 border border-github-border`,children:e})}),$v=e=>{switch(e){case`add`:return`border-l-4 border-diff-addition-border`;case`delete`:return`border-l-4 border-diff-deletion-border`;case`change`:return`border-l-4 border-diff-addition-border`;default:return`border-l-4 border-transparent`}},ey=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),ty=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),ny=e=>{let t=e.trim();return t.length>=7&&t.startsWith(`<!--`)&&t.endsWith(`-->`)},ry=e=>e.trim()===``||ey(e)||ty(e)||ny(e),iy=e=>e.every(ry),ay=e=>{let t=e.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!t)return null;let n=t[1];return n?{marker:n[0],length:n.length,raw:e}:null},oy=(e,t)=>{let n=e.match(/^\s{0,3}(`{3,}|~{3,})\s*$/);return n?.[1]?n[1][0]===t.marker&&n[1].length>=t.length:!1},sy=e=>{let t=[],n=null,r=null,i=()=>{n&&=(t.push(n),null)},a=(e,t)=>{if(n?.type===e){n.lines.push(t);return}i(),n={kind:`markdown`,type:e,lines:[t]}},o=e=>{if(!r)return;let n=r.lines.every(e=>e.type===`context`);e&&n?(a(`context`,r.fence.raw),r.lines.forEach(e=>{a(`context`,e.content)}),a(`context`,e)):(i(),t.push({kind:`fenced-code`,lines:r.lines})),r=null};return e.forEach(e=>{e.lines.forEach(t=>{if(r){if(oy(t,r.fence)){o(t);return}r.lines.push({type:e.type,content:t});return}let n=ay(t);if(n){i(),r={fence:n,lines:[]};return}a(e.type,t)})}),o(),i(),t},cy=e=>{switch(e){case`add`:case`change`:return`border-l-4 border-diff-addition-border bg-diff-addition-bg`;case`delete`:return`border-l-4 border-diff-deletion-border bg-diff-deletion-bg`;default:return`border-l-4 border-transparent`}},ly=({blocks:e,syntaxTheme:t})=>{let n=(0,L.useMemo)(()=>Qv(t),[t]);return(0,R.jsx)(`div`,{className:`space-y-4`,children:(0,L.useMemo)(()=>sy(e),[e]).map((e,t)=>{if(e.kind===`fenced-code`)return(0,R.jsx)(`div`,{className:`px-4`,children:(0,R.jsx)(`div`,{className:`markdown-preview-code overflow-x-auto rounded border border-github-border bg-github-bg-secondary text-sm font-mono text-github-text-primary`,children:e.lines.map((e,n)=>(0,R.jsx)(`div`,{className:`${cy(e.type)} whitespace-pre px-3 py-1`,children:e.content||` `},`preview-code-line-${t}-${n}`))})},`preview-block-${t}`);let r=e.lines.join(`
59
+ `).trim();if(!r)return null;let i=iy(e.lines);return(0,R.jsx)(`div`,{className:`px-4 ${$v(e.type)}`,children:i?(0,R.jsx)(`pre`,{className:`whitespace-pre-wrap text-sm text-github-text-primary font-mono`,children:r}):(0,R.jsx)(Xm,{remarkPlugins:[ev],urlTransform:e=>Gv(e)?e:``,components:n,children:r})},`preview-block-${t}`)})})},uy=({content:e,syntaxTheme:t})=>{let n=(0,L.useMemo)(()=>Qv(t),[t]);return(0,R.jsx)(`div`,{className:`space-y-4`,children:(0,R.jsx)(Xm,{remarkPlugins:[ev],urlTransform:e=>Gv(e)?e:``,components:n,children:e})})};function dy(e){let{file:t,baseCommitish:n,targetCommitish:r,mergedChunks:i,syntaxTheme:a}=e,[o,s]=(0,L.useState)(`diff`),[c,l]=(0,L.useState)(null),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(null),[m,h]=(0,L.useState)(null),g=(0,L.useMemo)(()=>Jv(i),[i]),_=(0,L.useMemo)(()=>!n&&!r?null:t.status===`added`?r?{path:t.path,ref:r}:null:t.status===`deleted`?n?{path:t.oldPath||t.path,ref:n}:null:r?{path:t.path,ref:r}:n?{path:t.oldPath||t.path,ref:n}:null,[n,r,t.path,t.oldPath,t.status]),v=(0,L.useMemo)(()=>_?`${_.ref}:${_.path}`:null,[_]);(0,L.useEffect)(()=>{if(!_||!v||!Vv(_.ref)){l(null),h(null),p(null),d(!1);return}let e=!1;return(v!==m||c===null)&&(async()=>{v!==m&&l(null),d(!0),p(null);try{let t=encodeURIComponent(_.path),n=await fetch(`/api/blob/${t}?ref=${encodeURIComponent(_.ref)}`);if(!n.ok)throw Error(`Failed to fetch preview: ${n.statusText}`);let r=await n.text();e||(l(r),h(v))}catch(t){e||(l(null),h(null),p(t instanceof Error?t.message:`Failed to load preview`))}finally{e||d(!1)}})(),()=>{e=!0}},[c,m,_,v]);let y=(0,L.useMemo)(()=>v===m&&c!==null,[c,m,v]);return(0,L.useEffect)(()=>{o===`full-preview`&&!y&&s(`diff-preview`)},[y,o]),(0,R.jsxs)(`div`,{className:`bg-github-bg-primary`,children:[(0,R.jsx)(`div`,{className:`flex items-center justify-between border-b border-github-border px-4 py-2`,children:(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsxs)(`button`,{onClick:()=>s(`diff`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o===`diff`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Code Diff`,children:[(0,R.jsx)(Xe,{size:14}),`Diff`]}),(0,R.jsxs)(`button`,{onClick:()=>s(`diff-preview`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o===`diff-preview`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Diff Preview`,children:[(0,R.jsx)(Ye,{size:14}),`Diff Preview`]}),y&&(0,R.jsxs)(`button`,{onClick:()=>s(`full-preview`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o===`full-preview`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Full Preview`,children:[(0,R.jsx)(Ye,{size:14}),`Full Preview`]})]})}),o===`diff`&&(0,R.jsx)(Bv,{...e}),o===`diff-preview`&&(0,R.jsx)(`div`,{className:`p-4`,children:(0,R.jsx)(ly,{blocks:g,syntaxTheme:a})}),o===`full-preview`&&(0,R.jsxs)(`div`,{className:`p-4`,children:[u&&(0,R.jsx)(`div`,{className:`text-sm text-github-text-muted mb-3`,children:`Loading preview...`}),f&&(0,R.jsx)(`div`,{className:`text-sm text-github-danger mb-3`,children:f}),!u&&!f&&c!==null&&(0,R.jsx)(uy,{content:c,syntaxTheme:a}),!u&&!f&&c===null&&(0,R.jsx)(`div`,{className:`text-sm text-github-text-muted`,children:`Preview unavailable.`})]})]})}var fy=[`text-2xl font-semibold`,`text-xl font-semibold`,`text-lg font-semibold`,`text-base font-semibold`,`text-sm font-semibold uppercase tracking-wide`,`text-sm font-semibold`],py={markdown:`Markdown`,code:`Code`,raw:`Raw`,unknown:`Cell`},my=/"cell_type"\s*:\s*"([^"]+)"/,hy=/"source"\s*:/,gy=/"execution_count"\s*:\s*(null|[0-9]+)/,_y=/"id"\s*:\s*"([^"]+)"/,vy=e=>e.type===`delete`||e.type===`remove`,yy=e=>e.type===`normal`||e.type===`context`,by=e=>e.type===`add`?`add`:vy(e)?`delete`:yy(e)?`context`:null,xy=e=>e===`markdown`||e===`code`||e===`raw`?e:`unknown`,Sy=e=>{let t=e.trim();if(!t.startsWith(`"`))return null;let n=t;n.endsWith(`,`)&&(n=n.slice(0,-1));try{let e=JSON.parse(n);return typeof e==`string`?e:null}catch{return n.replace(/^"/,``).replace(/"$/,``).replace(/\\n/g,`
60
+ `).replace(/\\t/g,` `).replace(/\\"/g,`"`).replace(/\\\\/g,`\\`)}},Cy=e=>{let t=e.indexOf(`"source"`);if(t===-1)return null;let n=e.indexOf(`:`,t);if(n===-1)return null;let r=e.slice(n+1).trim();if(!r)return null;if(r.endsWith(`,`)&&(r=r.slice(0,-1).trim()),r.startsWith(`[`)){let e=r.lastIndexOf(`]`);if(e===-1)return null;let t=r.slice(0,e+1);try{let e=JSON.parse(t);if(Array.isArray(e))return e.filter(e=>typeof e==`string`)}catch{return null}return[]}if(r.startsWith(`"`))try{let e=JSON.parse(r);return typeof e==`string`?[e]:null}catch{return null}return null},wy=e=>{let t=Ty(e);if(t)return t;let n=[],r=null,i=!1,a=!1,o=!1,s=()=>{r&&(r.status=i&&a?`change`:i?`add`:a?`delete`:`context`,n.push(r),r=null,i=!1,a=!1,o=!1)},c=e=>{s(),r={cellType:e,sourceLines:[],status:`context`}};return e.forEach(e=>{e.lines.forEach(e=>{let t=by(e);if(!t)return;let n=e.content.match(my);if(n?c(xy(n[1]??``)):!r&&hy.test(e.content)&&c(`unknown`),!r)return;if(t===`add`&&(i=!0),t===`delete`&&(a=!0),!r.id){let t=e.content.match(_y);t&&(r.id=t[1])}if(r.executionCount===void 0){let t=e.content.match(gy);t&&(r.executionCount=t[1]===`null`?null:t[1])}if(hy.test(e.content)){let n=Cy(e.content);if(n){n.forEach(e=>{r?.sourceLines.push({type:t,content:e})}),o=!1;return}o=!0;return}if(!o)return;if(e.content.trim().startsWith(`]`)){o=!1;return}let s=Sy(e.content);s!==null&&r.sourceLines.push({type:t,content:s})})}),s(),{cells:n}},Ty=e=>{let t=Ey(e,[`add`,`context`]),n=Ey(e,[`delete`,`context`]),r=Dy(t),i=Dy(n);if(!r&&!i||r&&r.cells.length===0&&!i)return null;let a=r?.language??i?.language;return{cells:jy(i?.cells??[],r?.cells??[]),language:a}},Ey=(e,t)=>e.flatMap(e=>e.lines).map(e=>{let n=by(e);return!n||!t.includes(n)?null:e.content}).filter(e=>e!==null).join(`
61
+ `),Dy=e=>{if(!e.trim())return null;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||!(`cells`in t))return null;let n=t.cells;if(!Array.isArray(n))return null;let r=t.metadata,i=Oy(r);return{cells:n.map(e=>ky(e)),language:i}}catch{return null}},Oy=e=>{if(!e||typeof e!=`object`)return;let t=e,n=t.language_info;if(n&&typeof n==`object`){let e=n.name;if(typeof e==`string`&&e.trim())return e}let r=t.kernelspec;if(r&&typeof r==`object`){let e=r.language;if(typeof e==`string`&&e.trim())return e}},ky=e=>{let t=typeof e==`object`&&e?e:{},n=xy(typeof t.cell_type==`string`?t.cell_type:``),r=typeof t.id==`string`?t.id:void 0,i=t.execution_count,a=i===null?null:typeof i==`number`?String(i):typeof i==`string`?i:void 0;return{cellType:n,sourceText:Ay(t.source),id:r,executionCount:a}},Ay=e=>typeof e==`string`?e:Array.isArray(e)?e.filter(e=>typeof e==`string`).join(``):``,jy=(e,t)=>{let n=[];if(e.some(e=>!!e.id)||t.some(e=>!!e.id)){let r=new Map;e.forEach((e,t)=>{e.id&&r.set(e.id,{cell:e,index:t})});let i=new Set;return t.forEach(e=>{let t=e.id?r.get(e.id):void 0;t&&i.add(t.index),n.push(My(t?.cell??null,e))}),e.forEach((e,t)=>{i.has(t)||n.push(My(e,null))}),n}let r=Math.max(e.length,t.length);for(let i=0;i<r;i+=1){let r=e[i]??null,a=t[i]??null;n.push(My(r,a))}return n},My=(e,t)=>{if(!t&&e)return{cellType:e.cellType,sourceLines:Ny(e.sourceText,`delete`),status:`delete`,id:e.id,executionCount:e.executionCount};if(t&&!e)return{cellType:t.cellType,sourceLines:Ny(t.sourceText,`add`),status:`add`,id:t.id,executionCount:t.executionCount};let n=e?.sourceText??``,r=t?.sourceText??``,i=t?.cellType??e?.cellType??`unknown`,a=t?.id??e?.id,o=t?.executionCount??e?.executionCount;return n===r&&(e?.cellType??``)===(t?.cellType??``)?{cellType:i,sourceLines:Ny(r,`context`),status:`context`,id:a,executionCount:o}:{cellType:i,sourceLines:[...Ny(n,`delete`),...Ny(r,`add`)],status:`change`,id:a,executionCount:o}},Ny=(e,t)=>e?[{type:t,content:e}]:[],Py=e=>!!(e&&e!==`stdin`),Fy=async(e,t)=>{let n=await fetch(`/api/blob/${encodeURIComponent(e)}?ref=${encodeURIComponent(t)}`);return n.ok?n.text():null},Iy=(e,t)=>e.filter(e=>t.includes(e.type)).map(e=>e.content).join(``),Ly=e=>{if(!e)return[];let t=e.split(`
62
+ `);return t.length>0&&t[t.length-1]===``&&t.pop(),t},Ry=(e,t)=>!e&&!t?[]:e?t?wv(e,t).flatMap(e=>{let t=e.added?`add`:e.removed?`delete`:`context`;return Ly(e.value).map(e=>({type:t,content:e}))}):Ly(e).map(e=>({type:`delete`,content:e})):Ly(t).map(e=>({type:`add`,content:e})),zy=e=>L.isValidElement(e),By=e=>L.isValidElement(e),Vy=e=>e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(Vy).join(``):zy(e)?Vy(e.props.children):``,Hy=e=>{switch(e){case`add`:return`border-l-4 border-diff-addition-border`;case`delete`:return`border-l-4 border-diff-deletion-border`;case`change`:return`border-l-4 border-diff-addition-border`;default:return`border-l-4 border-transparent`}},Uy=e=>{switch(e){case`before`:return`border-l-4 border-diff-deletion-border`;case`after`:return`border-l-4 border-diff-addition-border`;default:return`border-l-4 border-transparent`}},Wy=e=>{switch(e){case`add`:return`bg-diff-addition-bg`;case`delete`:return`bg-diff-deletion-bg`;default:return`bg-transparent`}},Gy=e=>{switch(e){case`add`:return`+`;case`delete`:return`-`;default:return` `}},Ky=e=>{switch(e){case`add`:return`text-github-accent`;case`delete`:return`text-github-danger`;default:return`text-github-text-muted`}},qy=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),Jy=e=>({h1:({children:e})=>(0,R.jsx)(`h1`,{className:`${fy[0]} mb-2`,children:e}),h2:({children:e})=>(0,R.jsx)(`h2`,{className:`${fy[1]} mb-2`,children:e}),h3:({children:e})=>(0,R.jsx)(`h3`,{className:`${fy[2]} mb-2`,children:e}),h4:({children:e})=>(0,R.jsx)(`h4`,{className:`${fy[3]} mb-2`,children:e}),h5:({children:e})=>(0,R.jsx)(`h5`,{className:`${fy[4]} mb-2`,children:e}),h6:({children:e})=>(0,R.jsx)(`h6`,{className:`${fy[5]} mb-2`,children:e}),p:({children:e})=>(0,R.jsx)(`p`,{className:`text-sm leading-7`,children:e}),ul:({children:e})=>(0,R.jsx)(`ul`,{className:`list-disc pl-6 text-sm space-y-1`,children:e}),ol:({children:e})=>(0,R.jsx)(`ol`,{className:`list-decimal pl-6 text-sm space-y-1`,children:e}),li:({children:e})=>(0,R.jsx)(`li`,{children:e}),blockquote:({children:e})=>(0,R.jsx)(`blockquote`,{className:`border-l-4 border-github-border pl-4 text-github-text-muted italic`,children:e}),hr:()=>(0,R.jsx)(`hr`,{className:`border-github-border`}),a:({href:e,children:t})=>{let n=e??``;if(!n||!qy(n))return(0,R.jsx)(`span`,{children:t});let r=n.startsWith(`http`);return(0,R.jsx)(`a`,{href:n,target:r?`_blank`:void 0,rel:r?`noreferrer`:void 0,className:`text-sky-400 hover:text-sky-300 underline underline-offset-4`,children:t})},img:({src:e,alt:t})=>{let n=e??``;return!n||!qy(n)?null:(0,R.jsx)(`img`,{src:n,alt:t??``,loading:`lazy`,className:`max-w-full rounded border border-github-border`})},pre:({children:t})=>{let n=(Array.isArray(t)?t:[t]).find(By),r=Vy(n??t),i=/language-(\S+)/.exec(n?.props.className??``)?.[1];return r.trim()?(0,R.jsx)(`pre`,{className:`border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs`,children:(0,R.jsx)(ir,{code:r.replace(/\n$/,``),language:i,syntaxTheme:e,className:`font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre`})}):(0,R.jsx)(`pre`,{className:`border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs`,children:t})},code:({className:e,children:t})=>e?(0,R.jsx)(`code`,{className:e,children:t}):(0,R.jsx)(`code`,{className:`px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-xs font-mono`,children:t}),table:({children:e})=>(0,R.jsx)(`div`,{className:`overflow-x-auto`,children:(0,R.jsx)(`table`,{className:`min-w-full border border-github-border`,children:e})}),th:({children:e})=>(0,R.jsx)(`th`,{className:`border border-github-border px-2 py-1 bg-github-bg-tertiary text-sm`,children:e}),td:({children:e})=>(0,R.jsx)(`td`,{className:`border border-github-border px-2 py-1 text-sm`,children:e})}),Yy=e=>{let t=Iy(e.sourceLines,[`context`,`delete`]),n=Iy(e.sourceLines,[`context`,`add`]),r=[];return e.status===`change`?(t.trim()&&r.push({label:`Before`,content:t,tone:`before`}),n.trim()&&r.push({label:`After`,content:n,tone:`after`}),r.length===0&&r.push({label:`After`,content:n,tone:`after`}),r):e.status===`delete`?(r.push({label:`Before`,content:t||n,tone:`before`}),r):(r.push({label:`After`,content:n||t,tone:`after`}),r)},Xy=(e,t,n,r)=>{if(!t.trim())return(0,R.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:`Empty cell`});if(e===`markdown`){let e=Jy(n);return(0,R.jsx)(Xm,{remarkPlugins:[ev],urlTransform:e=>qy(e)?e:``,components:e,children:t})}return e===`raw`?(0,R.jsx)(`pre`,{className:`whitespace-pre-wrap break-words text-xs font-mono text-github-text-primary`,children:t}):(0,R.jsx)(`pre`,{className:`overflow-x-auto text-xs`,children:(0,R.jsx)(ar,{code:t.replace(/\n$/,``),language:r||`python`,syntaxTheme:n,className:`font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre`})})},Zy=({lines:e,syntaxTheme:t,language:n})=>e.length===0?(0,R.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:`Empty cell`}):(0,R.jsx)(`div`,{className:`overflow-x-auto`,children:(0,R.jsx)(`div`,{className:`font-mono text-xs`,children:e.map((e,r)=>(0,R.jsxs)(`div`,{className:`flex items-start min-h-[16px] ${Wy(e.type)}`,children:[(0,R.jsx)(`span`,{className:`w-5 text-center flex-shrink-0 select-none ${Ky(e.type)}`,children:Gy(e.type)}),(0,R.jsx)(ar,{code:e.content||` `,language:n||`python`,syntaxTheme:t,className:`flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit`})]},`notebook-code-line-${r}`))})}),Qy=({cells:e,syntaxTheme:t,language:n})=>(0,R.jsx)(`div`,{className:`space-y-4`,children:e.map((e,r)=>{let i=Yy(e),a=e.cellType===`code`&&e.executionCount!==void 0?`In[${e.executionCount??` `}]`:null,o=e.cellType===`code`,s=o?Ry(Iy(e.sourceLines,[`context`,`delete`]),Iy(e.sourceLines,[`context`,`add`])).filter(e=>e.type!==`context`):[];return o&&s.length===0?null:(0,R.jsxs)(`div`,{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${Hy(e.status)}`,children:[(0,R.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 mb-3`,children:(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wide text-github-text-muted`,children:py[e.cellType]}),a&&(0,R.jsx)(`span`,{className:`text-xs font-mono text-github-text-secondary`,children:a}),e.id&&(0,R.jsx)(`span`,{className:`text-xs font-mono text-github-text-muted`,children:e.id})]})}),(0,R.jsx)(`div`,{className:`space-y-3`,children:o?(0,R.jsx)(`div`,{className:`px-4 py-3 ${Uy(e.status===`delete`?`before`:`after`)}`,children:(0,R.jsx)(Zy,{lines:s,syntaxTheme:t,language:n})}):i.map((i,a)=>(0,R.jsx)(`div`,{className:`px-4 py-3 ${Uy(i.tone)}`,children:(0,R.jsx)(`div`,{className:`text-sm text-github-text-primary`,children:Xy(e.cellType,i.content,t,n)})},`notebook-cell-${r}-section-${a}`))})]},`notebook-cell-${r}`)})}),$y=({cells:e,syntaxTheme:t,language:n})=>(0,R.jsx)(`div`,{className:`space-y-4`,children:e.map((e,r)=>{let i=e.cellType===`code`&&e.executionCount!==void 0?`In[${e.executionCount??` `}]`:null;return(0,R.jsxs)(`div`,{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 mb-3`,children:[(0,R.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wide text-github-text-muted`,children:py[e.cellType]}),i&&(0,R.jsx)(`span`,{className:`text-xs font-mono text-github-text-secondary`,children:i}),e.id&&(0,R.jsx)(`span`,{className:`text-xs font-mono text-github-text-muted`,children:e.id})]}),(0,R.jsx)(`div`,{className:`text-sm text-github-text-primary`,children:Xy(e.cellType,e.sourceText,t,n)})]},`notebook-full-cell-${r}`)})});function eb(e){let{file:t,baseCommitish:n,targetCommitish:r}=e,[i,a]=(0,L.useState)(`diff`),o=(0,L.useMemo)(()=>wy(e.mergedChunks),[e.mergedChunks]),[s,c]=(0,L.useState)({status:`idle`,cells:o.cells,language:o.language}),l=(0,L.useMemo)(()=>s.cells.filter(e=>e.status===`context`?!1:e.cellType===`code`?Ry(Iy(e.sourceLines,[`context`,`delete`]),Iy(e.sourceLines,[`context`,`add`])).filter(e=>e.type!==`context`).length>0:!0),[s.cells]),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(o.language),[m,h]=(0,L.useState)(!1),[g,_]=(0,L.useState)(null),[v,y]=(0,L.useState)(null),b=(0,L.useMemo)(()=>!n&&!r?null:t.status===`added`?r?{path:t.path,ref:r}:null:t.status===`deleted`?n?{path:t.oldPath||t.path,ref:n}:null:r?{path:t.path,ref:r}:n?{path:t.oldPath||t.path,ref:n}:null,[n,r,t.oldPath,t.path,t.status]),x=(0,L.useMemo)(()=>b?`${b.ref}:${b.path}`:null,[b]);return(0,L.useEffect)(()=>{let e=!1;return(async()=>{let i=n||`HEAD~1`,a=r||`HEAD`,s=t.oldPath||t.path,l=t.status!==`added`&&Py(i),u=t.status!==`deleted`&&Py(a);if(!l&&!u){c({status:`ready`,cells:o.cells,language:o.language,source:`diff`,message:`Notebook content could not be loaded, falling back to diff preview.`});return}c(e=>({...e,status:`loading`}));try{let[n,r]=await Promise.all([l?Fy(s,i):Promise.resolve(null),u?Fy(t.path,a):Promise.resolve(null)]),d=n?Dy(n):null,f=r?Dy(r):null;if(!d&&!f){e||c({status:`ready`,cells:o.cells,language:o.language,source:`diff`,message:`Notebook content could not be parsed, falling back to diff preview.`});return}let p=f?.language??d?.language??o.language,m=jy(d?.cells??[],f?.cells??[]);e||c({status:`ready`,cells:m,source:`blob`,language:p})}catch(t){e||c({status:`error`,cells:o.cells,language:o.language,source:`diff`,message:t instanceof Error?t.message:`Failed to load notebook preview.`})}})(),()=>{e=!0}},[n,t.oldPath,t.path,t.status,e.mergedChunks,r,o]),(0,L.useEffect)(()=>{if(i!==`full-preview`)return;if(!b||!x||!Py(b.ref)){d(null),y(null),_(null),h(!1);return}let e=!1;return(x!==v||!u)&&(async()=>{x!==v&&d(null),h(!0),_(null);try{let t=await Fy(b.path,b.ref);if(!t)throw Error(`Failed to load preview.`);let n=Dy(t);if(!n)throw Error(`Notebook content could not be parsed.`);e||(d(n.cells),p(n.language??o.language),y(x))}catch(t){e||(d(null),y(null),_(t instanceof Error?t.message:`Failed to load preview`))}finally{e||h(!1)}})(),()=>{e=!0}},[o.language,u,v,i,b,x]),(0,R.jsxs)(`div`,{className:`bg-github-bg-primary`,children:[(0,R.jsx)(`div`,{className:`flex items-center justify-between border-b border-github-border px-4 py-2`,children:(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsxs)(`button`,{onClick:()=>a(`diff`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${i===`diff`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Code Diff`,children:[(0,R.jsx)(Xe,{size:14}),`Diff`]}),(0,R.jsxs)(`button`,{onClick:()=>a(`diff-preview`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${i===`diff-preview`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Diff Preview`,children:[(0,R.jsx)(Ye,{size:14}),`Diff Preview`]}),(0,R.jsxs)(`button`,{onClick:()=>a(`full-preview`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${i===`full-preview`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Full Preview`,children:[(0,R.jsx)(Ye,{size:14}),`Full Preview`]})]})}),i===`diff`&&(0,R.jsx)(Bv,{...e}),i===`diff-preview`&&(0,R.jsxs)(`div`,{className:`p-4`,children:[s.status===`loading`&&(0,R.jsx)(`div`,{className:`text-xs text-github-text-muted mb-3`,children:`Loading notebook preview…`}),s.message&&(0,R.jsx)(`div`,{className:`text-xs text-github-text-muted mb-3`,children:s.message}),l.length===0?(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-xs text-github-text-muted mb-3`,children:`No changed notebook cells were found. Showing raw diff instead.`}),(0,R.jsx)(Bv,{...e})]}):(0,R.jsx)(Qy,{cells:l,syntaxTheme:e.syntaxTheme,language:s.language})]}),i===`full-preview`&&(0,R.jsxs)(`div`,{className:`p-4`,children:[m&&(0,R.jsx)(`div`,{className:`text-sm text-github-text-muted mb-3`,children:`Loading preview...`}),g&&(0,R.jsx)(`div`,{className:`text-sm text-github-danger mb-3`,children:g}),!m&&!g&&u&&(0,R.jsx)($y,{cells:u,syntaxTheme:e.syntaxTheme,language:f??o.language}),!m&&!g&&!u&&(0,R.jsx)(`div`,{className:`text-sm text-github-text-muted`,children:`Preview unavailable.`})]})]})}var tb=[{id:`image`,match:e=>hc(e.path),Component:bc,canExpandHiddenLines:()=>!1},{id:`markdown`,match:e=>_c(e.path),Component:dy,canExpandHiddenLines:e=>e.status!==`added`&&e.status!==`deleted`},{id:`notebook`,match:e=>yc(e.path),Component:eb,canExpandHiddenLines:e=>e.status!==`added`&&e.status!==`deleted`},{id:`default`,match:()=>!0,Component:Bv,canExpandHiddenLines:e=>e.status!==`added`&&e.status!==`deleted`}],nb=e=>{let t=tb[tb.length-1];if(!t)throw Error(`No diff viewers registered`);return tb.find(t=>t.match(e))??t},rb=e=>{switch(e){case`added`:return(0,R.jsx)(Qe,{size:16,className:`text-github-accent`});case`deleted`:return(0,R.jsx)($e,{size:16,className:`text-github-danger`});case`renamed`:return(0,R.jsx)(Ze,{size:16,className:`text-github-warning`});default:return(0,R.jsx)(Xe,{size:16,className:`text-github-text-secondary`})}},ib=({file:e,isCollapsed:t,isReviewed:n,onToggleCollapsed:r,onToggleAllCollapsed:i,onToggleReviewed:a})=>{let[o,s]=(0,L.useState)(!1);return(0,R.jsxs)(`div`,{className:`bg-github-bg-secondary border-t-2 border-t-github-accent border-b border-github-border px-5 py-4 flex items-center justify-between flex-wrap gap-3 sticky top-0 z-10`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0`,children:[(0,R.jsx)(`button`,{onClick:n=>{n.altKey?i(!t):r(e.path)},className:`text-github-text-muted hover:text-github-text-primary transition-colors cursor-pointer`,title:t?`Expand file (Alt+Click to expand all)`:`Collapse file (Alt+Click to collapse all)`,children:t?(0,R.jsx)(Ve,{size:16}):(0,R.jsx)(ze,{size:16})}),rb(e.status),(0,R.jsx)(`h2`,{className:`text-sm font-mono text-github-text-primary m-0 overflow-hidden text-ellipsis whitespace-nowrap`,children:e.path}),(0,R.jsx)(`button`,{className:`bg-transparent border-none cursor-pointer px-1.5 py-1 rounded text-sm transition-all hover:bg-github-bg-tertiary ${o?`text-github-accent`:`text-github-text-secondary hover:text-github-text-primary`}`,onClick:()=>{Ot(e.path).then(()=>{console.log(`File path copied to clipboard:`,e.path),s(!0),setTimeout(()=>s(!1),2e3)}).catch(e=>{console.error(`Failed to copy file path:`,e)})},title:`Copy file path`,children:o?(0,R.jsx)(Re,{size:14}):(0,R.jsx)(Ke,{size:14})}),e.oldPath&&e.oldPath!==e.path&&(0,R.jsxs)(`span`,{className:`text-xs text-github-text-muted italic`,children:[`(renamed from `,e.oldPath,`)`]})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,R.jsxs)(`span`,{className:`font-medium px-1 py-0.5 rounded text-github-accent bg-green-100/10`,children:[`+`,e.additions]}),(0,R.jsxs)(`span`,{className:`font-medium px-1 py-0.5 rounded text-github-danger bg-red-100/10`,children:[`-`,e.deletions]})]}),(0,R.jsxs)(`button`,{onClick:()=>a(e.path),className:`flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 ${n?`bg-github-accent text-white`:`dark:bg-slate-600 dark:text-white dark:border-slate-500 dark:hover:bg-slate-500 dark:hover:border-slate-400 bg-github-bg-secondary text-github-text-primary border border-github-border hover:bg-github-bg-tertiary hover:border-github-text-muted`}`,title:n?`Mark as not reviewed`:`Mark as reviewed`,children:[n?(0,R.jsx)(Re,{size:14}):(0,R.jsx)(mt,{size:14}),`Viewed`]})]})]})},ab=e=>{let t={old:[],new:[]};return e.forEach(e=>{let n=e.side??`new`,[r,i]=Array.isArray(e.line)?[e.line[0],e.line[1]]:[e.line,e.line];r<=0||i<=0||t[n].push({start:Math.min(r,i),end:Math.max(r,i)})}),t},ob=(e,t)=>e.chunks.map((e,n)=>{let r=t===`old`?e.oldStart:e.newStart,i=t===`old`?e.oldLines:e.newLines;return!r||i<=0?null:{start:r,end:r+i-1,index:n}}).filter(e=>!!e),sb=e=>{let t=[],n=e[0];if(!n)return t;n.start>1&&t.push({type:`before`,start:1,end:n.start-1,nextChunkIndex:n.index});for(let n=1;n<e.length;n+=1){let r=e[n-1],i=e[n];!r||!i||i.start>r.end+1&&t.push({type:`between`,start:r.end+1,end:i.start-1,prevChunkIndex:r.index,nextChunkIndex:i.index})}let r=e[e.length-1];return r&&t.push({type:`after`,start:r.end+1,end:1/0,prevChunkIndex:r.index}),t},cb=e=>{let t=new Map;return e.forEach(e=>{let n=e.originalIndices[0];n!==void 0&&t.set(n,e)}),t},lb=e=>{let t=e[e.length-1];return t?.originalIndices[t.originalIndices.length-1]??null},ub=(0,L.memo)(function({file:e,threads:t,showAuthorBadges:n=!1,diffMode:r,reviewedFiles:i,onToggleReviewed:a,collapsedFiles:o,onToggleCollapsed:s,onToggleAllCollapsed:c,onAddComment:l,onGenerateThreadPrompt:u,onRemoveThread:d,onReplyToThread:f,onRemoveMessage:p,onUpdateMessage:m,onOpenInEditor:h,syntaxTheme:g,baseCommitish:_,targetCommitish:v,cursor:y=null,fileIndex:b=0,onLineClick:x,commentTrigger:S,onCommentTriggerHandled:C,mergedChunks:w,expandLines:T,expandAllBetweenChunks:E,prefetchFileContent:D,isExpandLoading:O}){let k=o.has(e.path),A=(0,L.useRef)(null),[j,M]=(0,L.useState)(!1),N=nb(e),P=N.canExpandHiddenLines?.(e)??!1;(0,L.useEffect)(()=>{if(!P)return;let e=A.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e?.isIntersecting&&M(!0)},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[P]),(0,L.useEffect)(()=>{j&&!k&&P&&D(e)},[j,k,P,e,D]);let ee=(0,L.useCallback)(async(t,n,r,i)=>{try{await l(e.path,t,n,r,i)}catch(e){console.error(`Failed to add comment:`,e)}},[e.path,l]);(0,L.useEffect)(()=>{if(k||O||!P||t.length===0||e.chunks.length===0||w.length===0)return;let n=ab(t),r=cb(w),i=lb(w),a=w[w.length-1],o=new Set,s=(e,t)=>{o.has(e)||(o.add(e),t())};[`old`,`new`].forEach(t=>{let o=n[t];o.length!==0&&sb(ob(e,t)).forEach(t=>{if(!o.some(e=>e.start<=t.end&&e.end>=t.start))return;if(t.type===`after`&&a&&i!==null){a.hiddenLinesAfter>0&&s(`after-${i}`,()=>{T(e,i,`down`,a.hiddenLinesAfter)});return}let n=t.nextChunkIndex;if(n===void 0)return;let c=r.get(n);!c||c.hiddenLinesBefore<=0||(t.type===`before`?s(`before-${n}`,()=>{T(e,n,`up`,c.hiddenLinesBefore)}):t.type===`between`&&s(`between-${n}`,()=>{E(e,n,c.hiddenLinesBefore)}))})})},[t,E,T,e,k,O,w,P]);let F=N.Component,I={file:e,threads:t,showAuthorBadges:n,diffMode:r,syntaxTheme:g,baseCommitish:_,targetCommitish:v,cursor:y,fileIndex:b,mergedChunks:w,isExpandLoading:O,expandHiddenLines:T,expandAllBetweenChunks:E,onAddComment:ee,onGenerateThreadPrompt:u,onRemoveThread:d,onReplyToThread:f,onRemoveMessage:p,onUpdateMessage:m,onOpenInEditor:h,onLineClick:x,commentTrigger:S,onCommentTriggerHandled:C};return(0,R.jsxs)(`div`,{ref:A,className:`bg-github-bg-primary`,style:{"--line-number-width":`4em`},children:[(0,R.jsx)(ib,{file:e,isCollapsed:k,isReviewed:i.has(e.path),onToggleCollapsed:s,onToggleAllCollapsed:c,onToggleReviewed:a}),!k&&(0,R.jsx)(`div`,{className:`overflow-y-auto`,children:(0,R.jsx)(F,{...I})})]})});function db(e){if(!e.isDirectory||!e.children)return[];let t=[];return e.path&&t.push(e.path),e.children.forEach(e=>{t.push(...db(e))}),t}function fb(e){let t={name:``,path:``,isDirectory:!0,children:[]};e.forEach(e=>{let n=e.path.split(`/`),r=t;for(let t=0;t<n.length;t++){let i=n[t];if(!i)continue;let a=t===n.length-1,o=n.slice(0,t+1).join(`/`);r.children||=[];let s=r.children.find(e=>e.name===i);s||(s={name:i,path:o,isDirectory:!a,children:a?void 0:[],file:a?e:void 0},r.children.push(s)),r=s}});let n=e=>{if(!e.isDirectory||!e.children)return e;if(e.children=e.children.map(n),e.children.length===1&&e.children[0]?.isDirectory&&e.children[0]?.children){let t=e.children[0];if(t)return e.name?{...e,name:`${e.name}/${t.name}`,path:t.path,children:t.children}:e}return e};return n(t)}function pb({files:e,onScrollToFile:t,onFileSelected:n,comments:r,reviewedFiles:i,onToggleReviewed:a,selectedFileIndex:o}){let s=(0,L.useMemo)(()=>fb(e),[e]),c=(0,L.useRef)(null),l=(0,L.useRef)(new Map),u={"--dir-row-height":`calc(var(--spacing, 0.25rem) * 9)`},[d,f]=(0,L.useState)(()=>new Set(db(s))),[p,m]=(0,L.useState)(``),h=(0,L.useMemo)(()=>{let e=new Map;return r.forEach(t=>{e.set(t.file,(e.get(t.file)??0)+1)}),e},[r]),g=(0,L.useMemo)(()=>{let t=new Map;return e.forEach((e,n)=>{t.set(e.path,n)}),t},[e]),_=(0,L.useMemo)(()=>{let e=p.trim().toLowerCase(),t=n=>{if(!e)return n;if(n.isDirectory&&n.children){let e=n.children.map(e=>t(e)).filter(e=>e!==null);return e.length>0?{...n,children:e}:null}else if(n.file)return n.file.path.toLowerCase().includes(e)?n:null;return null};return t(s)||{...s,children:[]}},[s,p]),v=e=>{switch(e){case`added`:return(0,R.jsx)(Qe,{size:16,className:`text-github-accent`});case`deleted`:return(0,R.jsx)($e,{size:16,className:`text-github-danger`});case`renamed`:return(0,R.jsx)(Ze,{size:16,className:`text-github-warning`});default:return(0,R.jsx)(Xe,{size:16,className:`text-github-text-secondary`})}},y=e=>{f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},b=(0,L.useMemo)(()=>db(s),[s]),x=d.size===b.length&&b.length>0,S=()=>{f(x?new Set:new Set(b))},C=(e,t)=>{let n=c.current,r=e.currentTarget;if(!n){y(t);return}let i=n.getBoundingClientRect(),a=r.getBoundingClientRect(),o=Number.parseFloat(getComputedStyle(r).top||`0`);if(a.top-i.top<=o+1){let e=l.current.get(t)?.querySelector(`[data-tree-row="true"]:not([data-dir-header="true"])`),i=r.getBoundingClientRect().height||0,a=e??r,o=i*Number.parseInt(a.dataset.depth||r.dataset.depth||`0`,10),s=Math.max(0,a.offsetTop-o);if(Math.abs(n.scrollTop-s)<=1){y(t);return}n.scrollTo({top:s,behavior:`smooth`});return}y(t)},w=(e,r=0)=>{if(e.isDirectory&&e.children){let t=d.has(e.path);return(0,R.jsxs)(`div`,{"data-dir-container":e.path||void 0,ref:t=>{e.path&&(t?l.current.set(e.path,t):l.current.delete(e.path))},children:[e.name&&(0,R.jsxs)(`div`,{className:`sticky flex h-9 items-center gap-2 bg-github-bg-secondary px-4 hover:bg-github-bg-tertiary cursor-pointer`,"data-dir-header":`true`,"data-tree-row":`true`,"data-depth":r,style:{paddingLeft:`${r*16+16}px`,top:`calc(${r} * var(--dir-row-height))`,zIndex:1e3-r},onClick:t=>C(t,e.path),children:[t?(0,R.jsx)(ze,{size:16}):(0,R.jsx)(Ve,{size:16}),t?(0,R.jsx)(et,{size:16,className:`text-github-text-secondary`}):(0,R.jsx)(tt,{size:16,className:`text-github-text-secondary`}),(0,R.jsx)(`span`,{className:`text-sm text-github-text-primary font-medium flex-1 overflow-hidden text-ellipsis whitespace-nowrap`,title:e.name,children:e.name})]}),(t||!e.name)&&e.children.map(t=>w(t,e.name?r+1:r))]},e.path)}else if(e.file){let s=e.file,c=h.get(s.path)??0,l=i.has(s.path),u=g.get(s.path)??-1;return(0,R.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-2 hover:bg-github-bg-tertiary cursor-pointer transition-colors ${l?`opacity-70`:``} ${o!==null&&o===u?`bg-github-bg-tertiary`:``}`,"data-file-row":`true`,"data-tree-row":`true`,"data-depth":r,style:{paddingLeft:`${r*16+16}px`},onClick:()=>{t(s.path),n?.()},children:[(0,R.jsx)(Tt,{checked:l,onChange:()=>{a(s.path)},title:l?`Mark as not reviewed`:`Mark as reviewed`,className:`z-10`}),v(e.file.status),(0,R.jsx)(`span`,{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${l?`line-through text-github-text-muted`:``}`,title:e.file.path,children:e.name}),c>0&&(0,R.jsxs)(`span`,{className:`text-github-warning text-sm font-medium ml-auto flex items-center gap-1`,children:[(0,R.jsx)(st,{size:14}),c]})]},s.path)}return null};return(0,R.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,R.jsxs)(`div`,{className:`px-4 py-3 border-b border-github-border bg-github-bg-tertiary`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,R.jsxs)(`h3`,{className:`text-sm font-semibold text-github-text-primary m-0`,children:[`Files changed (`,e.length,`)`]}),(0,R.jsx)(`button`,{onClick:S,className:`p-1 hover:bg-github-bg-primary rounded transition-colors`,title:x?`Collapse all`:`Expand all`,children:x?(0,R.jsx)(He,{size:16,className:`text-github-text-secondary`}):(0,R.jsx)(Ue,{size:16,className:`text-github-text-secondary`})})]}),(0,R.jsxs)(`div`,{className:`relative`,children:[(0,R.jsx)(ft,{size:16,className:`absolute left-3 top-1/2 transform -translate-y-1/2 text-github-text-muted`}),(0,R.jsx)(`input`,{type:`text`,placeholder:`Filter files...`,value:p,onChange:e=>m(e.target.value),className:`w-full pl-9 pr-3 py-2 text-sm bg-github-bg-primary border border-github-border rounded-md focus:outline-none focus:border-github-accent text-github-text-primary placeholder-github-text-muted`})]})]}),(0,R.jsx)(`div`,{className:`flex-1 overflow-y-auto relative z-0`,style:u,ref:c,children:_.children?.map(e=>w(e))})]})}function mb({style:e}){return(0,R.jsx)(`svg`,{width:`98`,height:`96`,viewBox:`0, 0, 98, 96`,style:e,xmlns:`http://www.w3.org/2000/svg`,"aria-label":`GitHub`,role:`img`,children:(0,R.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z`,fill:`currentColor`})})}function hb({isOpen:e,onClose:t}){let{enableScope:n,disableScope:r}=we();return V(`escape`,()=>t(),{enabled:e},[t,e]),(0,L.useEffect)(()=>(e?r(`navigation`):n(`navigation`),()=>{n(`navigation`)}),[e,n,r]),e?(0,R.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,R.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,R.jsxs)(`div`,{className:`relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full mx-4 max-h-[80vh] overflow-y-auto`,children:[(0,R.jsxs)(`div`,{className:`sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4 flex items-center justify-between`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold text-github-text-primary`,children:`Keyboard Shortcuts`}),(0,R.jsx)(`button`,{onClick:t,className:`text-github-text-secondary hover:text-github-text-primary transition-colors`,"aria-label":`Close help modal`,children:(0,R.jsx)(vt,{size:20})})]}),(0,R.jsxs)(`div`,{className:`px-6 py-4 grid grid-cols-1 lg:grid-cols-2 gap-6`,children:[(0,R.jsxs)(`section`,{children:[(0,R.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Line Navigation`}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`j`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`↓`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next line`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`k`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`↑`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous line`})]})]})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`File Navigation`}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`]`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next file`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`[`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous file`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,R.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`[`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Jump to first file`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,R.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`]`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Jump to last file`})]})]})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Chunk Navigation`}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`n`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next change chunk (added/deleted lines)`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`p`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous change chunk (added/deleted lines)`})]})]})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Comment Navigation`}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`N`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next comment`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`P`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous comment`})]})]})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Side Navigation (Side-by-side mode)`}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`h`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`←`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Focus left side`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`l`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`→`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Focus right side`})]})]})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Comment Management`}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,R.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`L`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`View all comments list`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,R.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`C`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Copy all comments prompt`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,R.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`D`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Delete all comments`})]})]})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Actions`}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`v`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Toggle viewed state of current file`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,R.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`R`})]}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Refresh diff when changes detected`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`c`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Add comment at current line`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`.`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Move cursor to center of viewport`})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`?`}),(0,R.jsx)(`span`,{className:`text-github-text-secondary`,children:`Show/hide this help`})]})]})]}),(0,R.jsx)(`div`,{className:`pt-4 border-t border-github-border lg:col-span-2`,children:(0,R.jsx)(`p`,{className:`text-xs text-github-text-secondary`,children:`Shortcuts are disabled when typing in input fields.`})})]})]})]}):null}function gb({style:e}){return(0,R.jsxs)(`svg`,{style:e,viewBox:`0 0 720 190`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-label":`difit`,role:`img`,children:[(0,R.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M440.487 5.90627C432.164 9.01695 427.318 16.2817 427.318 25.649C427.318 35.9474 433.206 43.6458 442.714 45.7819C451.336 47.7188 459.606 44.3893 464.84 36.8737C466.923 33.8843 467.35 32.4073 467.606 27.3105C467.773 23.9957 467.492 20.0154 466.983 18.4654C465.699 14.5629 460.869 9.13088 456.854 7.07513C452.57 4.88086 444.73 4.32102 440.487 5.90627ZM596.658 6.653C588.927 9.55794 584.572 15.4908 583.887 24.0465C583.17 33.0212 586.83 39.8868 594.382 43.7278C603.739 48.4877 615.574 44.5081 620.482 34.9515C625.35 25.4728 622.15 13.4916 613.37 8.32678C608.986 5.74808 601.154 4.96365 596.658 6.653ZM368.585 7.68006C367.464 8.80629 367.302 12.903 367.302 40.2286V71.4878L363.832 68.1329C353.432 58.0787 335.595 52.668 319.246 54.6082C310.542 55.641 299.81 59.1369 293.3 63.0607C278.56 71.9427 266.453 89.5576 263.139 106.945C261.765 114.155 261.602 129.431 262.825 136.365C265.723 152.796 274.795 168.36 286.716 177.355C298.275 186.077 310.237 190 325.274 190C340.687 190 353.943 185.273 362.869 176.594L367.302 172.284V178.215C367.302 186.902 366.946 186.724 384.303 186.709C392.243 186.702 399.29 186.347 399.964 185.919C401.04 185.236 401.189 174.47 401.189 97.1224C401.189 23.7236 401.003 8.87842 400.068 7.74809C398.433 5.77021 370.547 5.71037 368.585 7.68006ZM526.937 7.94153C519.783 10.0325 515.359 12.5834 510.029 17.6867C501.959 25.4129 498.766 34.4597 498.766 49.5975V58.8517H490.659C484.378 58.8517 482.263 59.1418 481.268 60.1394C480.214 61.1976 479.986 63.6558 479.986 73.91C479.986 82.5264 480.289 86.6977 480.966 87.3764C481.601 88.0141 484.903 88.36 490.356 88.36H498.766V136.692C498.766 183.638 498.811 185.048 500.345 185.873C502.433 186.994 529.394 186.994 531.482 185.873C533.016 185.048 533.061 183.638 533.061 136.692V88.36H549.334C563.038 88.36 565.809 88.1568 566.89 87.0723C568.782 85.1723 568.782 62.0394 566.89 60.1394C565.808 59.0541 563.029 58.8517 549.231 58.8517H532.856L533.216 51.9721C533.604 44.5499 534.721 41.9147 538.546 39.3958C540.377 38.1901 543.049 37.904 554.661 37.6737C562.626 37.5155 569.018 37.0343 569.602 36.5483C570.892 35.4761 571.046 10.3579 569.777 7.9776C568.978 6.47923 567.918 6.39562 550.384 6.45054C535.269 6.49808 530.93 6.77431 526.937 7.94153ZM654.931 26.4834C653.136 27.7662 653.094 28.1572 653.094 43.3245V58.8517H644.567C633.342 58.8517 633.497 58.6443 633.497 73.6059C633.497 88.5674 633.342 88.36 644.567 88.36H653.094V122.636C653.094 159.998 653.439 163.935 657.362 171.354C661.848 179.838 669.111 184.99 680.857 188.022C687.996 189.866 707.647 189.269 714.309 187.007C719.756 185.158 719.86 184.87 719.969 171.298C720.082 157.364 720.441 157.791 709.174 158.48C695.386 159.324 689.341 156.938 687.388 149.883C686.927 148.214 686.58 134.435 686.577 117.663L686.572 88.36H702.068H717.564L718.87 86.3592C719.946 84.7108 720.129 82.3461 719.91 72.9575C719.719 64.8279 719.321 61.1689 718.522 60.2041C717.553 59.0345 715.315 58.8517 701.987 58.8517H686.572L686.546 43.8926C686.526 31.8556 686.28 28.613 685.288 27.2941C684.156 25.7884 682.945 25.6351 670.412 25.4129C658.94 25.2088 656.476 25.3793 654.931 26.4834ZM431.459 60.1394C430.316 61.2877 430.178 68.0001 430.188 121.82C430.197 168.838 430.429 182.667 431.232 184.262L432.264 186.311L446.657 186.535C458.941 186.725 461.242 186.567 462.353 185.452C463.521 184.279 463.655 177.845 463.655 122.786C463.655 68.0985 463.515 61.2877 462.372 60.1394C460.469 58.2287 433.362 58.2287 431.459 60.1394ZM587.799 60.4369C587.238 61.4894 586.954 82.56 586.954 123.084C586.954 177.502 587.093 184.285 588.236 185.434C590.138 187.342 616.431 187.342 618.333 185.434C619.476 184.285 619.615 177.447 619.615 122.482C619.615 75.6149 619.38 60.5828 618.636 59.8353C617.947 59.1443 613.344 58.8517 603.15 58.8517C589.644 58.8517 588.586 58.9607 587.799 60.4369ZM347.956 87.3469C362.023 93.9543 369.138 107.306 367.775 124.535C366.623 139.097 359.678 149.866 347.83 155.463C337.073 160.544 325.541 160.523 315.049 155.403C293.381 144.83 288.765 112.315 306.417 94.5961C313.92 87.0641 322.021 84.1412 334.301 84.5354C341.49 84.7666 343.224 85.124 347.956 87.3469Z`,fill:`currentColor`}),(0,R.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.42299 0.744751C4.61699 2.15275 2.03999 5.66375 0.956994 12.2768C-0.369006 20.3728 -0.294006 170.791 1.03899 176.572C2.29699 182.031 4.81699 185.308 9.65399 187.774C13.265 189.615 16.865 189.684 108.63 189.684C163.129 189.684 204.095 189.304 204.41 188.795C206 188.5 206 188.795 207.5 188C211.167 187.079 216.779 180.138 218.005 175.584C218.682 173.068 218.939 143.952 218.756 90.4718C218.487 11.7478 218.417 9.10275 216.535 6.62675C215.466 5.22075 213.441 3.19575 212.035 2.12675C209.546 0.23575 206.839 0.17975 110.978 0.0167504C55.373 -0.0782496 11.148 0.239751 9.42299 0.744751ZM203.778 14.8838C205.558 16.6638 205.509 172.577 203.728 175.005C202.577 176.574 198.865 176.688 156.978 176.446L111.478 176.184L111.226 138.684L110.974 101.184H84.059C69.255 101.184 56.808 101.52 56.397 101.931C55.986 102.343 60.674 107.82 66.814 114.104C72.954 120.388 77.978 126.202 77.978 127.026C77.978 129.577 74.769 134.267 71.896 135.916C69.609 137.229 68.75 137.278 66.704 136.217C63.533 134.572 28.705 99.1448 27.757 96.5998C27.36 95.5348 27.491 93.4308 28.049 91.9238C28.955 89.4768 68.498 49.6838 70.024 49.6838C70.366 49.6838 72.356 51.1627 74.447 52.9697C77.589 55.6867 78.118 56.6658 77.498 58.6198C77.086 59.9198 72.075 65.8308 66.363 71.7568C60.651 77.6818 55.978 83.0148 55.978 83.6068C55.978 84.3488 64.068 84.6838 81.952 84.6838H107.927H110.666C111.144 82.5 110.978 73.4537 110.978 46.2337V13.6838H156.778C191.067 13.6838 202.88 13.9858 203.778 14.8838ZM148.803 52.7217C146.51 54.0597 144.845 59.5997 145.74 62.9107C146.146 64.4107 150.657 69.9308 155.764 75.1788C161.411 80.9788 164.547 84.8988 163.764 85.1788C163.057 85.4318 151.549 85.7608 138.19 85.9108C117.896 86.1388 113.747 86.4308 112.956 87.6838C112.435 88.5088 112.002 91.7228 111.993 94.8268C111.982 99.0598 112.373 100.622 113.56 101.077C114.43 101.411 126.13 101.684 139.56 101.684C156.121 101.684 163.978 102.026 163.978 102.746C163.978 103.33 160.187 107.607 155.554 112.251C146.244 121.582 144.276 125.371 146.069 130.514C147.321 134.107 149.576 135.684 153.463 135.684C155.522 135.684 159.843 131.902 173.778 117.904C191.699 99.9008 194.978 96.0678 194.978 93.1208C194.978 91.1338 157.422 53.8238 154.163 52.5728C151.322 51.4818 150.908 51.4937 148.803 52.7217Z`,fill:`currentColor`})]})}function _b({shouldReload:e,isReloading:t,onReload:n,changeType:r,className:i=``,compact:a=!1}){return e?(0,R.jsxs)(`button`,{onClick:n,disabled:t,className:`
63
+ flex items-center gap-1.5 text-xs rounded-md border ${i} ${a?`px-2 py-2`:`px-3 py-1.5`}
64
+ ${t?`bg-github-text-primary text-github-bg-primary border-github-text-primary cursor-not-allowed`:`bg-github-text-primary text-github-bg-primary border-github-text-primary`}
65
+ `,title:`${(()=>{switch(r){case`commit`:return`New commits available`;case`staging`:return`Staging changes detected`;case`file`:return`File changes detected`;default:return`Changes detected`}})()} - Click to refresh`,"aria-label":a?`Refresh`:void 0,children:[(0,R.jsx)(dt,{size:12,className:`${t?`animate-spin`:``}`}),a?(0,R.jsx)(`span`,{className:`sr-only`,children:`Refresh`}):`Refresh`]}):null}var vb=new Set([`merge-base`]);function yb({label:e,value:t,resolvedValue:n,onChange:r,options:i,disabledValues:a=[]}){let[o,s]=(0,L.useState)(!1),{refs:c,floatingStyles:l,context:u}=Ws({open:o,onOpenChange:s,middleware:[Do(4),ko(),Oo({padding:8})],whileElementsMounted:go}),{getReferenceProps:d,getFloatingProps:f}=Js([ts(u,{handleClose:ac()}),Rs(u),Ks(u),Hs(u),Xs(u)]),p=t===`working`&&a.includes(`staged`)||t===`staged`&&a.includes(`working`),m=i.specialOptions.filter(e=>!vb.has(e.value)),h=()=>{let e=m.find(e=>e.value===t);if(e)return e.label;let n=i.branches.find(e=>e.name===t);if(n)return`${n.name}${n.current?` (current)`:``}`;let r=i.commits.find(e=>e.shortHash===t||e.hash===t);return r?`${r.shortHash} - ${r.message}`:t||`Select...`},g=e=>{r(e),s(!1)},_=e=>a.includes(e),v=(e,t)=>[`w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors`,e?`hover:bg-diff-selected-bg focus:bg-diff-selected-bg`:`hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary`,e?`bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2`:``,t?`opacity-50 cursor-not-allowed`:`cursor-pointer`].join(` `),y=(e,r)=>e===t||r===t?!0:n?e===n||r===n:!1,b=()=>{let e=0,n=m.findIndex(e=>e.value===t);if(n!==-1)return n;if(e+=m.length,!p){let n=i.commits.findIndex(e=>e.shortHash===t);if(n!==-1)return e+n;e+=i.commits.length;let r=i.branches.findIndex(e=>e.name===t);if(r!==-1)return e+r}return 0};return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`button`,{ref:c.setReference,type:`button`,className:`flex items-center gap-1.5 cursor-pointer group`,"aria-haspopup":`listbox`,"aria-expanded":o,...d(),children:[(0,R.jsxs)(`span`,{className:`text-xs text-github-text-secondary`,children:[e,`:`]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors`,children:[(0,R.jsx)(`code`,{className:`text-xs text-github-text-primary max-w-[150px] truncate`,children:h()}),(0,R.jsx)(ze,{size:12,className:`text-github-text-secondary group-hover:text-github-text-primary transition-colors`})]})]}),o&&(0,R.jsx)(Cs,{children:(0,R.jsx)(Ps,{context:u,modal:!1,initialFocus:b(),children:(0,R.jsxs)(`div`,{ref:c.setFloating,style:l,className:`bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[400px] overflow-y-auto`,...f(),children:[m.length>0&&(0,R.jsxs)(`div`,{className:`border-b border-github-border`,children:[(0,R.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Special`}),m.map(e=>(0,R.jsx)(`button`,{onClick:()=>g(e.value),disabled:_(e.value),className:v(e.value===t,_(e.value)),children:e.label},e.value))]}),!p&&i.commits.length>0&&(0,R.jsxs)(`div`,{className:`border-b border-github-border`,children:[(0,R.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Recent Commits`}),i.commits.map(e=>(0,R.jsx)(`button`,{onClick:()=>g(e.shortHash),disabled:_(e.shortHash),className:v(y(e.shortHash,e.hash),_(e.shortHash)),children:(0,R.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,R.jsx)(`code`,{className:`text-xs text-github-text-primary font-mono whitespace-nowrap`,children:e.shortHash}),(0,R.jsx)(`span`,{className:`text-xs text-github-text-secondary flex-1 break-words`,children:e.message})]})},e.hash))]}),!p&&i.branches.length>0&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary`,children:`Branches`}),i.branches.map(e=>(0,R.jsx)(`button`,{onClick:()=>g(e.name),disabled:_(e.name),className:v(e.name===t,_(e.name)),children:(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`text-github-text-primary`,children:e.name}),e.current&&(0,R.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:`(current)`})]})},e.name))]})]})})})]})}function bb({isOpen:e,onClose:t,options:n,selection:r,resolvedBaseRevision:i,resolvedTargetRevision:a,onApply:o}){let[s,c]=(0,L.useState)(r),{enableScope:l,disableScope:u}=we(),d=s.baseCommitish,f=s.targetCommitish;(0,L.useEffect)(()=>{c(r)},[r]),(0,L.useEffect)(()=>(e?u(`navigation`):l(`navigation`),()=>{l(`navigation`)}),[e,l,u]);let p=(0,L.useMemo)(()=>{let e=a||f,t=n.commits.findIndex(t=>t.shortHash===e||t.hash===e);if(t===-1)return f?[f]:[];let r=n.commits.slice(0,t+1).map(e=>e.shortHash);return f&&!r.includes(f)&&r.push(f),r.includes(`working`)||r.push(`working`),r},[f,a,n.commits]),m=(0,L.useMemo)(()=>{let e=i||d,t=n.commits.findIndex(t=>t.shortHash===e||t.hash===e);if(t===-1)return d?[d]:[];let r=n.commits.slice(t).map(e=>e.shortHash);return d&&!r.includes(d)&&r.push(d),r},[d,i,n.commits]);if(!e)return null;let h=()=>{o(St(s.baseCommitish,s.targetCommitish)),t()};return(0,R.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,R.jsx)(`div`,{className:`absolute inset-0 bg-black/40`,onClick:t}),(0,R.jsxs)(`div`,{className:`relative bg-github-bg-secondary border border-github-border rounded-lg shadow-lg w-full max-w-lg mx-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b border-github-border`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold text-github-text-primary`,children:`Detailed Diff`}),(0,R.jsx)(`button`,{onClick:t,className:`text-github-text-secondary hover:text-github-text-primary p-1`,"aria-label":`Close detailed diff`,children:(0,R.jsx)(vt,{size:18})})]}),(0,R.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-center gap-3`,children:[(0,R.jsx)(yb,{label:`Base`,value:d,resolvedValue:i,onChange:e=>c(St(e,s.targetCommitish)),options:n,disabledValues:p}),(0,R.jsx)(`span`,{className:`text-github-text-muted`,children:`...`}),(0,R.jsx)(yb,{label:`Target`,value:f,resolvedValue:a,onChange:e=>c(St(s.baseCommitish,e)),options:n,disabledValues:m})]}),(0,R.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,R.jsx)(`button`,{onClick:t,className:`px-3 py-1.5 text-xs font-medium rounded border border-github-border text-github-text-secondary hover:text-github-text-primary transition-colors`,type:`button`,children:`Cancel`}),(0,R.jsx)(`button`,{onClick:h,className:`px-3 py-1.5 text-xs font-medium rounded bg-github-accent text-white hover:bg-github-accent/90 transition-colors`,type:`button`,children:`Apply`})]})]})]})]})}var xb=[{id:`vscode`,label:`VS Code`,protocol:`vscode`,cliCommand:`code`,cliArgs:[],lineFormat:`goto-flag`,aliases:[`vscode`,`code`]},{id:`cursor`,label:`Cursor`,protocol:`cursor`,cliCommand:`cursor`,cliArgs:[],lineFormat:`goto-flag`,aliases:[`cursor`]},{id:`zed`,label:`Zed`,protocol:`zed`,cliCommand:`zed`,cliArgs:[],lineFormat:`path-suffix`,aliases:[`zed`]},{id:`none`,label:`Hide “Open in editor” button`,protocol:null,cliCommand:null,cliArgs:[],lineFormat:`goto-flag`,aliases:[`none`,`disabled`,`off`]}],Sb=`vscode`;function Cb(e){return e.replaceAll(`\\`,`/`).replace(/^\.\/+/,``)}function wb(e){return e.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`)}function Tb(e){let t=new Set;return e.forEach(e=>{let n=e.trim();n&&t.add(Cb(n))}),[...t]}function Eb(e){return Cb(e).split(`/`).filter(e=>e.length>0)}function Db(e,t){let n=`^`;for(let e of t){if(e===`*`){n+=`.*`;continue}if(e===`?`){n+=`.`;continue}n+=wb(e)}return n+=`$`,new RegExp(n).test(e)}function Ob(e,t,n=0,r=0){if(r>=t.length)return n>=e.length;let i=t[r];if(!i)return n>=e.length;if(i===`**`){let i=r+1;if(i>=t.length)return!0;for(let r=n;r<=e.length;r+=1)if(Ob(e,t,r,i))return!0;return!1}let a=e[n];return!a||!Db(a,i)?!1:Ob(e,t,n+1,r+1)}function kb(e){return Array.isArray(e)?Tb(e.filter(e=>typeof e==`string`)):[]}function Ab(e){return Tb(e.split(/\r?\n/))}function jb(e){return kb(e).join(`
66
+ `)}function Mb(e,t){let n=Cb(t.trim());if(!n)return!1;let r=Cb(e);return n.includes(`/`)?Ob(Eb(r),Eb(n)):Db(r.split(`/`).pop()??r,n)}function Nb(e,t){return kb(t).some(t=>Mb(e,t))}var Pb=[{id:`github`,label:`GitHub Light`},{id:`vsLight`,label:`VS Light`},{id:`oneLight`,label:`One Light`},{id:`gruvboxMaterialLight`,label:`Gruvbox Material Light`},{id:`nightOwlLight`,label:`Night Owl Light`}],Fb=[{id:`vsDark`,label:`VS Dark`},{id:`oneDark`,label:`One Dark`},{id:`gruvboxMaterialDark`,label:`Gruvbox Material Dark`},{id:`nightOwl`,label:`Night Owl`},{id:`dracula`,label:`Dracula`},{id:`okaidia`,label:`Okaidia`}],Ib=e=>e===`top`?`translateY(4px)`:e===`bottom`?`translateY(-4px)`:e===`left`?`translateX(4px)`:`translateX(-4px)`,Lb=(e,t)=>{if(typeof e==`function`){e(t);return}e&&`current`in e&&(e.current=t)};function Rb({content:e,children:t,placement:n=`top`,className:r=``}){let[i,a]=(0,L.useState)(!1),o=(0,L.useId)(),{refs:s,floatingStyles:c,context:l}=Ws({open:i,onOpenChange:a,placement:n,middleware:[Do(8),ko(),Oo({padding:8})],whileElementsMounted:go}),u=ts(l,{move:!1}),d=Ks(l),f=Hs(l),p=Xs(l,{role:`tooltip`}),{isMounted:m,styles:h}=tc(l,{duration:{open:180,close:120},initial:({side:e})=>({opacity:0,transform:Ib(e)}),open:{opacity:1,transform:`translate(0, 0)`},close:({side:e})=>({opacity:0,transform:Ib(e)}),common:{willChange:`opacity, transform`}}),{getReferenceProps:g,getFloatingProps:_}=Js([u,d,f,p]),v=t.props,y=g({...v,"aria-describedby":i?o:void 0}),b=[`w-64 rounded-md border border-github-border bg-github-bg-primary px-3 py-2 text-xs text-github-text-primary`,r].filter(Boolean).join(` `);return(0,R.jsxs)(R.Fragment,{children:[(0,L.cloneElement)(t,{...y,ref:e=>{Lb(v.ref,e),s.setReference(e)}}),m?(0,R.jsx)(Cs,{children:(0,R.jsx)(`div`,{ref:s.setFloating,..._(),id:o,style:c,className:`z-[60]`,children:(0,R.jsx)(`div`,{style:h,className:b,children:e})})}):null]})}var zb={fontSize:14,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,theme:`dark`,syntaxTheme:`vsDark`,editor:Sb,colorVision:`normal`,autoViewedPatterns:[]},Bb=[{name:`System Font`,value:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`},{name:`Menlo`,value:`Menlo, Monaco, "Courier New", monospace`},{name:`SF Mono`,value:`SF Mono, Consolas, "Liberation Mono", monospace`},{name:`Fira Code`,value:`"Fira Code", "Courier New", monospace`},{name:`JetBrains Mono`,value:`"JetBrains Mono", "Courier New", monospace`}],Vb=[{id:`normal`,label:`Normal`},{id:`deuteranopia`,label:`Deuteranopia`,tooltip:`Deuteranopia mode uses blue/orange instead of green/red for diffs.`}],Hb=[{id:`appearance`,label:`Appearance`},{id:`system`,label:`System`}];function Ub({isOpen:e,onClose:t,settings:n,onSettingsChange:r}){let[i,a]=(0,L.useState)(jb(n.autoViewedPatterns)),[o,s]=(0,L.useState)(`appearance`),{enableScope:c,disableScope:l}=we();(0,L.useEffect)(()=>(e?l(`navigation`):c(`navigation`),()=>{c(`navigation`)}),[e,c,l]);let u=()=>n.theme===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:n.theme,d=()=>u()===`light`?Pb:Fb,f=e=>{let t={...n,theme:e},i=(e===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e)===`light`?Pb:Fb;if(!i.some(e=>e.id===n.syntaxTheme)&&i.length>0){let e=i[0];e&&(t.syntaxTheme=e.id)}r(t)},p=()=>{if(o===`appearance`){r({...n,fontSize:zb.fontSize,fontFamily:zb.fontFamily,theme:zb.theme,syntaxTheme:zb.syntaxTheme,colorVision:zb.colorVision});return}r({...n,editor:zb.editor,autoViewedPatterns:zb.autoViewedPatterns}),a(jb(zb.autoViewedPatterns))};return e?(0,R.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center z-50 pointer-events-none`,children:(0,R.jsxs)(`div`,{className:`bg-github-bg-secondary border border-github-border rounded-lg w-full max-w-3xl mx-4 pointer-events-auto overflow-hidden`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b border-github-border`,children:[(0,R.jsxs)(`h2`,{className:`text-lg font-semibold text-github-text-primary flex items-center gap-2`,children:[(0,R.jsx)(pt,{size:20}),`Settings`]}),(0,R.jsx)(`button`,{onClick:t,className:`text-github-text-secondary hover:text-github-text-primary p-1`,children:(0,R.jsx)(vt,{size:18})})]}),(0,R.jsxs)(`div`,{className:`flex flex-col sm:flex-row min-h-[420px]`,children:[(0,R.jsx)(`nav`,{"aria-label":`Settings sections`,className:`sm:w-40 border-b sm:border-b-0 sm:border-r border-github-border px-3 py-2`,children:(0,R.jsx)(`div`,{className:`flex sm:flex-col gap-1`,children:Hb.map(e=>{let t=e.id===o;return(0,R.jsx)(`button`,{type:`button`,onClick:()=>s(e.id),"aria-pressed":t,className:`flex-1 sm:flex-none text-left px-3 py-2 text-sm font-medium transition-colors border-b-2 sm:border-b-0 sm:border-l-2 ${t?`text-github-text-primary border-github-accent`:`text-github-text-secondary border-transparent hover:text-github-text-primary`}`,children:e.label},e.id)})})}),(0,R.jsxs)(`div`,{className:`flex-1 p-4 sm:p-6 overflow-y-auto`,children:[o===`appearance`&&(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Font Size`}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(`input`,{type:`range`,min:`10`,max:`20`,step:`1`,value:n.fontSize,onChange:e=>r({...n,fontSize:Number.parseInt(e.target.value,10)}),className:`flex-1 accent-github-accent`}),(0,R.jsxs)(`span`,{className:`text-sm text-github-text-secondary w-8 text-right`,children:[n.fontSize,`px`]})]})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Font Family`}),(0,R.jsx)(`select`,{value:n.fontFamily,onChange:e=>r({...n,fontFamily:e.target.value}),className:`w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm`,children:Bb.map(e=>(0,R.jsx)(`option`,{value:e.value,children:e.name},e.value))})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Theme`}),(0,R.jsx)(`div`,{className:`flex gap-2`,children:[`light`,`dark`,`auto`].map(e=>(0,R.jsx)(`button`,{type:`button`,onClick:()=>f(e),className:`px-3 py-2 text-sm rounded border transition-colors ${n.theme===e?`bg-github-accent text-white border-github-accent`:`bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary`}`,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Color Vision`}),(0,R.jsx)(`div`,{className:`flex gap-2`,children:Vb.map(e=>{let t=(0,R.jsx)(`button`,{type:`button`,onClick:()=>r({...n,colorVision:e.id}),className:`px-3 py-2 text-sm rounded border transition-colors ${(n.colorVision??`normal`)===e.id?`bg-github-accent text-white border-github-accent`:`bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary`}`,children:e.label},e.id);return`tooltip`in e?(0,R.jsx)(Rb,{content:e.tooltip,children:t},e.id):t})})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Syntax Highlighting Theme`}),(0,R.jsx)(`select`,{value:n.syntaxTheme,onChange:e=>r({...n,syntaxTheme:e.target.value}),className:`w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm`,children:d().map(e=>(0,R.jsx)(`option`,{value:e.id,children:e.label},e.id))})]})]}),o===`system`&&(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Open In Editor`}),(0,R.jsx)(`select`,{value:n.editor,onChange:e=>r({...n,editor:e.target.value}),className:`w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm`,children:xb.map(e=>(0,R.jsx)(`option`,{value:e.id,children:e.label},e.id))})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`label`,{htmlFor:`auto-viewed-patterns`,className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Auto-Mark Viewed Patterns`}),(0,R.jsx)(`p`,{className:`text-sm text-github-text-secondary mb-2`,children:`Files matching these glob patterns are marked as Viewed automatically. Enter one pattern per line.`}),(0,R.jsx)(`textarea`,{id:`auto-viewed-patterns`,value:i,onChange:e=>{a(e.target.value),r({...n,autoViewedPatterns:Ab(e.target.value)})},rows:6,spellCheck:!1,placeholder:`*.test.ts
67
+ *.stories.tsx
68
+ src/generated/**`,className:`w-full p-3 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm font-mono`})]})]})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-t border-github-border`,children:[(0,R.jsx)(`button`,{onClick:p,className:`px-3 py-2 text-sm text-github-text-secondary hover:text-github-text-primary`,children:o===`appearance`?`Reset Appearance Defaults`:`Reset System Defaults`}),(0,R.jsx)(`button`,{onClick:t,className:`px-4 py-2 text-sm bg-github-accent text-white rounded hover:bg-green-600`,children:`Close`})]})]})}):null}var Wb={position:`absolute`,fontSize:`16px`,pointerEvents:`none`,zIndex:100,transform:`translateY(20px) scale(0.5)`,opacity:0},Gb=({isActive:e})=>e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`animate-sparkle-rise`,style:{...Wb,left:`-12px`,animationDelay:`0s`},children:`✨`}),(0,R.jsx)(`div`,{className:`animate-sparkle-rise`,style:{...Wb,right:`-12px`,animationDelay:`0.3s`},children:`✨`})]}):null,Kb={fontSize:14,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,theme:`dark`,syntaxTheme:`vsDark`,editor:Sb,colorVision:`normal`,autoViewedPatterns:[]};function qb(){let[e,t]=(0,L.useState)(()=>{try{let e=localStorage.getItem(h);if(e){let t=JSON.parse(e);return{...Kb,...t,autoViewedPatterns:kb(t.autoViewedPatterns)}}}catch(e){console.warn(`Failed to load appearance settings from localStorage:`,e)}return Kb}),n=(0,L.useCallback)((e,t=`normal`)=>{E(e,t)},[]);return(0,L.useEffect)(()=>{let t=document.documentElement;t.style.setProperty(`--app-font-size`,`${e.fontSize}px`),t.style.setProperty(`--app-font-family`,e.fontFamily);let r=e.colorVision??`normal`;if(e.theme===`auto`){let e=window.matchMedia(`(prefers-color-scheme: dark)`);n(C(`auto`,e.matches?`dark`:`light`),r);let t=e=>{n(C(`auto`,e.matches?`dark`:`light`),r)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)}else{n(e.theme,r);return}},[e,n]),{settings:e,updateSettings:e=>{t(e);try{localStorage.setItem(h,JSON.stringify(e))}catch(e){console.warn(`Failed to save appearance settings to localStorage:`,e)}}}}function Jb(e){return typeof e==`number`?`L${e}`:`L${e[0]}-L${e[1]}`}function Yb(e,t){if(kt(e)){let n=At(e);if(n.length>0){let r=``,i=0;for(let a of n){let n=e.slice(i,a.startIndex).trim();n&&(r+=`${r?`
69
+ `:``}${n}`),t&&(r+=`${r?`
70
+ `:``}ORIGINAL:\n\`\`\`\n${t}\n\`\`\``),r+=`${r?`
71
+ `:``}SUGGESTED:\n\`\`\`\n${a.suggestedCode}\n\`\`\``,i=a.endIndex}let a=e.slice(i).trim();return a&&(r+=`${r?`
72
+ `:``}${a}`),r}}return e}function Xb(e){let t=[`${e.file||`<unknown file>`}:${Jb(e.line)}`];return e.messages.forEach((n,r)=>{if(r===0){t.push(Yb(n.body,e.codeContent));return}let i=r,a=n.author?.trim()||`Unknown`;t.push(`Reply ${i} (${a})`),t.push(Yb(n.body,e.codeContent))}),t.filter(Boolean).join(`
73
+ `)}function Zb(e){return e.length===0?``:e.map(e=>Xb(e)).join(`
74
+ =====
75
+ `)}var Qb=`abcdefghijklmnopqrstuvwxyz0123456789`,$b=16;function ex(){return Array.from({length:$b},()=>Qb[Math.floor(Math.random()*36)]).join(``)}function tx(e){return typeof e.line==`number`?`${e.side}:${e.line}`:`${e.side}:${e.line.start}-${e.line.end}`}function nx(e,t){return tx(e)===tx(t)}function rx(e){return e?.trim()||``}function ix(e,t,n=!0){return n&&t.id&&e.id===t.id?!0:!(rx(e.author)!==rx(t.author)||e.body!==t.body||t.createdAt&&e.createdAt!==t.createdAt)}function ax(e,t){if(t.id&&e.id===t.id)return!0;if(e.filePath!==t.filePath||!nx(e.position,t.position))return!1;let n=e.messages[0];return n?ix(n,t,!0):!1}function ox(e,t){let n=e.createdAt??t;return{createdAt:n,updatedAt:e.updatedAt??n}}function sx(e,t){return e.localeCompare(t)>=0?e:t}function cx(e,t){return t.updatedAt.localeCompare(e.updatedAt)}function lx(e,t){let{createdAt:n,updatedAt:r}=ox(e,t),i=e.id??ex();return{id:i,filePath:e.filePath,createdAt:n,updatedAt:r,position:e.position,codeSnapshot:e.codeSnapshot,messages:[{id:e.id??i,body:e.body,author:e.author,createdAt:n,updatedAt:r}]}}function ux(e,t){let{createdAt:n,updatedAt:r}=ox(e,t);return{id:e.id??ex(),body:e.body,author:e.author,createdAt:n,updatedAt:r}}function dx(e,t){let n=[...e],r=[];for(let e of t){let t=new Date().toISOString();if(e.type===`thread`){if(n.some(t=>ax(t,e)))continue;n.push(lx(e,t));continue}let i=n.filter(t=>t.filePath===e.filePath&&nx(t.position,e.position)).sort(cx)[0];if(!i){r.push(`Skipped reply import for ${e.filePath}:${tx(e.position)} because no matching thread was found.`);continue}if(i.messages.some(t=>ix(t,e,!0)))continue;let a=ux(e,t);i.messages=[...i.messages,a],i.updatedAt=sx(i.updatedAt,a.updatedAt)}return{threads:n,warnings:r}}var fx=`difit-storage-v1`;function px(e){return{id:e.id,filePath:e.filePath,createdAt:e.createdAt,updatedAt:e.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot,messages:[{id:e.id,body:e.body,author:e.author,createdAt:e.createdAt,updatedAt:e.updatedAt}]}}function mx(e){let t=e.messages[0];return t?{id:e.id,filePath:e.filePath,body:t.body,author:t.author,createdAt:t.createdAt,updatedAt:t.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot}:null}var hx=new class{generateStorageKey(e,t,n){let r=e=>e.replace(/[^a-zA-Z0-9-_]/g,e=>`_${e.charCodeAt(0).toString(16)}_`),i=`${r(e)}-${r(t)}`;return xt(n)===`merge-base`?`${i}-merge-base`:i}getFullStorageKey(e,t){return e?`${fx}/${e}/${t}`:`${fx}/${t}`}normalizeCommitish(e,t,n){if(e===`.`||e===`working`)return`WORKING`;if(e===`staged`)return`STAGED`;if((e===`HEAD`||e===`@`)&&t)return t;if(n?.has(e)){let t=n.get(e);if(t)return t}return(e.startsWith(`@`)||e.includes(`^`)||e.includes(`~`)||e.includes(`HEAD`))&&console.warn(`[StorageService] Cannot normalize symbolic ref '${e}' - may cause key collision. currentCommitHash=${t}`),e}getStorageKey(e,t,n,r,i,a){let o=this.normalizeStorageBase(e,t,n,r),s=this.normalizeStorageTarget(e,t,n,r),c=this.generateStorageKey(o,s,a);return this.getFullStorageKey(i,c)}getDiffContextData(e,t,n,r,i,a){try{let o=this.getStorageKey(e,t,n,r,i,a),s=localStorage.getItem(o);if(!s)return null;let c=JSON.parse(s);return c.version===2&&`threads`in c?c:c.version===1&&`comments`in c?{version:2,baseCommitish:c.baseCommitish,targetCommitish:c.targetCommitish,createdAt:c.createdAt,lastModifiedAt:c.lastModifiedAt,threads:c.comments.map(px),viewedFiles:c.viewedFiles,appliedCommentImportIds:[]}:(console.warn(`Unknown storage version: ${String(c.version)}`),null)}catch(e){return console.error(`Error reading diff context data:`,e),null}}normalizeStorageBase(e,t,n,r){return t===`.`||t===`working`||t===`staged`?n||e:this.normalizeCommitish(e,n,r)}normalizeStorageTarget(e,t,n,r){return t===`.`||t===`working`?`WORKING`:t===`staged`?`STAGED`:this.normalizeCommitish(t,n,r)}saveDiffContextData(e,t,n,r,i,a,o){try{let s=this.getStorageKey(e,t,r,i,a,o),c={...n,version:2,baseCommitish:e,targetCommitish:t,baseMode:o,lastModifiedAt:new Date().toISOString(),appliedCommentImportIds:n.appliedCommentImportIds||[]};localStorage.setItem(s,JSON.stringify(c))}catch(e){e instanceof DOMException&&e.name===`QuotaExceededError`?console.error(`localStorage quota exceeded`):console.error(`Error saving diff context data:`,e)}}getCommentThreads(e,t,n,r,i,a){return this.getDiffContextData(e,t,n,r,i,a)?.threads||[]}getComments(e,t,n,r,i,a){return this.getCommentThreads(e,t,n,r,i,a).map(e=>mx(e)).filter(e=>e!==null)}saveCommentThreads(e,t,n,r,i,a,o){let s=this.getDiffContextData(e,t,r,i,a,o)||{version:2,baseCommitish:e,targetCommitish:t,baseMode:o,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),threads:[],viewedFiles:[],appliedCommentImportIds:[]};s.threads=n,this.saveDiffContextData(e,t,s,r,i,a,o)}saveComments(e,t,n,r,i,a,o){this.saveCommentThreads(e,t,n.map(px),r,i,a,o)}getViewedFiles(e,t,n,r,i,a){return this.getDiffContextData(e,t,n,r,i,a)?.viewedFiles||[]}saveViewedFiles(e,t,n,r,i,a,o){let s=this.getDiffContextData(e,t,r,i,a,o)||{version:2,baseCommitish:e,targetCommitish:t,baseMode:o,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),threads:[],viewedFiles:[],appliedCommentImportIds:[]};s.viewedFiles=n,this.saveDiffContextData(e,t,s,r,i,a,o)}cleanupOldData(e){let t=new Date;t.setDate(t.getDate()-e);let n=t.getTime(),r=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(t?.startsWith(fx))try{let e=localStorage.getItem(t);if(!e)continue;let i=JSON.parse(e);new Date(i.lastModifiedAt).getTime()<n&&r.push(t)}catch{}}r.forEach(e=>localStorage.removeItem(e))}getStorageSize(){let e=0;for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(!n?.startsWith(fx))continue;let r=localStorage.getItem(n);r&&(e+=(n.length+r.length)*2)}return e}};async function gx(e){try{let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}catch{return console.warn(`Crypto API not available, using fallback hash`),_x(e)}}function _x(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t).toString(16)}function vx(e){let t=e.chunks.map(e=>{let t=e.lines.filter(e=>e.type!==`hunk`&&e.type!==`header`).map(e=>`${e.type}:${e.content}`).join(`
76
+ `);return`${e.header}\n${t}`}).join(`
77
+
78
+ `);return`${e.path}\n${e.status}\n${t}`}function yx(e){return{id:e.id,file:e.filePath,line:typeof e.position.line==`number`?e.position.line:[e.position.line.start,e.position.line.end],side:e.position.side,createdAt:e.createdAt,updatedAt:e.updatedAt,codeContent:e.codeSnapshot?.content,messages:e.messages}}function bx(e){let t=e.messages[0];return t?{id:e.id,filePath:e.filePath,body:t.body,author:t.author,createdAt:t.createdAt,updatedAt:t.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot}:null}function xx(e,t,n,r,i,a){let[o,s]=(0,L.useState)([]),c=(0,L.useCallback)(()=>!e||!t?null:hx.getDiffContextData(e,t,n,r,i,a),[e,t,n,r,i,a]),l=(0,L.useCallback)(()=>{if(!e||!t)return null;let n=new Date().toISOString();return{version:2,baseCommitish:e,targetCommitish:t,baseMode:a,createdAt:n,lastModifiedAt:n,threads:[],viewedFiles:[],appliedCommentImportIds:[]}},[e,t,a]);(0,L.useEffect)(()=>{!e||!t||s(c()?.threads||hx.getCommentThreads(e,t,n,r,i,a))},[e,t,n,r,i,a,c]);let u=(0,L.useCallback)(o=>{!e||!t||(hx.saveCommentThreads(e,t,o,n,r,i,a),s(o))},[e,t,n,r,i,a]),d=(0,L.useCallback)(e=>{let t=new Date().toISOString(),n=ex(),r={id:n,filePath:e.filePath,createdAt:t,updatedAt:t,position:{side:e.side,line:e.line},codeSnapshot:e.codeSnapshot||{content:``,language:er(e.filePath)},messages:[{id:n,body:e.body,author:`User`,createdAt:t,updatedAt:t}]};return u([...o,r]),r},[u,o]),f=(0,L.useCallback)(e=>{let t=bx(d(e));if(!t)throw Error(`Failed to create root comment`);return t},[d]),p=(0,L.useCallback)(({threadId:e,body:t})=>{let n=new Date().toISOString();u(o.map(r=>r.id===e?{...r,updatedAt:n,messages:[...r.messages,{id:ex(),body:t,author:`User`,createdAt:n,updatedAt:n}]}:r))},[u,o]),m=(0,L.useCallback)(e=>{u(o.filter(t=>t.id!==e))},[u,o]),h=(0,L.useCallback)(e=>{m(e)},[m]),g=(0,L.useCallback)((e,t)=>{let n=o.find(t=>t.id===e);if(!n)return;let r=n.messages.findIndex(e=>e.id===t);if(r<0)return;if(r===0){m(e);return}let i=new Date().toISOString();u(o.map(n=>n.id===e?{...n,updatedAt:i,messages:n.messages.filter(e=>e.id!==t)}:n))},[m,u,o]),_=(0,L.useCallback)((e,t,n)=>{let r=new Date().toISOString();u(o.map(i=>i.id===e?{...i,updatedAt:r,messages:i.messages.map(e=>e.id===t?{...e,body:n,updatedAt:r}:e)}:i))},[u,o]),v=(0,L.useCallback)((e,t)=>{_(e,e,t)},[_]),y=(0,L.useCallback)(()=>{u([])},[u]),b=(0,L.useCallback)(o=>{if(!o?.resetAppliedCommentImportIds){y();return}let u=c()||l();if(!u||!e||!t)return;let d={...u,threads:[],appliedCommentImportIds:[]};hx.saveDiffContextData(e,t,d,n,r,i,a),s([])},[e,t,r,y,l,n,c,i,a]),x=(0,L.useCallback)((o,u)=>{if(!e||!t||o.length===0||u.length===0)return[];let d=c()||l();if(!d)return[];if(d.appliedCommentImportIds.includes(u))return s(d.threads),[];let f=dx(d.threads,o),p={...d,threads:f.threads,appliedCommentImportIds:[...d.appliedCommentImportIds,u]};return hx.saveDiffContextData(e,t,p,n,r,i,a),s(f.threads),f.warnings},[e,t,r,l,n,c,i,a]),S=(0,L.useCallback)(e=>{let t=o.find(t=>t.id===e);return t?Xb(yx(t)):``},[o]),C=(0,L.useCallback)(e=>S(e),[S]),w=(0,L.useCallback)(()=>Zb(o.map(yx)),[o]);return{comments:o.map(e=>bx(e)).filter(e=>e!==null),threads:o,addComment:f,addThread:d,removeComment:h,replyToThread:p,removeThread:m,updateComment:v,removeMessage:g,updateMessage:_,clearAllComments:b,applyCommentImports:x,generatePrompt:C,generateThreadPrompt:S,generateAllCommentsPrompt:w}}var Sx=20;async function Cx(e,t){let n=await fetch(`/api/blob/${encodeURIComponent(e)}?ref=${encodeURIComponent(t)}`);if(!n.ok)throw Error(`Failed to fetch file content: ${n.statusText}`);let r=(await n.text()).split(`
79
+ `);return r.length>0&&r[r.length-1]===``&&r.pop(),{lines:r,totalLines:r.length}}async function wx(e,t,n,r){let i=encodeURIComponent(e),a=new URLSearchParams;t&&a.set(`oldRef`,t),n&&a.set(`newRef`,n),r&&r!==e&&a.set(`oldPath`,r);let o=await fetch(`/api/line-count/${i}?${a}`);if(!o.ok)throw Error(`Failed to fetch line count: ${o.statusText}`);return o.json()}function Tx({baseCommitish:e,targetCommitish:t,diffIdentity:n}){let[r,i]=(0,L.useState)({}),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(null),[l,u]=(0,L.useState)(0),d=(0,L.useRef)(new Map),f=(0,L.useRef)({});f.current=r;let p=(0,L.useRef)(0);(0,L.useEffect)(()=>{p.current+=1,d.current.clear(),f.current={},i({}),o(!1),c(null),u(0)},[e,t,n]);let m=(0,L.useCallback)(async n=>{let r=p.current,i=`${r}:${n.path}`,a=d.current.get(i);if(a)return a;let o=(async()=>{let i=f.current[n.path];if(i?.oldContent&&i?.newContent)return i;let a={...i,expandedRanges:i?.expandedRanges||[]};if(n.status!==`added`&&e){let t=n.oldPath||n.path;try{let{lines:n,totalLines:i}=await Cx(t,e);if(p.current!==r)return null;a.oldContent=n,a.oldTotalLines=i}catch(e){console.error(`Failed to fetch old file content:`,e),a.oldContent=[],a.oldTotalLines=0}}if(n.status!==`deleted`&&t)try{let{lines:e,totalLines:i}=await Cx(n.path,t);if(p.current!==r)return null;a.newContent=e,a.newTotalLines=i}catch(e){console.error(`Failed to fetch new file content:`,e),a.newContent=[],a.newTotalLines=0}return a})();d.current.set(i,o);try{return await o}finally{d.current.delete(i)}},[e,t]),h=(0,L.useCallback)(e=>{c(e),u(e=>e+1)},[]),g=(0,L.useCallback)(async(e,t,n,r=Sx)=>{let a=p.current;o(!0);try{let o=await m(e);if(!o||p.current!==a)return;i(i=>{let a=i[e.path],s=a?.expandedRanges||o.expandedRanges||[],c=s.findIndex(e=>e.chunkIndex===t&&e.direction===n),l=[...s];if(c>=0&&l[c]){let e=l[c];l[c]={chunkIndex:e.chunkIndex,direction:e.direction,count:e.count+r}}else l.push({chunkIndex:t,direction:n,count:r});return{...i,[e.path]:{oldContent:a?.oldContent??o.oldContent,newContent:a?.newContent??o.newContent,oldTotalLines:a?.oldTotalLines??o.oldTotalLines,newTotalLines:a?.newTotalLines??o.newTotalLines,expandedRanges:l}}}),h(e.path)}finally{o(!1)}},[m,h]),_=(0,L.useCallback)(async(e,t,n)=>{let r=p.current;o(!0);try{let a=await m(e);if(!a||p.current!==r)return;i(r=>{let i=r[e.path],o=[...i?.expandedRanges||a.expandedRanges||[]],s=o.findIndex(e=>e.chunkIndex===t&&e.direction===`up`),c=o.findIndex(e=>e.chunkIndex===t-1&&e.direction===`down`),l=0,u=0;s>=0&&o[s]&&(l=o[s].count),c>=0&&o[c]&&(u=o[c].count);let d=l+u+n,f=o.filter(e=>!(e.chunkIndex===t-1&&e.direction===`down`)),p=f.findIndex(e=>e.chunkIndex===t&&e.direction===`up`);return p>=0&&f[p]?f[p]={chunkIndex:t,direction:`up`,count:d}:f.push({chunkIndex:t,direction:`up`,count:d}),{...r,[e.path]:{oldContent:i?.oldContent??a.oldContent,newContent:i?.newContent??a.newContent,oldTotalLines:i?.oldTotalLines??a.oldTotalLines,newTotalLines:i?.newTotalLines??a.newTotalLines,expandedRanges:f}}}),h(e.path)}finally{o(!1)}},[m,h]),v=(0,L.useCallback)(async n=>{let r=p.current,a=f.current[n.path];if(a?.oldTotalLines!==void 0||a?.newTotalLines!==void 0)return;let o=n.status===`added`?void 0:e,s=n.status===`deleted`?void 0:t;if(!(!o&&!s))try{let{oldLineCount:e,newLineCount:t}=await wx(n.path,o,s,n.oldPath);if(p.current!==r)return;i(r=>{let i=r[n.path];return i?.oldTotalLines!==void 0||i?.newTotalLines!==void 0?r:{...r,[n.path]:{...i,expandedRanges:i?.expandedRanges||[],oldTotalLines:e,newTotalLines:t}}}),h(n.path)}catch(e){console.error(`Failed to prefetch line count:`,e)}},[e,t,h]),y=(0,L.useCallback)((e,t,n)=>{let i=r[e];return i&&i.expandedRanges.find(e=>e.chunkIndex===t&&e.direction===n)?.count||0},[r]),b=(0,L.useCallback)((e,t,n)=>{if(e.status===`added`||e.status===`deleted`)return 0;let r=e.chunks[n-1],i;if(!r)i=t.oldStart-1;else{let e=r.oldStart+r.oldLines;i=t.oldStart-e}let a=y(e.path,n,`up`),o=n>0?y(e.path,n-1,`down`):0;return Math.max(0,i-a-o)},[y]),x=(0,L.useCallback)((e,t,n)=>{if(e.status===`added`||e.status===`deleted`)return 0;let i=r[e.path],a=i?.oldTotalLines||i?.newTotalLines;if(a===void 0)return e.chunks[n+1]?0:-1;if(e.chunks[n+1])return 0;let o=a-(t.oldStart+t.oldLines-1),s=y(e.path,n,`down`);return Math.max(0,o-s)},[r,y]),S=(0,L.useCallback)((e,t,n)=>{let i=r[e.path];if(!i)return t;let a=y(e.path,n,`up`),o=y(e.path,n,`down`);if(a===0&&o===0)return t;let s=i.oldContent||[],c=i.newContent||[],l=[];if(a>0){let r=e.chunks[n-1],i;i=r?r.oldStart+r.oldLines-1:Math.max(0,t.oldStart-1-a);let o=t.oldStart-1,u=t.newStart-1,d=Math.min(a,o-i),f=o-d,p=u-d;for(let e=0;e<d;e++){let t=f+e+1,n=p+e+1,r=s[t-1]??c[n-1]??``;l.push({type:`normal`,content:r,oldLineNumber:t,newLineNumber:n,isExpanded:!0})}}if(l.push(...t.lines),o>0){let r=t.oldStart+t.oldLines-1,a=t.newStart+t.newLines-1,u=e.chunks[n+1],d=u?u.oldStart-1:i.oldTotalLines||r,f=Math.min(o,d-r);for(let e=0;e<f;e++){let t=r+e+1,n=a+e+1,i=s[t-1]??c[n-1]??``;l.push({type:`normal`,content:i,oldLineNumber:t,newLineNumber:n,isExpanded:!0})}}let u=l[0],d=l[l.length-1];return{...t,lines:l,oldStart:u?.oldLineNumber??t.oldStart,newStart:u?.newLineNumber??t.newStart,oldLines:(d?.oldLineNumber??t.oldStart+t.oldLines-1)-(u?.oldLineNumber??t.oldStart)+1,newLines:(d?.newLineNumber??t.newStart+t.newLines-1)-(u?.newLineNumber??t.newStart)+1}},[r,y]);return{expandedState:r,isLoading:a,lastUpdatedFilePath:s,lastUpdatedAt:l,expandLines:g,expandAllBetweenChunks:_,prefetchFileContent:v,getMergedChunks:(0,L.useCallback)(e=>{let t=[];for(let n=0;n<e.chunks.length;n++){let r=e.chunks[n];if(!r)continue;let i=S(e,r,n),a=b(e,r,n),o=x(e,r,n),s=t[t.length-1];if(s&&a===0){s.lines=[...s.lines,...i.lines],s.originalIndices.push(n),s.hiddenLinesAfter=o;let e=s.lines[s.lines.length-1];s.oldLines=(e?.oldLineNumber??s.oldStart+s.oldLines-1)-s.oldStart+1,s.newLines=(e?.newLineNumber??s.newStart+s.newLines-1)-s.newStart+1}else t.push({...i,originalIndices:[n],hiddenLinesBefore:a,hiddenLinesAfter:o})}return t},[S,b,x]),getHiddenLinesBefore:b,getHiddenLinesAfter:x}}var Ex=function(e){return e.DEFAULT=`default`,e.WORKING=`working`,e.STAGED=`staged`,e.DOT=`dot`,e.SPECIFIC=`specific`,e}({});function Dx(e){let t=(void 0)?.trim();if(!t)return e;try{return new URL(e,t).toString()}catch{return e}}function Ox(e){let t=(0,L.useRef)(null),n=(0,L.useRef)(null),r=(0,L.useRef)(0),i=3e3,[a,o]=(0,L.useState)({isWatchEnabled:!1,diffMode:Ex.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:`disconnected`}),[s,c]=(0,L.useState)(null),l=(0,L.useCallback)(()=>{if(!t.current)try{let e=new EventSource(Dx(`/api/watch`));t.current=e,e.onopen=()=>{console.log(`Connected to file watch service`),o(e=>({...e,connectionStatus:`connected`})),r.current=0,c(null)},e.onmessage=e=>{try{let t=JSON.parse(e.data);switch(t.type){case`connected`:o(e=>({...e,isWatchEnabled:!0,diffMode:t.diffMode,connectionStatus:`connected`}));break;case`reload`:console.log(`File changes detected, showing reload button:`,t.changeType),o(e=>({...e,shouldReload:!0,lastChangeTime:new Date,lastChangeType:t.changeType}));break;case`error`:console.error(`File watch error:`,t.message),c(t.message||`File watch error occurred`);break}}catch(e){console.error(`Error parsing watch event:`,e)}},e.onerror=()=>{console.log(`File watch connection lost`),o(e=>({...e,connectionStatus:`disconnected`})),t.current&&=(t.current.close(),null),r.current<5?(o(e=>({...e,connectionStatus:`reconnecting`})),r.current+=1,n.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (${r.current}/5)...`),l()},i)):(console.error(`Max reconnection attempts reached`),c(`Lost connection to file watch service`))}}catch(e){console.error(`Failed to connect to file watch service:`,e),c(`Failed to connect to file watch service`)}},[5,i]),u=(0,L.useCallback)(async()=>{if(!a.isReloading){o(e=>({...e,isReloading:!0}));try{e&&await e(),o(e=>({...e,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null}))}catch(e){console.error(`Reload failed:`,e),c(`Failed to reload diff data`),o(e=>({...e,isReloading:!1}))}}},[e,a.isReloading]),d=()=>{t.current&&=(t.current.close(),null),n.current&&=(clearTimeout(n.current),null)};return(0,L.useEffect)(()=>(l(),d),[l]),(0,L.useEffect)(()=>d,[]),{shouldReload:a.shouldReload,isConnected:a.connectionStatus===`connected`,error:s,reload:u,watchState:a}}var kx={SCROLL_CONTAINER:`main.overflow-y-auto`};function Ax(e,t){let n=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return t===`split`?`${n}-${e.side}`:n}function jx(e,t,n){return`${e}:${t}:${n??`any`}`}function Mx(e,t){let n=t[e.fileIndex]?.chunks[e.chunkIndex]?.lines[e.lineIndex];return n&&(n.type===`add`||n.type===`delete`||n.type===`normal`)?n.type:null}function Nx(e,t){let n=Mx(e,t);return n?n===`normal`?!0:n===`delete`?e.side===`left`:n===`add`?e.side===`right`:!1:!1}function Px(e,t){return Nx(e,t)?e:{...e,side:e.side===`left`?`right`:`left`}}var Fx={VIEWPORT_OFFSET_RATIO:1/3};function Ix(e,t,n){let r=[];return t.oldLineNumber!==void 0&&(r.push(jx(e,t.oldLineNumber,`old`)),r.push(jx(e,t.oldLineNumber))),t.newLineNumber!==void 0&&(r.push(jx(e,t.newLineNumber,`new`)),r.push(jx(e,t.newLineNumber))),r.some(e=>n.has(e))}function Lx(e,t,n,r){return{line:t=>{let i=e[t.fileIndex];return!i||r?.has(i.path)?!1:n===`unified`||Nx(t,e)},chunk:t=>{let n=e[t.fileIndex];if(!n||r?.has(n.path))return!1;let i=n.chunks[t.chunkIndex]?.lines[t.lineIndex];if(!i||i.type===`normal`)return!1;if(t.lineIndex===0)return!0;let a=n.chunks[t.chunkIndex]?.lines[t.lineIndex-1];return!a||a.type===`normal`},comment:n=>{let i=e[n.fileIndex];if(!i||r?.has(i.path))return!1;let a=i.chunks[n.chunkIndex]?.lines[n.lineIndex];return a?Ix(i.path,a,t):!1},file:e=>e.chunkIndex===0&&e.lineIndex===0}}function Rx(){return e=>{let t=document.getElementById(e);if(!t)return;let n=document.querySelector(kx.SCROLL_CONTAINER);if(!n)throw Error(`Scrollable container (${kx.SCROLL_CONTAINER}) not found`);let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=n.clientHeight,o=n.scrollTop,s=Math.max(i.top,0),c=Math.min(i.bottom,window.innerHeight);if(!(r.top>=s&&r.bottom<=c)){let e=zx(t,n)-a*Fx.VIEWPORT_OFFSET_RATIO;n.scrollTop=Math.max(0,e);return}let l=r.bottom>Math.min(i.bottom,window.innerHeight),u=t.offsetTop-n.offsetTop-a*Fx.VIEWPORT_OFFSET_RATIO;l&&u>o&&(n.scrollTop=Math.max(0,u))}}function zx(e,t){let n=e,r=0;for(;n&&n!==t&&n.offsetParent;)r+=n.offsetTop,n=n.offsetParent;return n&&n!==t&&(r+=n.offsetTop),r}function Bx(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:`right`}}function Vx(e,t,n){return n&&e.fileIndex===t.fileIndex&&e.chunkIndex===t.chunkIndex&&e.lineIndex===t.lineIndex}function Hx(e,t,n){let{fileIndex:r,chunkIndex:i,lineIndex:a}=e,o=n.length,s=0;if(t===`next`)for(a++;s<o;){if(n[r]?.chunks[i]?.lines[a])return{...e,fileIndex:r,chunkIndex:i,lineIndex:a};i++,a=0,n[r]?.chunks[i]||(r++,i=0,a=0,r>=o&&(r=0,s++))}else for(a--;s<o;){if(a<0)if(i--,i<0){r--,r<0&&(r=o-1,s++);let e=n[r];if(e&&e.chunks.length>0){i=e.chunks.length-1;let t=e.chunks[i];a=t&&t.lines.length>0?t.lines.length-1:-1}else i=-1,a=-1}else{let e=n[r]?.chunks[i];a=e&&e.lines.length>0?e.lines.length-1:-1}if(a>=0&&n[r]?.chunks[i]?.lines[a])return{...e,fileIndex:r,chunkIndex:i,lineIndex:a};a<0||a--}return null}function Ux(e,t,n,r,i){let a=e,o=!1;for(;a;){let s=Hx(a,t,r);if(!s||(a=s,Vx(a,e,o)))break;if(o=!0,n(a,r)){let e=Px(a,r);return{position:e,scrollTarget:Ax(e,i)}}}return{position:null,scrollTarget:null}}function Wx({files:e,comments:t,viewMode:n=yt,reviewedFiles:r,onToggleReviewed:i,onCreateComment:a,onCopyAllComments:o,onDeleteAllComments:s,onShowCommentsList:c,onRefresh:l}){let[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(!1),m=(0,L.useMemo)(()=>Rx(),[]),h=(0,L.useMemo)(()=>{let e=new Map;return t.forEach(t=>{let n=Array.isArray(t.line)?t.line[0]:t.line,r=jx(t.file,n,t.side);e.has(r)||e.set(r,[]),e.get(r)?.push(t)}),e},[t]),g=(0,L.useMemo)(()=>Lx(e,h,n,r),[e,h,n,r]),_=(0,L.useCallback)((t,r)=>e.length===0?{position:null,scrollTarget:null}:Ux(Bx(u),t,r,e,n),[u,e,n]),v=(0,L.useCallback)(e=>t=>{let n=_(t,e);n.position&&(d(n.position),n.scrollTarget&&m(n.scrollTarget))},[_,m]),y=(0,L.useMemo)(()=>v(g.line),[v,g.line]),b=(0,L.useMemo)(()=>v(g.chunk),[v,g.chunk]),x=(0,L.useMemo)(()=>v(g.file),[v,g.file]),S=(0,L.useMemo)(()=>v(g.comment),[v,g.comment]),C=(0,L.useCallback)(t=>{if(!u||n!==`split`)return;let r={...u,side:t},i=e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex];if(i){if(t===`left`&&i.type===`add`&&u.lineIndex>0){if(e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex-1]?.type===`delete`){r={...r,lineIndex:u.lineIndex-1},d(r),m(Ax(r,n));return}}else if(t===`right`&&i.type===`delete`&&e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex+1]?.type===`add`){r={...r,lineIndex:u.lineIndex+1},d(r),m(Ax(r,n));return}}if(!Nx(r,e)){let t=e[u.fileIndex];if(!t)return;let n=t.chunks[u.chunkIndex];if(n){for(let t=u.lineIndex+1;t<n.lines.length;t++){let n={...r,lineIndex:t};if(Nx(n,e)){r=n;break}}if(!Nx(r,e))for(let t=u.lineIndex-1;t>=0;t--){let n={...r,lineIndex:t};if(Nx(n,e)){r=n;break}}}if(!Nx(r,e)){for(let n=u.chunkIndex+1;n<t.chunks.length;n++){let i=t.chunks[n];if(i){for(let t=0;t<i.lines.length;t++){let i={...r,chunkIndex:n,lineIndex:t};if(Nx(i,e)){r=i;break}}if(Nx(r,e))break}}if(!Nx(r,e))for(let n=u.chunkIndex-1;n>=0;n--){let i=t.chunks[n];if(i){for(let t=i.lines.length-1;t>=0;t--){let i={...r,chunkIndex:n,lineIndex:t};if(Nx(i,e)){r=i;break}}if(Nx(r,e))break}}}}d(r),m(Ax(r,n))},[u,n,m,e]),w=(0,L.useCallback)(()=>{let t=document.querySelector(kx.SCROLL_CONTAINER);if(!t)return;let r=t.getBoundingClientRect(),i=r.top+r.height/2,a=1/0,o=null;e.forEach((t,s)=>{t.chunks.forEach((t,c)=>{t.lines.forEach((t,l)=>{let u=n===`split`?[`left`,`right`]:[`right`];for(let t of u){let u={fileIndex:s,chunkIndex:c,lineIndex:l,side:t};if(n===`split`&&!Nx(u,e))continue;let d=Ax(u,n),f=document.getElementById(d);if(f){let e=f.getBoundingClientRect(),t=e.top+e.height/2,n=Math.abs(t-i);e.top<r.bottom&&e.bottom>r.top&&n<a&&(a=n,o=u)}}})})}),o&&d(o)},[e,n,d]),T=(0,L.useCallback)(t=>{if(!t){d(null);return}let r=Px(t,e);d(r),m(Ax(r,n))},[e,n,m]),E={scopes:`navigation`,enableOnFormTags:!1,preventDefault:!0};return V(`j, down`,()=>y(`next`),E,[y]),V(`k, up`,()=>y(`prev`),E,[y]),V(`n`,()=>b(`next`),E,[b]),V(`p`,()=>b(`prev`),E,[b]),V(`shift+n`,()=>S(`next`),E,[S]),V(`shift+p`,()=>S(`prev`),E,[S]),V(`]`,()=>x(`next`),{...E,useKey:!0},[x]),V(`[`,()=>x(`prev`),{...E,useKey:!0},[x]),V(`{`,()=>{e.length>0&&(d({fileIndex:0,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`}),m(Ax({fileIndex:0,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`},n)))},{...E,useKey:!0},[e,n,m]),V(`}`,()=>{if(e.length>0){let t=e.length-1,r=e[t];r&&r.chunks.length>0&&(d({fileIndex:t,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`}),m(Ax({fileIndex:t,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`},n)))}},{...E,useKey:!0},[e,n,m]),V(`h, left`,()=>C(`left`),{...E,enabled:n===`split`},[C,n]),V(`l, right`,()=>C(`right`),{...E,enabled:n===`split`},[C,n]),V(`v`,()=>{if(u){let t=e[u.fileIndex];t&&i(t.path)}},E,[u,e,i]),V(`shift+r`,()=>{l&&l()},E,[l]),V(`c`,()=>{if(u&&a){let t=e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex];t&&t.type!==`delete`&&a()}},E,[u,e,a]),V(`?`,()=>p(!f),{...E,useKey:!0},[f]),V(`.`,e=>{e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(w(),e.preventDefault())},{...E,useKey:!0,preventDefault:!1},[w]),V(`shift+c`,()=>{o&&o()},{...E,scopes:[`navigation`,`comments-list`]},[o]),V(`shift+d`,()=>{s&&s()},{...E,scopes:[`navigation`,`comments-list`]},[s]),V(`shift+l`,()=>{c&&c()},E,[c]),{cursor:u,isHelpOpen:f,setIsHelpOpen:p,setCursorPosition:T}}var Gx=new Map,Kx=0;function qx(e){return Gx.has(e)||Gx.set(e,`file-${++Kx}`),Gx.get(e)??``}var Jx=8,Yx=`1200px 0px`,Xx=60,Zx=180;function Qx({diffData:e,diffScrollContainerRef:t,setDiffData:n}){let[r,i]=(0,L.useState)(new Set),a=(0,L.useRef)(new Set),o=(0,L.useRef)(null),s=(0,L.useRef)(new Map),c=(0,L.useRef)(new Set),l=(0,L.useRef)(null),u=(0,L.useRef)(0);(0,L.useEffect)(()=>{if(!e){let e=new Set;a.current=e,i(e),c.current.clear(),l.current=null;return}let t=`${e.requestedBaseCommitish??``}:${e.requestedTargetCommitish??``}:${e.requestedBaseMode??`direct`}`;if(l.current===t)return;l.current=t;let n=e.files.slice(0,Jx).map(e=>e.path),r=new Set(n);a.current=r,i(r),c.current.clear()},[e]);let d=(0,L.useCallback)(e=>{let t=s.current.get(e);t&&o.current&&o.current.unobserve(t),i(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),a.current=n,n})},[]),f=(0,L.useCallback)((e,t)=>{let n=o.current,r=s.current.get(e);if(r&&n&&n.unobserve(r),!t){s.current.delete(e);return}s.current.set(e,t),!(a.current.has(e)||!n)&&n.observe(t)},[]);(0,L.useEffect)(()=>{if(o.current&&o.current.disconnect(),!e){o.current=null;return}let n=new IntersectionObserver(e=>{i(t=>{let r=!1,i=new Set(t);return e.forEach(e=>{if(!e.isIntersecting)return;let t=e.target.dataset.filePath;!t||i.has(t)||(i.add(t),n.unobserve(e.target),r=!0)}),r&&(a.current=i),r?i:t})},{root:t.current,rootMargin:Yx});return o.current=n,s.current.forEach((e,t)=>{a.current.has(t)||n.observe(e)}),()=>{n.disconnect(),o.current=null}},[e,t]);let p=(0,L.useCallback)(t=>{if(!e)return;let n=e.files.findIndex(e=>e.path===t);if(n<0)return;let r=o.current;i(t=>{let i=!1,o=new Set(t);for(let t=0;t<=n;t++){let n=e.files[t]?.path;if(n&&!o.has(n)){o.add(n),i=!0;let e=s.current.get(n);e&&r&&r.unobserve(e)}}return i&&(a.current=o),i?o:t})},[e]),m=(0,L.useCallback)(n=>{p(n);let r=e?.files.findIndex(e=>e.path===n)??-1,i=e&&r>=0?e.files.slice(0,r+1).map(e=>qx(e.path)):[qx(n)],a=u.current+1;u.current=a;let o=()=>{for(let e of i){let t=document.getElementById(e);if(!t||t.dataset.rendered!==`true`)return!1}return!0},s=e=>{let r=t.current,i=document.getElementById(qx(n));if(!r||!i)return!1;let a=r.getBoundingClientRect(),o=i.getBoundingClientRect(),s=r.scrollTop+(o.top-a.top);return r.scrollTo({top:Math.max(0,s),behavior:e}),!0},c=0,l=()=>{requestAnimationFrame(()=>{if(u.current===a){if(!o()){c<Xx&&(c++,l());return}if(!s(`smooth`)){c<Xx&&(c++,l());return}window.setTimeout(()=>{u.current===a&&s(`smooth`)},Zx)}})};l()},[e,t,p]);return(0,L.useEffect)(()=>{if(!e||e.targetCommitish===`stdin`)return;let t=e.targetCommitish||`HEAD`,i=`${e.requestedBaseCommitish??``}...${e.requestedTargetCommitish??``}:${e.requestedBaseMode??`direct`}`;e.files.forEach(a=>{if(!r.has(a.path)||a.isGenerated!==!1||a.status===`deleted`)return;let o=`${i}:${t}:${a.path}`;if(c.current.has(o))return;c.current.add(o);let s=encodeURIComponent(a.path);fetch(`/api/generated-status/${s}?ref=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():null).then(t=>{!t||t.isGenerated!==!0||n(t=>{if(!t||t.requestedBaseCommitish!==e.requestedBaseCommitish||t.requestedTargetCommitish!==e.requestedTargetCommitish||t.requestedBaseMode!==e.requestedBaseMode)return t;let n=!1,r=t.files.map(e=>e.path!==a.path||e.isGenerated?e:(n=!0,{...e,isGenerated:!0}));return n?{...t,files:r}:t})}).catch(()=>{})})},[e,r,n]),{renderedFilePaths:r,ensureFileRendered:d,ensureFilesRenderedUpTo:p,registerLazyFileContainer:f,scrollFileIntoDiffContainer:m}}function $x(e,t,n,r,i,a,o=[],s){let[c,l]=(0,L.useState)([]),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(new Map),m=e&&t?`${a??`default`}:${wt({baseCommitish:e,targetCommitish:t,baseMode:s})}:${n??`no-commit`}`:null,h=m!==null&&u===m;(0,L.useEffect)(()=>{if(!e||!t||!m)return;let c=!1,u=hx.getViewedFiles(e,t,n,r,a,s);return(async()=>{if(i&&i.length>0){let f=[],p=new Set(u.map(e=>e.filePath));for(let e of i)if((e.isGenerated||e.status===`deleted`||Nb(e.path,o))&&!p.has(e.path))try{let t=await gx(vx(e)),n={filePath:e.path,viewedAt:new Date().toISOString(),diffContentHash:t};f.push(n)}catch(e){console.error(`Failed to generate hash for auto-collapsed file:`,e)}if(f.length>0){let i=[...u,...f];hx.saveViewedFiles(e,t,i,n,r,a,s),c||(l(i),d(m));return}}c||(l(u),d(m))})(),()=>{c=!0}},[e,t,n,r,a,m,s]);let g=(0,L.useCallback)(i=>{!e||!t||(hx.saveViewedFiles(e,t,i,n,r,a,s),l(i))},[e,t,n,r,a,s]),_=(0,L.useMemo)(()=>new Set(c.map(e=>e.filePath)),[c]),v=(0,L.useCallback)(e=>c.find(t=>t.filePath===e),[c]),y=(0,L.useCallback)(async e=>{let t=f.get(e.path);if(t)return t;let n=await gx(vx(e));return p(t=>new Map(t).set(e.path,n)),n},[f]),b=(0,L.useCallback)(async(e,t)=>{let n=v(e);if(!n)return!1;let r=await y(t);return n.diffContentHash!==r},[v,y]);return{viewedFiles:_,hasLoadedInitialViewedFiles:h,toggleFileViewed:(0,L.useCallback)(async(e,t)=>{if(v(e))g(c.filter(t=>t.filePath!==e));else{let n=await y(t),r={filePath:e,viewedAt:new Date().toISOString(),diffContentHash:n};g([...c,r])}},[c,v,y,g]),isFileContentChanged:b,getViewedFileRecord:v,clearViewedFiles:(0,L.useCallback)(()=>{g([]),p(new Map)},[g])}}var eS={mobileMax:767,desktopMin:1024},tS={mobile:`(max-width: ${eS.mobileMax}px)`,desktop:`(min-width: ${eS.desktopMin}px)`},nS=()=>typeof window>`u`?{isMobile:!1,isDesktop:!0}:{isMobile:window.matchMedia(tS.mobile).matches,isDesktop:window.matchMedia(tS.desktop).matches};function rS(){let[e,t]=(0,L.useState)(()=>nS());return(0,L.useEffect)(()=>{if(typeof window>`u`)return;let e=window.matchMedia(tS.mobile),n=window.matchMedia(tS.desktop),r=()=>{t({isMobile:e.matches,isDesktop:n.matches})};return r(),e.addEventListener(`change`,r),n.addEventListener(`change`,r),()=>{e.removeEventListener(`change`,r),n.removeEventListener(`change`,r)}},[]),e}function iS(e){let t=new Set;return e.forEach(e=>{let n=e.author?.trim();n&&t.add(n)}),[...t]}function aS(e){return iS(e).length>=2}function oS(e,t,n,r){for(let i=0;i<e.chunks.length;i++){let a=e.chunks[i];if(a)for(let e=0;e<a.lines.length;e++){let o=a.lines[e];if(o&&(r===`old`?o.oldLineNumber:r===`new`?o.newLineNumber:o.newLineNumber??o.oldLineNumber)===n)return{fileIndex:t,chunkIndex:i,lineIndex:e,side:r===`old`?`left`:r===`new`||o.newLineNumber?`right`:`left`}}}return null}function sS(e,t){let n=t.findIndex(t=>t.path===e.file);if(n===-1)return null;let r=t[n];if(!r)return null;let i=Array.isArray(e.line)?e.line[1]:e.line,a=e.side;return oS(r,n,i,a)||oS(r,n,i,`new`)||oS(r,n,i,`old`)}var cS={diffVersion:null,byFile:new Map};function lS(e,t,n,r){let i=new Map;return t.forEach(e=>{let t=n.get(e);t&&i.set(e,r(t))}),{diffVersion:e,byFile:i}}function uS(e,t,n){if(e.diffVersion===t)return e.byFile.get(n)}var dS=[],fS=[],pS=`difit.sidebarWidth`,mS=`difit.sidebarOpen`,hS=200,gS=600,_S=280,vS=()=>{if(typeof window>`u`)return _S;let e=window.localStorage.getItem(pS);if(!e)return _S;let t=Number.parseInt(e,10);return Number.isFinite(t)?Math.min(gS,Math.max(hS,t)):_S},yS=()=>{if(typeof window>`u`)return!0;let e=window.localStorage.getItem(mS);return e===null||e===`true`?!0:e!==`false`};function bS(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(0),[i,a]=(0,L.useState)(yt),o=(0,L.useRef)(!1),[s,c]=(0,L.useState)(!0),[l,u]=(0,L.useState)(!0),[d,f]=(0,L.useState)(null),[p,m]=(0,L.useState)(!1),[h,g]=(0,L.useState)(vS),[_,v]=(0,L.useState)(!1),[y,b]=(0,L.useState)(yS),[x,S]=(0,L.useState)(!1),[C,w]=(0,L.useState)(!1),[T,E]=(0,L.useState)(!1),[D,O]=(0,L.useState)(!1),[k,A]=(0,L.useState)(!1),[j,M]=(0,L.useState)(new Set),N=(0,L.useRef)(!1),P=(0,L.useRef)(null),[ee,F]=(0,L.useState)(null),[I,te]=(0,L.useState)(St(``,``)),[z,ne]=(0,L.useState)(``),[B,re]=(0,L.useState)(``),ie=(0,L.useRef)(!1),ae=(0,L.useRef)(I.baseMode);ae.current=e?.requestedBaseMode??I.baseMode;let oe=(0,L.useRef)(I);oe.current=I;let se=(0,L.useRef)(0),ce=(0,L.useRef)(null),le=(0,L.useMemo)(()=>!e?.baseCommitish||!e?.targetCommitish?null:St(e.baseCommitish,e.targetCommitish,e.requestedBaseMode),[e]),ue=(0,L.useMemo)(()=>le?wt(le):null,[le]),{settings:de,updateSettings:fe}=qb(),{isMobile:pe,isDesktop:me}=rS(),{threads:he,addThread:ge,replyToThread:_e,removeThread:ve,removeMessage:ye,updateMessage:be,clearAllComments:xe,applyCommentImports:Se,generateThreadPrompt:Ce,generateAllCommentsPrompt:we}=xx(le?.baseCommitish,le?.targetCommitish,e?.commit,void 0,e?.repositoryId,le?.baseMode),Te=(0,L.useMemo)(()=>he.map(e=>({id:e.id,file:e.filePath,line:typeof e.position.line==`number`?e.position.line:[e.position.line.start,e.position.line.end],side:e.position.side,createdAt:e.createdAt,updatedAt:e.updatedAt,codeContent:e.codeSnapshot?.content,messages:e.messages})),[he]),Ee=(0,L.useMemo)(()=>aS(Te.flatMap(e=>e.messages)),[Te]),De=(0,L.useMemo)(()=>{let e=new Map;return Te.forEach(t=>{let n=e.get(t.file);n?n.push(t):e.set(t.file,[t])}),e},[Te]),Oe=pe&&he.length>0,{viewedFiles:V,hasLoadedInitialViewedFiles:ke,toggleFileViewed:Ae,clearViewedFiles:je}=$x(le?.baseCommitish,le?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId,de.autoViewedPatterns,le?.baseMode);(0,L.useEffect)(()=>{N.current=!1},[e?.repositoryId,ue,e?.commit]),(0,L.useEffect)(()=>{!N.current&&ke&&(M(new Set(V)),N.current=!0)},[V,ke]);let{renderedFilePaths:Me,ensureFileRendered:Ne,ensureFilesRenderedUpTo:Pe,registerLazyFileContainer:Fe,scrollFileIntoDiffContainer:H}=Qx({diffData:e,diffScrollContainerRef:P,setDiffData:t}),Ie=(0,L.useCallback)(async t=>{if(!e)return;let n=e.files.find(e=>e.path===t);if(!n)return;let r=V.has(t);await Ae(t,n),M(e=>{let n=new Set(e);return r?n.delete(t):n.add(t),n}),r||setTimeout(()=>{H(t)},100)},[e,H,Ae,V]),Le=(0,L.useCallback)(e=>{M(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Re=(0,L.useCallback)(t=>{e&&M(t?new Set(e.files.map(e=>e.path)):new Set)},[e]),ze=(0,L.useCallback)(e=>{o.current=!0,a(e)},[]),{isLoading:Be,expandLines:Ve,expandAllBetweenChunks:He,prefetchFileContent:Ue,getMergedChunks:We,lastUpdatedAt:Ke}=Tx({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish,diffIdentity:n}),qe=(0,L.useRef)(We);(0,L.useEffect)(()=>{qe.current=We},[We]);let[Je,Ye]=(0,L.useState)(cS),Xe=(0,L.useMemo)(()=>{let t=new Map;return e?.files.forEach(e=>{t.set(e.path,e)}),t},[e]);(0,L.useEffect)(()=>{if(!e){Ye(cS);return}Ye(lS(n,Me,Xe,e=>qe.current(e)))},[e,n,Xe,Me,Ke]);let Ze=(0,L.useMemo)(()=>e?e.files.map(e=>({...e,chunks:uS(Je,n,e.path)||e.chunks})):[],[e,n,Je]),[Qe,$e]=(0,L.useState)(null),{shouldReload:et,reload:tt,watchState:nt}=Ox(async()=>{await gt()}),{cursor:it,isHelpOpen:at,setIsHelpOpen:ot,setCursorPosition:st}=Wx({files:Ze,comments:Te,viewMode:i,reviewedFiles:V,onToggleReviewed:Ie,onCreateComment:()=>{it&&$e({fileIndex:it.fileIndex,chunkIndex:it.chunkIndex,lineIndex:it.lineIndex})},onCopyAllComments:()=>{he.length>0&&kt()},onDeleteAllComments:()=>{he.length>0&&confirm(`Delete all comments?`)&&xe()},onShowCommentsList:()=>{O(!0)},onRefresh:()=>{tt()}});(0,L.useEffect)(()=>{if(!e||!it)return;let t=e.files[it.fileIndex]?.path;!t||Me.has(t)||(Pe(t),requestAnimationFrame(()=>{st(it)}))},[it,e,Pe,Me,st]);let ut=(0,L.useCallback)((e,t,n,r)=>{st({fileIndex:e,chunkIndex:t,lineIndex:n,side:r})},[st]),dt=(0,L.useCallback)(()=>{$e(null)},[$e]),ft=(0,L.useCallback)(e=>Ce(e.id),[Ce]),mt=e=>{e.preventDefault(),S(!0);let t=e.clientX,n=h,r=e=>{g(Math.max(hS,Math.min(gS,n+(e.clientX-t))))},i=()=>{S(!1),document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)},gt=(0,L.useCallback)(async e=>{let n=se.current+1;se.current=n,ce.current?.abort();let i=new AbortController;ce.current=i;try{let c=e??(ie.current?oe.current:void 0),l=new URLSearchParams({ignoreWhitespace:String(s)});c?.baseCommitish&&l.set(`base`,c.baseCommitish),c?.targetCommitish&&l.set(`target`,c.targetCommitish),c?.baseMode===`merge-base`&&l.set(`baseMode`,c.baseMode);let u=await fetch(`/api/diff?${l}`,{signal:i.signal});if(!u.ok)throw Error(`Failed to fetch diff data`);let d=await u.json();if(se.current!==n)return;if(t(d),r(e=>e+1),ne(d.baseCommitish&&d.requestedBaseMode!==`merge-base`?d.baseCommitish:``),d.targetCommitish&&re(d.targetCommitish),!ie.current){let e=d.requestedBaseCommitish??d.baseCommitish,t=d.requestedTargetCommitish??d.targetCommitish;e&&t&&te(St(e,t,d.requestedBaseMode))}d.mode&&!o.current&&a(bt(d.mode))}catch(e){if(e?.name===`AbortError`||se.current!==n)return;f(e instanceof Error?e.message:`Unknown error`)}finally{ce.current===i&&(ce.current=null),se.current===n&&u(!1)}},[s]);(0,L.useEffect)(()=>{gt()},[gt]),(0,L.useEffect)(()=>()=>{ce.current?.abort()},[]),(0,L.useEffect)(()=>{pe&&i!==`unified`&&a(`unified`)},[i,pe]),(0,L.useEffect)(()=>{try{window.localStorage.setItem(pS,String(h))}catch{}},[h]),(0,L.useEffect)(()=>{try{window.localStorage.setItem(mS,String(y))}catch{}},[y]),(0,L.useEffect)(()=>{fetch(`/api/revisions`).then(e=>e.ok?e.json():null).then(e=>{F(e),e?.resolvedBase&&xt(ae.current)!==`merge-base`&&ne(t=>t||e.resolvedBase||``),e?.resolvedTarget&&re(t=>t||e.resolvedTarget||``)}).catch(()=>F(null))},[]);let _t=(0,L.useCallback)(async e=>{Ct(e,I)||(ie.current=!0,oe.current=e,te(e),u(!0),f(null),await gt(e))},[gt,I]),vt=(0,L.useRef)(!1);(0,L.useEffect)(()=>{e?.clearComments&&!vt.current&&(vt.current=!0,xe({resetAppliedCommentImportIds:!0}),je(),console.log(`✅ All existing comments and viewed files cleared as requested via --clean flag`))},[e?.clearComments,xe,je]),(0,L.useEffect)(()=>{!e?.commentImportId||!e.commentImports?.length||Se(e.commentImports,e.commentImportId).forEach(e=>console.warn(e))},[Se,e?.commentImportId,e?.commentImports]),(0,L.useEffect)(()=>{e&&(V.size<e.files.length?E(!1):V.size===e.files.length&&!T&&(w(!0),E(!0),setTimeout(()=>{w(!1)},1e3)))},[V.size,e,T]),(0,L.useEffect)(()=>{let e=JSON.stringify({threads:Te});fetch(`/api/comments`,{method:`POST`,headers:{"Content-Type":`application/json`},body:e}).catch(e=>{console.error(`Failed to sync comments:`,e)});let t=()=>{navigator.sendBeacon(`/api/comments`,e)};return window.addEventListener(`beforeunload`,t),()=>{window.removeEventListener(`beforeunload`,t)}},[Te]),(0,L.useEffect)(()=>{let e=new EventSource(Dx(`/api/heartbeat`));return e.onopen=()=>{console.log(`Connected to server heartbeat`)},e.onerror=()=>{console.log(`Server connection lost`),e.close()},()=>{e.close()}},[]);let Dt=(0,L.useCallback)((e,t,n,r,i)=>(ge({filePath:e,body:n,side:i||`new`,line:typeof t==`number`?t:{start:t[0],end:t[1]},codeSnapshot:r?{content:r,language:void 0}:void 0}),Promise.resolve()),[ge]),kt=async()=>{try{await Ot(we()),m(!0),setTimeout(()=>m(!1),2e3)}catch(e){console.error(`Failed to copy all comments prompt:`,e)}},At=(0,L.useCallback)((e,t)=>(_e({threadId:e,body:t}),Promise.resolve()),[_e]),jt=t=>{if(!e)return;let n=sS(t,e.files);n&&st(n)},Mt=(0,L.useCallback)(async(e,t)=>{try{let n=await fetch(`/api/open-in-editor`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:e,line:t,editor:de.editor})});if(!n.ok){let e=await n.json().catch(()=>null),t=n.statusText;e&&typeof e==`object`&&`error`in e&&typeof e.error==`string`&&(t=e.error),console.error(`Failed to open file in editor:`,t)}}catch(e){console.error(`Failed to open file in editor:`,e)}},[de.editor]),Nt=e=>{st(null);let t=e.target,n=t.closest(`[data-comment-button="true"]`),r=t.closest(`[data-open-in-editor-button="true"]`);!n&&!r&&Pt(e)},Pt=e=>{document.querySelectorAll(`form[data-empty="true"]`).forEach(t=>{t.contains(e.target)||t.querySelector(`button[type="button"]`)?.click()})};if(l)return(0,R.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-github-bg-primary`,children:(0,R.jsx)(`div`,{className:`text-github-text-secondary text-base`,children:`Loading diff...`})});if(d)return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2`,children:[(0,R.jsx)(`h2`,{className:`text-github-danger text-2xl mb-2`,children:`Error`}),(0,R.jsx)(`p`,{className:`text-github-text-secondary text-base`,children:d})]});if(!e)return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2`,children:[(0,R.jsx)(`h2`,{className:`text-github-danger text-2xl mb-2`,children:`No data`}),(0,R.jsx)(`p`,{className:`text-github-text-secondary text-base`,children:`No diff data available`})]});let Ft=de.editor!==`none`&&e.openInEditorAvailable!==!1;return(0,R.jsx)(zt,{children:(0,R.jsxs)(`div`,{className:`h-screen flex flex-col`,onClickCapture:Nt,children:[(0,R.jsxs)(`header`,{className:`bg-github-bg-secondary border-b border-github-border flex ${pe?`flex-col`:`flex-row items-center`}`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between w-full ${pe?`px-3 py-2 gap-3`:`px-4 py-3 gap-4 w-auto`} ${x?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:pe?`100%`:y?`${h}px`:`auto`,minWidth:pe?`0px`:y?`200px`:`auto`,maxWidth:pe?`none`:y?`600px`:`none`},children:[(0,R.jsx)(`h1`,{children:(0,R.jsx)(gb,{style:{height:`18px`,color:`var(--color-github-text-secondary)`}})}),(0,R.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,R.jsx)(`button`,{onClick:()=>b(!y),className:`p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors`,title:y?`Collapse file tree`:`Expand file tree`,"aria-expanded":y,"aria-controls":`file-tree-panel`,"aria-label":`Toggle file tree panel`,children:y?(0,R.jsx)(ct,{size:18}):(0,R.jsx)(lt,{size:18})}),(0,R.jsx)(`button`,{onClick:()=>v(!0),className:`p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors`,title:`Settings`,children:(0,R.jsx)(pt,{size:18})})]})]}),!pe&&(0,R.jsx)(`div`,{className:`border-r border-github-border ${x?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:y?`4px`:`0px`,height:`calc(100% - 16px)`,margin:`8px 0`,transform:`translateX(-2px)`}}),(0,R.jsxs)(`div`,{className:`flex-1 flex flex-wrap items-center justify-between ${pe?`px-3 pb-2 gap-3`:`px-4 py-3 gap-4`}`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center ${pe?`gap-2`:`gap-3`}`,children:[!pe&&(0,R.jsxs)(`div`,{className:`flex bg-github-bg-tertiary border border-github-border rounded-md p-1`,children:[(0,R.jsxs)(`button`,{onClick:()=>ze(`split`),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${i===`split`?`bg-github-bg-primary text-github-text-primary shadow-sm`:`text-github-text-secondary hover:text-github-text-primary`}`,children:[(0,R.jsx)(Ge,{size:14}),`Split`]}),(0,R.jsxs)(`button`,{onClick:()=>ze(`unified`),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${i===`unified`?`bg-github-bg-primary text-github-text-primary shadow-sm`:`text-github-text-secondary hover:text-github-text-primary`}`,children:[(0,R.jsx)(ht,{size:14}),`Unified`]})]}),(0,R.jsx)(Tt,{checked:s,onChange:c,label:`Ignore Whitespace`,title:s?`Show whitespace changes`:`Ignore whitespace changes`}),(0,R.jsx)(_b,{shouldReload:et,isReloading:nt.isReloading,onReload:tt,changeType:nt.lastChangeType,compact:pe})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center text-sm text-github-text-secondary ${pe?`gap-3`:`gap-4`}`,children:[!pe&&he.length>0&&(0,R.jsx)(Et,{commentsCount:he.length,isCopiedAll:p,onCopyAll:kt,onDeleteAll:xe,onViewAll:()=>O(!0)}),(0,R.jsxs)(`div`,{className:`flex flex-col gap-1 items-center`,children:[(0,R.jsxs)(`div`,{className:`text-xs relative`,children:[V.size===e.files.length?`All diffs difit-ed!`:`${V.size} / ${e.files.length} files viewed`,(0,R.jsx)(Gb,{isActive:C})]}),(0,R.jsx)(`div`,{className:`relative h-2 bg-github-bg-tertiary rounded-full overflow-hidden`,style:{width:`90px`,border:`1px solid var(--color-github-border)`},children:(0,R.jsx)(`div`,{className:`absolute top-0 right-0 h-full transition-all duration-300 ease-out`,style:{width:`${(e.files.length-V.size)/e.files.length*100}%`,backgroundColor:(()=>{let t=(e.files.length-V.size)/e.files.length*100;return t>50?`var(--color-github-accent)`:t>20?`var(--color-github-warning)`:`var(--color-github-danger)`})()}})})]}),ee?(0,R.jsx)(pc,{options:ee,selection:I,resolvedBaseRevision:z,resolvedTargetRevision:B,onSelectDiff:e=>void _t(e),onOpenAdvanced:()=>A(!0),compact:!me}):(0,R.jsxs)(`span`,{className:`text-xs`,children:[`Reviewing:`,` `,(0,R.jsx)(`code`,{className:`bg-github-bg-tertiary px-1.5 py-0.5 rounded text-xs text-github-text-primary`,children:e.commit.includes(`...`)?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`span`,{className:`text-github-text-secondary font-medium`,children:[e.commit.split(`...`)[0],`...`]}),(0,R.jsx)(`span`,{className:`font-medium`,children:e.commit.split(`...`)[1]})]}):e.commit})]})]})]})]}),ee&&(0,R.jsx)(bb,{isOpen:k,onClose:()=>A(!1),options:ee,selection:I,resolvedBaseRevision:z,resolvedTargetRevision:B,onApply:e=>void _t(e)},k?wt(I):`closed`),pe&&y&&(0,R.jsx)(`button`,{type:`button`,"aria-label":`Close file tree`,className:`fixed inset-0 bg-black/40 z-30`,onClick:()=>b(!1)}),(0,R.jsxs)(`div`,{className:`flex flex-1 overflow-hidden relative`,children:[(0,R.jsx)(`div`,{className:`relative overflow-hidden ${x?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:pe?`0px`:y?`${h}px`:`0px`},children:(0,R.jsxs)(`aside`,{id:`file-tree-panel`,className:`bg-github-bg-secondary overflow-y-auto flex flex-col ${pe?`fixed inset-y-0 right-0 z-40 w-[min(85vw,360px)] border-l border-github-border transition-transform duration-300 ease-out`:`relative border-r border-github-border`}`,style:{width:pe?`min(85vw, 360px)`:`${h}px`,minWidth:pe?`0px`:`200px`,maxWidth:pe?`none`:`600px`,height:`100%`,transform:pe?y?`translateX(0)`:`translateX(100%)`:void 0},children:[(0,R.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:(0,R.jsx)(pb,{files:e.files,onScrollToFile:H,onFileSelected:pe?()=>b(!1):void 0,comments:Te,reviewedFiles:V,onToggleReviewed:Ie,selectedFileIndex:it?.fileIndex??null})}),!pe&&(0,R.jsxs)(`div`,{className:`p-4 border-t border-github-border flex justify-between items-center`,children:[(0,R.jsxs)(`button`,{onClick:()=>ot(!0),className:`flex items-center gap-1.5 text-github-text-secondary hover:text-github-text-primary transition-colors`,title:`Keyboard shortcuts (Shift+?)`,children:[(0,R.jsx)(rt,{size:16}),(0,R.jsx)(`span`,{className:`text-sm`,children:`Shortcuts`})]}),(0,R.jsxs)(`a`,{href:`https://github.com/yoshiko-pg/difit`,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-github-text-secondary hover:text-github-text-primary transition-colors`,title:`View on GitHub`,children:[(0,R.jsx)(`span`,{className:`text-sm`,children:`Star on GitHub`}),(0,R.jsx)(mb,{style:{height:`18px`,width:`18px`}})]})]})]})}),!pe&&(0,R.jsx)(`div`,{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${x?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:y?`4px`:`0px`},onMouseDown:mt,title:`Drag to resize file list`}),(0,R.jsx)(`main`,{ref:P,className:`flex-1 overflow-y-auto ${Oe?`pb-16`:``}`,children:e.files.map((t,r)=>{let a=De.get(t.path)??dS,o=uS(Je,n,t.path)??fS,s=Me.has(t.path);return(0,R.jsx)(`div`,{id:qx(t.path),"data-file-path":t.path,"data-rendered":s?`true`:`false`,ref:e=>Fe(t.path,e),className:`mb-6`,children:s?(0,R.jsx)(ub,{file:t,threads:a,showAuthorBadges:Ee,diffMode:i,reviewedFiles:V,onToggleReviewed:Ie,collapsedFiles:j,onToggleCollapsed:Le,onToggleAllCollapsed:Re,onAddComment:Dt,onGenerateThreadPrompt:ft,onRemoveThread:ve,onReplyToThread:At,onRemoveMessage:ye,onUpdateMessage:be,onOpenInEditor:Ft?Mt:void 0,syntaxTheme:de.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:it?.fileIndex===r?it:null,fileIndex:r,onLineClick:ut,commentTrigger:Qe?.fileIndex===r?Qe:null,onCommentTriggerHandled:dt,mergedChunks:o,expandLines:Ve,expandAllBetweenChunks:He,prefetchFileContent:Ue,isExpandLoading:Be}):(0,R.jsx)(`div`,{className:`bg-github-bg-secondary border border-github-border rounded-md px-4 py-3`,children:(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-github-text-muted`,children:`Deferred Rendering`}),(0,R.jsx)(`div`,{className:`text-sm font-mono text-github-text-primary truncate`,children:t.path})]}),(0,R.jsx)(`button`,{type:`button`,onClick:()=>Ne(t.path),className:`px-3 py-1.5 text-xs rounded border border-github-border text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary`,children:`Load now`})]})})},t.path)})})]}),Oe&&(0,R.jsx)(`div`,{className:`fixed bottom-0 left-0 right-0 z-20 bg-github-bg-secondary border-t border-github-border px-4 py-2 flex justify-end`,children:(0,R.jsx)(Et,{commentsCount:he.length,isCopiedAll:p,onCopyAll:kt,onDeleteAll:xe,onViewAll:()=>O(!0),direction:`up`,compact:!0})}),_&&(0,R.jsx)(Ub,{isOpen:_,onClose:()=>v(!1),settings:de,onSettingsChange:fe}),(0,R.jsx)(hb,{isOpen:at,onClose:()=>ot(!1)}),(0,R.jsx)(br,{isOpen:D,onClose:()=>O(!1),onNavigate:jt,comments:Te,showAuthorBadges:Ee,onRemoveThread:ve,onGenerateThreadPrompt:ft,onReplyToThread:At,onRemoveMessage:ye,onUpdateMessage:be,syntaxTheme:de.syntaxTheme})]})})}var xS=document.getElementById(`root`);if(!xS)throw Error(`Root element not found`);te.createRoot(xS).render((0,R.jsx)(L.StrictMode,{children:(0,R.jsx)(Te,{initiallyActiveScopes:[`navigation`],children:(0,R.jsx)(bS,{})})}));export{u as a,c as i,s as n,f as o,o as r,d as s,Hn as t};